diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/pcnet32.c | 5 | ||||
-rw-r--r-- | drivers/net/s2io.c | 10 | ||||
-rw-r--r-- | drivers/net/sk98lin/skge.c | 4 | ||||
-rw-r--r-- | drivers/net/skge.c | 10 | ||||
-rw-r--r-- | drivers/net/tg3.c | 257 | ||||
-rw-r--r-- | drivers/net/tg3.h | 7 |
6 files changed, 182 insertions, 111 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index be319229f543..8f6cf8c896a4 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -1251,12 +1251,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) | |||
1251 | 1251 | ||
1252 | if (memcmp(promaddr, dev->dev_addr, 6) | 1252 | if (memcmp(promaddr, dev->dev_addr, 6) |
1253 | || !is_valid_ether_addr(dev->dev_addr)) { | 1253 | || !is_valid_ether_addr(dev->dev_addr)) { |
1254 | #ifndef __powerpc__ | ||
1255 | if (is_valid_ether_addr(promaddr)) { | 1254 | if (is_valid_ether_addr(promaddr)) { |
1256 | #else | ||
1257 | if (!is_valid_ether_addr(dev->dev_addr) | ||
1258 | && is_valid_ether_addr(promaddr)) { | ||
1259 | #endif | ||
1260 | if (pcnet32_debug & NETIF_MSG_PROBE) { | 1255 | if (pcnet32_debug & NETIF_MSG_PROBE) { |
1261 | printk(" warning: CSR address invalid,\n"); | 1256 | printk(" warning: CSR address invalid,\n"); |
1262 | printk(KERN_INFO " using instead PROM address of"); | 1257 | printk(KERN_INFO " using instead PROM address of"); |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index e57df8dfe6b4..669dd52c412a 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -3078,7 +3078,7 @@ int s2io_set_swapper(nic_t * sp) | |||
3078 | 3078 | ||
3079 | static int wait_for_msix_trans(nic_t *nic, int i) | 3079 | static int wait_for_msix_trans(nic_t *nic, int i) |
3080 | { | 3080 | { |
3081 | XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; | 3081 | XENA_dev_config_t __iomem *bar0 = nic->bar0; |
3082 | u64 val64; | 3082 | u64 val64; |
3083 | int ret = 0, cnt = 0; | 3083 | int ret = 0, cnt = 0; |
3084 | 3084 | ||
@@ -3099,7 +3099,7 @@ static int wait_for_msix_trans(nic_t *nic, int i) | |||
3099 | 3099 | ||
3100 | void restore_xmsi_data(nic_t *nic) | 3100 | void restore_xmsi_data(nic_t *nic) |
3101 | { | 3101 | { |
3102 | XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; | 3102 | XENA_dev_config_t __iomem *bar0 = nic->bar0; |
3103 | u64 val64; | 3103 | u64 val64; |
3104 | int i; | 3104 | int i; |
3105 | 3105 | ||
@@ -3117,7 +3117,7 @@ void restore_xmsi_data(nic_t *nic) | |||
3117 | 3117 | ||
3118 | static void store_xmsi_data(nic_t *nic) | 3118 | static void store_xmsi_data(nic_t *nic) |
3119 | { | 3119 | { |
3120 | XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; | 3120 | XENA_dev_config_t __iomem *bar0 = nic->bar0; |
3121 | u64 val64, addr, data; | 3121 | u64 val64, addr, data; |
3122 | int i; | 3122 | int i; |
3123 | 3123 | ||
@@ -3140,7 +3140,7 @@ static void store_xmsi_data(nic_t *nic) | |||
3140 | 3140 | ||
3141 | int s2io_enable_msi(nic_t *nic) | 3141 | int s2io_enable_msi(nic_t *nic) |
3142 | { | 3142 | { |
3143 | XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; | 3143 | XENA_dev_config_t __iomem *bar0 = nic->bar0; |
3144 | u16 msi_ctrl, msg_val; | 3144 | u16 msi_ctrl, msg_val; |
3145 | struct config_param *config = &nic->config; | 3145 | struct config_param *config = &nic->config; |
3146 | struct net_device *dev = nic->dev; | 3146 | struct net_device *dev = nic->dev; |
@@ -3190,7 +3190,7 @@ int s2io_enable_msi(nic_t *nic) | |||
3190 | 3190 | ||
3191 | int s2io_enable_msi_x(nic_t *nic) | 3191 | int s2io_enable_msi_x(nic_t *nic) |
3192 | { | 3192 | { |
3193 | XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; | 3193 | XENA_dev_config_t __iomem *bar0 = nic->bar0; |
3194 | u64 tx_mat, rx_mat; | 3194 | u64 tx_mat, rx_mat; |
3195 | u16 msi_control; /* Temp variable */ | 3195 | u16 msi_control; /* Temp variable */ |
3196 | int ret, i, j, msix_indx = 1; | 3196 | int ret, i, j, msix_indx = 1; |
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index 00c5d7f04c68..ae7343934758 100644 --- a/drivers/net/sk98lin/skge.c +++ b/drivers/net/sk98lin/skge.c | |||
@@ -818,7 +818,7 @@ uintptr_t VNextDescr; /* the virtual bus address of the next descriptor */ | |||
818 | /* set the pointers right */ | 818 | /* set the pointers right */ |
819 | pDescr->VNextRxd = VNextDescr & 0xffffffffULL; | 819 | pDescr->VNextRxd = VNextDescr & 0xffffffffULL; |
820 | pDescr->pNextRxd = pNextDescr; | 820 | pDescr->pNextRxd = pNextDescr; |
821 | pDescr->TcpSumStarts = 0; | 821 | if (!IsTx) pDescr->TcpSumStarts = ETH_HLEN << 16 | ETH_HLEN; |
822 | 822 | ||
823 | /* advance one step */ | 823 | /* advance one step */ |
824 | pPrevDescr = pDescr; | 824 | pPrevDescr = pDescr; |
@@ -2169,7 +2169,7 @@ rx_start: | |||
2169 | } /* frame > SK_COPY_TRESHOLD */ | 2169 | } /* frame > SK_COPY_TRESHOLD */ |
2170 | 2170 | ||
2171 | #ifdef USE_SK_RX_CHECKSUM | 2171 | #ifdef USE_SK_RX_CHECKSUM |
2172 | pMsg->csum = pRxd->TcpSums; | 2172 | pMsg->csum = pRxd->TcpSums & 0xffff; |
2173 | pMsg->ip_summed = CHECKSUM_HW; | 2173 | pMsg->ip_summed = CHECKSUM_HW; |
2174 | #else | 2174 | #else |
2175 | pMsg->ip_summed = CHECKSUM_NONE; | 2175 | pMsg->ip_summed = CHECKSUM_NONE; |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 716467879b9c..00d683063c01 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -2280,11 +2280,13 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev) | |||
2280 | } | 2280 | } |
2281 | 2281 | ||
2282 | if (unlikely(skge->tx_avail < skb_shinfo(skb)->nr_frags +1)) { | 2282 | if (unlikely(skge->tx_avail < skb_shinfo(skb)->nr_frags +1)) { |
2283 | netif_stop_queue(dev); | 2283 | if (!netif_queue_stopped(dev)) { |
2284 | spin_unlock_irqrestore(&skge->tx_lock, flags); | 2284 | netif_stop_queue(dev); |
2285 | 2285 | ||
2286 | printk(KERN_WARNING PFX "%s: ring full when queue awake!\n", | 2286 | printk(KERN_WARNING PFX "%s: ring full when queue awake!\n", |
2287 | dev->name); | 2287 | dev->name); |
2288 | } | ||
2289 | spin_unlock_irqrestore(&skge->tx_lock, flags); | ||
2288 | return NETDEV_TX_BUSY; | 2290 | return NETDEV_TX_BUSY; |
2289 | } | 2291 | } |
2290 | 2292 | ||
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 1828a6bf8458..cefb0c08a68d 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -68,8 +68,8 @@ | |||
68 | 68 | ||
69 | #define DRV_MODULE_NAME "tg3" | 69 | #define DRV_MODULE_NAME "tg3" |
70 | #define PFX DRV_MODULE_NAME ": " | 70 | #define PFX DRV_MODULE_NAME ": " |
71 | #define DRV_MODULE_VERSION "3.43" | 71 | #define DRV_MODULE_VERSION "3.46" |
72 | #define DRV_MODULE_RELDATE "Oct 24, 2005" | 72 | #define DRV_MODULE_RELDATE "Dec 19, 2005" |
73 | 73 | ||
74 | #define TG3_DEF_MAC_MODE 0 | 74 | #define TG3_DEF_MAC_MODE 0 |
75 | #define TG3_DEF_RX_MODE 0 | 75 | #define TG3_DEF_RX_MODE 0 |
@@ -341,6 +341,16 @@ static struct { | |||
341 | { "interrupt test (offline)" }, | 341 | { "interrupt test (offline)" }, |
342 | }; | 342 | }; |
343 | 343 | ||
344 | static void tg3_write32(struct tg3 *tp, u32 off, u32 val) | ||
345 | { | ||
346 | writel(val, tp->regs + off); | ||
347 | } | ||
348 | |||
349 | static u32 tg3_read32(struct tg3 *tp, u32 off) | ||
350 | { | ||
351 | return (readl(tp->regs + off)); | ||
352 | } | ||
353 | |||
344 | static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) | 354 | static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) |
345 | { | 355 | { |
346 | unsigned long flags; | 356 | unsigned long flags; |
@@ -411,13 +421,29 @@ static u32 tg3_read_indirect_mbox(struct tg3 *tp, u32 off) | |||
411 | return val; | 421 | return val; |
412 | } | 422 | } |
413 | 423 | ||
414 | static void _tw32_flush(struct tg3 *tp, u32 off, u32 val) | 424 | /* usec_wait specifies the wait time in usec when writing to certain registers |
425 | * where it is unsafe to read back the register without some delay. | ||
426 | * GRC_LOCAL_CTRL is one example if the GPIOs are toggled to switch power. | ||
427 | * TG3PCI_CLOCK_CTRL is another example if the clock frequencies are changed. | ||
428 | */ | ||
429 | static void _tw32_flush(struct tg3 *tp, u32 off, u32 val, u32 usec_wait) | ||
415 | { | 430 | { |
416 | tp->write32(tp, off, val); | 431 | if ((tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) || |
417 | if (!(tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) && | 432 | (tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) |
418 | !(tp->tg3_flags & TG3_FLAG_5701_REG_WRITE_BUG) && | 433 | /* Non-posted methods */ |
419 | !(tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) | 434 | tp->write32(tp, off, val); |
420 | tp->read32(tp, off); /* flush */ | 435 | else { |
436 | /* Posted method */ | ||
437 | tg3_write32(tp, off, val); | ||
438 | if (usec_wait) | ||
439 | udelay(usec_wait); | ||
440 | tp->read32(tp, off); | ||
441 | } | ||
442 | /* Wait again after the read for the posted method to guarantee that | ||
443 | * the wait time is met. | ||
444 | */ | ||
445 | if (usec_wait) | ||
446 | udelay(usec_wait); | ||
421 | } | 447 | } |
422 | 448 | ||
423 | static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val) | 449 | static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val) |
@@ -438,16 +464,6 @@ static void tg3_write32_tx_mbox(struct tg3 *tp, u32 off, u32 val) | |||
438 | readl(mbox); | 464 | readl(mbox); |
439 | } | 465 | } |
440 | 466 | ||
441 | static void tg3_write32(struct tg3 *tp, u32 off, u32 val) | ||
442 | { | ||
443 | writel(val, tp->regs + off); | ||
444 | } | ||
445 | |||
446 | static u32 tg3_read32(struct tg3 *tp, u32 off) | ||
447 | { | ||
448 | return (readl(tp->regs + off)); | ||
449 | } | ||
450 | |||
451 | #define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val) | 467 | #define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val) |
452 | #define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val)) | 468 | #define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val)) |
453 | #define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val) | 469 | #define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val) |
@@ -455,7 +471,8 @@ static u32 tg3_read32(struct tg3 *tp, u32 off) | |||
455 | #define tr32_mailbox(reg) tp->read32_mbox(tp, reg) | 471 | #define tr32_mailbox(reg) tp->read32_mbox(tp, reg) |
456 | 472 | ||
457 | #define tw32(reg,val) tp->write32(tp, reg, val) | 473 | #define tw32(reg,val) tp->write32(tp, reg, val) |
458 | #define tw32_f(reg,val) _tw32_flush(tp,(reg),(val)) | 474 | #define tw32_f(reg,val) _tw32_flush(tp,(reg),(val), 0) |
475 | #define tw32_wait_f(reg,val,us) _tw32_flush(tp,(reg),(val), (us)) | ||
459 | #define tr32(reg) tp->read32(tp, reg) | 476 | #define tr32(reg) tp->read32(tp, reg) |
460 | 477 | ||
461 | static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) | 478 | static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) |
@@ -595,21 +612,19 @@ static void tg3_switch_clocks(struct tg3 *tp) | |||
595 | 612 | ||
596 | if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { | 613 | if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { |
597 | if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { | 614 | if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { |
598 | tw32_f(TG3PCI_CLOCK_CTRL, | 615 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
599 | clock_ctrl | CLOCK_CTRL_625_CORE); | 616 | clock_ctrl | CLOCK_CTRL_625_CORE, 40); |
600 | udelay(40); | ||
601 | } | 617 | } |
602 | } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { | 618 | } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { |
603 | tw32_f(TG3PCI_CLOCK_CTRL, | 619 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
604 | clock_ctrl | | 620 | clock_ctrl | |
605 | (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); | 621 | (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK), |
606 | udelay(40); | 622 | 40); |
607 | tw32_f(TG3PCI_CLOCK_CTRL, | 623 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
608 | clock_ctrl | (CLOCK_CTRL_ALTCLK)); | 624 | clock_ctrl | (CLOCK_CTRL_ALTCLK), |
609 | udelay(40); | 625 | 40); |
610 | } | 626 | } |
611 | tw32_f(TG3PCI_CLOCK_CTRL, clock_ctrl); | 627 | tw32_wait_f(TG3PCI_CLOCK_CTRL, clock_ctrl, 40); |
612 | udelay(40); | ||
613 | } | 628 | } |
614 | 629 | ||
615 | #define PHY_BUSY_LOOPS 5000 | 630 | #define PHY_BUSY_LOOPS 5000 |
@@ -1017,37 +1032,50 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
1017 | if ((tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) != 0) | 1032 | if ((tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) != 0) |
1018 | return; | 1033 | return; |
1019 | 1034 | ||
1020 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { | 1035 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || |
1021 | tp_peer = pci_get_drvdata(tp->pdev_peer); | 1036 | (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) { |
1022 | if (!tp_peer) | 1037 | struct net_device *dev_peer; |
1038 | |||
1039 | dev_peer = pci_get_drvdata(tp->pdev_peer); | ||
1040 | if (!dev_peer) | ||
1023 | BUG(); | 1041 | BUG(); |
1042 | tp_peer = netdev_priv(dev_peer); | ||
1024 | } | 1043 | } |
1025 | 1044 | ||
1026 | |||
1027 | if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || | 1045 | if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || |
1028 | (tp_peer->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0) { | 1046 | (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0 || |
1047 | (tp_peer->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || | ||
1048 | (tp_peer->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { | ||
1029 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || | 1049 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || |
1030 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) { | 1050 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) { |
1031 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1051 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1032 | (GRC_LCLCTRL_GPIO_OE0 | | 1052 | (GRC_LCLCTRL_GPIO_OE0 | |
1033 | GRC_LCLCTRL_GPIO_OE1 | | 1053 | GRC_LCLCTRL_GPIO_OE1 | |
1034 | GRC_LCLCTRL_GPIO_OE2 | | 1054 | GRC_LCLCTRL_GPIO_OE2 | |
1035 | GRC_LCLCTRL_GPIO_OUTPUT0 | | 1055 | GRC_LCLCTRL_GPIO_OUTPUT0 | |
1036 | GRC_LCLCTRL_GPIO_OUTPUT1)); | 1056 | GRC_LCLCTRL_GPIO_OUTPUT1), |
1037 | udelay(100); | 1057 | 100); |
1038 | } else { | 1058 | } else { |
1039 | u32 no_gpio2; | 1059 | u32 no_gpio2; |
1040 | u32 grc_local_ctrl; | 1060 | u32 grc_local_ctrl = 0; |
1041 | 1061 | ||
1042 | if (tp_peer != tp && | 1062 | if (tp_peer != tp && |
1043 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) | 1063 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) |
1044 | return; | 1064 | return; |
1045 | 1065 | ||
1066 | /* Workaround to prevent overdrawing Amps. */ | ||
1067 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == | ||
1068 | ASIC_REV_5714) { | ||
1069 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3; | ||
1070 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | ||
1071 | grc_local_ctrl, 100); | ||
1072 | } | ||
1073 | |||
1046 | /* On 5753 and variants, GPIO2 cannot be used. */ | 1074 | /* On 5753 and variants, GPIO2 cannot be used. */ |
1047 | no_gpio2 = tp->nic_sram_data_cfg & | 1075 | no_gpio2 = tp->nic_sram_data_cfg & |
1048 | NIC_SRAM_DATA_CFG_NO_GPIO2; | 1076 | NIC_SRAM_DATA_CFG_NO_GPIO2; |
1049 | 1077 | ||
1050 | grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | | 1078 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 | |
1051 | GRC_LCLCTRL_GPIO_OE1 | | 1079 | GRC_LCLCTRL_GPIO_OE1 | |
1052 | GRC_LCLCTRL_GPIO_OE2 | | 1080 | GRC_LCLCTRL_GPIO_OE2 | |
1053 | GRC_LCLCTRL_GPIO_OUTPUT1 | | 1081 | GRC_LCLCTRL_GPIO_OUTPUT1 | |
@@ -1056,21 +1084,18 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
1056 | grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | | 1084 | grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | |
1057 | GRC_LCLCTRL_GPIO_OUTPUT2); | 1085 | GRC_LCLCTRL_GPIO_OUTPUT2); |
1058 | } | 1086 | } |
1059 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1087 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1060 | grc_local_ctrl); | 1088 | grc_local_ctrl, 100); |
1061 | udelay(100); | ||
1062 | 1089 | ||
1063 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT0; | 1090 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT0; |
1064 | 1091 | ||
1065 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1092 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1066 | grc_local_ctrl); | 1093 | grc_local_ctrl, 100); |
1067 | udelay(100); | ||
1068 | 1094 | ||
1069 | if (!no_gpio2) { | 1095 | if (!no_gpio2) { |
1070 | grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT2; | 1096 | grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT2; |
1071 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1097 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1072 | grc_local_ctrl); | 1098 | grc_local_ctrl, 100); |
1073 | udelay(100); | ||
1074 | } | 1099 | } |
1075 | } | 1100 | } |
1076 | } else { | 1101 | } else { |
@@ -1080,19 +1105,16 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
1080 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) | 1105 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) |
1081 | return; | 1106 | return; |
1082 | 1107 | ||
1083 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1108 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1084 | (GRC_LCLCTRL_GPIO_OE1 | | 1109 | (GRC_LCLCTRL_GPIO_OE1 | |
1085 | GRC_LCLCTRL_GPIO_OUTPUT1)); | 1110 | GRC_LCLCTRL_GPIO_OUTPUT1), 100); |
1086 | udelay(100); | ||
1087 | 1111 | ||
1088 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1112 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1089 | (GRC_LCLCTRL_GPIO_OE1)); | 1113 | GRC_LCLCTRL_GPIO_OE1, 100); |
1090 | udelay(100); | ||
1091 | 1114 | ||
1092 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1115 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1093 | (GRC_LCLCTRL_GPIO_OE1 | | 1116 | (GRC_LCLCTRL_GPIO_OE1 | |
1094 | GRC_LCLCTRL_GPIO_OUTPUT1)); | 1117 | GRC_LCLCTRL_GPIO_OUTPUT1), 100); |
1095 | udelay(100); | ||
1096 | } | 1118 | } |
1097 | } | 1119 | } |
1098 | } | 1120 | } |
@@ -1105,6 +1127,8 @@ static int tg3_setup_phy(struct tg3 *, int); | |||
1105 | 1127 | ||
1106 | static void tg3_write_sig_post_reset(struct tg3 *, int); | 1128 | static void tg3_write_sig_post_reset(struct tg3 *, int); |
1107 | static int tg3_halt_cpu(struct tg3 *, u32); | 1129 | static int tg3_halt_cpu(struct tg3 *, u32); |
1130 | static int tg3_nvram_lock(struct tg3 *); | ||
1131 | static void tg3_nvram_unlock(struct tg3 *); | ||
1108 | 1132 | ||
1109 | static int tg3_set_power_state(struct tg3 *tp, int state) | 1133 | static int tg3_set_power_state(struct tg3 *tp, int state) |
1110 | { | 1134 | { |
@@ -1133,10 +1157,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1133 | udelay(100); /* Delay after power state change */ | 1157 | udelay(100); /* Delay after power state change */ |
1134 | 1158 | ||
1135 | /* Switch out of Vaux if it is not a LOM */ | 1159 | /* Switch out of Vaux if it is not a LOM */ |
1136 | if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) { | 1160 | if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) |
1137 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl); | 1161 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl, 100); |
1138 | udelay(100); | ||
1139 | } | ||
1140 | 1162 | ||
1141 | return 0; | 1163 | return 0; |
1142 | 1164 | ||
@@ -1179,6 +1201,21 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1179 | tg3_setup_phy(tp, 0); | 1201 | tg3_setup_phy(tp, 0); |
1180 | } | 1202 | } |
1181 | 1203 | ||
1204 | if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) { | ||
1205 | int i; | ||
1206 | u32 val; | ||
1207 | |||
1208 | for (i = 0; i < 200; i++) { | ||
1209 | tg3_read_mem(tp, NIC_SRAM_FW_ASF_STATUS_MBOX, &val); | ||
1210 | if (val == ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1) | ||
1211 | break; | ||
1212 | msleep(1); | ||
1213 | } | ||
1214 | } | ||
1215 | tg3_write_mem(tp, NIC_SRAM_WOL_MBOX, WOL_SIGNATURE | | ||
1216 | WOL_DRV_STATE_SHUTDOWN | | ||
1217 | WOL_DRV_WOL | WOL_SET_MAGIC_PKT); | ||
1218 | |||
1182 | pci_read_config_word(tp->pdev, pm + PCI_PM_PMC, &power_caps); | 1219 | pci_read_config_word(tp->pdev, pm + PCI_PM_PMC, &power_caps); |
1183 | 1220 | ||
1184 | if (tp->tg3_flags & TG3_FLAG_WOL_ENABLE) { | 1221 | if (tp->tg3_flags & TG3_FLAG_WOL_ENABLE) { |
@@ -1220,10 +1257,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1220 | base_val |= (CLOCK_CTRL_RXCLK_DISABLE | | 1257 | base_val |= (CLOCK_CTRL_RXCLK_DISABLE | |
1221 | CLOCK_CTRL_TXCLK_DISABLE); | 1258 | CLOCK_CTRL_TXCLK_DISABLE); |
1222 | 1259 | ||
1223 | tw32_f(TG3PCI_CLOCK_CTRL, base_val | | 1260 | tw32_wait_f(TG3PCI_CLOCK_CTRL, base_val | CLOCK_CTRL_ALTCLK | |
1224 | CLOCK_CTRL_ALTCLK | | 1261 | CLOCK_CTRL_PWRDOWN_PLL133, 40); |
1225 | CLOCK_CTRL_PWRDOWN_PLL133); | ||
1226 | udelay(40); | ||
1227 | } else if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { | 1262 | } else if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { |
1228 | /* do nothing */ | 1263 | /* do nothing */ |
1229 | } else if (!((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && | 1264 | } else if (!((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && |
@@ -1244,11 +1279,11 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1244 | newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE; | 1279 | newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE; |
1245 | } | 1280 | } |
1246 | 1281 | ||
1247 | tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1); | 1282 | tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1, |
1248 | udelay(40); | 1283 | 40); |
1249 | 1284 | ||
1250 | tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2); | 1285 | tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2, |
1251 | udelay(40); | 1286 | 40); |
1252 | 1287 | ||
1253 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { | 1288 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { |
1254 | u32 newbits3; | 1289 | u32 newbits3; |
@@ -1262,9 +1297,20 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1262 | newbits3 = CLOCK_CTRL_44MHZ_CORE; | 1297 | newbits3 = CLOCK_CTRL_44MHZ_CORE; |
1263 | } | 1298 | } |
1264 | 1299 | ||
1265 | tw32_f(TG3PCI_CLOCK_CTRL, | 1300 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
1266 | tp->pci_clock_ctrl | newbits3); | 1301 | tp->pci_clock_ctrl | newbits3, 40); |
1267 | udelay(40); | 1302 | } |
1303 | } | ||
1304 | |||
1305 | if (!(tp->tg3_flags & TG3_FLAG_WOL_ENABLE) && | ||
1306 | !(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) { | ||
1307 | /* Turn off the PHY */ | ||
1308 | if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) { | ||
1309 | tg3_writephy(tp, MII_TG3_EXT_CTRL, | ||
1310 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); | ||
1311 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); | ||
1312 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) | ||
1313 | tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); | ||
1268 | } | 1314 | } |
1269 | } | 1315 | } |
1270 | 1316 | ||
@@ -1277,8 +1323,12 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1277 | 1323 | ||
1278 | val &= ~((1 << 16) | (1 << 4) | (1 << 2) | (1 << 1) | 1); | 1324 | val &= ~((1 << 16) | (1 << 4) | (1 << 2) | (1 << 1) | 1); |
1279 | tw32(0x7d00, val); | 1325 | tw32(0x7d00, val); |
1280 | if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) | 1326 | if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) { |
1327 | tg3_nvram_lock(tp); | ||
1281 | tg3_halt_cpu(tp, RX_CPU_BASE); | 1328 | tg3_halt_cpu(tp, RX_CPU_BASE); |
1329 | tw32_f(NVRAM_SWARB, SWARB_REQ_CLR0); | ||
1330 | tg3_nvram_unlock(tp); | ||
1331 | } | ||
1282 | } | 1332 | } |
1283 | 1333 | ||
1284 | /* Finally, set the new power state. */ | 1334 | /* Finally, set the new power state. */ |
@@ -1812,7 +1862,7 @@ static int tg3_setup_copper_phy(struct tg3 *tp, int force_reset) | |||
1812 | } | 1862 | } |
1813 | } | 1863 | } |
1814 | relink: | 1864 | relink: |
1815 | if (current_link_up == 0) { | 1865 | if (current_link_up == 0 || tp->link_config.phy_is_low_power) { |
1816 | u32 tmp; | 1866 | u32 tmp; |
1817 | 1867 | ||
1818 | tg3_phy_copper_begin(tp); | 1868 | tg3_phy_copper_begin(tp); |
@@ -3565,12 +3615,15 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3565 | if (!spin_trylock(&tp->tx_lock)) | 3615 | if (!spin_trylock(&tp->tx_lock)) |
3566 | return NETDEV_TX_LOCKED; | 3616 | return NETDEV_TX_LOCKED; |
3567 | 3617 | ||
3568 | /* This is a hard error, log it. */ | ||
3569 | if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { | 3618 | if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { |
3570 | netif_stop_queue(dev); | 3619 | if (!netif_queue_stopped(dev)) { |
3620 | netif_stop_queue(dev); | ||
3621 | |||
3622 | /* This is a hard error, log it. */ | ||
3623 | printk(KERN_ERR PFX "%s: BUG! Tx Ring full when " | ||
3624 | "queue awake!\n", dev->name); | ||
3625 | } | ||
3571 | spin_unlock(&tp->tx_lock); | 3626 | spin_unlock(&tp->tx_lock); |
3572 | printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", | ||
3573 | dev->name); | ||
3574 | return NETDEV_TX_BUSY; | 3627 | return NETDEV_TX_BUSY; |
3575 | } | 3628 | } |
3576 | 3629 | ||
@@ -7922,13 +7975,12 @@ static int tg3_test_memory(struct tg3 *tp) | |||
7922 | u32 offset; | 7975 | u32 offset; |
7923 | u32 len; | 7976 | u32 len; |
7924 | } mem_tbl_570x[] = { | 7977 | } mem_tbl_570x[] = { |
7925 | { 0x00000000, 0x01000}, | 7978 | { 0x00000000, 0x00b50}, |
7926 | { 0x00002000, 0x1c000}, | 7979 | { 0x00002000, 0x1c000}, |
7927 | { 0xffffffff, 0x00000} | 7980 | { 0xffffffff, 0x00000} |
7928 | }, mem_tbl_5705[] = { | 7981 | }, mem_tbl_5705[] = { |
7929 | { 0x00000100, 0x0000c}, | 7982 | { 0x00000100, 0x0000c}, |
7930 | { 0x00000200, 0x00008}, | 7983 | { 0x00000200, 0x00008}, |
7931 | { 0x00000b50, 0x00400}, | ||
7932 | { 0x00004000, 0x00800}, | 7984 | { 0x00004000, 0x00800}, |
7933 | { 0x00006000, 0x01000}, | 7985 | { 0x00006000, 0x01000}, |
7934 | { 0x00008000, 0x02000}, | 7986 | { 0x00008000, 0x02000}, |
@@ -8530,6 +8582,7 @@ static void __devinit tg3_nvram_init(struct tg3 *tp) | |||
8530 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) { | 8582 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) { |
8531 | tp->tg3_flags |= TG3_FLAG_NVRAM; | 8583 | tp->tg3_flags |= TG3_FLAG_NVRAM; |
8532 | 8584 | ||
8585 | tg3_nvram_lock(tp); | ||
8533 | tg3_enable_nvram_access(tp); | 8586 | tg3_enable_nvram_access(tp); |
8534 | 8587 | ||
8535 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752) | 8588 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752) |
@@ -8540,6 +8593,7 @@ static void __devinit tg3_nvram_init(struct tg3 *tp) | |||
8540 | tg3_get_nvram_size(tp); | 8593 | tg3_get_nvram_size(tp); |
8541 | 8594 | ||
8542 | tg3_disable_nvram_access(tp); | 8595 | tg3_disable_nvram_access(tp); |
8596 | tg3_nvram_unlock(tp); | ||
8543 | 8597 | ||
8544 | } else { | 8598 | } else { |
8545 | tp->tg3_flags &= ~(TG3_FLAG_NVRAM | TG3_FLAG_NVRAM_BUFFERED); | 8599 | tp->tg3_flags &= ~(TG3_FLAG_NVRAM | TG3_FLAG_NVRAM_BUFFERED); |
@@ -8637,10 +8691,10 @@ static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val) | |||
8637 | if (ret == 0) | 8691 | if (ret == 0) |
8638 | *val = swab32(tr32(NVRAM_RDDATA)); | 8692 | *val = swab32(tr32(NVRAM_RDDATA)); |
8639 | 8693 | ||
8640 | tg3_nvram_unlock(tp); | ||
8641 | |||
8642 | tg3_disable_nvram_access(tp); | 8694 | tg3_disable_nvram_access(tp); |
8643 | 8695 | ||
8696 | tg3_nvram_unlock(tp); | ||
8697 | |||
8644 | return ret; | 8698 | return ret; |
8645 | } | 8699 | } |
8646 | 8700 | ||
@@ -8725,6 +8779,10 @@ static int tg3_nvram_write_block_unbuffered(struct tg3 *tp, u32 offset, u32 len, | |||
8725 | 8779 | ||
8726 | offset = offset + (pagesize - page_off); | 8780 | offset = offset + (pagesize - page_off); |
8727 | 8781 | ||
8782 | /* Nvram lock released by tg3_nvram_read() above, | ||
8783 | * so need to get it again. | ||
8784 | */ | ||
8785 | tg3_nvram_lock(tp); | ||
8728 | tg3_enable_nvram_access(tp); | 8786 | tg3_enable_nvram_access(tp); |
8729 | 8787 | ||
8730 | /* | 8788 | /* |
@@ -10423,7 +10481,7 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str) | |||
10423 | return str; | 10481 | return str; |
10424 | } | 10482 | } |
10425 | 10483 | ||
10426 | static struct pci_dev * __devinit tg3_find_5704_peer(struct tg3 *tp) | 10484 | static struct pci_dev * __devinit tg3_find_peer(struct tg3 *tp) |
10427 | { | 10485 | { |
10428 | struct pci_dev *peer; | 10486 | struct pci_dev *peer; |
10429 | unsigned int func, devnr = tp->pdev->devfn & ~7; | 10487 | unsigned int func, devnr = tp->pdev->devfn & ~7; |
@@ -10434,8 +10492,13 @@ static struct pci_dev * __devinit tg3_find_5704_peer(struct tg3 *tp) | |||
10434 | break; | 10492 | break; |
10435 | pci_dev_put(peer); | 10493 | pci_dev_put(peer); |
10436 | } | 10494 | } |
10437 | if (!peer || peer == tp->pdev) | 10495 | /* 5704 can be configured in single-port mode, set peer to |
10438 | BUG(); | 10496 | * tp->pdev in that case. |
10497 | */ | ||
10498 | if (!peer) { | ||
10499 | peer = tp->pdev; | ||
10500 | return peer; | ||
10501 | } | ||
10439 | 10502 | ||
10440 | /* | 10503 | /* |
10441 | * We don't need to keep the refcount elevated; there's no way | 10504 | * We don't need to keep the refcount elevated; there's no way |
@@ -10671,8 +10734,9 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10671 | tp->rx_pending = 63; | 10734 | tp->rx_pending = 63; |
10672 | } | 10735 | } |
10673 | 10736 | ||
10674 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) | 10737 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || |
10675 | tp->pdev_peer = tg3_find_5704_peer(tp); | 10738 | (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) |
10739 | tp->pdev_peer = tg3_find_peer(tp); | ||
10676 | 10740 | ||
10677 | err = tg3_get_device_address(tp); | 10741 | err = tg3_get_device_address(tp); |
10678 | if (err) { | 10742 | if (err) { |
@@ -10817,12 +10881,14 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state) | |||
10817 | 10881 | ||
10818 | tg3_full_lock(tp, 0); | 10882 | tg3_full_lock(tp, 0); |
10819 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); | 10883 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); |
10884 | tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE; | ||
10820 | tg3_full_unlock(tp); | 10885 | tg3_full_unlock(tp); |
10821 | 10886 | ||
10822 | err = tg3_set_power_state(tp, pci_choose_state(pdev, state)); | 10887 | err = tg3_set_power_state(tp, pci_choose_state(pdev, state)); |
10823 | if (err) { | 10888 | if (err) { |
10824 | tg3_full_lock(tp, 0); | 10889 | tg3_full_lock(tp, 0); |
10825 | 10890 | ||
10891 | tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; | ||
10826 | tg3_init_hw(tp); | 10892 | tg3_init_hw(tp); |
10827 | 10893 | ||
10828 | tp->timer.expires = jiffies + tp->timer_offset; | 10894 | tp->timer.expires = jiffies + tp->timer_offset; |
@@ -10856,6 +10922,7 @@ static int tg3_resume(struct pci_dev *pdev) | |||
10856 | 10922 | ||
10857 | tg3_full_lock(tp, 0); | 10923 | tg3_full_lock(tp, 0); |
10858 | 10924 | ||
10925 | tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; | ||
10859 | tg3_init_hw(tp); | 10926 | tg3_init_hw(tp); |
10860 | 10927 | ||
10861 | tp->timer.expires = jiffies + tp->timer_offset; | 10928 | tp->timer.expires = jiffies + tp->timer_offset; |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index fb7e2a5f4a08..94dbcf3537ec 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -1529,6 +1529,12 @@ | |||
1529 | #define NIC_SRAM_MAC_ADDR_HIGH_MBOX 0x00000c14 | 1529 | #define NIC_SRAM_MAC_ADDR_HIGH_MBOX 0x00000c14 |
1530 | #define NIC_SRAM_MAC_ADDR_LOW_MBOX 0x00000c18 | 1530 | #define NIC_SRAM_MAC_ADDR_LOW_MBOX 0x00000c18 |
1531 | 1531 | ||
1532 | #define NIC_SRAM_WOL_MBOX 0x00000d30 | ||
1533 | #define WOL_SIGNATURE 0x474c0000 | ||
1534 | #define WOL_DRV_STATE_SHUTDOWN 0x00000001 | ||
1535 | #define WOL_DRV_WOL 0x00000002 | ||
1536 | #define WOL_SET_MAGIC_PKT 0x00000004 | ||
1537 | |||
1532 | #define NIC_SRAM_DATA_CFG_2 0x00000d38 | 1538 | #define NIC_SRAM_DATA_CFG_2 0x00000d38 |
1533 | 1539 | ||
1534 | #define SHASTA_EXT_LED_MODE_MASK 0x00018000 | 1540 | #define SHASTA_EXT_LED_MODE_MASK 0x00018000 |
@@ -1565,6 +1571,7 @@ | |||
1565 | #define MII_TG3_EXT_CTRL 0x10 /* Extended control register */ | 1571 | #define MII_TG3_EXT_CTRL 0x10 /* Extended control register */ |
1566 | #define MII_TG3_EXT_CTRL_FIFO_ELASTIC 0x0001 | 1572 | #define MII_TG3_EXT_CTRL_FIFO_ELASTIC 0x0001 |
1567 | #define MII_TG3_EXT_CTRL_LNK3_LED_MODE 0x0002 | 1573 | #define MII_TG3_EXT_CTRL_LNK3_LED_MODE 0x0002 |
1574 | #define MII_TG3_EXT_CTRL_FORCE_LED_OFF 0x0008 | ||
1568 | #define MII_TG3_EXT_CTRL_TBI 0x8000 | 1575 | #define MII_TG3_EXT_CTRL_TBI 0x8000 |
1569 | 1576 | ||
1570 | #define MII_TG3_EXT_STAT 0x11 /* Extended status register */ | 1577 | #define MII_TG3_EXT_STAT 0x11 /* Extended status register */ |