]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: lantiq_gswip: fix and improve the unsupported interface error
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sun, 7 Jun 2020 13:02:58 +0000 (15:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jun 2020 00:09:46 +0000 (17:09 -0700)
commitb2c36b8ea6cc5070971f032a6389514e97d08672
treeeafeb984ffde99427dc67201575372c07c308e70
parent55c2c3c06d385f1d811f48e830ba780f54cdcaa0
net: dsa: lantiq_gswip: fix and improve the unsupported interface error

While trying to use the lantiq_gswip driver on one of my boards I made
a mistake when specifying the phy-mode (because the out-of-tree driver
wants phy-mode "gmii" or "mii" for the internal PHYs). In this case the
following error is printed multiple times:
  Unsupported interface: 3

While it gives at least a hint at what may be wrong it is not very user
friendly. Print the human readable phy-mode and also which port is
configured incorrectly (this hardware supports ports 0..6) to improve
the cases where someone made a mistake.

Fixes: 1e1742476b63e3 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lantiq_gswip.c