ixgbe: avoid doing FCoE DDP when adapter is DOWN or RESETTING
authorYi Zou <yi.zou@intel.com>
Wed, 17 Nov 2010 03:27:13 +0000 (19:27 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 17 Nov 2010 03:27:13 +0000 (19:27 -0800)
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>
drivers/net/ixgbe/ixgbe_fcoe.c

index 05efa6a8ce8e080c6cea2d85e31bcfd09728e8dd..07346b8ebb044e46b143038a92cb9355ec680225 100644 (file)
@@ -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);