]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: qca8k: Fix port enable for CPU port
authorAndrew Lunn <andrew@lunn.ch>
Wed, 25 Sep 2019 00:47:07 +0000 (02:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Sep 2019 08:30:58 +0000 (10:30 +0200)
commit714c1a36ce9b7040caf5438cd596f02ea39ca363
tree3e21a08a6caf0eae3bcc36cf8a8d91126ea0445b
parente18c4107c19ab5c56dcac9954a3ae0b825b15c3d
net: dsa: qca8k: Fix port enable for CPU port

The CPU port does not have a PHY connected to it. So calling
phy_support_asym_pause() results in an Opps. As with other DSA
drivers, add a guard that the port is a user port.

Reported-by: Michal Vokáč <michal.vokac@ysoft.com>
Fixes: 404668d1f07e ("net: dsa: enable and disable all ports")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Michal Vokáč <michal.vokac@ysoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c