sky2: revert pci express extensions
Subsystems (2)
PATCH 1/1 sky2: revert pci express extensions
The pci express error handling extensions don't work unless PCI access is via mmconfig. Otherwise, all accesses to pci config registers greater than 256 fail. Since the sky2 driver has other ways of getting to PCI config space, it works around this short coming, but the pci_find_ext_capablity doesn't work.
This backs out commit 91aeb3edbcf4e6ed72d138ac8c22fd68e6d717c3 Go back to hardcoding, since we know where the error registers are anyway. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7222
--- drivers/net/sky2.c | 30 ++++++++---------------------- drivers/net/sky2.h | 45 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 24 deletions(-)
drivers/net/sky2.c +8 -22
@@ -2220,8 +2220,7 @@/* PCI-Express uncorrectable Error occurred */ u32 pex_err; - pex_err =sky2_pci_read32 (hw, - hw->err_cap +PCI_ERR_UNCOR_STATUS ); + pex_err =sky2_pci_read32 (hw,PEX_UNC_ERR_STAT );if (net_ratelimit ()) printk(KERN_ERR PFX "%s: pci express error (0x%x)\n",
@@ -2229,20 +2228,15 @@/* clear the interrupt */ sky2_write32 (hw,B2_TST_CTRL1 ,TST_CFG_WRITE_ON ); -sky2_pci_write32 (hw, - hw->err_cap +PCI_ERR_UNCOR_STATUS , -0xffffffffUL ); +sky2_pci_write32 (hw,PEX_UNC_ERR_STAT , +0xffffffffUL );sky2_write32 (hw,B2_TST_CTRL1 ,TST_CFG_WRITE_OFF ); - -/* In case of fatal error mask off to keep from getting stuck */ -if (pex_err & (PCI_ERR_UNC_POISON_TLP |PCI_ERR_UNC_FCP - |PCI_ERR_UNC_DLP )) { +if (pex_err &PEX_FATAL_ERRORS ) {u32 hwmsk =sky2_read32 (hw,B0_HWE_IMSK ); hwmsk &= ~Y2_IS_PCI_EXP ;sky2_write32 (hw,B0_HWE_IMSK , hwmsk); } - }if (status &Y2_HWE_L1_MASK )
@@ -2423,7 +2417,6 @@u16 status;u8 t8;int i; -u32 msk;sky2_write8 (hw,B0_CTST ,CS_RST_CLR );
@@ -2464,13 +2457,9 @@sky2_write8 (hw,B0_CTST ,CS_MRST_CLR );/* clear any PEX errors */ -if (pci_find_capability (hw->pdev,PCI_CAP_ID_EXP )) { - hw->err_cap =pci_find_ext_capability (hw->pdev,PCI_EXT_CAP_ID_ERR ); -if (hw->err_cap) -sky2_pci_write32 (hw, - hw->err_cap +PCI_ERR_UNCOR_STATUS , -0xffffffffUL ); - } +if (pci_find_capability (hw->pdev,PCI_CAP_ID_EXP )) +sky2_pci_write32 (hw,PEX_UNC_ERR_STAT ,0xffffffffUL ); + hw->pmd_type =sky2_read8 (hw,B2_PMD_TYP ); hw->ports =1 ;
@@ -2527,10 +2516,7 @@sky2_write8 (hw,RAM_BUFFER (i,B3_RI_RTO_XS2 ),SK_RI_TO_53 ); } - msk =Y2_HWE_ALL_MASK ; -if (!hw->err_cap) - msk &= ~Y2_IS_PCI_EXP ; -sky2_write32 (hw,B0_HWE_IMSK , msk); +sky2_write32 (hw,B0_HWE_IMSK ,Y2_HWE_ALL_MASK );for (i =0 ; i < hw->ports; i++)sky2_gmac_reset (hw, i);
drivers/net/sky2.h +43 -2
71 lines not on this page · raw message
PATCH 1/1 sky2: set lower pause threshold to prevent overrun
Adjust the pause threshold on slower systems to keep from getting overrun. Since FIFO is 2K bytes, don't send XON pause until there is space for a full frame.
--- drivers/net/sky2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/sky2.c +1 -1
@@ -683,7 +683,7 @@sky2_write16 (hw,SK_REG (port,TX_GMF_CTRL_T ),GMF_OPER_ON );if (hw->chip_id ==CHIP_ID_YUKON_EC_U ) { -sky2_write8 (hw,SK_REG (port,RX_GMF_LP_THR ),768 /8 ); +sky2_write8 (hw,SK_REG (port,RX_GMF_LP_THR ),512 /8 );sky2_write8 (hw,SK_REG (port,RX_GMF_UP_THR ),1024 /8 );if (hw->dev[port]->mtu >ETH_DATA_LEN ) {/* set Tx GMAC FIFO Almost Empty Threshold */
Hello Stephen,
Am Montag, den 09.10.2006, 14:40 -0700 schrieb Stephen Hemminger:
Quoted 11 lines
The pci express error handling extensions don't work unless PCI access is via mmconfig. Otherwise, all accesses to pci config registers greater than 256 fail. Since the sky2 driver has other ways of getting to PCI config space, it works around this short coming, but the
pci_find_ext_capablitydoesn't work.This backs out commit
91aeb3edbcf4e6ed72d138ac8c22fd68e6d717c3Go back to hardcoding, since we know where the error registers are anyway. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7222Signed-off-by Stephen Hemminger <[email protected]>
[...]
thanks a lot for that one. Works perfectly fine and the annoying error-messages are gone.
Signature · 3 lines
Matthias 'CoreDump' Hentges My OS: Debian SID. Geek by Nature, Linux by Choice