generic: ar8216: register the switch from the probe routine
authorGabor Juhos <juhosg@openwrt.org>
Thu, 14 Feb 2013 14:01:24 +0000 (14:01 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Thu, 14 Feb 2013 14:01:24 +0000 (14:01 +0000)
commit3a1dc62c100f9c82960912a35f3876eeba80b9e7
tree49e57eaef9c45fceb039edbc74aa7d0d8a77b876
parent7f7ca933034e6b59bc04606ec89db5b6d8e824a5
generic: ar8216: register the switch from the probe routine

Currently the switch gets registered when an ethernet
driver connects to a PHY of the switch. This method does
not work with the ethernet drivers which are connecting
to the PHY from their ndo_open callback. With those
ethernet drivers, the driver tries to register the switch
each time when the etherned device is opened and this causes
a deadlock.

Move the switch registration into the probe routine to fix
this problem.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 35602
target/linux/generic/files/drivers/net/phy/ar8216.c