diff options
author | Arthur Jones <arthur.jones@qlogic.com> | 2008-04-17 00:09:31 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:09:31 -0400 |
commit | bb9171448deb1f7ece27674e2e431e4f267fd453 (patch) | |
tree | b042155205bbbe3deb317d65a53a4180fb512435 /drivers/infiniband/hw/ipath/ipath_intr.c | |
parent | 8babfa4fb9bfe93d57c700410a4f8be9fbd3edd7 (diff) |
IB/ipath: Misc changes to prepare for IB7220 introduction
The patch adds a number of minor changes to support newer HCAs:
- New send buffer control bits
- New error condition bits
- Locking and initialization changes
- More send buffers
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_intr.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_intr.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c index 3bad601fcc90..90b972f6a840 100644 --- a/drivers/infiniband/hw/ipath/ipath_intr.c +++ b/drivers/infiniband/hw/ipath/ipath_intr.c | |||
@@ -73,7 +73,7 @@ static void ipath_clrpiobuf(struct ipath_devdata *dd, u32 pnum) | |||
73 | * If rewrite is true, and bits are set in the sendbufferror registers, | 73 | * If rewrite is true, and bits are set in the sendbufferror registers, |
74 | * we'll write to the buffer, for error recovery on parity errors. | 74 | * we'll write to the buffer, for error recovery on parity errors. |
75 | */ | 75 | */ |
76 | static void ipath_disarm_senderrbufs(struct ipath_devdata *dd, int rewrite) | 76 | void ipath_disarm_senderrbufs(struct ipath_devdata *dd, int rewrite) |
77 | { | 77 | { |
78 | u32 piobcnt; | 78 | u32 piobcnt; |
79 | unsigned long sbuf[4]; | 79 | unsigned long sbuf[4]; |
@@ -87,12 +87,14 @@ static void ipath_disarm_senderrbufs(struct ipath_devdata *dd, int rewrite) | |||
87 | dd, dd->ipath_kregs->kr_sendbuffererror); | 87 | dd, dd->ipath_kregs->kr_sendbuffererror); |
88 | sbuf[1] = ipath_read_kreg64( | 88 | sbuf[1] = ipath_read_kreg64( |
89 | dd, dd->ipath_kregs->kr_sendbuffererror + 1); | 89 | dd, dd->ipath_kregs->kr_sendbuffererror + 1); |
90 | if (piobcnt > 128) { | 90 | if (piobcnt > 128) |
91 | sbuf[2] = ipath_read_kreg64( | 91 | sbuf[2] = ipath_read_kreg64( |
92 | dd, dd->ipath_kregs->kr_sendbuffererror + 2); | 92 | dd, dd->ipath_kregs->kr_sendbuffererror + 2); |
93 | if (piobcnt > 192) | ||
93 | sbuf[3] = ipath_read_kreg64( | 94 | sbuf[3] = ipath_read_kreg64( |
94 | dd, dd->ipath_kregs->kr_sendbuffererror + 3); | 95 | dd, dd->ipath_kregs->kr_sendbuffererror + 3); |
95 | } | 96 | else |
97 | sbuf[3] = 0; | ||
96 | 98 | ||
97 | if (sbuf[0] || sbuf[1] || (piobcnt > 128 && (sbuf[2] || sbuf[3]))) { | 99 | if (sbuf[0] || sbuf[1] || (piobcnt > 128 && (sbuf[2] || sbuf[3]))) { |
98 | int i; | 100 | int i; |
@@ -365,7 +367,8 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd, | |||
365 | */ | 367 | */ |
366 | if (lastlts == INFINIPATH_IBCS_LT_STATE_POLLACTIVE || | 368 | if (lastlts == INFINIPATH_IBCS_LT_STATE_POLLACTIVE || |
367 | lastlts == INFINIPATH_IBCS_LT_STATE_POLLQUIET) { | 369 | lastlts == INFINIPATH_IBCS_LT_STATE_POLLQUIET) { |
368 | if (++dd->ipath_ibpollcnt == 40) { | 370 | if (!(dd->ipath_flags & IPATH_IB_AUTONEG_INPROG) && |
371 | (++dd->ipath_ibpollcnt == 40)) { | ||
369 | dd->ipath_flags |= IPATH_NOCABLE; | 372 | dd->ipath_flags |= IPATH_NOCABLE; |
370 | *dd->ipath_statusp |= | 373 | *dd->ipath_statusp |= |
371 | IPATH_STATUS_IB_NOCABLE; | 374 | IPATH_STATUS_IB_NOCABLE; |