diff options
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_iba7322.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_iba7322.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index 50cceb3ab885..b01809a82cb0 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c | |||
@@ -623,7 +623,6 @@ struct qib_chippport_specific { | |||
623 | u8 ibmalfusesnap; | 623 | u8 ibmalfusesnap; |
624 | struct qib_qsfp_data qsfp_data; | 624 | struct qib_qsfp_data qsfp_data; |
625 | char epmsgbuf[192]; /* for port error interrupt msg buffer */ | 625 | char epmsgbuf[192]; /* for port error interrupt msg buffer */ |
626 | u8 bounced; | ||
627 | }; | 626 | }; |
628 | 627 | ||
629 | static struct { | 628 | static struct { |
@@ -1881,23 +1880,7 @@ static noinline void handle_7322_p_errors(struct qib_pportdata *ppd) | |||
1881 | IB_PHYSPORTSTATE_DISABLED) | 1880 | IB_PHYSPORTSTATE_DISABLED) |
1882 | qib_set_ib_7322_lstate(ppd, 0, | 1881 | qib_set_ib_7322_lstate(ppd, 0, |
1883 | QLOGIC_IB_IBCC_LINKINITCMD_DISABLE); | 1882 | QLOGIC_IB_IBCC_LINKINITCMD_DISABLE); |
1884 | else { | 1883 | else |
1885 | u32 lstate; | ||
1886 | /* | ||
1887 | * We need the current logical link state before | ||
1888 | * lflags are set in handle_e_ibstatuschanged. | ||
1889 | */ | ||
1890 | lstate = qib_7322_iblink_state(ibcs); | ||
1891 | |||
1892 | if (IS_QMH(dd) && !ppd->cpspec->bounced && | ||
1893 | ltstate == IB_PHYSPORTSTATE_LINKUP && | ||
1894 | (lstate >= IB_PORT_INIT && | ||
1895 | lstate <= IB_PORT_ACTIVE)) { | ||
1896 | ppd->cpspec->bounced = 1; | ||
1897 | qib_7322_set_ib_cfg(ppd, QIB_IB_CFG_LSTATE, | ||
1898 | IB_LINKCMD_DOWN | IB_LINKINITCMD_POLL); | ||
1899 | } | ||
1900 | |||
1901 | /* | 1884 | /* |
1902 | * Since going into a recovery state causes the link | 1885 | * Since going into a recovery state causes the link |
1903 | * state to go down and since recovery is transitory, | 1886 | * state to go down and since recovery is transitory, |
@@ -1911,7 +1894,6 @@ static noinline void handle_7322_p_errors(struct qib_pportdata *ppd) | |||
1911 | ltstate != IB_PHYSPORTSTATE_RECOVERY_WAITRMT && | 1894 | ltstate != IB_PHYSPORTSTATE_RECOVERY_WAITRMT && |
1912 | ltstate != IB_PHYSPORTSTATE_RECOVERY_IDLE) | 1895 | ltstate != IB_PHYSPORTSTATE_RECOVERY_IDLE) |
1913 | qib_handle_e_ibstatuschanged(ppd, ibcs); | 1896 | qib_handle_e_ibstatuschanged(ppd, ibcs); |
1914 | } | ||
1915 | } | 1897 | } |
1916 | if (*msg && iserr) | 1898 | if (*msg && iserr) |
1917 | qib_dev_porterr(dd, ppd->port, "%s error\n", msg); | 1899 | qib_dev_porterr(dd, ppd->port, "%s error\n", msg); |
@@ -2381,6 +2363,11 @@ static int qib_7322_bringup_serdes(struct qib_pportdata *ppd) | |||
2381 | qib_write_kreg_port(ppd, krp_rcvctrl, ppd->p_rcvctrl); | 2363 | qib_write_kreg_port(ppd, krp_rcvctrl, ppd->p_rcvctrl); |
2382 | spin_unlock_irqrestore(&dd->cspec->rcvmod_lock, flags); | 2364 | spin_unlock_irqrestore(&dd->cspec->rcvmod_lock, flags); |
2383 | 2365 | ||
2366 | /* Hold the link state machine for mezz boards */ | ||
2367 | if (IS_QMH(dd) || IS_QME(dd)) | ||
2368 | qib_set_ib_7322_lstate(ppd, 0, | ||
2369 | QLOGIC_IB_IBCC_LINKINITCMD_DISABLE); | ||
2370 | |||
2384 | /* Also enable IBSTATUSCHG interrupt. */ | 2371 | /* Also enable IBSTATUSCHG interrupt. */ |
2385 | val = qib_read_kreg_port(ppd, krp_errmask); | 2372 | val = qib_read_kreg_port(ppd, krp_errmask); |
2386 | qib_write_kreg_port(ppd, krp_errmask, | 2373 | qib_write_kreg_port(ppd, krp_errmask, |
@@ -5702,6 +5689,11 @@ static void set_no_qsfp_atten(struct qib_devdata *dd, int change) | |||
5702 | ppd->cpspec->h1_val = h1; | 5689 | ppd->cpspec->h1_val = h1; |
5703 | /* now change the IBC and serdes, overriding generic */ | 5690 | /* now change the IBC and serdes, overriding generic */ |
5704 | init_txdds_table(ppd, 1); | 5691 | init_txdds_table(ppd, 1); |
5692 | /* Re-enable the physical state machine on mezz boards | ||
5693 | * now that the correct settings have been set. */ | ||
5694 | if (IS_QMH(dd) || IS_QME(dd)) | ||
5695 | qib_set_ib_7322_lstate(ppd, 0, | ||
5696 | QLOGIC_IB_IBCC_LINKINITCMD_SLEEP); | ||
5705 | any++; | 5697 | any++; |
5706 | } | 5698 | } |
5707 | if (*nxt == '\n') | 5699 | if (*nxt == '\n') |