drivers/net/sunhme.c patch
Subsystems (2)
This patch provides a unique mac address for all interfaces for the Sun QFE card (non-sparc). It takes the base mac from the first interface and increments the mac address for the other interfaces.
It still preserves the 'macaddr' parameter so if desired, it can still be used.
Before patching:
eth0 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BB eth1 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BB eth2 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BB eth3 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BB
After patching:
eth0 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BB eth1 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BC eth2 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BD eth3 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BE
Cheers,
Tom
drivers/net/sunhme.c 2007-10-29 08:53:03.000000000 -0600 renamed from drivers/net/sunhme.c.orig 2007-10-29 07:58:25.000000000 -0600 +5 -0
@@ -3083,6 +3083,11 @@ static int __devinit happy_meal_pci_prob } #else get_hme_mac_nonsparc(pdev, &dev->dev_addr[0]); + if(macaddr[5] == 0){ + for (i = 0; i < 6; i++) + macaddr[i] = dev->dev_addr[i]; + macaddr[5]++; + } #endif }
David Miller
maintainerFrom: Tom Southerland <[email protected]>
Date: Mon, 29 Oct 2007 19:53:52 -0600
Quoted 15 lines
This patch provides a unique mac address for all interfaces for the Sun QFE card (non-sparc). It takes the base mac from the first interface and increments the mac address for the other interfaces.
It still preserves the 'macaddr' parameter so if desired, it can still be used.
Before patching:
eth0 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BB eth1 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BB eth2 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BB eth3 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BB
Quoted 6 lines
After patching:
eth0 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BB eth1 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BC eth2 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BD eth3 Link encap:Ethernet HWaddr 00:03:BA:17:4C:BE
Unfortunately, although I understand what you're trying to do, this change is not correct.
We obtain properly the local-mac-address property stored in the PCI ROM of each interface, and if you look at the code we look the MACs up by interface index.
So we are (or should be) obtaining the per-interface MAC address programmed into the onboard firmware.
Perhaps in get_hme_mac_nonsparc(), is_quattro_p() is evaluating false and therefore we mistakedly always use index 0?
Could you please check this? That's probably what the problem is.