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 505 * ipath_get_guid - get the GUID from the i2c device 506 506 * @dd: the infinipath device 507 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. 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. 511 510 */ 512 - void ipath_get_guid(struct ipath_devdata *dd) 511 + void ipath_get_eeprom_info(struct ipath_devdata *dd) 513 512 { 514 513 void *buf; 515 514 struct ipath_flash *ifp;
+19 -2
drivers/infiniband/hw/ipath/ipath_ht400.c
··· 607 607 case 4: /* Ponderosa is one of the bringup boards */ 608 608 n = "Ponderosa"; 609 609 break; 610 - case 5: /* HT-460 original production board */ 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 + */ 611 616 n = "InfiniPath_HT-460"; 612 617 break; 613 618 case 6: ··· 647 642 if (n) 648 643 snprintf(name, namelen, "%s", n); 649 644 650 - if (dd->ipath_majrev != 3 || dd->ipath_minrev != 2) { 645 + if (dd->ipath_majrev != 3 || (dd->ipath_minrev < 2 || dd->ipath_minrev > 3)) { 651 646 /* 652 647 * This version of the driver only supports the HT-400 653 648 * Rev 3.2 ··· 1525 1520 */ 1526 1521 ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, 1527 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 + } 1528 1535 return 0; 1529 1536 } 1530 1537
-1
drivers/infiniband/hw/ipath/ipath_init_chip.c
··· 879 879 880 880 done: 881 881 if (!ret) { 882 - ipath_get_guid(dd); 883 882 *dd->ipath_statusp |= IPATH_STATUS_CHIP_PRESENT; 884 883 if (!dd->ipath_f_intrsetup(dd)) { 885 884 /* now we can enable all interrupts from the chip */
+1 -1
drivers/infiniband/hw/ipath/ipath_kernel.h
··· 650 650 void ipath_init_pe800_funcs(struct ipath_devdata *); 651 651 /* init HT-400-specific func */ 652 652 void ipath_init_ht400_funcs(struct ipath_devdata *); 653 - void ipath_get_guid(struct ipath_devdata *); 653 + void ipath_get_eeprom_info(struct ipath_devdata *); 654 654 u64 ipath_snap_cntr(struct ipath_devdata *, ipath_creg); 655 655 656 656 /*
+2
drivers/infiniband/hw/ipath/ipath_pe800.c
··· 1180 1180 */ 1181 1181 dd->ipath_rhdrhead_intr_off = 1ULL<<32; 1182 1182 1183 + ipath_get_eeprom_info(dd); 1184 + 1183 1185 return 0; 1184 1186 } 1185 1187