NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/59012: Missing support in udav(4) for SUNRISING SR9702 chip variant



>Number:         59012
>Category:       kern
>Synopsis:       Missing support in udav(4) for SUNRISING SR9702 chip variant
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 19 19:35:00 +0000 2025
>Originator:     Havard Eidnes
>Release:        NetBSD 10.0_STABLE
>Organization:
	I try...
>Environment:
System: NetBSD jonsvatnet.uninett.no 10.0_STABLE NetBSD 10.0_STABLE (JV) #3: Sun Jan 19 14:22:39 CET 2025  he%mt.urc.uninett.no@localhost:/u/build/netbsd-10/obj/i386/sys/arch/i386/compile/JV i386
Architecture: i386
Machine: i386
>Description:
	I got this USB 10/100M ethernet dongle, marked "QTS1081B ... NO:9700".
	Initial insertion got me

[ 132014.9979612] umass0 at uhub0 port 2 configuration 1 interface 0
[ 132014.9979612] umass0: SUNRISING (0x0fe6) USB 2.0 10/100M Ethernet Adaptor (0x9702), rev 1.10/1.01, addr 2
[ 132015.2079608] scsibus0 at umass0: 2 targets, 1 lun per target
[ 132015.2179603] cd1 at scsibus0 target 0 lun 0: <, Supereal VR DISK, 1.00> cdrom removable

	and looking at the contents of the top dir:

# mount -t cd9660 /dev/cd1a /mnt
# ls -l /mnt
total 231
-r-xr-xr-x  1 root  wheel      50 Oct 18  2022 AUTORUN.INF
-r-xr-xr-x  1 root  wheel   16958 Aug 20  2020 CoreChips.ico
-r-xr-xr-x  1 root  wheel   42338 Sep 14  2015 SR9700 Mac OS 10.10 Driver.pkg
dr-xr-xr-x  1 root  wheel    2048 Oct 18  2022 SR9700 Mac OS 10.6~10.9 Driver.pkg
-r-xr-xr-x  1 root  wheel  122265 Sep 27  2022 SR9700_SFX.exe
-r-xr-xr-x  1 root  wheel   54159 Aug  6  2020 rd9700_v2.4_for_10.15.pkg
#

	Grep'ing a bit in sys/dev/usb got me to try this diff:

Index: usbdevs
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usbdevs,v
retrieving revision 1.806.4.4
diff -u -r1.806.4.4 usbdevs
--- usbdevs     20 Jun 2024 17:52:12 -0000      1.806.4.4
+++ usbdevs     19 Jan 2025 11:48:54 -0000
@@ -3358,6 +3358,7 @@
 /* SUNRISING products */
 product SUNRISING SR9600       0x8101  SR9600 Ethernet
 product SUNRISING QF9700       0x9700  QF9700 Ethernet
+product SUNRISING QF9702       0x9702  QF9702 Ethernet
 
 /* SuperTop products */
 product SUPERTOP IDEBRIDGE     0x6600  SuperTop IDE Bridge
Index: if_udav.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/if_udav.c,v
retrieving revision 1.99
diff -u -r1.99 if_udav.c
--- if_udav.c   20 Aug 2022 14:09:20 -0000      1.99
+++ if_udav.c   19 Jan 2025 11:48:54 -0000
@@ -119,6 +119,8 @@
        {{ USB_VENDOR_SUNRISING, USB_PRODUCT_SUNRISING_SR9600 }, 0 },
        /* SUNRISING QF9700 */
        {{ USB_VENDOR_SUNRISING, USB_PRODUCT_SUNRISING_QF9700 }, UDAV_NO_PHY },
+       /* SUNRISING QF9702 */
+       {{ USB_VENDOR_SUNRISING, USB_PRODUCT_SUNRISING_QF9702 }, UDAV_NO_PHY },
        /* QUAN DM9601 */
        {{USB_VENDOR_QUAN, USB_PRODUCT_QUAN_DM9601 }, 0},
 #if 0

	and this got me an ethernet device with an ethernet address:

udav0: flags=0x8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        address: 00:e8:00:4c:2e:d4

	However, ifconfig'ing it up and connecting an ethernet cable gives
	no link, and "dhcpcd udav0" ended up with a 169.254.0.0/16 address,
	i.e. it did not manage to aquire an address.

	I also tried with "0" instead of UDAV_NO_PHY, and that got me

udav0: flags=0x8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        address: 00:e8:00:4c:2e:d4
        media: Ethernet none (none)

	but otherwise the same result as above, and no mii driver attached:

[ 21415.121944] udav0 at uhub0 port 2
[ 21415.121944] udav0: SUNRISING (0x0fe6) USB 2.0 10/100M Ethernet Adaptor (0x9702), rev 1.10/1.01, addr 2
[ 21415.151944] udav0: Ethernet address 00:e8:00:4c:2e:d4

	The udav(4) man page mentions SUNRISING SR9600 Ethernet, but not 9700,
	even though 9700 is in the code already.

	The udav(4) man page also has a URL for the data sheet to the DM9601
	chip, but that link is now dead (gives HTTP 404 error).

	So... Evidently the 9702 is sufficiently different from the 9700 that
	the driver as it stands doesn't work for the 9702.

	I've tried looking for support elsewhere, e.g. FreeBSD, but have come
	up empty so far for how this should be done.


>How-To-Repeat:
	Try to use a SUNRISING SR9702 ethernet dongle.

>Fix:
	Yes, please...



Home | Main Index | Thread Index | Old Index