diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-10-08 09:54:41 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-08 22:54:51 -0700 |
commit | 84087f4d482c5d554e1b26a557d424761213e5dc (patch) | |
tree | 8d7058d6008db2814e577caa779533482ee2b635 /drivers/net/qlge/qlge_main.c | |
parent | 76b26694cc9eb8c7ea1004b0601a5953cfa57b89 (diff) | |
download | op-kernel-dev-84087f4d482c5d554e1b26a557d424761213e5dc.zip op-kernel-dev-84087f4d482c5d554e1b26a557d424761213e5dc.tar.gz |
qlge: Fix chip reset process.
Add wait for NIC fifo and MGMNT fifo to empty before applying reset.
Otherwise broken frames can be processed by management processor and
cause it to hang.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge_main.c')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index e1203bf..fe13006b 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -3349,6 +3349,13 @@ static int ql_adapter_reset(struct ql_adapter *qdev) end_jiffies = jiffies + max((unsigned long)1, usecs_to_jiffies(30)); + + /* Stop management traffic. */ + ql_mb_set_mgmnt_traffic_ctl(qdev, MB_SET_MPI_TFK_STOP); + + /* Wait for the NIC and MGMNT FIFOs to empty. */ + ql_wait_fifo_empty(qdev); + ql_write32(qdev, RST_FO, (RST_FO_FR << 16) | RST_FO_FR); do { @@ -3364,6 +3371,8 @@ static int ql_adapter_reset(struct ql_adapter *qdev) status = -ETIMEDOUT; } + /* Resume management traffic. */ + ql_mb_set_mgmnt_traffic_ctl(qdev, MB_SET_MPI_TFK_RESUME); return status; } |