* [net-next-2.6 PATCH 1/4] e1000e: don't inadvertently re-set INTX_DISABLE @ 2010-06-30 4:12 Jeff Kirsher 2010-06-30 4:12 ` [net-next-2.6 PATCH 2/4] e1000e: suppress compile warnings on certain archs Jeff Kirsher ` (3 more replies) 0 siblings, 4 replies; 8+ messages in thread From: Jeff Kirsher @ 2010-06-30 4:12 UTC (permalink / raw) To: davem; +Cc: netdev, gospo, bphilips, Dean Nelson, stable, Jeff Kirsher From: Dean Nelson <dnelson@redhat.com> Should e1000_test_msi() fail to see an msi interrupt, it attempts to fallback to legacy INTx interrupts. But an error in the code may prevent this from happening correctly. Before calling e1000_test_msi_interrupt(), e1000_test_msi() disables SERR by clearing the SERR bit from the just read PCI_COMMAND bits as it writes them back out. Upon return from calling e1000_test_msi_interrupt(), it re-enables SERR by writing out the version of PCI_COMMAND it had previously read. The problem with this is that e1000_test_msi_interrupt() calls pci_disable_msi(), which eventually ends up in pci_intx(). And because pci_intx() was called with enable set to 1, the INTX_DISABLE bit gets cleared from PCI_COMMAND, which is what we want. But when we get back to e1000_test_msi(), the INTX_DISABLE bit gets inadvertently re-set because of the attempt by e1000_test_msi() to re-enable SERR. The solution is to have e1000_test_msi() re-read the PCI_COMMAND bits as part of its attempt to re-enable SERR. During debugging/testing of this issue I found that not all the systems I ran on had the SERR bit set to begin with. And on some of the systems the same could be said for the INTX_DISABLE bit. Needless to say these latter systems didn't have a problem falling back to legacy INTx interrupts with the code as is. Signed-off-by: Dean Nelson <dnelson@redhat.com> CC: stable@kernel.org Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> --- drivers/net/e1000e/netdev.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 71592ed..3e53ca7 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c @@ -3439,13 +3439,18 @@ static int e1000_test_msi(struct e1000_adapter *adapter) /* disable SERR in case the MSI write causes a master abort */ pci_read_config_word(adapter->pdev, PCI_COMMAND, &pci_cmd); - pci_write_config_word(adapter->pdev, PCI_COMMAND, - pci_cmd & ~PCI_COMMAND_SERR); + if (pci_cmd & PCI_COMMAND_SERR) + pci_write_config_word(adapter->pdev, PCI_COMMAND, + pci_cmd & ~PCI_COMMAND_SERR); err = e1000_test_msi_interrupt(adapter); - /* restore previous setting of command word */ - pci_write_config_word(adapter->pdev, PCI_COMMAND, pci_cmd); + /* re-enable SERR */ + if (pci_cmd & PCI_COMMAND_SERR) { + pci_read_config_word(adapter->pdev, PCI_COMMAND, &pci_cmd); + pci_cmd |= PCI_COMMAND_SERR; + pci_write_config_word(adapter->pdev, PCI_COMMAND, pci_cmd); + } /* success ! */ if (!err) ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [net-next-2.6 PATCH 2/4] e1000e: suppress compile warnings on certain archs 2010-06-30 4:12 [net-next-2.6 PATCH 1/4] e1000e: don't inadvertently re-set INTX_DISABLE Jeff Kirsher @ 2010-06-30 4:12 ` Jeff Kirsher 2010-06-30 6:14 ` David Miller 2010-06-30 4:12 ` [net-next-2.6 PATCH 3/4] e1000e: remove EEE module parameter Jeff Kirsher ` (2 subsequent siblings) 3 siblings, 1 reply; 8+ messages in thread From: Jeff Kirsher @ 2010-06-30 4:12 UTC (permalink / raw) To: davem; +Cc: netdev, gospo, bphilips, Bruce Allan, Jeff Kirsher From: Bruce Allan <bruce.w.allan@intel.com> Commit 84f4ee902ad3ee964b7b3a13d5b7cf9c086e9916 causes compile warnings on architectures that have unsigned long long's that are not 64-bit, e.g. ia64. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> --- drivers/net/e1000e/netdev.c | 38 +++++++++++++++++++++----------------- 1 files changed, 21 insertions(+), 17 deletions(-) diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 3e53ca7..6aa795a 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c @@ -224,10 +224,10 @@ static void e1000e_dump(struct e1000_adapter *adapter) buffer_info = &tx_ring->buffer_info[tx_ring->next_to_clean]; printk(KERN_INFO " %5d %5X %5X %016llX %04X %3X %016llX\n", 0, tx_ring->next_to_use, tx_ring->next_to_clean, - (u64)buffer_info->dma, + (unsigned long long)buffer_info->dma, buffer_info->length, buffer_info->next_to_watch, - (u64)buffer_info->time_stamp); + (unsigned long long)buffer_info->time_stamp); /* Print TX Rings */ if (!netif_msg_tx_done(adapter)) @@ -279,9 +279,11 @@ static void e1000e_dump(struct e1000_adapter *adapter) "%04X %3X %016llX %p", (!(le64_to_cpu(u0->b) & (1<<29)) ? 'l' : ((le64_to_cpu(u0->b) & (1<<20)) ? 'd' : 'c')), i, - le64_to_cpu(u0->a), le64_to_cpu(u0->b), - (u64)buffer_info->dma, buffer_info->length, - buffer_info->next_to_watch, (u64)buffer_info->time_stamp, + (unsigned long long)le64_to_cpu(u0->a), + (unsigned long long)le64_to_cpu(u0->b), + (unsigned long long)buffer_info->dma, + buffer_info->length, buffer_info->next_to_watch, + (unsigned long long)buffer_info->time_stamp, buffer_info->skb); if (i == tx_ring->next_to_use && i == tx_ring->next_to_clean) printk(KERN_CONT " NTC/U\n"); @@ -356,19 +358,19 @@ rx_ring_summary: printk(KERN_INFO "RWB[0x%03X] %016llX " "%016llX %016llX %016llX " "---------------- %p", i, - le64_to_cpu(u1->a), - le64_to_cpu(u1->b), - le64_to_cpu(u1->c), - le64_to_cpu(u1->d), + (unsigned long long)le64_to_cpu(u1->a), + (unsigned long long)le64_to_cpu(u1->b), + (unsigned long long)le64_to_cpu(u1->c), + (unsigned long long)le64_to_cpu(u1->d), buffer_info->skb); } else { printk(KERN_INFO "R [0x%03X] %016llX " "%016llX %016llX %016llX %016llX %p", i, - le64_to_cpu(u1->a), - le64_to_cpu(u1->b), - le64_to_cpu(u1->c), - le64_to_cpu(u1->d), - (u64)buffer_info->dma, + (unsigned long long)le64_to_cpu(u1->a), + (unsigned long long)le64_to_cpu(u1->b), + (unsigned long long)le64_to_cpu(u1->c), + (unsigned long long)le64_to_cpu(u1->d), + (unsigned long long)buffer_info->dma, buffer_info->skb); if (netif_msg_pktdata(adapter)) @@ -405,9 +407,11 @@ rx_ring_summary: buffer_info = &rx_ring->buffer_info[i]; u0 = (struct my_u0 *)rx_desc; printk(KERN_INFO "Rl[0x%03X] %016llX %016llX " - "%016llX %p", - i, le64_to_cpu(u0->a), le64_to_cpu(u0->b), - (u64)buffer_info->dma, buffer_info->skb); + "%016llX %p", i, + (unsigned long long)le64_to_cpu(u0->a), + (unsigned long long)le64_to_cpu(u0->b), + (unsigned long long)buffer_info->dma, + buffer_info->skb); if (i == rx_ring->next_to_use) printk(KERN_CONT " NTU\n"); else if (i == rx_ring->next_to_clean) ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [net-next-2.6 PATCH 2/4] e1000e: suppress compile warnings on certain archs 2010-06-30 4:12 ` [net-next-2.6 PATCH 2/4] e1000e: suppress compile warnings on certain archs Jeff Kirsher @ 2010-06-30 6:14 ` David Miller 0 siblings, 0 replies; 8+ messages in thread From: David Miller @ 2010-06-30 6:14 UTC (permalink / raw) To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, bruce.w.allan From: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Date: Tue, 29 Jun 2010 21:12:30 -0700 > From: Bruce Allan <bruce.w.allan@intel.com> > > Commit 84f4ee902ad3ee964b7b3a13d5b7cf9c086e9916 causes compile warnings on > architectures that have unsigned long long's that are not 64-bit, e.g. > ia64. > > Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Applied. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [net-next-2.6 PATCH 3/4] e1000e: remove EEE module parameter 2010-06-30 4:12 [net-next-2.6 PATCH 1/4] e1000e: don't inadvertently re-set INTX_DISABLE Jeff Kirsher 2010-06-30 4:12 ` [net-next-2.6 PATCH 2/4] e1000e: suppress compile warnings on certain archs Jeff Kirsher @ 2010-06-30 4:12 ` Jeff Kirsher 2010-06-30 6:14 ` David Miller 2010-06-30 4:13 ` [net-next-2.6 PATCH 4/4] e1000e: disable EEE support by default Jeff Kirsher 2010-06-30 6:14 ` [net-next-2.6 PATCH 1/4] e1000e: don't inadvertently re-set INTX_DISABLE David Miller 3 siblings, 1 reply; 8+ messages in thread From: Jeff Kirsher @ 2010-06-30 4:12 UTC (permalink / raw) To: davem; +Cc: netdev, gospo, bphilips, Bruce Allan, Jeff Kirsher From: Bruce Allan <bruce.w.allan@intel.com> As requested by Dave Miller. A follow-on set of patches will allow for ethtool to enable/disable the feature instead. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> --- drivers/net/e1000e/param.c | 28 ---------------------------- 1 files changed, 0 insertions(+), 28 deletions(-) diff --git a/drivers/net/e1000e/param.c b/drivers/net/e1000e/param.c index 593251c..34aeec1 100644 --- a/drivers/net/e1000e/param.c +++ b/drivers/net/e1000e/param.c @@ -161,15 +161,6 @@ E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lea E1000_PARAM(CrcStripping, "Enable CRC Stripping, disable if your BMC needs " \ "the CRC"); -/* - * Enable/disable EEE (a.k.a. IEEE802.3az) - * - * Valid Range: 0, 1 - * - * Default Value: 1 - */ -E1000_PARAM(EEE, "Enable/disable on parts that support the feature"); - struct e1000_option { enum { enable_option, range_option, list_option } type; const char *name; @@ -486,23 +477,4 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) } } } - { /* EEE for parts supporting the feature */ - static const struct e1000_option opt = { - .type = enable_option, - .name = "EEE Support", - .err = "defaulting to Enabled", - .def = OPTION_ENABLED - }; - - if (adapter->flags2 & FLAG2_HAS_EEE) { - /* Currently only supported on 82579 */ - if (num_EEE > bd) { - unsigned int eee = EEE[bd]; - e1000_validate_option(&eee, &opt, adapter); - hw->dev_spec.ich8lan.eee_disable = !eee; - } else { - hw->dev_spec.ich8lan.eee_disable = !opt.def; - } - } - } } ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [net-next-2.6 PATCH 3/4] e1000e: remove EEE module parameter 2010-06-30 4:12 ` [net-next-2.6 PATCH 3/4] e1000e: remove EEE module parameter Jeff Kirsher @ 2010-06-30 6:14 ` David Miller 0 siblings, 0 replies; 8+ messages in thread From: David Miller @ 2010-06-30 6:14 UTC (permalink / raw) To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, bruce.w.allan From: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Date: Tue, 29 Jun 2010 21:12:52 -0700 > From: Bruce Allan <bruce.w.allan@intel.com> > > As requested by Dave Miller. A follow-on set of patches will allow for > ethtool to enable/disable the feature instead. > > Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> > Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Applied. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [net-next-2.6 PATCH 4/4] e1000e: disable EEE support by default 2010-06-30 4:12 [net-next-2.6 PATCH 1/4] e1000e: don't inadvertently re-set INTX_DISABLE Jeff Kirsher 2010-06-30 4:12 ` [net-next-2.6 PATCH 2/4] e1000e: suppress compile warnings on certain archs Jeff Kirsher 2010-06-30 4:12 ` [net-next-2.6 PATCH 3/4] e1000e: remove EEE module parameter Jeff Kirsher @ 2010-06-30 4:13 ` Jeff Kirsher 2010-06-30 6:15 ` David Miller 2010-06-30 6:14 ` [net-next-2.6 PATCH 1/4] e1000e: don't inadvertently re-set INTX_DISABLE David Miller 3 siblings, 1 reply; 8+ messages in thread From: Jeff Kirsher @ 2010-06-30 4:13 UTC (permalink / raw) To: davem; +Cc: netdev, gospo, bphilips, bhutchings, Bruce Allan, Jeff Kirsher From: Bruce Allan <bruce.w.allan@intel.com> Based on community feedback, EEE should be disabled by default until the IEEE802.3az specification has been finalized. Cc: bhutchings@solarflare.com Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> --- drivers/net/e1000e/ich8lan.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 6b5e108..63930d1 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c @@ -731,6 +731,10 @@ static s32 e1000_get_variants_ich8lan(struct e1000_adapter *adapter) (adapter->hw.phy.type == e1000_phy_igp_3)) adapter->flags |= FLAG_LSC_GIG_SPEED_DROP; + /* Disable EEE by default until IEEE802.3az spec is finalized */ + if (adapter->flags2 & FLAG2_HAS_EEE) + adapter->hw.dev_spec.ich8lan.eee_disable = true; + return 0; } ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [net-next-2.6 PATCH 4/4] e1000e: disable EEE support by default 2010-06-30 4:13 ` [net-next-2.6 PATCH 4/4] e1000e: disable EEE support by default Jeff Kirsher @ 2010-06-30 6:15 ` David Miller 0 siblings, 0 replies; 8+ messages in thread From: David Miller @ 2010-06-30 6:15 UTC (permalink / raw) To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, bhutchings, bruce.w.allan From: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Date: Tue, 29 Jun 2010 21:13:13 -0700 > From: Bruce Allan <bruce.w.allan@intel.com> > > Based on community feedback, EEE should be disabled by default until the > IEEE802.3az specification has been finalized. > > Cc: bhutchings@solarflare.com > Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> > Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Applied. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [net-next-2.6 PATCH 1/4] e1000e: don't inadvertently re-set INTX_DISABLE 2010-06-30 4:12 [net-next-2.6 PATCH 1/4] e1000e: don't inadvertently re-set INTX_DISABLE Jeff Kirsher ` (2 preceding siblings ...) 2010-06-30 4:13 ` [net-next-2.6 PATCH 4/4] e1000e: disable EEE support by default Jeff Kirsher @ 2010-06-30 6:14 ` David Miller 3 siblings, 0 replies; 8+ messages in thread From: David Miller @ 2010-06-30 6:14 UTC (permalink / raw) To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, dnelson, stable From: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Date: Tue, 29 Jun 2010 21:12:05 -0700 > From: Dean Nelson <dnelson@redhat.com> > > Should e1000_test_msi() fail to see an msi interrupt, it attempts to > fallback to legacy INTx interrupts. But an error in the code may prevent > this from happening correctly. ... > The solution is to have e1000_test_msi() re-read the PCI_COMMAND bits as > part of its attempt to re-enable SERR. > > During debugging/testing of this issue I found that not all the systems > I ran on had the SERR bit set to begin with. And on some of the systems > the same could be said for the INTX_DISABLE bit. Needless to say these > latter systems didn't have a problem falling back to legacy INTx > interrupts with the code as is. > > Signed-off-by: Dean Nelson <dnelson@redhat.com> > CC: stable@kernel.org > Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Applied. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-06-30 6:14 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-06-30 4:12 [net-next-2.6 PATCH 1/4] e1000e: don't inadvertently re-set INTX_DISABLE Jeff Kirsher 2010-06-30 4:12 ` [net-next-2.6 PATCH 2/4] e1000e: suppress compile warnings on certain archs Jeff Kirsher 2010-06-30 6:14 ` David Miller 2010-06-30 4:12 ` [net-next-2.6 PATCH 3/4] e1000e: remove EEE module parameter Jeff Kirsher 2010-06-30 6:14 ` David Miller 2010-06-30 4:13 ` [net-next-2.6 PATCH 4/4] e1000e: disable EEE support by default Jeff Kirsher 2010-06-30 6:15 ` David Miller 2010-06-30 6:14 ` [net-next-2.6 PATCH 1/4] e1000e: don't inadvertently re-set INTX_DISABLE David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).