diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index fc9b5cd957aa..a0b8848049c9 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -7,7 +7,12 @@ | |||
7 | * Copyright (C) 2005 Broadcom Corporation. | 7 | * Copyright (C) 2005 Broadcom Corporation. |
8 | * | 8 | * |
9 | * Firmware is: | 9 | * Firmware is: |
10 | * Copyright (C) 2000-2003 Broadcom Corporation. | 10 | * Derived from proprietary unpublished source code, |
11 | * Copyright (C) 2000-2003 Broadcom Corporation. | ||
12 | * | ||
13 | * Permission is hereby granted for the distribution of this firmware | ||
14 | * data in hexadecimal or equivalent format, provided this copyright | ||
15 | * notice is accompanying it. | ||
11 | */ | 16 | */ |
12 | 17 | ||
13 | #include <linux/config.h> | 18 | #include <linux/config.h> |
@@ -61,8 +66,8 @@ | |||
61 | 66 | ||
62 | #define DRV_MODULE_NAME "tg3" | 67 | #define DRV_MODULE_NAME "tg3" |
63 | #define PFX DRV_MODULE_NAME ": " | 68 | #define PFX DRV_MODULE_NAME ": " |
64 | #define DRV_MODULE_VERSION "3.29" | 69 | #define DRV_MODULE_VERSION "3.31" |
65 | #define DRV_MODULE_RELDATE "May 23, 2005" | 70 | #define DRV_MODULE_RELDATE "June 8, 2005" |
66 | 71 | ||
67 | #define TG3_DEF_MAC_MODE 0 | 72 | #define TG3_DEF_MAC_MODE 0 |
68 | #define TG3_DEF_RX_MODE 0 | 73 | #define TG3_DEF_RX_MODE 0 |
@@ -8555,6 +8560,16 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp) | |||
8555 | 8560 | ||
8556 | case NIC_SRAM_DATA_CFG_LED_MODE_MAC: | 8561 | case NIC_SRAM_DATA_CFG_LED_MODE_MAC: |
8557 | tp->led_ctrl = LED_CTRL_MODE_MAC; | 8562 | tp->led_ctrl = LED_CTRL_MODE_MAC; |
8563 | |||
8564 | /* Default to PHY_1_MODE if 0 (MAC_MODE) is | ||
8565 | * read on some older 5700/5701 bootcode. | ||
8566 | */ | ||
8567 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == | ||
8568 | ASIC_REV_5700 || | ||
8569 | GET_ASIC_REV(tp->pci_chip_rev_id) == | ||
8570 | ASIC_REV_5701) | ||
8571 | tp->led_ctrl = LED_CTRL_MODE_PHY_1; | ||
8572 | |||
8558 | break; | 8573 | break; |
8559 | 8574 | ||
8560 | case SHASTA_EXT_LED_SHARED: | 8575 | case SHASTA_EXT_LED_SHARED: |
@@ -9680,10 +9695,24 @@ static int __devinit tg3_test_dma(struct tg3 *tp) | |||
9680 | } | 9695 | } |
9681 | if ((tp->dma_rwctrl & DMA_RWCTRL_WRITE_BNDRY_MASK) != | 9696 | if ((tp->dma_rwctrl & DMA_RWCTRL_WRITE_BNDRY_MASK) != |
9682 | DMA_RWCTRL_WRITE_BNDRY_16) { | 9697 | DMA_RWCTRL_WRITE_BNDRY_16) { |
9698 | static struct pci_device_id dma_wait_state_chipsets[] = { | ||
9699 | { PCI_DEVICE(PCI_VENDOR_ID_APPLE, | ||
9700 | PCI_DEVICE_ID_APPLE_UNI_N_PCI15) }, | ||
9701 | { }, | ||
9702 | }; | ||
9703 | |||
9683 | /* DMA test passed without adjusting DMA boundary, | 9704 | /* DMA test passed without adjusting DMA boundary, |
9684 | * just restore the calculated DMA boundary | 9705 | * now look for chipsets that are known to expose the |
9706 | * DMA bug without failing the test. | ||
9685 | */ | 9707 | */ |
9686 | tp->dma_rwctrl = saved_dma_rwctrl; | 9708 | if (pci_dev_present(dma_wait_state_chipsets)) { |
9709 | tp->dma_rwctrl &= ~DMA_RWCTRL_WRITE_BNDRY_MASK; | ||
9710 | tp->dma_rwctrl |= DMA_RWCTRL_WRITE_BNDRY_16; | ||
9711 | } | ||
9712 | else | ||
9713 | /* Safe to use the calculated DMA boundary. */ | ||
9714 | tp->dma_rwctrl = saved_dma_rwctrl; | ||
9715 | |||
9687 | tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); | 9716 | tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); |
9688 | } | 9717 | } |
9689 | 9718 | ||