From: Auke Kok Date: Mon, 11 Feb 2008 17:26:01 +0000 (-0800) Subject: ixgbe: Disallow device reset during ethtool test X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4bebfaa56b72c94fe4997240ee73ad1c1fcf96c9;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git ixgbe: Disallow device reset during ethtool test Signed-off-by: Auke Kok Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 576fb51eb74..a4aeaec1b29 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -1942,6 +1942,10 @@ static int ixgbe_open(struct net_device *netdev) int err; u32 num_rx_queues = adapter->num_rx_queues; + /* disallow open during test */ + if (test_bit(__IXGBE_TESTING, &adapter->state)) + return -EBUSY; + try_intr_reinit: /* allocate transmit descriptors */ err = ixgbe_setup_all_tx_resources(adapter);