diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:19:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:19:30 -0400 |
commit | 60ca97584fcb98d2f1b14e4c2f12203dd5b3888e (patch) | |
tree | eccd93512a4b3b1e5cb5f721084ee51165ff4965 /drivers/net/sky2.c | |
parent | f061c5847bcc72eebf6a783f458d42092eac1b6a (diff) | |
parent | 4a1d2d81fa327d095a0a8a1f961bace5b0a2f7da (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (42 commits)
[PATCH] Fix section mismatch in de2104x.c
[PATCH] sky2: set lower pause threshold to prevent overrun
[PATCH] sky2: revert pci express extensions
[PATCH] skge: version 1.9
[PATCH] skge: better flow control negotiation
[PATCH] skge: pause mapping for fiber
[PATCH] skge: fix stuck irq when fiber down
[PATCH] powerpc/cell spidernet release all descrs
[PATCH] powerpc/cell spidernet DMA direction fix
[PATCH] powerpc/cell spidernet variable name change
[PATCH] powerpc/cell spidernet reduce DMA kicking
[PATCH] powerpc/cell spidernet
[PATCH] powerpc/cell spidernet refine locking
[PATCH] powerpc/cell spidernet NAPI polling info.
[PATCH] powerpc/cell spidernet low watermark patch.
[PATCH] powerpc/cell spidernet incorrect offset
[PATCH] powerpc/cell spidernet stop error printing patch.
[PATCH] powerpc/cell spidernet fix error interrupt print
[PATCH] powerpc/cell spidernet bogus rx interrupt bit
[PATCH] Spidernet stop queue when queue is full.
...
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 459c845d6648..c10e7f5faa5f 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -683,7 +683,7 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port) | |||
683 | sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON); | 683 | sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON); |
684 | 684 | ||
685 | if (hw->chip_id == CHIP_ID_YUKON_EC_U) { | 685 | if (hw->chip_id == CHIP_ID_YUKON_EC_U) { |
686 | sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8); | 686 | sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 512/8); |
687 | sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8); | 687 | sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8); |
688 | if (hw->dev[port]->mtu > ETH_DATA_LEN) { | 688 | if (hw->dev[port]->mtu > ETH_DATA_LEN) { |
689 | /* set Tx GMAC FIFO Almost Empty Threshold */ | 689 | /* set Tx GMAC FIFO Almost Empty Threshold */ |
@@ -1907,7 +1907,7 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2, | |||
1907 | pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr, | 1907 | pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr, |
1908 | length, PCI_DMA_FROMDEVICE); | 1908 | length, PCI_DMA_FROMDEVICE); |
1909 | re->skb->ip_summed = CHECKSUM_NONE; | 1909 | re->skb->ip_summed = CHECKSUM_NONE; |
1910 | __skb_put(skb, length); | 1910 | skb_put(skb, length); |
1911 | } | 1911 | } |
1912 | return skb; | 1912 | return skb; |
1913 | } | 1913 | } |
@@ -1970,7 +1970,7 @@ static struct sk_buff *receive_new(struct sky2_port *sky2, | |||
1970 | if (skb_shinfo(skb)->nr_frags) | 1970 | if (skb_shinfo(skb)->nr_frags) |
1971 | skb_put_frags(skb, hdr_space, length); | 1971 | skb_put_frags(skb, hdr_space, length); |
1972 | else | 1972 | else |
1973 | skb_put(skb, hdr_space); | 1973 | skb_put(skb, length); |
1974 | return skb; | 1974 | return skb; |
1975 | } | 1975 | } |
1976 | 1976 | ||
@@ -2220,8 +2220,7 @@ static void sky2_hw_intr(struct sky2_hw *hw) | |||
2220 | /* PCI-Express uncorrectable Error occurred */ | 2220 | /* PCI-Express uncorrectable Error occurred */ |
2221 | u32 pex_err; | 2221 | u32 pex_err; |
2222 | 2222 | ||
2223 | pex_err = sky2_pci_read32(hw, | 2223 | pex_err = sky2_pci_read32(hw, PEX_UNC_ERR_STAT); |
2224 | hw->err_cap + PCI_ERR_UNCOR_STATUS); | ||
2225 | 2224 | ||
2226 | if (net_ratelimit()) | 2225 | if (net_ratelimit()) |
2227 | printk(KERN_ERR PFX "%s: pci express error (0x%x)\n", | 2226 | printk(KERN_ERR PFX "%s: pci express error (0x%x)\n", |
@@ -2229,20 +2228,15 @@ static void sky2_hw_intr(struct sky2_hw *hw) | |||
2229 | 2228 | ||
2230 | /* clear the interrupt */ | 2229 | /* clear the interrupt */ |
2231 | sky2_write32(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | 2230 | sky2_write32(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); |
2232 | sky2_pci_write32(hw, | 2231 | sky2_pci_write32(hw, PEX_UNC_ERR_STAT, |
2233 | hw->err_cap + PCI_ERR_UNCOR_STATUS, | 2232 | 0xffffffffUL); |
2234 | 0xffffffffUL); | ||
2235 | sky2_write32(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | 2233 | sky2_write32(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); |
2236 | 2234 | ||
2237 | 2235 | if (pex_err & PEX_FATAL_ERRORS) { | |
2238 | /* In case of fatal error mask off to keep from getting stuck */ | ||
2239 | if (pex_err & (PCI_ERR_UNC_POISON_TLP | PCI_ERR_UNC_FCP | ||
2240 | | PCI_ERR_UNC_DLP)) { | ||
2241 | u32 hwmsk = sky2_read32(hw, B0_HWE_IMSK); | 2236 | u32 hwmsk = sky2_read32(hw, B0_HWE_IMSK); |
2242 | hwmsk &= ~Y2_IS_PCI_EXP; | 2237 | hwmsk &= ~Y2_IS_PCI_EXP; |
2243 | sky2_write32(hw, B0_HWE_IMSK, hwmsk); | 2238 | sky2_write32(hw, B0_HWE_IMSK, hwmsk); |
2244 | } | 2239 | } |
2245 | |||
2246 | } | 2240 | } |
2247 | 2241 | ||
2248 | if (status & Y2_HWE_L1_MASK) | 2242 | if (status & Y2_HWE_L1_MASK) |
@@ -2423,7 +2417,6 @@ static int sky2_reset(struct sky2_hw *hw) | |||
2423 | u16 status; | 2417 | u16 status; |
2424 | u8 t8; | 2418 | u8 t8; |
2425 | int i; | 2419 | int i; |
2426 | u32 msk; | ||
2427 | 2420 | ||
2428 | sky2_write8(hw, B0_CTST, CS_RST_CLR); | 2421 | sky2_write8(hw, B0_CTST, CS_RST_CLR); |
2429 | 2422 | ||
@@ -2464,13 +2457,9 @@ static int sky2_reset(struct sky2_hw *hw) | |||
2464 | sky2_write8(hw, B0_CTST, CS_MRST_CLR); | 2457 | sky2_write8(hw, B0_CTST, CS_MRST_CLR); |
2465 | 2458 | ||
2466 | /* clear any PEX errors */ | 2459 | /* clear any PEX errors */ |
2467 | if (pci_find_capability(hw->pdev, PCI_CAP_ID_EXP)) { | 2460 | if (pci_find_capability(hw->pdev, PCI_CAP_ID_EXP)) |
2468 | hw->err_cap = pci_find_ext_capability(hw->pdev, PCI_EXT_CAP_ID_ERR); | 2461 | sky2_pci_write32(hw, PEX_UNC_ERR_STAT, 0xffffffffUL); |
2469 | if (hw->err_cap) | 2462 | |
2470 | sky2_pci_write32(hw, | ||
2471 | hw->err_cap + PCI_ERR_UNCOR_STATUS, | ||
2472 | 0xffffffffUL); | ||
2473 | } | ||
2474 | 2463 | ||
2475 | hw->pmd_type = sky2_read8(hw, B2_PMD_TYP); | 2464 | hw->pmd_type = sky2_read8(hw, B2_PMD_TYP); |
2476 | hw->ports = 1; | 2465 | hw->ports = 1; |
@@ -2527,10 +2516,7 @@ static int sky2_reset(struct sky2_hw *hw) | |||
2527 | sky2_write8(hw, RAM_BUFFER(i, B3_RI_RTO_XS2), SK_RI_TO_53); | 2516 | sky2_write8(hw, RAM_BUFFER(i, B3_RI_RTO_XS2), SK_RI_TO_53); |
2528 | } | 2517 | } |
2529 | 2518 | ||
2530 | msk = Y2_HWE_ALL_MASK; | 2519 | sky2_write32(hw, B0_HWE_IMSK, Y2_HWE_ALL_MASK); |
2531 | if (!hw->err_cap) | ||
2532 | msk &= ~Y2_IS_PCI_EXP; | ||
2533 | sky2_write32(hw, B0_HWE_IMSK, msk); | ||
2534 | 2520 | ||
2535 | for (i = 0; i < hw->ports; i++) | 2521 | for (i = 0; i < hw->ports; i++) |
2536 | sky2_gmac_reset(hw, i); | 2522 | sky2_gmac_reset(hw, i); |