diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 2000-01-08 06:52:36 +0000 |
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 2000-01-08 06:52:36 +0000 |
| commit | dd3e57dac639dbd83ee2d7212e4dd49d04cbd0ae (patch) | |
| tree | e6f8769537a859accc4747b736f49efb8ef75f62 /sys/dev/usb | |
| parent | 1a24969d600fa65633bc6971479e0bc7ac011643 (diff) | |
Notes
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/if_aue.c | 27 | ||||
| -rw-r--r-- | sys/dev/usb/if_auereg.h | 1 |
2 files changed, 21 insertions, 7 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 2630ee0a3f7f..b398c3cd8415 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -372,6 +372,8 @@ static int aue_miibus_readreg(dev, phy, reg) int i; u_int16_t val = 0; + sc = device_get_softc(dev); + /* * The Am79C901 HomePNA PHY actually contains * two transceivers: a 1Mbps HomePNA PHY and a @@ -382,13 +384,13 @@ static int aue_miibus_readreg(dev, phy, reg) * happens to be configured for MII address 3, * so we filter that out. */ - if (phy == 3) - return(0); - - if (phy != 1) - return(0); - - sc = device_get_softc(dev); + if (sc->aue_info->aue_vid == USB_VENDOR_ADMTEK && + sc->aue_info->aue_did == USB_PRODUCT_ADMTEK_PEGASUS) { + if (phy == 3) + return(0); + if (phy != 1) + return(0); + } csr_write_1(sc, AUE_PHY_ADDR, phy); csr_write_1(sc, AUE_PHY_CTL, reg|AUE_PHYCTL_READ); @@ -582,6 +584,7 @@ USB_ATTACH(aue) usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; int i; + struct aue_type *t; s = splimp(); @@ -590,6 +593,16 @@ USB_ATTACH(aue) sc->aue_udev = uaa->device; sc->aue_unit = device_get_unit(self); + t = aue_devs; + while(t->aue_name != NULL) { + if (uaa->vendor == t->aue_vid && + uaa->product == t->aue_did) { + sc->aue_info = t; + break; + } + t++; + } + id = usbd_get_interface_descriptor(uaa->iface); usbd_devinfo(uaa->device, 0, devinfo); diff --git a/sys/dev/usb/if_auereg.h b/sys/dev/usb/if_auereg.h index 2bbe567390ba..d804705b8314 100644 --- a/sys/dev/usb/if_auereg.h +++ b/sys/dev/usb/if_auereg.h @@ -237,6 +237,7 @@ struct aue_softc { device_t aue_miibus; usbd_device_handle aue_udev; usbd_interface_handle aue_iface; + struct aue_type *aue_info; int aue_ed[AUE_ENDPT_MAX]; usbd_pipe_handle aue_ep[AUE_ENDPT_MAX]; int aue_unit; |
