IB/ipath: enable GPIO interrupt on HT-460

This is required for even semi-decent performance on OpenIB.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

authored by Bryan O'Sullivan and committed by Roland Dreier f2080fa3 b0ff7c20

+25 -8
+3 -4
drivers/infiniband/hw/ipath/ipath_eeprom.c
··· 505 * ipath_get_guid - get the GUID from the i2c device 506 * @dd: the infinipath device 507 * 508 - * When we add the multi-chip support, we will probably have to add 509 - * the ability to use the number of guids field, and get the guid from 510 - * the first chip's flash, to use for all of them. 511 */ 512 - void ipath_get_guid(struct ipath_devdata *dd) 513 { 514 void *buf; 515 struct ipath_flash *ifp;
··· 505 * ipath_get_guid - get the GUID from the i2c device 506 * @dd: the infinipath device 507 * 508 + * We have the capability to use the ipath_nguid field, and get 509 + * the guid from the first chip's flash, to use for all of them. 510 */ 511 + void ipath_get_eeprom_info(struct ipath_devdata *dd) 512 { 513 void *buf; 514 struct ipath_flash *ifp;
+19 -2
drivers/infiniband/hw/ipath/ipath_ht400.c
··· 607 case 4: /* Ponderosa is one of the bringup boards */ 608 n = "Ponderosa"; 609 break; 610 - case 5: /* HT-460 original production board */ 611 n = "InfiniPath_HT-460"; 612 break; 613 case 6: ··· 647 if (n) 648 snprintf(name, namelen, "%s", n); 649 650 - if (dd->ipath_majrev != 3 || dd->ipath_minrev != 2) { 651 /* 652 * This version of the driver only supports the HT-400 653 * Rev 3.2 ··· 1525 */ 1526 ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, 1527 INFINIPATH_S_ABORT); 1528 return 0; 1529 } 1530
··· 607 case 4: /* Ponderosa is one of the bringup boards */ 608 n = "Ponderosa"; 609 break; 610 + case 5: 611 + /* 612 + * HT-460 original production board; two production levels, with 613 + * different serial number ranges. See ipath_ht_early_init() for 614 + * case where we enable IPATH_GPIO_INTR for later serial # range. 615 + */ 616 n = "InfiniPath_HT-460"; 617 break; 618 case 6: ··· 642 if (n) 643 snprintf(name, namelen, "%s", n); 644 645 + if (dd->ipath_majrev != 3 || (dd->ipath_minrev < 2 || dd->ipath_minrev > 3)) { 646 /* 647 * This version of the driver only supports the HT-400 648 * Rev 3.2 ··· 1520 */ 1521 ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, 1522 INFINIPATH_S_ABORT); 1523 + 1524 + ipath_get_eeprom_info(dd); 1525 + if(dd->ipath_boardrev == 5 && dd->ipath_serial[0] == '1' && 1526 + dd->ipath_serial[1] == '2' && dd->ipath_serial[2] == '8') { 1527 + /* 1528 + * Later production HT-460 has same changes as HT-465, so 1529 + * can use GPIO interrupts. They have serial #'s starting 1530 + * with 128, rather than 112. 1531 + */ 1532 + dd->ipath_flags |= IPATH_GPIO_INTR; 1533 + dd->ipath_flags &= ~IPATH_POLL_RX_INTR; 1534 + } 1535 return 0; 1536 } 1537
-1
drivers/infiniband/hw/ipath/ipath_init_chip.c
··· 879 880 done: 881 if (!ret) { 882 - ipath_get_guid(dd); 883 *dd->ipath_statusp |= IPATH_STATUS_CHIP_PRESENT; 884 if (!dd->ipath_f_intrsetup(dd)) { 885 /* now we can enable all interrupts from the chip */
··· 879 880 done: 881 if (!ret) { 882 *dd->ipath_statusp |= IPATH_STATUS_CHIP_PRESENT; 883 if (!dd->ipath_f_intrsetup(dd)) { 884 /* now we can enable all interrupts from the chip */
+1 -1
drivers/infiniband/hw/ipath/ipath_kernel.h
··· 650 void ipath_init_pe800_funcs(struct ipath_devdata *); 651 /* init HT-400-specific func */ 652 void ipath_init_ht400_funcs(struct ipath_devdata *); 653 - void ipath_get_guid(struct ipath_devdata *); 654 u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg); 655 656 /*
··· 650 void ipath_init_pe800_funcs(struct ipath_devdata *); 651 /* init HT-400-specific func */ 652 void ipath_init_ht400_funcs(struct ipath_devdata *); 653 + void ipath_get_eeprom_info(struct ipath_devdata *); 654 u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg); 655 656 /*
+2
drivers/infiniband/hw/ipath/ipath_pe800.c
··· 1180 */ 1181 dd->ipath_rhdrhead_intr_off = 1ULL<<32; 1182 1183 return 0; 1184 } 1185
··· 1180 */ 1181 dd->ipath_rhdrhead_intr_off = 1ULL<<32; 1182 1183 + ipath_get_eeprom_info(dd); 1184 + 1185 return 0; 1186 } 1187