Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F158905535
D31613.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D31613.diff
View Options
Index: sys/arm64/conf/std.marvell
===================================================================
--- sys/arm64/conf/std.marvell
+++ sys/arm64/conf/std.marvell
@@ -44,6 +44,10 @@
device miiproxy # Required for etherswitch
device e6000sw # Marvell mv88e6085 based switches
+# Special support for miiphy attached to gpiomdio instead of neta.
+device gpiomdio # GPIO MDIO bus bit-banging driver
+device mii_bitbang # Need this explicitly for conf/files.
+
# USB support
device ehci_mv # Marvell EHCI USB interface
Index: sys/dev/mii/e1000phy.c
===================================================================
--- sys/dev/mii/e1000phy.c
+++ sys/dev/mii/e1000phy.c
@@ -111,6 +111,7 @@
MII_PHY_DESC(xxMARVELL, E1116R_29),
MII_PHY_DESC(xxMARVELL, E1118),
MII_PHY_DESC(xxMARVELL, E1145),
+ MII_PHY_DESC(xxMARVELL, E1512),
MII_PHY_DESC(xxMARVELL, E1149R),
MII_PHY_DESC(xxMARVELL, E3016),
MII_PHY_DESC(xxMARVELL, PHYG65G),
Index: sys/dev/mii/miidevs
===================================================================
--- sys/dev/mii/miidevs
+++ sys/dev/mii/miidevs
@@ -271,6 +271,7 @@
model xxMARVELL E1149 0x000b Marvell 88E1149 Gigabit PHY
model xxMARVELL E1111 0x000c Marvell 88E1111 Gigabit PHY
model xxMARVELL E1145 0x000d Marvell 88E1145 Quad Gigabit PHY
+model xxMARVELL E1512 0x001d Marvell 88E151[0248] Gigabit PHY
model xxMARVELL E1116 0x0021 Marvell 88E1116 Gigabit PHY
model xxMARVELL E1116R 0x0024 Marvell 88E1116R Gigabit PHY
model xxMARVELL E1118 0x0022 Marvell 88E1118 Gigabit PHY
Index: sys/dev/neta/if_mvneta.c
===================================================================
--- sys/dev/neta/if_mvneta.c
+++ sys/dev/neta/if_mvneta.c
@@ -731,9 +731,9 @@
/* Attach PHY(s) */
if ((sc->phy_addr != MII_PHY_ANY) && (!sc->use_inband_status)) {
- error = mii_attach(self, &sc->miibus, ifp, mvneta_mediachange,
- mvneta_mediastatus, BMSR_DEFCAPMASK, sc->phy_addr,
- MII_OFFSET_ANY, 0);
+ error = mii_attach(sc->phy_dev, &sc->miibus, ifp,
+ mvneta_mediachange, mvneta_mediastatus,
+ BMSR_DEFCAPMASK, sc->phy_addr, MII_OFFSET_ANY, 0);
if (error != 0) {
if (bootverbose) {
device_printf(self,
Index: sys/dev/neta/if_mvneta_fdt.c
===================================================================
--- sys/dev/neta/if_mvneta_fdt.c
+++ sys/dev/neta/if_mvneta_fdt.c
@@ -111,6 +111,7 @@
int err;
sc = device_get_softc(dev);
+ sc->phy_dev = dev;
/* Try to fetch PHY information from FDT */
err = mvneta_fdt_phy_acquire(dev);
@@ -141,6 +142,7 @@
mvneta_fdt_phy_acquire(device_t dev)
{
struct mvneta_softc *sc;
+ device_t phy_dev;
phandle_t node, child, phy_handle;
char phymode[PHY_MODE_MAXLEN];
char managed[INBAND_STATUS_MAXLEN];
@@ -218,6 +220,14 @@
"Could not find PHY address in FDT.\n");
return (ENXIO);
}
+ /* See if we have a "gpiomdio" device. */
+ phy_dev = OF_device_from_xref(OF_parent(phy_handle));
+ if (phy_dev != NULL && phy_dev != dev) {
+ sc->phy_dev = phy_dev;
+ if (bootverbose)
+ device_printf(dev, "Switching PHY dev to %s\n",
+ device_get_nameunit(phy_dev));
+ }
}
return (0);
Index: sys/dev/neta/if_mvnetavar.h
===================================================================
--- sys/dev/neta/if_mvnetavar.h
+++ sys/dev/neta/if_mvnetavar.h
@@ -269,6 +269,7 @@
enum mvneta_phy_mode phy_mode;
int phy_addr;
int phy_speed; /* PHY speed */
+ device_t phy_dev;
boolean_t phy_fdx; /* Full duplex mode */
boolean_t autoneg; /* Autonegotiation status */
boolean_t use_inband_status; /* In-band link status */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jun 8, 1:48 PM (18 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33812959
Default Alt Text
D31613.diff (3 KB)
Attached To
Mode
D31613: mvneta: no longer panic on boot when mii cannot attach
Attached
Detach File
Event Timeline
Log In to Comment