From e25593c034610803da27e1d2e337702d5a550797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 3 Nov 2007 16:43:28 +0000 Subject: [PATCH] I accidently didn't revert the delayed MII bus scan correctly which resulted in callling the device's attach() method twice - this would let every network device that found a MII PHY fall into an endless loop on start. In other words 3com and VIA Rhine should now work fine. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22815 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/libs/compat/freebsd_network/compat.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libs/compat/freebsd_network/compat.c b/src/libs/compat/freebsd_network/compat.c index e64246940e..2b21db16bd 100644 --- a/src/libs/compat/freebsd_network/compat.c +++ b/src/libs/compat/freebsd_network/compat.c @@ -405,15 +405,13 @@ bus_generic_attach(device_t dev) while ((child = list_get_next_item(&dev->children, child)) != NULL) { if (child->driver == NULL) { driver_t *driver = __haiku_select_miibus_driver(child); - if (driver) { - device_set_driver(child, driver); - child->methods.attach(child); - } else { + if (driver == NULL) { struct mii_attach_args *ma = device_get_ivars(child); device_printf(dev, "No PHY module found (%x/%x)!\n", ma->mii_id1, ma->mii_id2); - } + } else + device_set_driver(child, driver); } else if (child->driver == &miibus_driver) child->methods.probe(child);