From 2625e51956881fed072864ab37c3b1d0f784e73a Mon Sep 17 00:00:00 2001 From: Hiroki Sato Date: Wed, 10 Jul 2019 05:45:50 +0000 Subject: [PATCH] Add support for RTL8156, 2.5GbE USB network controller, to if_cdce(4). This chip can be found in Planex USB-LAN2500R. --- share/man/man4/cdce.4 | 6 +++++- sys/dev/usb/net/if_cdce.c | 1 + sys/dev/usb/quirk/usb_quirk.c | 1 + sys/dev/usb/usbdevs | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/share/man/man4/cdce.4 b/share/man/man4/cdce.4 index 68845cde9eca..8b45d76836ec 100644 --- a/share/man/man4/cdce.4 +++ b/share/man/man4/cdce.4 @@ -28,7 +28,7 @@ .\" $NetBSD: cdce.4,v 1.4 2004/12/08 18:35:56 peter Exp $ .\" $FreeBSD$ .\" -.Dd May 21, 2018 +.Dd July 10, 2019 .Dt CDCE 4 .Os .Sh NAME @@ -89,6 +89,10 @@ Prolific PL-2501 Host-to-Host Bridge Controller Sharp Zaurus PDA .It Terayon TJ-715 DOCSIS Cable Modem +.It +Realtek RTL8156 USB GBE/2.5G Ethernet Family Controller +.It +Planex USB-LAN2500R .El .Sh DIAGNOSTICS .Bl -diag diff --git a/sys/dev/usb/net/if_cdce.c b/sys/dev/usb/net/if_cdce.c index d63539da7e89..c7bf61131bc0 100644 --- a/sys/dev/usb/net/if_cdce.c +++ b/sys/dev/usb/net/if_cdce.c @@ -276,6 +276,7 @@ static const STRUCT_USB_HOST_ID cdce_host_devs[] = { {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLA300, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC700, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC750, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)}, + {USB_VPI(USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8156, 0)}, {USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR), USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x16), diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index b282c0f14be7..fc7081927aaa 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -101,6 +101,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK(ELSA, MODEM1, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(PLANEX2, MZKUE150N, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(CISCOLINKSYS, USB3GIGV1, 0x0000, 0xffff, UQ_CFG_INDEX_1), + USB_QUIRK(REALTEK, RTL8156, 0x0000, 0xffff, UQ_CFG_INDEX_2), /* Quirks for printer devices */ USB_QUIRK(HP, 895C, 0x0000, 0xffff, UQ_BROKEN_BIDIR), USB_QUIRK(HP, 880C, 0x0000, 0xffff, UQ_BROKEN_BIDIR), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 8c835d7273b0..1abdd57ab4c1 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -3962,6 +3962,7 @@ product REALTEK RTL8188RU_2 0x317f RTL8188RU product REALTEK USBKR100 0x8150 USBKR100 USB Ethernet product REALTEK RTL8152 0x8152 RTL8152 USB Ethernet product REALTEK RTL8153 0x8153 RTL8153 USB Ethernet +product REALTEK RTL8156 0x8156 RTL8156 USB Ethernet product REALTEK RTL8188CE_0 0x8170 RTL8188CE product REALTEK RTL8171 0x8171 RTL8171 product REALTEK RTL8172 0x8172 RTL8172