From 1e4ef5450180a6fe9a425e2d30b7b5cf90c1afad Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Tue, 13 May 2008 14:00:09 +0000 Subject: [PATCH] From the OpenBSD commit log : Add support for the Apple USB Ethernet adapter. Work around the "latch in at the first working PHY address hack", that fails for this adapter because it returns 0xffff when reading from lower PHY addresses. Also add more debugging printfs Obtained from: OpenBSD MFC After: 3 days --- sys/dev/usb/if_axe.c | 3 ++- sys/dev/usb/usbdevs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 188c08f2eda..65da32bfc2b 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -127,6 +127,7 @@ __FBSDID("$FreeBSD$"); const struct axe_type axe_devs[] = { { { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_UF200}, 0 }, { { USB_VENDOR_ACERCM, USB_PRODUCT_ACERCM_EP1427X2}, 0 }, + { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_ETHERNET}, AX772 }, { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88172}, 0 }, { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772}, AX772 }, { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88178}, AX178 }, @@ -273,7 +274,7 @@ axe_miibus_readreg(device_t dev, int phy, int reg) return(-1); } - if (val) + if (val && val != 0xffff) sc->axe_phyaddrs[0] = phy; return (le16toh(val)); diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 5b605d58e87..270e94b21ef 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -852,6 +852,7 @@ product APPLE IPOD_07 0x1207 iPod '07' product APPLE IPOD_08 0x1208 iPod '08' product APPLE IPODVIDEO 0x1209 iPod Video product APPLE IPODNANO 0x120a iPod Nano +product APPLE ETHERNET 0x1402 Ethernet A1277 /* Arkmicro Technologies */ product ARKMICRO ARK3116 0x0232 ARK3116 Serial