diff --git a/sys/dev/dc/dcphy.c b/sys/dev/dc/dcphy.c index e11fa54889f1..3c0e60b82d15 100644 --- a/sys/dev/dc/dcphy.c +++ b/sys/dev/dc/dcphy.c @@ -141,6 +141,7 @@ dcphy_attach(device_t dev) struct mii_attach_args *ma; struct mii_data *mii; struct dc_softc *dc_sc; + device_t brdev; sc = device_get_softc(dev); ma = device_get_ivars(dev); @@ -166,8 +167,8 @@ dcphy_attach(device_t dev) CSR_WRITE_4(dc_sc, DC_10BTSTAT, 0); CSR_WRITE_4(dc_sc, DC_10BTCTRL, 0); - switch(pci_read_config(device_get_parent(sc->mii_dev), - DC_PCI_CSID, 4)) { + brdev = device_get_parent(sc->mii_dev); + switch (pci_get_subdevice(brdev) << 16 | pci_get_subvendor(brdev)) { case COMPAQ_PRESARIO_ID: /* Example of how to only allow 10Mbps modes. */ sc->mii_capabilities = BMSR_ANEG|BMSR_10TFDX|BMSR_10THDX;