mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
The JP1082 device doesn't respond to the MII_BMSR command and it turns
out that it has an unusable PHY. It still works, although very slowly, without a PHY, so I implemented non-PHY support in the udav driver.
This commit is contained in:
parent
eac2306319
commit
63490e32b2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238466
@ -169,7 +169,7 @@ MODULE_DEPEND(udav, ether, 1, 1, 1);
|
||||
MODULE_DEPEND(udav, miibus, 1, 1, 1);
|
||||
MODULE_VERSION(udav, 1);
|
||||
|
||||
static const struct usb_ether_methods udav_ue_methods = {
|
||||
static struct usb_ether_methods udav_ue_methods = {
|
||||
.ue_attach_post = udav_attach_post,
|
||||
.ue_start = udav_start,
|
||||
.ue_init = udav_init,
|
||||
@ -206,7 +206,8 @@ static const STRUCT_USB_HOST_ID udav_devs[] = {
|
||||
{USB_VPI(USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_ADM8515, 0)},
|
||||
/* Kontron AG USB Ethernet */
|
||||
{USB_VPI(USB_VENDOR_KONTRON, USB_PRODUCT_KONTRON_DM9601, 0)},
|
||||
{USB_VPI(USB_VENDOR_KONTRON, USB_PRODUCT_KONTRON_JP1082, 0)},
|
||||
{USB_VPI(USB_VENDOR_KONTRON, USB_PRODUCT_KONTRON_JP1082,
|
||||
UDAV_FLAG_NO_PHY)},
|
||||
};
|
||||
|
||||
static void
|
||||
@ -259,6 +260,16 @@ udav_attach(device_t dev)
|
||||
goto detach;
|
||||
}
|
||||
|
||||
/*
|
||||
* The JP1082 has an unusable PHY and provides no link information.
|
||||
*/
|
||||
if (sc->sc_flags & UDAV_FLAG_NO_PHY) {
|
||||
udav_ue_methods.ue_tick = NULL;
|
||||
udav_ue_methods.ue_mii_upd = NULL;
|
||||
udav_ue_methods.ue_mii_sts = NULL;
|
||||
sc->sc_flags |= UDAV_FLAG_LINK;
|
||||
}
|
||||
|
||||
ue->ue_sc = sc;
|
||||
ue->ue_dev = dev;
|
||||
ue->ue_udev = uaa->device;
|
||||
@ -712,7 +723,8 @@ udav_stop(struct usb_ether *ue)
|
||||
UDAV_LOCK_ASSERT(sc, MA_OWNED);
|
||||
|
||||
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
|
||||
sc->sc_flags &= ~UDAV_FLAG_LINK;
|
||||
if (!(sc->sc_flags & UDAV_FLAG_NO_PHY))
|
||||
sc->sc_flags &= ~UDAV_FLAG_LINK;
|
||||
|
||||
/*
|
||||
* stop all the transfers, if not already stopped:
|
||||
|
@ -159,6 +159,7 @@ struct udav_softc {
|
||||
int sc_flags;
|
||||
#define UDAV_FLAG_LINK 0x0001
|
||||
#define UDAV_FLAG_EXT_PHY 0x0040
|
||||
#define UDAV_FLAG_NO_PHY 0x0080
|
||||
};
|
||||
|
||||
#define UDAV_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
|
||||
|
Loading…
Reference in New Issue
Block a user