aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2009-09-21 11:39:37 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-22 17:47:21 -0400
commit6ef57a0ea77e7bf4123a06da895a0e26312b5737 (patch)
treee4af2f05bd7aa7dca4195a65d88ed4db52fac0db /drivers
parent68f40152747da28ae0de21633c9062671448b66c (diff)
cnic: Shutdown iSCSI ring during uio_close.
The iSCSI ring should be shutdown during uio_close instead of uio_open for proper operations. This fixes the problem of the ring getting stuck intermittently. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/cnic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index d45eacb76702..211c8e9182fc 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -85,8 +85,6 @@ static int cnic_uio_open(struct uio_info *uinfo, struct inode *inode)
85 85
86 cp->uio_dev = iminor(inode); 86 cp->uio_dev = iminor(inode);
87 87
88 cnic_shutdown_bnx2_rx_ring(dev);
89
90 cnic_init_bnx2_tx_ring(dev); 88 cnic_init_bnx2_tx_ring(dev);
91 cnic_init_bnx2_rx_ring(dev); 89 cnic_init_bnx2_rx_ring(dev);
92 90
@@ -98,6 +96,8 @@ static int cnic_uio_close(struct uio_info *uinfo, struct inode *inode)
98 struct cnic_dev *dev = uinfo->priv; 96 struct cnic_dev *dev = uinfo->priv;
99 struct cnic_local *cp = dev->cnic_priv; 97 struct cnic_local *cp = dev->cnic_priv;
100 98
99 cnic_shutdown_bnx2_rx_ring(dev);
100
101 cp->uio_dev = -1; 101 cp->uio_dev = -1;
102 return 0; 102 return 0;
103} 103}