Summary: | if_urndis does not support newer HMD Global devices | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | id | ||||||
Component: | usb | Assignee: | Hans Petter Selasky <hselasky> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Some People | CC: | hselasky, id | ||||||
Priority: | --- | ||||||||
Version: | 12.0-RELEASE | ||||||||
Hardware: | amd64 | ||||||||
OS: | Any | ||||||||
See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245152 | ||||||||
Attachments: |
|
Description
id
2019-07-28 13:13:00 UTC
Hi, if_urndis likely needs some new device match-entries it looks like: https://github.com/jwise/HoRNDIS/commit/f4ac3df2c7fc477b7a8e635b7d4aaa06c603b27a What does usbconfig say about your device, when you add: dump_device_desc dump_curr_config_desc --HPS Created attachment 206123 [details]
dump_device_desc dump_curr_config_desc
You need to modify this table in if_urndis.c to make it attach: static const STRUCT_USB_HOST_ID urndis_host_devs[] = { /* Generic RNDIS class match */ {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(0xff)}, {USB_IFACE_CLASS(UICLASS_WIRELESS), USB_IFACE_SUBCLASS(UISUBCLASS_RF), USB_IFACE_PROTOCOL(UIPROTO_RNDIS)}, {USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(UISUBCLASS_SYNC), USB_IFACE_PROTOCOL(UIPROTO_ACTIVESYNC)}, /* HP-WebOS */ {USB_VENDOR(USB_VENDOR_PALM), USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(0xff)}, }; Using these values: bInterfaceClass = 0x00ef <Miscellaneous device> bInterfaceSubClass = 0x0004 bInterfaceProtocol = 0x0001 Can you try the attached patch? --HPS Created attachment 206130 [details]
Patch
Applying the patch, rebuilding /usr/src/sys/modules/usb/urndis and reloading if_urndis.ko was not enough. Is there some other part of base that would need to be rebuilt? Is anything printed in dmesg? When you re-built the module, did you specify KMODDIR=/boot/kernel , else it will be installed in /boot/modules which won't work. --HPS Ah, you are right. I forgot that there was still the module in /boot/kernel. kldload /boot/modules/if_urndis.ko did the job. Can you show the resulting dmesg? Does the network device work? --HPS These are the corresponding dmesg lines from when I turned on the USB tethering: ugen0.6: <HMD Global Nokia 7 plus> at usbus0 (disconnected) umass0: at uhub2, port 2, addr 6 (disconnected) cd0 at umass-sim0 bus 0 scbus4 target 0 lun 0 cd0: <Linux File-CD Gadget 0404> detached (cd0:umass-sim0:0:0:0): Periph destroyed umass0: detached ugen0.6: <HMD Global Nokia 7 plus> at usbus0 urndis0 on uhub2 urndis0: <RNDIS Communications Control> on usbus0 ue0: <USB Ethernet> on urndis0 ue0: Ethernet address: c6:4d:fa:1d:97:b9 The device indeed works. As a matter of fact, my last comment was submitted over that network interface. A commit references this bug: Author: hselasky Date: Sun Jul 28 21:47:05 UTC 2019 New revision: 350396 URL: https://svnweb.freebsd.org/changeset/base/350396 Log: Add support for tethering with Nokia 7 plus and the alike. PR: 239495 MFC after: 1 week Sponsored by: Mellanox Technologies Changes: head/sys/dev/usb/net/if_urndis.c A commit references this bug: Author: hselasky Date: Wed Aug 14 09:40:12 UTC 2019 New revision: 351013 URL: https://svnweb.freebsd.org/changeset/base/351013 Log: MFC r350396: Add support for tethering with Nokia 7 plus and the alike. PR: 239495 Sponsored by: Mellanox Technologies Changes: _U stable/12/ stable/12/sys/dev/usb/net/if_urndis.c A commit references this bug: Author: hselasky Date: Wed Aug 14 09:41:31 UTC 2019 New revision: 351015 URL: https://svnweb.freebsd.org/changeset/base/351015 Log: MFC r350396: Add support for tethering with Nokia 7 plus and the alike. PR: 239495 Sponsored by: Mellanox Technologies Changes: _U stable/11/ stable/11/sys/dev/usb/net/if_urndis.c A commit references this bug: Author: hselasky Date: Wed Aug 14 09:42:27 UTC 2019 New revision: 351017 URL: https://svnweb.freebsd.org/changeset/base/351017 Log: MFC r350396: Add support for tethering with Nokia 7 plus and the alike. PR: 239495 Sponsored by: Mellanox Technologies Changes: _U stable/10/ stable/10/sys/dev/usb/net/if_urndis.c |