Fix dead 21041 ethernet after ifconfig down
Subsystems (2)
PATCH 1/1 Fix dead 21041 ethernet after ifconfig down
The de2104x did a pci_disable_device() in it's close function, but the open function never does a pci_enable_device() and assumes that the device is already enabled. Considering that downing the interface is just a temporary thing the pci_disable_device() isn't a pretty good idea and removing it from the close function just fixes the bug.
---
drivers/net/tulip/de2104x.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/net/tulip/de2104x.c +0 -1
@@ -1418,7 +1418,6 @@ static int de_close (struct net_device *dev)de_free_rings (de);de_adapter_sleep (de); -pci_disable_device (de->pdev);return 0 ; }
Quoted 5 lines · Thomas Bogendoerfer
The de2104x did a
pci_disable_device()in it's close function, but the open function never does apci_enable_device()and assumes that the device is already enabled. Considering that downing the interface is just a temporary thing thepci_disable_device()isn't a pretty good idea and removing it from the close function just fixes the bug.
Thomas,
Thanks for the patch!
The de2104 driver is calling pci_enable_device() in it's .probe routine and calls pci_disable_device in it's .remove function.
It never occurred to me a NIC driver would call either pci function from someplace else as well.
Quoted 1 line
Signed-off-by Thomas Bogendoerfer <[email protected]>
Quoted 17 lines
---
drivers/net/tulip/de2104x.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)drivers/net/tulip/de2104x.c +0
-1@@ -1418,7 +1418,6 @@ static int de_close (struct net_device *dev)de_free_rings (de);de_adapter_sleep (de); -pci_disable_device (de->pdev);return 0 ; }
Jeff Garzik
AppliedQuoted 30 lines · Grant Grundler
Quoted 5 lines · Thomas Bogendoerfer
The de2104x did a
pci_disable_device()in it's close function, but the open function never does apci_enable_device()and assumes that the device is already enabled. Considering that downing the interface is just a temporary thing thepci_disable_device()isn't a pretty good idea and removing it from the close function just fixes the bug.Thomas,
Thanks for the patch!The de2104 driver is calling
pci_enable_device()in it's .probe routine and callspci_disable_devicein it's .remove function.
It never occurred to me a NIC driver would call either pci function from someplace else as well.Quoted 1 line
Signed-off-by Thomas Bogendoerfer <[email protected]>Acked-by Grant Grundler <[email protected]>Quoted 11 lines
---
drivers/net/tulip/de2104x.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)drivers/net/tulip/de2104x.c +0
-0@@ -1418,7 +1418,6 @@ static int de_close (struct net_device *dev)
Quoted 3 lines
drivers/net/tulip/de2104x.c static int de_close (struct net_device *dev) · line 1421
Quoted 3 lines
drivers/net/tulip/de2104x.c +0
-1de_free_rings (de);de_adapter_sleep (de); -pci_disable_device (de->pdev);
applied