summaryrefslogtreecommitdiff
path: root/drivers/net/ixgbe
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2010-11-17 06:27:13 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-11-17 06:27:13 +0300
commita41c059741570779c0254a3a1aa4da3baa463d7c (patch)
tree5894b94633fc3e99b1a22756c33aba6da8eb2889 /drivers/net/ixgbe
parentc84d324c770dc81acebc1042163da33c8ded2364 (diff)
downloadlinux-a41c059741570779c0254a3a1aa4da3baa463d7c.tar.xz
ixgbe: avoid doing FCoE DDP when adapter is DOWN or RESETTING
There is no point to allow incoming DDP requests from the upper layer stack if the adapter is going down or being reset. Signed-off-by: Yi Zou <yi.zou@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r--drivers/net/ixgbe/ixgbe_fcoe.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c
index 05efa6a8ce8e..07346b8ebb04 100644
--- a/drivers/net/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ixgbe/ixgbe_fcoe.c
@@ -168,6 +168,11 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid,
return 0;
}
+ /* no DDP if we are already down or resetting */
+ if (test_bit(__IXGBE_DOWN, &adapter->state) ||
+ test_bit(__IXGBE_RESETTING, &adapter->state))
+ return 0;
+
fcoe = &adapter->fcoe;
if (!fcoe->pool) {
e_warn(drv, "xid=0x%x no ddp pool for fcoe\n", xid);