aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Maxwell <jmaxwell37@gmail.com>2019-04-02 01:07:56 -0400
committerDavid S. Miller <davem@davemloft.net>2019-04-02 13:54:59 -0400
commitf0dfecc93a60d6ac2acae886103ee0449a25a9c9 (patch)
tree0c397bf31519d39ca9137a53cd85251037f4ca6e
parente142723700baaa621c1b4649ec17a714a4d4a582 (diff)
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@gmail.com> Acked-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 45ccadee02af..d029468738ed 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,
12763{ 12763{
12764 struct tg3 *tp = netdev_priv(dev); 12764 struct tg3 *tp = netdev_priv(dev);
12765 12765
12766 if (!netif_running(tp->dev))
12767 return -EAGAIN;
12768
12769 switch (state) { 12766 switch (state) {
12770 case ETHTOOL_ID_ACTIVE: 12767 case ETHTOOL_ID_ACTIVE:
12771 return 1; /* cycle on/off once per second */ 12768 return 1; /* cycle on/off once per second */