Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156826376
D50294.id155275.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1013 B
Referenced Files
None
Subscribers
None
D50294.id155275.diff
View Options
diff --git a/sys/dev/etherswitch/e6000sw/e6000sw.c b/sys/dev/etherswitch/e6000sw/e6000sw.c
--- a/sys/dev/etherswitch/e6000sw/e6000sw.c
+++ b/sys/dev/etherswitch/e6000sw/e6000sw.c
@@ -196,8 +196,8 @@
sizeof(e6000sw_softc_t));
DRIVER_MODULE(e6000sw, mdio, e6000sw_driver, 0, 0);
-DRIVER_MODULE(etherswitch, e6000sw, etherswitch_driver, 0, 0);
DRIVER_MODULE(miibus, e6000sw, miibus_driver, 0, 0);
+DRIVER_MODULE_ORDERED(etherswitch, e6000sw, etherswitch_driver, 0, 0, SI_ORDER_ANY);
MODULE_DEPEND(e6000sw, mdio, 1, 1, 1);
MODULE_DEPEND(e6000sw, etherswitch, 1, 1, 1);
@@ -1402,11 +1402,17 @@
static __inline struct mii_data*
e6000sw_miiforphy(e6000sw_softc_t *sc, unsigned int phy)
{
+ device_t mii_dev;
if (!e6000sw_is_phyport(sc, phy))
return (NULL);
+ mii_dev = sc->miibus[phy];
+ if (mii_dev == NULL)
+ return (NULL);
+ if (device_get_state(mii_dev) != DS_ATTACHED)
+ return (NULL);
- return (device_get_softc(sc->miibus[phy]));
+ return (device_get_softc(mii_dev));
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 17, 5:47 PM (5 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33201428
Default Alt Text
D50294.id155275.diff (1013 B)
Attached To
Mode
D50294: e6000sw: fix bus ordering; don't panic if miibus devices are destroyed
Attached
Detach File
Event Timeline
Log In to Comment