diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2006-09-28 12:00:11 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-09-28 14:16:49 -0400 |
commit | f62fe77ad26b9c89c2028d96709f0f28793fe6cd (patch) | |
tree | c84a4b8b90219a5385299bd9dcd5b994cd1ff531 /drivers/infiniband/hw/ipath/ipath_iba6110.c | |
parent | 5659416207a9bcf35a646c7b798b290953e4891c (diff) |
IB/ipath: Support multiple simultaneous devices of different types
Prior to this change, the driver was not able to support a HT and PCIE
card simultaneously present in the same machine.
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_iba6110.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_iba6110.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_iba6110.c b/drivers/infiniband/hw/ipath/ipath_iba6110.c index 87eb99af5e19..695f77402515 100644 --- a/drivers/infiniband/hw/ipath/ipath_iba6110.c +++ b/drivers/infiniband/hw/ipath/ipath_iba6110.c | |||
@@ -252,8 +252,8 @@ static const struct ipath_cregs ipath_ht_cregs = { | |||
252 | }; | 252 | }; |
253 | 253 | ||
254 | /* kr_intstatus, kr_intclear, kr_intmask bits */ | 254 | /* kr_intstatus, kr_intclear, kr_intmask bits */ |
255 | #define INFINIPATH_I_RCVURG_MASK 0x1FF | 255 | #define INFINIPATH_I_RCVURG_MASK ((1U<<9)-1) |
256 | #define INFINIPATH_I_RCVAVAIL_MASK 0x1FF | 256 | #define INFINIPATH_I_RCVAVAIL_MASK ((1U<<9)-1) |
257 | 257 | ||
258 | /* kr_hwerrclear, kr_hwerrmask, kr_hwerrstatus, bits */ | 258 | /* kr_hwerrclear, kr_hwerrmask, kr_hwerrstatus, bits */ |
259 | #define INFINIPATH_HWE_HTCMEMPARITYERR_SHIFT 0 | 259 | #define INFINIPATH_HWE_HTCMEMPARITYERR_SHIFT 0 |
@@ -457,10 +457,10 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg, | |||
457 | "(cleared)\n", (unsigned long long) hwerrs); | 457 | "(cleared)\n", (unsigned long long) hwerrs); |
458 | dd->ipath_lasthwerror |= hwerrs; | 458 | dd->ipath_lasthwerror |= hwerrs; |
459 | 459 | ||
460 | if (hwerrs & ~infinipath_hwe_bitsextant) | 460 | if (hwerrs & ~dd->ipath_hwe_bitsextant) |
461 | ipath_dev_err(dd, "hwerror interrupt with unknown errors " | 461 | ipath_dev_err(dd, "hwerror interrupt with unknown errors " |
462 | "%llx set\n", (unsigned long long) | 462 | "%llx set\n", (unsigned long long) |
463 | (hwerrs & ~infinipath_hwe_bitsextant)); | 463 | (hwerrs & ~dd->ipath_hwe_bitsextant)); |
464 | 464 | ||
465 | ctrl = ipath_read_kreg32(dd, dd->ipath_kregs->kr_control); | 465 | ctrl = ipath_read_kreg32(dd, dd->ipath_kregs->kr_control); |
466 | if (ctrl & INFINIPATH_C_FREEZEMODE) { | 466 | if (ctrl & INFINIPATH_C_FREEZEMODE) { |
@@ -1058,21 +1058,21 @@ static void ipath_setup_ht_setextled(struct ipath_devdata *dd, | |||
1058 | ipath_write_kreg(dd, dd->ipath_kregs->kr_extctrl, extctl); | 1058 | ipath_write_kreg(dd, dd->ipath_kregs->kr_extctrl, extctl); |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | static void ipath_init_ht_variables(void) | 1061 | static void ipath_init_ht_variables(struct ipath_devdata *dd) |
1062 | { | 1062 | { |
1063 | ipath_gpio_sda_num = _IPATH_GPIO_SDA_NUM; | 1063 | dd->ipath_gpio_sda_num = _IPATH_GPIO_SDA_NUM; |
1064 | ipath_gpio_scl_num = _IPATH_GPIO_SCL_NUM; | 1064 | dd->ipath_gpio_scl_num = _IPATH_GPIO_SCL_NUM; |
1065 | ipath_gpio_sda = IPATH_GPIO_SDA; | 1065 | dd->ipath_gpio_sda = IPATH_GPIO_SDA; |
1066 | ipath_gpio_scl = IPATH_GPIO_SCL; | 1066 | dd->ipath_gpio_scl = IPATH_GPIO_SCL; |
1067 | 1067 | ||
1068 | infinipath_i_bitsextant = | 1068 | dd->ipath_i_bitsextant = |
1069 | (INFINIPATH_I_RCVURG_MASK << INFINIPATH_I_RCVURG_SHIFT) | | 1069 | (INFINIPATH_I_RCVURG_MASK << INFINIPATH_I_RCVURG_SHIFT) | |
1070 | (INFINIPATH_I_RCVAVAIL_MASK << | 1070 | (INFINIPATH_I_RCVAVAIL_MASK << |
1071 | INFINIPATH_I_RCVAVAIL_SHIFT) | | 1071 | INFINIPATH_I_RCVAVAIL_SHIFT) | |
1072 | INFINIPATH_I_ERROR | INFINIPATH_I_SPIOSENT | | 1072 | INFINIPATH_I_ERROR | INFINIPATH_I_SPIOSENT | |
1073 | INFINIPATH_I_SPIOBUFAVAIL | INFINIPATH_I_GPIO; | 1073 | INFINIPATH_I_SPIOBUFAVAIL | INFINIPATH_I_GPIO; |
1074 | 1074 | ||
1075 | infinipath_e_bitsextant = | 1075 | dd->ipath_e_bitsextant = |
1076 | INFINIPATH_E_RFORMATERR | INFINIPATH_E_RVCRC | | 1076 | INFINIPATH_E_RFORMATERR | INFINIPATH_E_RVCRC | |
1077 | INFINIPATH_E_RICRC | INFINIPATH_E_RMINPKTLEN | | 1077 | INFINIPATH_E_RICRC | INFINIPATH_E_RMINPKTLEN | |
1078 | INFINIPATH_E_RMAXPKTLEN | INFINIPATH_E_RLONGPKTLEN | | 1078 | INFINIPATH_E_RMAXPKTLEN | INFINIPATH_E_RLONGPKTLEN | |
@@ -1090,7 +1090,7 @@ static void ipath_init_ht_variables(void) | |||
1090 | INFINIPATH_E_INVALIDADDR | INFINIPATH_E_RESET | | 1090 | INFINIPATH_E_INVALIDADDR | INFINIPATH_E_RESET | |
1091 | INFINIPATH_E_HARDWARE; | 1091 | INFINIPATH_E_HARDWARE; |
1092 | 1092 | ||
1093 | infinipath_hwe_bitsextant = | 1093 | dd->ipath_hwe_bitsextant = |
1094 | (INFINIPATH_HWE_HTCMEMPARITYERR_MASK << | 1094 | (INFINIPATH_HWE_HTCMEMPARITYERR_MASK << |
1095 | INFINIPATH_HWE_HTCMEMPARITYERR_SHIFT) | | 1095 | INFINIPATH_HWE_HTCMEMPARITYERR_SHIFT) | |
1096 | (INFINIPATH_HWE_TXEMEMPARITYERR_MASK << | 1096 | (INFINIPATH_HWE_TXEMEMPARITYERR_MASK << |
@@ -1119,8 +1119,8 @@ static void ipath_init_ht_variables(void) | |||
1119 | INFINIPATH_HWE_IBCBUSTOSPCPARITYERR | | 1119 | INFINIPATH_HWE_IBCBUSTOSPCPARITYERR | |
1120 | INFINIPATH_HWE_IBCBUSFRSPCPARITYERR; | 1120 | INFINIPATH_HWE_IBCBUSFRSPCPARITYERR; |
1121 | 1121 | ||
1122 | infinipath_i_rcvavail_mask = INFINIPATH_I_RCVAVAIL_MASK; | 1122 | dd->ipath_i_rcvavail_mask = INFINIPATH_I_RCVAVAIL_MASK; |
1123 | infinipath_i_rcvurg_mask = INFINIPATH_I_RCVURG_MASK; | 1123 | dd->ipath_i_rcvurg_mask = INFINIPATH_I_RCVURG_MASK; |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | /** | 1126 | /** |
@@ -1585,5 +1585,5 @@ void ipath_init_iba6110_funcs(struct ipath_devdata *dd) | |||
1585 | * do very early init that is needed before ipath_f_bus is | 1585 | * do very early init that is needed before ipath_f_bus is |
1586 | * called | 1586 | * called |
1587 | */ | 1587 | */ |
1588 | ipath_init_ht_variables(); | 1588 | ipath_init_ht_variables(dd); |
1589 | } | 1589 | } |