mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-18 08:35:03 +00:00
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>
This commit is contained in:
parent
e142723700
commit
f0dfecc93a
1 changed files with 0 additions and 3 deletions
|
@ -12763,9 +12763,6 @@ static int tg3_set_phys_id(struct net_device *dev,
|
||||||
{
|
{
|
||||||
struct tg3 *tp = netdev_priv(dev);
|
struct tg3 *tp = netdev_priv(dev);
|
||||||
|
|
||||||
if (!netif_running(tp->dev))
|
|
||||||
return -EAGAIN;
|
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case ETHTOOL_ID_ACTIVE:
|
case ETHTOOL_ID_ACTIVE:
|
||||||
return 1; /* cycle on/off once per second */
|
return 1; /* cycle on/off once per second */
|
||||||
|
|
Loading…
Reference in a new issue