Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178156936
D50294.1796143981.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1013 B
Referenced Files
None
Subscribers
None
D50294.1796143981.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
Tue, Dec 1, 4:53 PM (1 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42128006
Default Alt Text
D50294.1796143981.diff (1013 B)
Attached To
Mode
D50294: e6000sw: fix bus ordering; don't panic if miibus devices are destroyed
Attached
Detach File
Event Timeline