From: Yi Zou Date: Wed, 17 Nov 2010 03:27:13 +0000 (-0800) Subject: ixgbe: avoid doing FCoE DDP when adapter is DOWN or RESETTING X-Git-Tag: firefly_0821_release~7613^2~3122^2~547^2~13 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a41c059741570779c0254a3a1aa4da3baa463d7c;p=firefly-linux-kernel-4.4.55.git 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 Tested-by: Ross Brattain Signed-off-by: Jeff Kirsher --- 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);