Opened 11 months ago

Last modified 5 months ago

#15333 assigned bug

Canon scanner does not function on USB 3.0 ports

Reported by: vidrep Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Drivers/USB Version: R1/Development
Keywords: Cc: pulkomandy
Blocked By: Blocking:
Platform: All

Description

hrev53458 x86_64

Hardware: Canon MP620 multifunction printer

Software: Sanity 0.6-5, sane_backends 1.0.27-4, libusb 1.0.22-4

When connecting a Canon MP620 multifunction printer to a USB 2.0 port, it functions normally. Connecting to any USB 3.0 port, whether on-board, or on a plug-in card results in no functionality.

Attachments (12)

USB_2.0.syslog (124.8 KB ) - added by vidrep 11 months ago.
USB_3.0.syslog (125.6 KB ) - added by vidrep 11 months ago.
listdev.txt (2.2 KB ) - added by vidrep 11 months ago.
Canon MP620 USB 2.0 (7.3 KB ) - added by vidrep 11 months ago.
Canon MP620 USB 3.0 (200 bytes ) - added by vidrep 11 months ago.
syslog (1.9 KB ) - added by vidrep 6 months ago.
syslog.2 (1.4 KB ) - added by vidrep 6 months ago.
listusb_USB2.0.txt (1007 bytes ) - added by vidrep 6 months ago.
listusb_USB3.0.txt (1005 bytes ) - added by vidrep 6 months ago.
listusb_allUSB3.0.txt (997 bytes ) - added by vidrep 6 months ago.
listusb-v_USB2.txt (16.8 KB ) - added by vidrep 5 months ago.
listusb-v_USB3.txt (16.8 KB ) - added by vidrep 5 months ago.

Download all attachments as: .zip

Change History (28)

by vidrep, 11 months ago

Attachment: USB_2.0.syslog added

by vidrep, 11 months ago

Attachment: USB_3.0.syslog added

by vidrep, 11 months ago

Attachment: listdev.txt added

by vidrep, 11 months ago

Attachment: Canon MP620 USB 2.0 added

by vidrep, 11 months ago

Attachment: Canon MP620 USB 3.0 added

comment:1 by waddlesplash, 11 months ago

Component: Drivers/USBDrivers/USB/XHCI
Owner: changed from mmlr to nobody
Status: newassigned

It's very strange that there's no other errors before the missing TRBs come up...

comment:2 by waddlesplash, 7 months ago

Does this still happen?

comment:3 by vidrep, 7 months ago

Tested with hrev53678. No change. Device is not detected on USB3 ports.

comment:4 by waddlesplash, 6 months ago

Please retest after hrev53851.

comment:5 by vidrep, 6 months ago

Tested again with hrev53855. Printer works on USB 3.0 port, but scanner is not detected (same as before). Plugging it into a USB 2.0 port, scanner is detected again.

comment:6 by waddlesplash, 6 months ago

Please post a new syslog.

comment:7 by vidrep, 6 months ago

New syslog attached

by vidrep, 6 months ago

Attachment: syslog added

comment:8 by waddlesplash, 6 months ago

The first "...was not found in the endpoint!" is strange, but the "Length invalid" error seems more relevant, I think. I need to investigate more.

comment:9 by vidrep, 6 months ago

Tried with hrev53888:

Attached syslog

Last edited 6 months ago by vidrep (previous) (diff)

by vidrep, 6 months ago

Attachment: syslog.2 added

comment:10 by waddlesplash, 6 months ago

Please post the output of listusb both ways.

comment:11 by vidrep, 6 months ago

Attached USB2.0 and USB3.0 listusb

by vidrep, 6 months ago

Attachment: listusb_USB2.0.txt added

by vidrep, 6 months ago

Attachment: listusb_USB3.0.txt added

comment:12 by waddlesplash, 6 months ago

Cc: pulkomandy added
Component: Drivers/USB/XHCIDrivers/USB

USB2:

04a9:172f /dev/bus/usb/1/0/5 "Canon, Inc." "PIXMA MP620" ver. 0109

USB3:

04a9:172f /dev/bus/usb/0/2 "Canon, Inc." "PIXMA MP620" ver. 0109

As far as I can tell, the only differences are that in the USB2 case, it is attached to a hub; whereas in the USB3 case, it's directly attached to the root hub. Perhaps there is some problem with the way libusb or Sanity enumerate devices here? It's hard to say; but I doubt at this point that it is really an XHCI issue.

CC'ing PulkoMandy; perhaps he has some ideas of what might be tried to further diagnose the problem.

comment:13 by vidrep, 6 months ago

Here's a listusb with everything connected to USB3.0 ports; nothing on USB2.0 ports.

by vidrep, 6 months ago

Attachment: listusb_allUSB3.0.txt added

by vidrep, 5 months ago

Attachment: listusb-v_USB2.txt added

by vidrep, 5 months ago

Attachment: listusb-v_USB3.txt added

comment:14 by waddlesplash, 5 months ago

The endpoints are indeed the same.

Vidrep reports on IRC:

5:37 PM <Vidrep_64> when attached to a USB 3 port, and running Sanity, it doesn't detect the scanner, and Sanity keeps running in deskbar. Only way to kill it is reboot.

That sounds like a usb_raw driver issue.

comment:15 by pulkomandy, 5 months ago

It's probably the same bug I have with my Saleae Logic Analyzer clone and a few other devices. A syscall that never returns. You can confirm this by attaching Debugger to the frozen app, and saving a debug report from there.

There is this change for EHCI but I have no idea if it's the right thing to do: https://review.haiku-os.org/c/haiku/+/1424

Since here the problem is in XHCI, I doubt it is all there is to this.

comment:16 by waddlesplash, 5 months ago

Uh, that change is in usb_raw, so all bus drivers are affected. The question is if it works or not, and given no devices are removed, it seems this case is indeed different. It's strange there's no errors and there's still a hang in this ticket.

Note: See TracTickets for help on using tickets.