Skip to content

Commit

Permalink
cnic: Shutdown iSCSI ring during uio_close.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Chan authored and David S. Miller committed Sep 22, 2009
1 parent 68f4015 commit 6ef57a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
}
Expand Down

0 comments on commit 6ef57a0

Please sign in to comment.