lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  2 Apr 2019 16:07:56 +1100
From:   Jon Maxwell <jmaxwell37@...il.com>
To:     davem@...emloft.net, siva.kallam@...adcom.com
Cc:     prashant@...adcom.com, mchan@...adcom.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, jmaxwell@...hat.com
Subject: [net-next] tg3: allow ethtool -p to work for NICs in down state

Make tg3 behave like other drivers and let "ethtool -p" identify the
NIC even when it's in the DOWN state. Before this patch it would get an 
error as follows if the NIC was down:

# ip link set down dev em4
# ethtool -p em4
Cannot identify NIC: Resource temporarily unavailable

With this patch ethtool identify works regardless of whether the NIC is up
or down as it does for other drivers.

Signed-off-by: Jon Maxwell <jmaxwell37@...il.com>
---
 drivers/net/ethernet/broadcom/tg3.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 328373e0578f..3e458394f149 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -12763,9 +12763,6 @@ static int tg3_set_phys_id(struct net_device *dev,
 {
 	struct tg3 *tp = netdev_priv(dev);
 
-	if (!netif_running(tp->dev))
-		return -EAGAIN;
-
 	switch (state) {
 	case ETHTOOL_ID_ACTIVE:
 		return 1;	/* cycle on/off once per second */
-- 
2.13.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ