diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/tg3.c | 37 | ||||
-rw-r--r-- | drivers/net/tg3.h | 6 |
2 files changed, 36 insertions, 7 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 88829eb9568e..c69c8df088d0 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -225,6 +225,10 @@ static struct pci_device_id tg3_pci_tbl[] = { | |||
225 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | 225 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, |
226 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5754M, | 226 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5754M, |
227 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | 227 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, |
228 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5755, | ||
229 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | ||
230 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5755M, | ||
231 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | ||
228 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787, | 232 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787, |
229 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | 233 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, |
230 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787M, | 234 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787M, |
@@ -4557,6 +4561,7 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
4557 | } | 4561 | } |
4558 | 4562 | ||
4559 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || | 4563 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || |
4564 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || | ||
4560 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | 4565 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) |
4561 | tw32(GRC_FASTBOOT_PC, 0); | 4566 | tw32(GRC_FASTBOOT_PC, 0); |
4562 | 4567 | ||
@@ -6152,6 +6157,9 @@ static int tg3_reset_hw(struct tg3 *tp) | |||
6152 | gpio_mask |= GRC_LCLCTRL_GPIO_OE3 | | 6157 | gpio_mask |= GRC_LCLCTRL_GPIO_OE3 | |
6153 | GRC_LCLCTRL_GPIO_OUTPUT3; | 6158 | GRC_LCLCTRL_GPIO_OUTPUT3; |
6154 | 6159 | ||
6160 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) | ||
6161 | gpio_mask |= GRC_LCLCTRL_GPIO_UART_SEL; | ||
6162 | |||
6155 | tp->grc_local_ctrl |= tr32(GRC_LOCAL_CTRL) & gpio_mask; | 6163 | tp->grc_local_ctrl |= tr32(GRC_LOCAL_CTRL) & gpio_mask; |
6156 | 6164 | ||
6157 | /* GPIO1 must be driven high for eeprom write protect */ | 6165 | /* GPIO1 must be driven high for eeprom write protect */ |
@@ -6191,7 +6199,8 @@ static int tg3_reset_hw(struct tg3 *tp) | |||
6191 | } | 6199 | } |
6192 | 6200 | ||
6193 | /* Enable host coalescing bug fix */ | 6201 | /* Enable host coalescing bug fix */ |
6194 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | 6202 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) || |
6203 | (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787)) | ||
6195 | val |= (1 << 29); | 6204 | val |= (1 << 29); |
6196 | 6205 | ||
6197 | tw32_f(WDMAC_MODE, val); | 6206 | tw32_f(WDMAC_MODE, val); |
@@ -6249,6 +6258,9 @@ static int tg3_reset_hw(struct tg3 *tp) | |||
6249 | udelay(100); | 6258 | udelay(100); |
6250 | 6259 | ||
6251 | tp->rx_mode = RX_MODE_ENABLE; | 6260 | tp->rx_mode = RX_MODE_ENABLE; |
6261 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) | ||
6262 | tp->rx_mode |= RX_MODE_IPV6_CSUM_ENABLE; | ||
6263 | |||
6252 | tw32_f(MAC_RX_MODE, tp->rx_mode); | 6264 | tw32_f(MAC_RX_MODE, tp->rx_mode); |
6253 | udelay(10); | 6265 | udelay(10); |
6254 | 6266 | ||
@@ -7907,7 +7919,8 @@ static int tg3_set_tx_csum(struct net_device *dev, u32 data) | |||
7907 | return 0; | 7919 | return 0; |
7908 | } | 7920 | } |
7909 | 7921 | ||
7910 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | 7922 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || |
7923 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | ||
7911 | ethtool_op_set_tx_hw_csum(dev, data); | 7924 | ethtool_op_set_tx_hw_csum(dev, data); |
7912 | else | 7925 | else |
7913 | ethtool_op_set_tx_csum(dev, data); | 7926 | ethtool_op_set_tx_csum(dev, data); |
@@ -8332,7 +8345,8 @@ static int tg3_test_memory(struct tg3 *tp) | |||
8332 | int i; | 8345 | int i; |
8333 | 8346 | ||
8334 | if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { | 8347 | if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { |
8335 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | 8348 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || |
8349 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | ||
8336 | mem_tbl = mem_tbl_5755; | 8350 | mem_tbl = mem_tbl_5755; |
8337 | else | 8351 | else |
8338 | mem_tbl = mem_tbl_5705; | 8352 | mem_tbl = mem_tbl_5705; |
@@ -9310,6 +9324,7 @@ static int tg3_nvram_write_block_buffered(struct tg3 *tp, u32 offset, u32 len, | |||
9310 | nvram_cmd |= NVRAM_CMD_LAST; | 9324 | nvram_cmd |= NVRAM_CMD_LAST; |
9311 | 9325 | ||
9312 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5752) && | 9326 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5752) && |
9327 | (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5755) && | ||
9313 | (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787) && | 9328 | (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787) && |
9314 | (tp->nvram_jedecnum == JEDEC_ST) && | 9329 | (tp->nvram_jedecnum == JEDEC_ST) && |
9315 | (nvram_cmd & NVRAM_CMD_FIRST)) { | 9330 | (nvram_cmd & NVRAM_CMD_FIRST)) { |
@@ -10044,6 +10059,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10044 | 10059 | ||
10045 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 || | 10060 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 || |
10046 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || | 10061 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || |
10062 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || | ||
10047 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || | 10063 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || |
10048 | (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) | 10064 | (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) |
10049 | tp->tg3_flags2 |= TG3_FLG2_5750_PLUS; | 10065 | tp->tg3_flags2 |= TG3_FLG2_5750_PLUS; |
@@ -10053,7 +10069,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10053 | tp->tg3_flags2 |= TG3_FLG2_5705_PLUS; | 10069 | tp->tg3_flags2 |= TG3_FLG2_5705_PLUS; |
10054 | 10070 | ||
10055 | if (tp->tg3_flags2 & TG3_FLG2_5750_PLUS) { | 10071 | if (tp->tg3_flags2 & TG3_FLG2_5750_PLUS) { |
10056 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) { | 10072 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || |
10073 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) { | ||
10057 | tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2; | 10074 | tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2; |
10058 | tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI; | 10075 | tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI; |
10059 | } else | 10076 | } else |
@@ -10063,6 +10080,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10063 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && | 10080 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && |
10064 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750 && | 10081 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750 && |
10065 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5752 && | 10082 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5752 && |
10083 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5755 && | ||
10066 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787) | 10084 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787) |
10067 | tp->tg3_flags2 |= TG3_FLG2_JUMBO_CAPABLE; | 10085 | tp->tg3_flags2 |= TG3_FLG2_JUMBO_CAPABLE; |
10068 | 10086 | ||
@@ -10219,6 +10237,9 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10219 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752) | 10237 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752) |
10220 | tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3; | 10238 | tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3; |
10221 | 10239 | ||
10240 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) | ||
10241 | tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; | ||
10242 | |||
10222 | /* Force the chip into D0. */ | 10243 | /* Force the chip into D0. */ |
10223 | err = tg3_set_power_state(tp, PCI_D0); | 10244 | err = tg3_set_power_state(tp, PCI_D0); |
10224 | if (err) { | 10245 | if (err) { |
@@ -10274,6 +10295,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10274 | tp->tg3_flags2 |= TG3_FLG2_PHY_5704_A0_BUG; | 10295 | tp->tg3_flags2 |= TG3_FLG2_PHY_5704_A0_BUG; |
10275 | 10296 | ||
10276 | if ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) && | 10297 | if ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) && |
10298 | (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5755) && | ||
10277 | (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787)) | 10299 | (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787)) |
10278 | tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG; | 10300 | tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG; |
10279 | 10301 | ||
@@ -10413,7 +10435,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10413 | /* All chips before 5787 can get confused if TX buffers | 10435 | /* All chips before 5787 can get confused if TX buffers |
10414 | * straddle the 4GB address boundary in some cases. | 10436 | * straddle the 4GB address boundary in some cases. |
10415 | */ | 10437 | */ |
10416 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | 10438 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || |
10439 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | ||
10417 | tp->dev->hard_start_xmit = tg3_start_xmit; | 10440 | tp->dev->hard_start_xmit = tg3_start_xmit; |
10418 | else | 10441 | else |
10419 | tp->dev->hard_start_xmit = tg3_start_xmit_dma_bug; | 10442 | tp->dev->hard_start_xmit = tg3_start_xmit_dma_bug; |
@@ -11002,6 +11025,7 @@ static char * __devinit tg3_phy_string(struct tg3 *tp) | |||
11002 | case PHY_ID_BCM5752: return "5752"; | 11025 | case PHY_ID_BCM5752: return "5752"; |
11003 | case PHY_ID_BCM5714: return "5714"; | 11026 | case PHY_ID_BCM5714: return "5714"; |
11004 | case PHY_ID_BCM5780: return "5780"; | 11027 | case PHY_ID_BCM5780: return "5780"; |
11028 | case PHY_ID_BCM5755: return "5755"; | ||
11005 | case PHY_ID_BCM5787: return "5787"; | 11029 | case PHY_ID_BCM5787: return "5787"; |
11006 | case PHY_ID_BCM8002: return "8002/serdes"; | 11030 | case PHY_ID_BCM8002: return "8002/serdes"; |
11007 | case 0: return "serdes"; | 11031 | case 0: return "serdes"; |
@@ -11350,7 +11374,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
11350 | * checksumming. | 11374 | * checksumming. |
11351 | */ | 11375 | */ |
11352 | if ((tp->tg3_flags & TG3_FLAG_BROKEN_CHECKSUMS) == 0) { | 11376 | if ((tp->tg3_flags & TG3_FLAG_BROKEN_CHECKSUMS) == 0) { |
11353 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | 11377 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || |
11378 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | ||
11354 | dev->features |= NETIF_F_HW_CSUM; | 11379 | dev->features |= NETIF_F_HW_CSUM; |
11355 | else | 11380 | else |
11356 | dev->features |= NETIF_F_IP_CSUM; | 11381 | dev->features |= NETIF_F_IP_CSUM; |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index baa34c4721db..672f375ef711 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -138,6 +138,7 @@ | |||
138 | #define ASIC_REV_5752 0x06 | 138 | #define ASIC_REV_5752 0x06 |
139 | #define ASIC_REV_5780 0x08 | 139 | #define ASIC_REV_5780 0x08 |
140 | #define ASIC_REV_5714 0x09 | 140 | #define ASIC_REV_5714 0x09 |
141 | #define ASIC_REV_5755 0x0a | ||
141 | #define ASIC_REV_5787 0x0b | 142 | #define ASIC_REV_5787 0x0b |
142 | #define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8) | 143 | #define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8) |
143 | #define CHIPREV_5700_AX 0x70 | 144 | #define CHIPREV_5700_AX 0x70 |
@@ -456,6 +457,7 @@ | |||
456 | #define RX_MODE_PROMISC 0x00000100 | 457 | #define RX_MODE_PROMISC 0x00000100 |
457 | #define RX_MODE_NO_CRC_CHECK 0x00000200 | 458 | #define RX_MODE_NO_CRC_CHECK 0x00000200 |
458 | #define RX_MODE_KEEP_VLAN_TAG 0x00000400 | 459 | #define RX_MODE_KEEP_VLAN_TAG 0x00000400 |
460 | #define RX_MODE_IPV6_CSUM_ENABLE 0x01000000 | ||
459 | #define MAC_RX_STATUS 0x0000046c | 461 | #define MAC_RX_STATUS 0x0000046c |
460 | #define RX_STATUS_REMOTE_TX_XOFFED 0x00000001 | 462 | #define RX_STATUS_REMOTE_TX_XOFFED 0x00000001 |
461 | #define RX_STATUS_XOFF_RCVD 0x00000002 | 463 | #define RX_STATUS_XOFF_RCVD 0x00000002 |
@@ -1340,6 +1342,7 @@ | |||
1340 | #define GRC_LCLCTRL_CLEARINT 0x00000002 | 1342 | #define GRC_LCLCTRL_CLEARINT 0x00000002 |
1341 | #define GRC_LCLCTRL_SETINT 0x00000004 | 1343 | #define GRC_LCLCTRL_SETINT 0x00000004 |
1342 | #define GRC_LCLCTRL_INT_ON_ATTN 0x00000008 | 1344 | #define GRC_LCLCTRL_INT_ON_ATTN 0x00000008 |
1345 | #define GRC_LCLCTRL_GPIO_UART_SEL 0x00000010 /* 5755 only */ | ||
1343 | #define GRC_LCLCTRL_USE_SIG_DETECT 0x00000010 /* 5714/5780 only */ | 1346 | #define GRC_LCLCTRL_USE_SIG_DETECT 0x00000010 /* 5714/5780 only */ |
1344 | #define GRC_LCLCTRL_USE_EXT_SIG_DETECT 0x00000020 /* 5714/5780 only */ | 1347 | #define GRC_LCLCTRL_USE_EXT_SIG_DETECT 0x00000020 /* 5714/5780 only */ |
1345 | #define GRC_LCLCTRL_GPIO_INPUT3 0x00000020 | 1348 | #define GRC_LCLCTRL_GPIO_INPUT3 0x00000020 |
@@ -2259,6 +2262,7 @@ struct tg3 { | |||
2259 | #define PHY_ID_BCM5752 0x60008100 | 2262 | #define PHY_ID_BCM5752 0x60008100 |
2260 | #define PHY_ID_BCM5714 0x60008340 | 2263 | #define PHY_ID_BCM5714 0x60008340 |
2261 | #define PHY_ID_BCM5780 0x60008350 | 2264 | #define PHY_ID_BCM5780 0x60008350 |
2265 | #define PHY_ID_BCM5755 0xbc050cc0 | ||
2262 | #define PHY_ID_BCM5787 0xbc050ce0 | 2266 | #define PHY_ID_BCM5787 0xbc050ce0 |
2263 | #define PHY_ID_BCM8002 0x60010140 | 2267 | #define PHY_ID_BCM8002 0x60010140 |
2264 | #define PHY_ID_INVALID 0xffffffff | 2268 | #define PHY_ID_INVALID 0xffffffff |
@@ -2286,7 +2290,7 @@ struct tg3 { | |||
2286 | (X) == PHY_ID_BCM5705 || (X) == PHY_ID_BCM5750 || \ | 2290 | (X) == PHY_ID_BCM5705 || (X) == PHY_ID_BCM5750 || \ |
2287 | (X) == PHY_ID_BCM5752 || (X) == PHY_ID_BCM5714 || \ | 2291 | (X) == PHY_ID_BCM5752 || (X) == PHY_ID_BCM5714 || \ |
2288 | (X) == PHY_ID_BCM5780 || (X) == PHY_ID_BCM5787 || \ | 2292 | (X) == PHY_ID_BCM5780 || (X) == PHY_ID_BCM5787 || \ |
2289 | (X) == PHY_ID_BCM8002) | 2293 | (X) == PHY_ID_BCM5755 || (X) == PHY_ID_BCM8002) |
2290 | 2294 | ||
2291 | struct tg3_hw_stats *hw_stats; | 2295 | struct tg3_hw_stats *hw_stats; |
2292 | dma_addr_t stats_mapping; | 2296 | dma_addr_t stats_mapping; |