|
@@ -263,8 +263,8 @@ static const struct ipath_cregs ipath_pe_cregs = {
|
|
};
|
|
};
|
|
|
|
|
|
/* kr_intstatus, kr_intclear, kr_intmask bits */
|
|
/* kr_intstatus, kr_intclear, kr_intmask bits */
|
|
-#define INFINIPATH_I_RCVURG_MASK 0x1F
|
|
|
|
-#define INFINIPATH_I_RCVAVAIL_MASK 0x1F
|
|
|
|
|
|
+#define INFINIPATH_I_RCVURG_MASK ((1U<<5)-1)
|
|
|
|
+#define INFINIPATH_I_RCVAVAIL_MASK ((1U<<5)-1)
|
|
|
|
|
|
/* kr_hwerrclear, kr_hwerrmask, kr_hwerrstatus, bits */
|
|
/* kr_hwerrclear, kr_hwerrmask, kr_hwerrstatus, bits */
|
|
#define INFINIPATH_HWE_PCIEMEMPARITYERR_MASK 0x000000000000003fULL
|
|
#define INFINIPATH_HWE_PCIEMEMPARITYERR_MASK 0x000000000000003fULL
|
|
@@ -376,10 +376,10 @@ static void ipath_pe_handle_hwerrors(struct ipath_devdata *dd, char *msg,
|
|
"(cleared)\n", (unsigned long long) hwerrs);
|
|
"(cleared)\n", (unsigned long long) hwerrs);
|
|
dd->ipath_lasthwerror |= hwerrs;
|
|
dd->ipath_lasthwerror |= hwerrs;
|
|
|
|
|
|
- if (hwerrs & ~infinipath_hwe_bitsextant)
|
|
|
|
|
|
+ if (hwerrs & ~dd->ipath_hwe_bitsextant)
|
|
ipath_dev_err(dd, "hwerror interrupt with unknown errors "
|
|
ipath_dev_err(dd, "hwerror interrupt with unknown errors "
|
|
"%llx set\n", (unsigned long long)
|
|
"%llx set\n", (unsigned long long)
|
|
- (hwerrs & ~infinipath_hwe_bitsextant));
|
|
|
|
|
|
+ (hwerrs & ~dd->ipath_hwe_bitsextant));
|
|
|
|
|
|
ctrl = ipath_read_kreg32(dd, dd->ipath_kregs->kr_control);
|
|
ctrl = ipath_read_kreg32(dd, dd->ipath_kregs->kr_control);
|
|
if (ctrl & INFINIPATH_C_FREEZEMODE) {
|
|
if (ctrl & INFINIPATH_C_FREEZEMODE) {
|
|
@@ -865,19 +865,19 @@ static int ipath_setup_pe_config(struct ipath_devdata *dd,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-static void ipath_init_pe_variables(void)
|
|
|
|
|
|
+static void ipath_init_pe_variables(struct ipath_devdata *dd)
|
|
{
|
|
{
|
|
/*
|
|
/*
|
|
* bits for selecting i2c direction and values,
|
|
* bits for selecting i2c direction and values,
|
|
* used for I2C serial flash
|
|
* used for I2C serial flash
|
|
*/
|
|
*/
|
|
- ipath_gpio_sda_num = _IPATH_GPIO_SDA_NUM;
|
|
|
|
- ipath_gpio_scl_num = _IPATH_GPIO_SCL_NUM;
|
|
|
|
- ipath_gpio_sda = IPATH_GPIO_SDA;
|
|
|
|
- ipath_gpio_scl = IPATH_GPIO_SCL;
|
|
|
|
|
|
+ dd->ipath_gpio_sda_num = _IPATH_GPIO_SDA_NUM;
|
|
|
|
+ dd->ipath_gpio_scl_num = _IPATH_GPIO_SCL_NUM;
|
|
|
|
+ dd->ipath_gpio_sda = IPATH_GPIO_SDA;
|
|
|
|
+ dd->ipath_gpio_scl = IPATH_GPIO_SCL;
|
|
|
|
|
|
/* variables for sanity checking interrupt and errors */
|
|
/* variables for sanity checking interrupt and errors */
|
|
- infinipath_hwe_bitsextant =
|
|
|
|
|
|
+ dd->ipath_hwe_bitsextant =
|
|
(INFINIPATH_HWE_RXEMEMPARITYERR_MASK <<
|
|
(INFINIPATH_HWE_RXEMEMPARITYERR_MASK <<
|
|
INFINIPATH_HWE_RXEMEMPARITYERR_SHIFT) |
|
|
INFINIPATH_HWE_RXEMEMPARITYERR_SHIFT) |
|
|
(INFINIPATH_HWE_PCIEMEMPARITYERR_MASK <<
|
|
(INFINIPATH_HWE_PCIEMEMPARITYERR_MASK <<
|
|
@@ -895,13 +895,13 @@ static void ipath_init_pe_variables(void)
|
|
INFINIPATH_HWE_SERDESPLLFAILED |
|
|
INFINIPATH_HWE_SERDESPLLFAILED |
|
|
INFINIPATH_HWE_IBCBUSTOSPCPARITYERR |
|
|
INFINIPATH_HWE_IBCBUSTOSPCPARITYERR |
|
|
INFINIPATH_HWE_IBCBUSFRSPCPARITYERR;
|
|
INFINIPATH_HWE_IBCBUSFRSPCPARITYERR;
|
|
- infinipath_i_bitsextant =
|
|
|
|
|
|
+ dd->ipath_i_bitsextant =
|
|
(INFINIPATH_I_RCVURG_MASK << INFINIPATH_I_RCVURG_SHIFT) |
|
|
(INFINIPATH_I_RCVURG_MASK << INFINIPATH_I_RCVURG_SHIFT) |
|
|
(INFINIPATH_I_RCVAVAIL_MASK <<
|
|
(INFINIPATH_I_RCVAVAIL_MASK <<
|
|
INFINIPATH_I_RCVAVAIL_SHIFT) |
|
|
INFINIPATH_I_RCVAVAIL_SHIFT) |
|
|
INFINIPATH_I_ERROR | INFINIPATH_I_SPIOSENT |
|
|
INFINIPATH_I_ERROR | INFINIPATH_I_SPIOSENT |
|
|
INFINIPATH_I_SPIOBUFAVAIL | INFINIPATH_I_GPIO;
|
|
INFINIPATH_I_SPIOBUFAVAIL | INFINIPATH_I_GPIO;
|
|
- infinipath_e_bitsextant =
|
|
|
|
|
|
+ dd->ipath_e_bitsextant =
|
|
INFINIPATH_E_RFORMATERR | INFINIPATH_E_RVCRC |
|
|
INFINIPATH_E_RFORMATERR | INFINIPATH_E_RVCRC |
|
|
INFINIPATH_E_RICRC | INFINIPATH_E_RMINPKTLEN |
|
|
INFINIPATH_E_RICRC | INFINIPATH_E_RMINPKTLEN |
|
|
INFINIPATH_E_RMAXPKTLEN | INFINIPATH_E_RLONGPKTLEN |
|
|
INFINIPATH_E_RMAXPKTLEN | INFINIPATH_E_RLONGPKTLEN |
|
|
@@ -919,8 +919,8 @@ static void ipath_init_pe_variables(void)
|
|
INFINIPATH_E_INVALIDADDR | INFINIPATH_E_RESET |
|
|
INFINIPATH_E_INVALIDADDR | INFINIPATH_E_RESET |
|
|
INFINIPATH_E_HARDWARE;
|
|
INFINIPATH_E_HARDWARE;
|
|
|
|
|
|
- infinipath_i_rcvavail_mask = INFINIPATH_I_RCVAVAIL_MASK;
|
|
|
|
- infinipath_i_rcvurg_mask = INFINIPATH_I_RCVURG_MASK;
|
|
|
|
|
|
+ dd->ipath_i_rcvavail_mask = INFINIPATH_I_RCVAVAIL_MASK;
|
|
|
|
+ dd->ipath_i_rcvurg_mask = INFINIPATH_I_RCVURG_MASK;
|
|
}
|
|
}
|
|
|
|
|
|
/* setup the MSI stuff again after a reset. I'd like to just call
|
|
/* setup the MSI stuff again after a reset. I'd like to just call
|
|
@@ -1326,6 +1326,6 @@ void ipath_init_iba6120_funcs(struct ipath_devdata *dd)
|
|
dd->ipath_kregs = &ipath_pe_kregs;
|
|
dd->ipath_kregs = &ipath_pe_kregs;
|
|
dd->ipath_cregs = &ipath_pe_cregs;
|
|
dd->ipath_cregs = &ipath_pe_cregs;
|
|
|
|
|
|
- ipath_init_pe_variables();
|
|
|
|
|
|
+ ipath_init_pe_variables(dd);
|
|
}
|
|
}
|
|
|
|
|