提交 83ea0f4c 编写于 作者: N Neil Armstrong 提交者: David S. Miller

net: dsa: mv88e6060: use the correct bit shift for mac0

According to the mv88e6060 datasheet, the first mac byte must
be at position 9 instead of 8 since the bit 8 is used to select
if the mac address must differ for each port for Pause frames.
Use the correct shift and set the same mac address for all port.
Acked-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b73c774e
...@@ -188,7 +188,8 @@ static int mv88e6060_setup(struct dsa_switch *ds) ...@@ -188,7 +188,8 @@ static int mv88e6060_setup(struct dsa_switch *ds)
static int mv88e6060_set_addr(struct dsa_switch *ds, u8 *addr) static int mv88e6060_set_addr(struct dsa_switch *ds, u8 *addr)
{ {
REG_WRITE(REG_GLOBAL, 0x01, (addr[0] << 8) | addr[1]); /* Use the same MAC Address as FD Pause frames for all ports */
REG_WRITE(REG_GLOBAL, 0x01, (addr[0] << 9) | addr[1]);
REG_WRITE(REG_GLOBAL, 0x02, (addr[2] << 8) | addr[3]); REG_WRITE(REG_GLOBAL, 0x02, (addr[2] << 8) | addr[3]);
REG_WRITE(REG_GLOBAL, 0x03, (addr[4] << 8) | addr[5]); REG_WRITE(REG_GLOBAL, 0x03, (addr[4] << 8) | addr[5]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册