Implement pm3386 reset. A reset zeroes out the internally stored MAC addresses, so we need to save and reload them by hand.
Signed-off-by: Lennert Buytenhek <[EMAIL PROTECTED]> diff -urN linux-2.6.15-rc1.upstream.orig/drivers/net/ixp2000/pm3386.c linux-2.6.15-rc1.upstream/drivers/net/ixp2000/pm3386.c --- linux-2.6.15-rc1.upstream.orig/drivers/net/ixp2000/pm3386.c 2005-11-22 12:50:33.000000000 +0100 +++ linux-2.6.15-rc1.upstream/drivers/net/ixp2000/pm3386.c 2005-11-22 12:50:39.000000000 +0100 @@ -89,7 +89,37 @@ void pm3386_reset(void) { - /* @@@ Implement me. */ + u8 mac[3][6]; + + /* Save programmed MAC addresses. */ + pm3386_get_mac(0, mac[0]); + pm3386_get_mac(1, mac[1]); + pm3386_get_mac(2, mac[2]); + + /* Assert analog and digital reset. */ + pm3386_reg_write(0, 0x002, 0x0060); + pm3386_reg_write(1, 0x002, 0x0060); + mdelay(1); + + /* Deassert analog reset. */ + pm3386_reg_write(0, 0x002, 0x0062); + pm3386_reg_write(1, 0x002, 0x0062); + mdelay(10); + + /* Deassert digital reset. */ + pm3386_reg_write(0, 0x002, 0x0063); + pm3386_reg_write(1, 0x002, 0x0063); + mdelay(10); + + /* Restore programmed MAC addresses. */ + pm3386_set_mac(0, mac[0]); + pm3386_set_mac(1, mac[1]); + pm3386_set_mac(2, mac[2]); + + /* Disable carrier on all ports. */ + pm3386_set_carrier(0, 0); + pm3386_set_carrier(1, 0); + pm3386_set_carrier(2, 0); } static u16 swaph(u16 x) - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html