]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: marvell10g: fix differentiation of 88X3310 from 88X3340
authorMarek Behún <kabel@kernel.org>
Sun, 11 Jul 2021 16:38:15 +0000 (18:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Jul 2021 17:02:33 +0000 (10:02 -0700)
commitbf0b5db7eb1dc443a88309cbcced89ecf1cc6be7
tree0b772747329017f09b8698d3277063208cd763d3
parent8d24e3c2793db93156b2cf5e555de2318061cac2
net: phy: marvell10g: fix differentiation of 88X3310 from 88X3340

It seems that we cannot differentiate 88X3310 from 88X3340 by simply
looking at bit 3 of revision ID. This only works on revisions A0 and A1.
On revision B0, this bit is always 1.

Instead use the 3.d00d register for differentiation, since this register
contains information about number of ports on the device.

Fixes: 9181faa3d494 ("net: phy: marvell10g: add separate structure for 88X3340")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reported-by: Matteo Croce <mcroce@linux.microsoft.com>
Tested-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell10g.c
include/linux/marvell_phy.h