diff options
author | Michael Chan <mchan@broadcom.com> | 2009-09-21 17:39:37 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-22 23:47:21 +0200 |
commit | 6ef57a0ea77e7bf4123a06da895a0e26312b5737 (patch) | |
tree | e4af2f05bd7aa7dca4195a65d88ed4db52fac0db /drivers/net/cnic.c | |
parent | at91_can: add driver for Atmel's CAN controller on AT91SAM9263 (diff) | |
download | linux-6ef57a0ea77e7bf4123a06da895a0e26312b5737.tar.xz linux-6ef57a0ea77e7bf4123a06da895a0e26312b5737.zip |
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/net/cnic.c')
-rw-r--r-- | drivers/net/cnic.c | 4 |
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) cp->uio_dev = iminor(inode); - cnic_shutdown_bnx2_rx_ring(dev); - cnic_init_bnx2_tx_ring(dev); cnic_init_bnx2_rx_ring(dev); @@ -98,6 +96,8 @@ static int cnic_uio_close(struct uio_info *uinfo, struct inode *inode) struct cnic_dev *dev = uinfo->priv; struct cnic_local *cp = dev->cnic_priv; + cnic_shutdown_bnx2_rx_ring(dev); + cp->uio_dev = -1; return 0; } |