diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2005-11-23 06:49:47 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-01 02:25:26 -0500 |
commit | 0b85c0ebde63a41d57b6214977ac2752bf5a086f (patch) | |
tree | 3ea968ce6be1c92aa6057958633af6392341b105 /drivers/net/ixp2000/pm3386.c | |
parent | 7ed98bfdea45dbdc66261660357659470935a03a (diff) |
[PATCH] pm3386: add hook for setting MAC address
When we reset the pm3386, it loses its internally stored MAC addresses
that were programmed into it by the bootloader (and are used by the
hardware for the generation of PAUSE frames.) Add a hook to allow
setting these addresses so that we can program them back by hand.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/ixp2000/pm3386.c')
-rw-r--r-- | drivers/net/ixp2000/pm3386.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ixp2000/pm3386.c b/drivers/net/ixp2000/pm3386.c index 267b6bd5f79f..870b486f5dea 100644 --- a/drivers/net/ixp2000/pm3386.c +++ b/drivers/net/ixp2000/pm3386.c | |||
@@ -215,6 +215,13 @@ void pm3386_get_mac(int port, u8 *mac) | |||
215 | mac[5] = (temp >> 8) & 0xff; | 215 | mac[5] = (temp >> 8) & 0xff; |
216 | } | 216 | } |
217 | 217 | ||
218 | void pm3386_set_mac(int port, u8 *mac) | ||
219 | { | ||
220 | pm3386_port_reg_write(port, 0x308, 0x100, (mac[1] << 8) | mac[0]); | ||
221 | pm3386_port_reg_write(port, 0x309, 0x100, (mac[3] << 8) | mac[2]); | ||
222 | pm3386_port_reg_write(port, 0x30a, 0x100, (mac[5] << 8) | mac[4]); | ||
223 | } | ||
224 | |||
218 | static u32 pm3386_get_stat(int port, u16 base) | 225 | static u32 pm3386_get_stat(int port, u16 base) |
219 | { | 226 | { |
220 | u32 value; | 227 | u32 value; |