Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Aug 2014 11:23:09 +0200
From:      Roland Smith <rsmith@xs4all.nl>
To:        Ross Penner <rossp@f-m.fm>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: USB ethernet adapter support
Message-ID:  <20140830092309.GA13466@slackbox.erewhon.home>
In-Reply-To: <1409380442.2672021.158440789.5C42A334@webmail.messagingengine.com>
References:  <1409380442.2672021.158440789.5C42A334@webmail.messagingengine.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 29, 2014 at 11:34:02PM -0700, Ross Penner wrote:
> I have a USB ethernet adapter that doesn't seem to work out of the box
> on my 10.0 system. I'm hoping somebody can help me figure out what
> driver to load, or if there even is a driver available.
>=20
> When I plug the device into the FreeBSD machine the only line on dmesg
> is:
> ugen4.2: <Linksys> at usbus4
>=20
> It does work with my Ubuntu 14.04 system. I've added the dmesg output in
> the hopes that it will be helpful:
> [137513.415146] usb 1-1.5: new high-speed USB device number 6 using
> ehci-pci
> [137513.508489] usb 1-1.5: New USB device found, idVendor=3D13b1,
> idProduct=3D0041
> [137513.508493] usb 1-1.5: New USB device strings: Mfr=3D1, Product=3D2,
> SerialNumber=3D6
> [137513.508494] usb 1-1.5: Product: Linksys USB3GIGV1
> [137513.508495] usb 1-1.5: Manufacturer: Linksys
> [137513.508497] usb 1-1.5: SerialNumber: 000001000000
> [137513.528939] cdc_ether 1-1.5:2.0 eth1: register 'cdc_ether' at
> usb-0000:00:1a.0-1.5, CDC Ethernet Device, b4:75:0e:8f:5e:90
> [137513.528960] usbcore: registered new interface driver cdc_ether
> [137518.015729] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready

You might get it to work with cdce(4). From the manual page:

    Many USB devices notoriously fail to report their class and interfaces
    correctly.  Undetected products might work flawlessly when their vendor
    and product IDs are added to the driver manually.

You will have to patch the files /usr/src/sys/dev/usb/usbdevs and
/usr/src/sys/dev/usb/net/if_cdce.c to add this device. Everything *between*
the lines starting with =E2=80=9C+++++=E2=80=9D is the patch;

+++++ patch for /usr/src/sys/dev/usb/usbdevs +++++
--- usbdevs.orig	2014-08-30 10:40:43.000000000 +0200
+++ usbdevs	2014-08-30 10:42:58.000000000 +0200
@@ -1402,6 +1402,7 @@
 product CISCOLINKSYS WUSB54GR	0x0023	WUSB54GR
 product CISCOLINKSYS WUSBF54G	0x0024	WUSBF54G
 product CISCOLINKSYS AE1000	0x002f	AE1000
+product CISCOLINKSYS USB3GIGV	0x0041	USB3GIGV
 product CISCOLINKSYS2 RT3070	0x4001	RT3070
 product CISCOLINKSYS3 RT3070	0x0101	RT3070
+++++ patch for /usr/src/sys/dev/usb/usbdevs +++++

Save this patch to a file (e.g. usbdevs.diff) and use the patch(1) utility =
to apply it;

    # cd /usr/src/sys/dev/usb/
    # patch </path/to/patch/usbdevs.diff

Then you'll have to patch /usr/src/sys/dev/usb/net/if_cdce.c to do the same;

+++++ patch for /usr/src/sys/dev/usb/net/if_cdce.c +++++
--- if_cdce.c.orig	2014-08-30 11:07:02.000000000 +0200
+++ if_cdce.c	2014-08-30 11:09:56.000000000 +0200
@@ -277,6 +277,7 @@
 	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLA300, CDCE_FLAG_ZAURUS | C=
DCE_FLAG_NO_UNION)},
 	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC700, CDCE_FLAG_ZAURUS | C=
DCE_FLAG_NO_UNION)},
 	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC750, CDCE_FLAG_ZAURUS | C=
DCE_FLAG_NO_UNION)},
+	{USB_VPI(USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_USB3GIGV, CDCE=
_FLAG_NO_UNION)},
 };
=20
 static const STRUCT_USB_DUAL_ID cdce_dual_devs[] =3D {
+++++ patch for /usr/src/sys/dev/usb/net/if_cdce.c +++++

Note that these patches were prepared on a 10-STABLE system; the files might
differ slightly from those on 10.0-RELEASE. If applying the patches fails,
edit the files by hand.

Now you have to rebuild and install the cdce module;

    # cd /usr/src/sys/modules/usb/cdce
    # make
    # cp if_cdce.ko /boot/kernel/
    # make cleandir

If the old if_cdce module is loaded, unload it;

    # kldunload if_cdce.ko


IIRC, required modules are loaded automatically, but to be sure you can load
the module before plugging the device in;

    # kldload if_cdce.ko

Now plug in the device and see if it works. Note that I don't have access to
this hardware so I don't know if it works.

While I don't think this will crash your system, you never know. So make su=
re you
have up-to-date backups.


Roland
--=20
R.F.Smith                                   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 5753 3324 1661 B0FE 8D93  FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0)

--TB36FDmn/VVEgNH/
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIbBAEBAgAGBQJUAZf8AAoJEED21dyjijPggi8P9A4YA8njDcfU84Sz8r/iE1Z4
KxSGQQvrynHsSpfPbTZNc8e6n2iJk0ckfmrnS1f9ycXuLfbaI/5E1DE6qlJfbpAP
TPGOufMx2kzYDfbxcaF5GYZOTC98xaekVJUppc8Nb731MnbqC15G8YW7MsPbedAS
Zhy/hKD/EFaOXrxgEjyFg0farVuiP/7izqp46KOrHPVWgHT2EkxKI5mBGYs98yGD
XxCneWoY0TCtCfKIuLlecKiFZUJ8E+YldD4IKS4j4fqeo3sjyXsdRZ3BoIIDcdO1
bcmmfqcog32bauwX87ny5kVefSddKBcFVPRf8hGuFYN/upFY9xqjyTAwg1ouUtWt
PcZSHJ3f0aBqxdZlMk4XKeqtk9OrXt1G/r84vQao4NWl1HujvLpw5lYP92HqW0Q0
28HrXYD1G3EhXCyKvytwM3i1CFGAYPjMx5yIuONll9DKdGBKb8DRv2jAR8l/TBzu
jjh7e3CiAZeiBAdRpPia/ahXT8ojDXSnCxvBtKFR7UtCUkKai7lTkaGDnzgYSMAz
hxQTDATTP5UI+YLp/pS9Ezfdy3Sd71KxUBTq0ZUafOLg0eKy0uBjjvWL5AKa1Ixf
+QYzJgpzoBRhpaMcZ8hwjaOGreazb+RcSs33ZB+PUOeKZ1xQqr4KZgKeeeeZ/SGM
RmysTGQT8l8o26sMFcY=
=0ryb
-----END PGP SIGNATURE-----

--TB36FDmn/VVEgNH/--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140830092309.GA13466>