Thread (101 messages) flat view 101 messages, 8 authors, 2021-01-09

Re: [PATCH v10 4/4] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

From: Andrew Lunn <andrew@lunn.ch>
Date: 2020-11-20 01:55:18
Also in: linux-devicetree, lkml, oe-kbuild-all

On Fri, Nov 20, 2020 at 02:43:11AM +0100, Marek Behun wrote:
Hi Andrew,

On Fri, 20 Nov 2020 02:29:06 +0100
Andrew Lunn [off-list ref] wrote:
quoted
quoted
+	if (speed >= 2500 && port > 0 && port < 9)
+		return -EOPNOTSUPP;  
Maybe i'm missing something, but it looks like at this point you can
call

	return mv88e6xxx_port_set_speed_duplex(chip, port, speed, true, true, duplex);
He can't. That function does not support speed 5000. You can't simply
add it, because it clashes with register value for speed 2500 on
previous switches (Peridot, Topaz).

	Amethyst reg val	Peridot + Topaz reg val
2500	SPD_1000 | ALT_BIT	SPD_10000 | ALT_BIT
5000	SPD_10000 | ALT_BIT	not supported
10000	SPD_UNFORCED		SPD_UNFORCED
Hi Marek

O.K, as i said, i might be missing something :-)

I think a comment would be nice, pointing this out. Otherwise somebody
might try refactoring it, and make the same mistake!

      Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help