diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-05 11:53:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-05 11:53:20 -0400 |
commit | c3d1f1746b966907ba5ad2f75ddca24db8b21147 (patch) | |
tree | 548a25e104d8bdb906030b8d3bf78fbfde0e5817 /drivers/net/au1000_eth.c | |
parent | 66eddbfcc1f6610fa7c73c8d20a57eaf8e284e2f (diff) | |
parent | 0d365753d0b7c26043fdfa97790411606fb40112 (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (150 commits)
MIPS: PowerTV: Separate PowerTV USB support from non-USB code
MIPS: strip the un-needed sections of vmlinuz
MIPS: Clean up the calculation of VMLINUZ_LOAD_ADDRESS
MIPS: Clean up arch/mips/boot/compressed/decompress.c
MIPS: Clean up arch/mips/boot/compressed/ld.script
MIPS: Unify the suffix of compressed vmlinux.bin
MIPS: PowerTV: Add Gaia platform definitions.
MIPS: BCM47xx: Fix nvram_getenv return value.
MIPS: Octeon: Allow more than 3.75GB of memory with PCIe
MIPS: Clean up notify_die() usage.
MIPS: Remove unused task_struct.trap_no field.
Documentation: Mention that KProbes is supported on MIPS
SAMPLES: kprobe_example: Make it print something on MIPS.
MIPS: kprobe: Add support.
MIPS: Add instrunction format for BREAK and SYSCALL
MIPS: kprobes: Define regs_return_value()
MIPS: Ritually kill stupid printk.
MIPS: Octeon: Disallow MSI-X interrupt and fall back to MSI interrupts.
MIPS: Octeon: Support 256 MSI on PCIe
MIPS: Decode core number for R2 CPUs.
...
Diffstat (limited to 'drivers/net/au1000_eth.c')
-rw-r--r-- | drivers/net/au1000_eth.c | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 386d4feec652..15ae6df2ff00 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -104,14 +104,6 @@ MODULE_VERSION(DRV_VERSION); | |||
104 | * complete immediately. | 104 | * complete immediately. |
105 | */ | 105 | */ |
106 | 106 | ||
107 | /* These addresses are only used if yamon doesn't tell us what | ||
108 | * the mac address is, and the mac address is not passed on the | ||
109 | * command line. | ||
110 | */ | ||
111 | static unsigned char au1000_mac_addr[6] __devinitdata = { | ||
112 | 0x00, 0x50, 0xc2, 0x0c, 0x30, 0x00 | ||
113 | }; | ||
114 | |||
115 | struct au1000_private *au_macs[NUM_ETH_INTERFACES]; | 107 | struct au1000_private *au_macs[NUM_ETH_INTERFACES]; |
116 | 108 | ||
117 | /* | 109 | /* |
@@ -1002,7 +994,6 @@ static int __devinit au1000_probe(struct platform_device *pdev) | |||
1002 | db_dest_t *pDB, *pDBfree; | 994 | db_dest_t *pDB, *pDBfree; |
1003 | int irq, i, err = 0; | 995 | int irq, i, err = 0; |
1004 | struct resource *base, *macen; | 996 | struct resource *base, *macen; |
1005 | char ethaddr[6]; | ||
1006 | 997 | ||
1007 | base = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 998 | base = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1008 | if (!base) { | 999 | if (!base) { |
@@ -1079,24 +1070,13 @@ static int __devinit au1000_probe(struct platform_device *pdev) | |||
1079 | } | 1070 | } |
1080 | aup->mac_id = pdev->id; | 1071 | aup->mac_id = pdev->id; |
1081 | 1072 | ||
1082 | if (pdev->id == 0) { | 1073 | if (pdev->id == 0) |
1083 | if (prom_get_ethernet_addr(ethaddr) == 0) | ||
1084 | memcpy(au1000_mac_addr, ethaddr, sizeof(au1000_mac_addr)); | ||
1085 | else { | ||
1086 | netdev_info(dev, "No MAC address found\n"); | ||
1087 | /* Use the hard coded MAC addresses */ | ||
1088 | } | ||
1089 | |||
1090 | au1000_setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR); | 1074 | au1000_setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR); |
1091 | } else if (pdev->id == 1) | 1075 | else if (pdev->id == 1) |
1092 | au1000_setup_hw_rings(aup, MAC1_RX_DMA_ADDR, MAC1_TX_DMA_ADDR); | 1076 | au1000_setup_hw_rings(aup, MAC1_RX_DMA_ADDR, MAC1_TX_DMA_ADDR); |
1093 | 1077 | ||
1094 | /* | 1078 | /* set a random MAC now in case platform_data doesn't provide one */ |
1095 | * Assign to the Ethernet ports two consecutive MAC addresses | 1079 | random_ether_addr(dev->dev_addr); |
1096 | * to match those that are printed on their stickers | ||
1097 | */ | ||
1098 | memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr)); | ||
1099 | dev->dev_addr[5] += pdev->id; | ||
1100 | 1080 | ||
1101 | *aup->enable = 0; | 1081 | *aup->enable = 0; |
1102 | aup->mac_enabled = 0; | 1082 | aup->mac_enabled = 0; |
@@ -1106,6 +1086,9 @@ static int __devinit au1000_probe(struct platform_device *pdev) | |||
1106 | dev_info(&pdev->dev, "no platform_data passed, PHY search on MAC0\n"); | 1086 | dev_info(&pdev->dev, "no platform_data passed, PHY search on MAC0\n"); |
1107 | aup->phy1_search_mac0 = 1; | 1087 | aup->phy1_search_mac0 = 1; |
1108 | } else { | 1088 | } else { |
1089 | if (is_valid_ether_addr(pd->mac)) | ||
1090 | memcpy(dev->dev_addr, pd->mac, 6); | ||
1091 | |||
1109 | aup->phy_static_config = pd->phy_static_config; | 1092 | aup->phy_static_config = pd->phy_static_config; |
1110 | aup->phy_search_highest_addr = pd->phy_search_highest_addr; | 1093 | aup->phy_search_highest_addr = pd->phy_search_highest_addr; |
1111 | aup->phy1_search_mac0 = pd->phy1_search_mac0; | 1094 | aup->phy1_search_mac0 = pd->phy1_search_mac0; |