Author Topic: Connecting SL-6000 to PC running Linux Kernel 3/4/5  (Read 9687 times)

maynard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Connecting SL-6000 to PC running Linux Kernel 3/4/5
« on: December 16, 2021, 01:21:29 am »
When I place my SL-6000 in the USB cradle/docking station connected to a PC running Linux kernel 2.6.32, a new USB0 connection is automatically created on my PC. However, in later kernels 3/4/5, I get an error message "Bad CDC descriptors" and no network connection. I am using the stock Sharp OS on my Tosa.

Has anyone managed to get a USB network connection working on a PC running a 3+ kernel after docking their SL6000?

Someone else had a similar issue many years ago:

https://forums.raspberrypi.com/viewtopic.php?t=25159&start=50
« Last Edit: December 16, 2021, 11:01:18 pm by maynard »

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1266
    • View Profile
Re: Connecting SL-6000 Tosa to PC with Linux Kernels 3/4/5
« Reply #1 on: December 16, 2021, 04:49:22 am »
Hi and welcome! I have moved the topic out of the Archived section, for better visibility.

If I have understood the thread you have linked, 6000s don't work anymore with recent kernels, while 5500s still work, since the device is seen as a CDC Ether device, while the 5500 registers itself as a serial one. The workaround described in the thread seems to be to force to register the 6000 as a serial device too.

BTW sdjf has been an active member here in the past, although he hasn't logged in here since some years.

Varti
« Last Edit: December 17, 2021, 05:46:22 am by Varti »
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

maynard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Connecting SL-6000 Tosa to PC with Linux Kernels 3/4/5
« Reply #2 on: December 16, 2021, 05:17:16 pm »
Hi Varti,

Thank you for moving me out of the Archived section!

I have been looking for a solution to this over the past year or so. There are a few other Zaurii in the cdc_ether.c blacklist such as the SL-5600 poodle, as well as some that were sold only in Japan: SL-A300 / C700 / C750 / C760 / C860. I am guessing that networking via the USB docking station doesn't work for SL-5600 users either.

If you were an Ubuntu user, you might not have encountered this issue until 2012 after it moved to Kernel 3, by which time the SL-6000 was getting quite old.

Anyway, I decided to post here on the slim chance that someone has been able to find a workaround to this problem.
« Last Edit: December 16, 2021, 11:02:38 pm by maynard »

maynard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #3 on: February 14, 2022, 03:51:11 pm »
The kernel developers have kindly applied a patch to fix this issue: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=6605cc67ca18

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1266
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #4 on: February 15, 2022, 09:58:44 am »
Great, thanks for this patch! I had some free time today and I have tried to connect three cradles/USB cables I own to my laptop:
- CE-ST7 (cradle, with an SL-5500)
- CE-ST8 (cradle, SL-A300)
- CE-UA1 (USB interface and cable, with an SL-5500, SL-B500/SL-5600, SL-6000N and an SL-A300)

My laptop is running Void Linux with kernel 5.10.20_1. I have managed to successfully connect the 5500 (with both its cradle and the cable), while the other 3 Zauruses show the same "bad CDC descriptors" error. I have also the SL-C clamshell models, I suspect they'll have the same issues. I guess they'll need a patch too, I'll see if I'll find some time to prepare one myself for them too, it would be very handy to be able to connect to all the Zauruses via USB.

 


Here's the output of dmesg for all the devices:

Code: [Select]
CE-ST7 (cradle) SL-5500:
[  256.488449] usb 2-2: new full-speed USB device number 3 using xhci_hcd
[  256.667755] usb 2-2: New USB device found, idVendor=04dd, idProduct=8004, bcdDevice= 0.00
[  256.667763] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  256.667767] usb 2-2: Product: SL-5500
[  256.667770] usb 2-2: Manufacturer: Sharp
[  256.667773] usb 2-2: SerialNumber: 400002000001
[  256.722789] usbcore: registered new interface driver cdc_ether
[  256.744888] zaurus 2-2:1.0 usb0: register 'zaurus' at usb-0000:00:10.0-2, Sharp Zaurus SL-5x00, 4a:71:73:4d:b2:da
[  256.752775] usbcore: registered new interface driver zaurus
[  256.761554] zaurus 2-2:1.0 enp0s16u2: renamed from usb0

CE-ST8 (cradle) SL-A300:
[ 3289.448559] usb 2-2: new full-speed USB device number 29 using xhci_hcd
[ 3289.610845] usb 2-2: New USB device found, idVendor=04dd, idProduct=8005, bcdDevice= 0.00
[ 3289.610853] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3289.610857] usb 2-2: Product: SL-A300
[ 3289.610860] usb 2-2: Manufacturer: Sharp
[ 3289.634091] usb 2-2: bad CDC descriptors

CE-UA1 (cable)
--------------

SL-B500 (SL-5600):
[ 2318.272523] usb 2-2: new full-speed USB device number 26 using xhci_hcd
[ 2318.433237] usb 2-2: New USB device found, idVendor=04dd, idProduct=8006, bcdDevice= 0.00
[ 2318.433246] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2318.433250] usb 2-2: Product: SL-B500
[ 2318.433253] usb 2-2: Manufacturer: Sharp
[ 2318.456418] usb 2-2: bad CDC descriptors

SL-5500:
[ 2387.942100] usb 2-2: USB disconnect, device number 26
[ 2563.752533] usb 2-2: new full-speed USB device number 27 using xhci_hcd
[ 2563.930405] usb 2-2: New USB device found, idVendor=04dd, idProduct=8004, bcdDevice= 0.00
[ 2563.930413] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2563.930418] usb 2-2: Product: SL-5500
[ 2563.930421] usb 2-2: Manufacturer: Sharp
[ 2563.930424] usb 2-2: SerialNumber: 400002000001
[ 2563.957352] zaurus 2-2:1.0 usb0: register 'zaurus' at usb-0000:00:10.0-2, Sharp Zaurus SL-5x00, 4a:71:73:4d:b2:da
[ 2563.981569] zaurus 2-2:1.0 enp0s16u2: renamed from usb0

SL-6000N:
[ 3186.512562] usb 2-2: new full-speed USB device number 28 using xhci_hcd
[ 3186.674872] usb 2-2: New USB device found, idVendor=04dd, idProduct=9032, bcdDevice= 0.00
[ 3186.674880] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3186.674884] usb 2-2: Product: SL-6000
[ 3186.674887] usb 2-2: Manufacturer: Sharp
[ 3186.698092] usb 2-2: bad CDC descriptors

SL-A300:
[ 3289.448559] usb 2-2: new full-speed USB device number 29 using xhci_hcd
[ 3289.610845] usb 2-2: New USB device found, idVendor=04dd, idProduct=8005, bcdDevice= 0.00
[ 3289.610853] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3289.610857] usb 2-2: Product: SL-A300
[ 3289.610860] usb 2-2: Manufacturer: Sharp
[ 3289.634091] usb 2-2: bad CDC descriptors

Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

maynard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #5 on: February 15, 2022, 04:00:13 pm »
Hi Varti,

Thanks for the reply!

The bug report I created was: https://bugzilla.kernel.org/show_bug.cgi?id=215361. It took me a few weeks to track down the offending patch using git bisect as instructed by Greg Kroah-Hartman.

[16adf5d07987d93675945f3cecf0e33706566005] usbnet: Remove over-broad module alias from zaurus.

That patch removed the following lines from zaurus.c which were in the 2.6 kernel:

    USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM,
            USB_CDC_PROTO_NONE),
    .driver_info = (unsigned long) &bogus_mdlm_info,
}, {

A quick and dirty fix would be to add the above lines back into zaurus.c and compile the module (I tried that myself over a month ago and it did work for the SL-6000). For future versions of the kernel you could create new bug report(s) for your other Zaurii that have the same issue.

If you just want to try fixing the problem for your SL-6000, just apply the new patch below and re-compile zauruc.c and cdc_ether.c:

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/patch?id=6605cc67ca18b9d583eb96e18a20f5f4e726103c

By the way, I know for a fact that SL-5600 compatibility was also broken by the offending patch, but I did not create a bug report for that, mainly because I don't use it any more...

Good luck!

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1266
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #6 on: February 16, 2022, 06:55:59 am »
Ok, I'll give it a try. I'm unsure if the SL-C1/3xxx USB ports are recognized in the same way, or if the custom connector can still be used with the CE-UA1 cable. I have noticed that there's a "SL-C3000 PDA in MDLM mode" entry in zaurus.c, I wonder if that mode has to be manually activated.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

maynard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #7 on: February 16, 2022, 05:22:05 pm »
Maybe just try adding

    USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM,
            USB_CDC_PROTO_NONE),
    .driver_info = (unsigned long) &bogus_mdlm_info,
}, {

to the 5.10.20_1 kernel's version of zaurus.c, and see if you can ping your other devices after compiling to the new zaurus.ko...

Those lines should be inserted before:

    /* Motorola Rokr E6 */

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1266
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #8 on: February 17, 2022, 06:30:34 am »
Thanks, I'll try that.
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

maynard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #9 on: March 12, 2022, 02:25:19 am »
The patch for the SL-6000 has now been applied to the following kernel versions in git:

4.9.304
4.14.269
4.19.232
5.4.182
5.10.103
5.15.26
5.16.12

maynard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #10 on: March 13, 2022, 07:11:19 pm »
Hi Varti,

If you connect your SL-C1/3xxx devices using a mini B cable, are they recognised by your Linux PC? (The cable for the SL-6000 cradle has a mini B plug.) I found from this website that these devices behave differently depending on whether you use a mini A or mini B plug: www.users.on.net/~hluc/myZaurus/

Another point is that the following line was not added to zaurus.c until well after the patch which broke SL-6000/5600 compatibility:

/* C-750/C-760/C-860/SL-C3000 PDA in MDLM mode */

So I am hoping that support for SL-C1/3xxx as client devices is not broken.
« Last Edit: March 14, 2022, 12:40:27 am by maynard »

maynard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #11 on: March 14, 2022, 02:49:50 am »
It seems that the same patch that broke SL-5600/6000 loading also affected C-750/C-760/C-860/SL-C3000, so another patch was applied for those devices in 2012 as a fix.

https://kernel.googlesource.com/pub/scm/linux/kernel/git/jejb/parisc-2.6/+/15103aa7a033d7d671c75cc3a71d772dbcbae61e
https://www.spinics.net/lists/netdev/msg189543.html
« Last Edit: March 14, 2022, 08:08:05 pm by maynard »

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1266
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #12 on: March 15, 2022, 05:25:40 am »
So, I guess that both the "cradle" cable and the USB one on the clamshell devices should be working. I'll do another round of checks to confirm that.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

maynard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #13 on: April 22, 2022, 12:06:21 am »
The SL-6000 was detected without errors by Ubuntu 22.04 (live DVD).
« Last Edit: April 22, 2022, 02:58:50 am by maynard »

maynard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Connecting SL-6000 to PC running Linux Kernel 3/4/5
« Reply #14 on: March 21, 2023, 12:25:56 am »
Hi Varti,
Would you happen to know where I can buy an SL-A300? I purchased two of them from auctions.yahoo.co.jp, but it turns out neither of them worked. I think the batteries were dead as they would not switch on after many hours of charging.
I want to report a bug at bugzilla.kernel.org so that they will fix broken SL-A300 support in recent kernels.
Thanks