Skip to content

Commit

Permalink
vxge: check for card status before continuing in device close
Browse files Browse the repository at this point in the history
- Fixed the crash in rmmod after vpath open failed when trying to change mtu.
We should check for card status before continuing in device close.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sreenivasa Honnur authored and David S. Miller committed Jul 6, 2009
1 parent 914d0d7 commit bd9ee68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/vxge/vxge-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2890,6 +2890,9 @@ int do_vxge_close(struct net_device *dev, int do_io)
vdev = (struct vxgedev *)netdev_priv(dev);
hldev = (struct __vxge_hw_device *) pci_get_drvdata(vdev->pdev);

if (unlikely(!is_vxge_card_up(vdev)))
return 0;

/* If vxge_handle_crit_err task is executing,
* wait till it completes. */
while (test_and_set_bit(__VXGE_STATE_RESET_CARD, &vdev->state))
Expand Down

0 comments on commit bd9ee68

Please sign in to comment.