e1000: fix, two minor updates
Subsystems (2)
cover e1000: fix, two minor updates
Jeff,
Please pull:
git-pull git://lost.foo-projects.org/~ahkok/git/netdev-2.6 e1000
to receive one fix (patch 1) and 2 updates to the e1000 driver.
Cheers,
Auke
---
Summary:
Jesse Brandeburg <[email protected]>: (1)
e1000: fix shared interrupt warning message
Auke Kok <[email protected]>: (2)
e1000: allow ethtool to see link status when down
e1000: remove obsolete custom pci_save_state code
--- drivers/net/e1000/e1000.h | 1 drivers/net/e1000/e1000_ethtool.c | 2 - drivers/net/e1000/e1000_main.c | 70 ++++---------------------------------- 3 files changed, 9 insertions(+), 64 deletions(-)
---
These patches appply against torvalds/linux-2.6 #master as of commit 0187f221e96e3436d552c0c7143f183eb82fb658 ( Ben Dooks -- "[PATCH] s3c2410fb: fix un-initialised dev field")
PATCH 1/3 e1000: fix shared interrupt warning message
---
drivers/net/e1000/e1000_main.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/e1000/e1000_main.c +6 -6
@@ -1417,10 +1417,6 @@ e1000_open(struct net_device *netdev)if ((err =e1000_setup_all_rx_resources (adapter))) goto err_setup_rx; - err =e1000_request_irq (adapter); -if (err) - goto err_req_irq; -e1000_power_up_phy (adapter);if ((err =e1000_up (adapter)))
@@ -1431,6 +1427,10 @@ e1000_open(struct net_device *netdev)e1000_update_mng_vlan (adapter); } + err =e1000_request_irq (adapter); +if (err) + goto err_req_irq; +/* If AMT is enabled, let the firmware know that the network * interface is now open */ if (adapter->hw.mac_type == e1000_82573 &&
@@ -1439,10 +1439,10 @@ e1000_open(struct net_device *netdev)return E1000_SUCCESS ; +err_req_irq: +e1000_down (adapter); err_up:e1000_power_down_phy (adapter); -e1000_free_irq (adapter); -err_req_irq:e1000_free_all_rx_resources (adapter); err_setup_rx:e1000_free_all_tx_resources (adapter);
---
Auke Kok <[email protected]>
PATCH 2/3 e1000: remove obsolete custom pci_save_state code
In reply to Kok, AukeNow that 2.6.19 provides a proper implementation that saves MSI, PCI-E config space, we can have the e1000 driver use those instead of it's custom implementation.
---
drivers/net/e1000/e1000.h | 1 - drivers/net/e1000/e1000_main.c | 58 +--------------------------------------- 2 files changed, 2 insertions(+), 57 deletions(-)
drivers/net/e1000/e1000.h +0 -1
@@ -337,7 +337,6 @@ struct e1000_adapter {struct e1000_rx_ring test_rx_ring; -uint32_t *config_space;int msg_enable;#ifdef CONFIG_PCI_MSI boolean_t have_msi;
drivers/net/e1000/e1000_main.c +2 -56
76 lines not on this page · raw message
---
Auke Kok <[email protected]>
PATCH 3/3 e1000: allow ethtool to see link status when down
In reply to Kok, AukeBy reading the MAC status register we can detect whether the MAC has seen the PHY see link. This allows us to show the link properties before the device is up in ethtool.
---
drivers/net/e1000/e1000_ethtool.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/e1000/e1000_ethtool.c +1 -1
@@ -166,7 +166,7 @@ e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ecmd->transceiver =XCVR_EXTERNAL ; } -if (netif_carrier_ok (adapter->netdev)) { +if (E1000_READ_REG (&adapter->hw,STATUS ) &E1000_STATUS_LU ) {e1000_get_speed_and_duplex (hw, &adapter->link_speed, &adapter->link_duplex);
---
Auke Kok <[email protected]>
Re: [PATCH 1/3] e1000: fix shared interrupt warning message
In reply to Kok, AukeQuoted 7 lines · Auke
Signed-off-by Jesse Brandeburg <[email protected]>Signed-off-by Auke Kok <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/net/e1000/e1000_main.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
applied 1-3, though patch #1 had a noticable lack of description. you should describe your change, not just the condition that prompted it. operation reordering is something that people shouldn't have to /try/ to understand. Things should just be obvious, and if not, document why.
Re: [PATCH 1/3] e1000: fix shared interrupt warning message
Quoted 10 lines · Jeff Garzik
Quoted 7 lines · Auke
Signed-off-by Jesse Brandeburg <[email protected]>Signed-off-by Auke Kok <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/net/e1000/e1000_main.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)applied 1-3, though patch #1 had a noticable lack of description. you should describe your change, not just the condition that prompted it. operation reordering is something that people shouldn't have to /try/ to understand. Things should just be obvious, and if not, document why.
For the record then:
It is suspected that workarounds in the _up() routine of e1000 can cause the receive unit to be enabled before we're all done initializing the adapter data. An interrupt arriving before we're all done setting up obviously causes problems. To fix, we postpone enabling interrupts completely until the software intialization is finished.
Thanks,
Auke
Re: [PATCH 1/3] e1000: fix shared interrupt warning message
Auke Kok <[email protected]> :
[...]
Quoted 1 line
It is suspected that workarounds in the
_up()routine of e1000 can cause
^^^^^^^^^
Quoted 4 lines
the receive unit to be enabled before we're all done initializing the adapter data. An interrupt arriving before we're all done setting up obviously causes problems. To fix, we postpone enabling interrupts completely until the software intialization is finished.
Call me dense but is there a chance that the same receive unit that should not be enabled now emits interrupts between e1000_up() and request_irq() ?
Signature · 1 line
Ueimor
Re: [PATCH 1/3] e1000: fix shared interrupt warning message
Quoted 8 lines · Francois Romieu
Auke Kok <[email protected]> :
[...]Quoted 1 line
It is suspected that workarounds in the
_up()routine of e1000 can cause^^^^^^^^^Quoted 1 line
the receive unit to be enabled before we're all done initializing the adapter data. An interrupt arriving before we're all done setting up obviously causes problems. To fix, we postpone enabling interrupts completely until the software intialization is finished.
Call me dense but is there a chance that the same receive unit that should not be enabled now emits interrupts between
e1000_up()andrequest_irq()?
turning on the receive unit starts the rx logic on the mac, but doesn't make the mac generate interrupts as far as I know. The fix was verified and even suggested earlier by some people as well.
Cheers,
Auke