From ec81fa9d4e8175468d96fd7d23548f2ed6b32315 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 15 Jun 2008 11:10:27 +0000 Subject: (4/6) bcm57xx: switch-core.c/switch-robo.c check for port already registered This patch prevents switch-robo.c from attempting robo_probe on a port that is already registered. robo_probe will adjust kernel reference counts if it detects a switch on the port. If this patch wasn't applied, the wrt350n would hang on reboot, waiting for the network driver reference count to reach zero indefinitely. Signed-off-by: Ben Pfountz git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11469 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/switch/src/switch-robo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'package/switch/src/switch-robo.c') diff --git a/package/switch/src/switch-robo.c b/package/switch/src/switch-robo.c index 045dce1c4b..779b89f615 100644 --- a/package/switch/src/switch-robo.c +++ b/package/switch/src/switch-robo.c @@ -528,7 +528,8 @@ static int __init robo_init(void) device = strdup("ethX"); for (device[3] = '0'; (device[3] <= '3') && notfound; device[3]++) { - notfound = robo_probe(device); + if (! switch_device_registered (device)) + notfound = robo_probe(device); } device[3]--; -- cgit v1.2.3