Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [guruplug] mvgbe1 no PHY found
>Can we just use the 'phy' locator we already have?
>For example in the kernel config(5):
>(revert to if_mvgbe.c 1.5 for this)
>mvgbe0 at mvgbec0 port 0
>mvgbe1 at mvgbec0 port 1
mvgbe1 at mvgbec1 port 0 (2 controllers one port on each)
>makphy0 at mvgbe0 phy 0
>makphy1 at mvgbe1 phy 1
I dont think so.... currently mvgbe_attach uses a helper routine from mii.c
to identify the PHYs.
I've looked at a few other network drivers and they seem to use this helper
routine rather than autoconf(9) too. (I must admit I'm still getting my
head around the autoconf process)
>Or even, as found on my Orion-based NAS:
>makphy0 at mvgbe0 phy 8
A PHY located at address 8 presents more of an issue..the patches submitted
to cvs would currently break support for your device as i had assumed
mvgbec0=>phy0, mvgbec1=>phy1
a solution could be mvgbec0 => 1st phy found, mvgbec1=> 2nd phy found .. the
helper function supports this if we specify a phy offset rather than a phy
address. (Though this still doesnt address the issue of >2 PHYs)
as in the patch below:
Index: ./sys/dev/marvell/if_mvgbe.c
===================================================================
RCS file: /cvsroot/src/sys/dev/marvell/if_mvgbe.c,v
retrieving revision 1.7
diff -u -r1.7 if_mvgbe.c
--- ./sys/dev/marvell/if_mvgbe.c 6 Mar 2011 17:00:16 -0000 1.7
+++ ./sys/dev/marvell/if_mvgbe.c 7 Mar 2011 12:06:26 -0000
@@ -619,7 +619,6 @@
mvgbe_attach(device_t parent, device_t self, void *aux)
{
struct mvgbe_softc *sc = device_private(self);
- struct mvgbec_softc *csc = device_private(parent);
struct marvell_attach_args *mva = aux;
struct mvgbe_txmap_entry *entry;
struct ifnet *ifp;
@@ -767,7 +766,7 @@
ifmedia_init(&sc->sc_mii.mii_media, 0,
mvgbe_mediachange, mvgbe_mediastatus);
mii_attach(self, &sc->sc_mii, 0xffffffff,
- parent == mvgebc0 ? 0 : 1, MII_OFFSET_ANY, 0);
+ MII_PHY_ANY,parent == mvgbec0 ? 0 : 1, 0);
if (LIST_FIRST(&sc->sc_mii.mii_phys) == NULL) {
aprint_error_dev(self, "no PHY found!\n");
ifmedia_add(&sc->sc_mii.mii_media,
--
View this message in context:
http://old.nabble.com/-guruplug--mvgbe1-no-PHY-found-tp30876058p31087225.html
Sent from the port-arm mailing list archive at Nabble.com.
Home |
Main Index |
Thread Index |
Old Index