diff options
| -rw-r--r-- | sys/pci/if_ste.c | 11 | ||||
| -rw-r--r-- | sys/pci/if_stereg.h | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/sys/pci/if_ste.c b/sys/pci/if_ste.c index 5a2a8142c5cd..5dca5da17dea 100644 --- a/sys/pci/if_ste.c +++ b/sys/pci/if_ste.c @@ -380,9 +380,7 @@ static int ste_miibus_readreg(dev, phy, reg) sc = device_get_softc(dev); - if (pci_get_vendor(dev) == DL_VENDORID && - pci_get_device(dev) == DL_DEVICEID_550TX && - phy != 0) + if ( sc->ste_one_phy && phy != 0 ) return (0); bzero((char *)&frame, sizeof(frame)); @@ -906,6 +904,13 @@ static int ste_attach(dev) bzero(sc, sizeof(struct ste_softc)); sc->ste_dev = dev; + /* + * Only use the first PHY since this chip reports multiple + */ + if (pci_get_vendor(dev) == DL_VENDORID && + pci_get_device(dev) == DL_DEVICEID_550TX ) + sc->ste_one_phy = 1; + mtx_init(&sc->ste_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE); STE_LOCK(sc); diff --git a/sys/pci/if_stereg.h b/sys/pci/if_stereg.h index c55af97f2179..9ff620e6459c 100644 --- a/sys/pci/if_stereg.h +++ b/sys/pci/if_stereg.h @@ -525,6 +525,7 @@ struct ste_softc { struct ste_chain_data ste_cdata; struct callout_handle ste_stat_ch; struct mtx ste_mtx; + u_int8_t ste_one_phy; }; #define STE_LOCK(_sc) mtx_lock(&(_sc)->ste_mtx) |
