From 8c754a04ff11a9c1107c134ad5a858e9dc08c1de Mon Sep 17 00:00:00 2001 From: Chris Snook Date: Wed, 28 Mar 2007 20:51:51 -0400 Subject: atl1: save mac address on remove Some atl1 boards get their MAC address written directly to the register by the BIOS during POST, rather than storing it in EEPROM that's accessible to the driver. If the MAC register on one of these boards is changed and then the module is unloaded, the permanent MAC address will be forgotten until the box is rebooted. We should save the permanent address during removal if we've been messing with it. Signed-off-by: Chris Snook Signed-off-by: Jeff Garzik --- drivers/net/atl1/atl1_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/net') diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c index dee3638ad744..8606eac5bec8 100644 --- a/drivers/net/atl1/atl1_main.c +++ b/drivers/net/atl1/atl1_main.c @@ -2320,6 +2320,16 @@ static void __devexit atl1_remove(struct pci_dev *pdev) return; adapter = netdev_priv(netdev); + + /* Some atl1 boards lack persistent storage for their MAC, and get it + * from the BIOS during POST. If we've been messing with the MAC + * address, we need to save the permanent one. + */ + if (memcmp(adapter->hw.mac_addr, adapter->hw.perm_mac_addr, ETH_ALEN)) { + memcpy(adapter->hw.mac_addr, adapter->hw.perm_mac_addr, ETH_ALEN); + atl1_set_mac_addr(&adapter->hw); + } + iowrite16(0, adapter->hw.hw_addr + REG_GPHY_ENABLE); unregister_netdev(netdev); pci_iounmap(pdev, adapter->hw.hw_addr); -- cgit v1.2.3-59-g8ed1b From bd7a44488975759da10b5f25bcebec19930a5328 Mon Sep 17 00:00:00 2001 From: Francois Romieu Date: Thu, 29 Mar 2007 00:18:50 +0200 Subject: sis190: new PHY support Reported to work on the WinFast 761GXK8MB-RS motherboard. Plain 10/100 Mbps. Signed-off-by: Paul Gibbons Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik --- drivers/net/sis190.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net') diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index b08508b35833..34463ce6f132 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c @@ -324,6 +324,7 @@ static struct mii_chip_info { u32 feature; } mii_chip_table[] = { { "Broadcom PHY BCM5461", { 0x0020, 0x60c0 }, LAN, F_PHY_BCM5461 }, + { "Broadcom PHY AC131", { 0x0143, 0xbc70 }, LAN, 0 }, { "Agere PHY ET1101B", { 0x0282, 0xf010 }, LAN, 0 }, { "Marvell PHY 88E1111", { 0x0141, 0x0cc0 }, LAN, F_PHY_88E1111 }, { "Realtek PHY RTL8201", { 0x0000, 0x8200 }, LAN, 0 }, -- cgit v1.2.3-59-g8ed1b From d8d79201eb391ae0eca05f9e51f1f94ab42b6b4e Mon Sep 17 00:00:00 2001 From: Linsys Contractor Adhiraj Joshi Date: Fri, 23 Mar 2007 07:21:24 -0800 Subject: NetXen: Fix hardware access for ppc architecture. NetXen: Fix for hardware access on big endian machine. Signed-off-by: Adhiraj Joshi Signed-off-by: Jeff Garzik --- drivers/net/netxen/netxen_nic_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 229aa1c4fb79..eff965dc5fff 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c @@ -438,6 +438,7 @@ do_rom_fast_read_words(struct netxen_adapter *adapter, int addr, for (addridx = addr; addridx < (addr + size); addridx += 4) { ret = do_rom_fast_read(adapter, addridx, (int *)bytes); + *(int *)bytes = cpu_to_le32(*(int *)bytes); if (ret != 0) break; bytes += 4; @@ -497,7 +498,7 @@ static inline int do_rom_fast_write_words(struct netxen_adapter *adapter, int timeout = 0; int data; - data = *(u32*)bytes; + data = le32_to_cpu((*(u32*)bytes)); ret = do_rom_fast_write(adapter, addridx, data); if (ret < 0) -- cgit v1.2.3-59-g8ed1b