summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ipath/ipath_stats.c
diff options
context:
space:
mode:
authorMichael Albaugh <Michael.Albaugh@QLogic.com>2007-03-15 14:45:08 -0700
committerRoland Dreier <rolandd@cisco.com>2007-04-18 20:20:58 -0700
commit27b044a815df7d4530bc68560796680ed588070c (patch)
treee84d4fe91961ae24ac2d72f12eac368b9b7c29e8 /drivers/infiniband/hw/ipath/ipath_stats.c
parent9783ab405844202b452ac673677e6c8f8c9a6a99 (diff)
IB/ipath: Fix driver crash (in interrupt or during unload) after chip reset
Re-init of the kernel structures after a chip reset was leaving the portdata structure for port zero in an inconsistent state, and a pointer to it either stale (in re-init code) or NULL (in devdata) Fixing the order of operations on this struct, and the condition for interrupt access, prevents the crashes. 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_stats.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_stats.c b/drivers/infiniband/hw/ipath/ipath_stats.c
index a627342a969c..9307f7187ca5 100644
--- a/drivers/infiniband/hw/ipath/ipath_stats.c
+++ b/drivers/infiniband/hw/ipath/ipath_stats.c
@@ -207,7 +207,7 @@ void ipath_get_faststats(unsigned long opaque)
* don't access the chip while running diags, or memory diags can
* fail
*/
- if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_PRESENT) ||
+ if (!dd->ipath_kregbase || !(dd->ipath_flags & IPATH_INITTED) ||
ipath_diag_inuse)
/* but re-arm the timer, for diags case; won't hurt other */
goto done;