Linux USB
 help / color / mirror / Atom feed
* USB 1.1 Full Speed OHCI slow/high latency
@ 2025-08-14  1:56 ValdikSS
  2025-08-14  6:01 ` Greg KH
  2025-08-14 14:24 ` Alan Stern
  0 siblings, 2 replies; 20+ messages in thread
From: ValdikSS @ 2025-08-14  1:56 UTC (permalink / raw)
  To: linux-usb

I have an old USB 1.1 Full Speed printer (Canon LBP1120) which can't 
print large documents due to insufficient USB 1.1 transfer speed/high 
latency on Linux.
I believe this may be Linux OHCI bug or deficiency.

If I connect the printer to USB 2.0 port (uses "companion" OHCI 
controller), the printing engine reports data underflow using its 
proprietary command protocol, and the full-page picture fails to print 
(only 1/3 is printed).
However if I connect it over USB 2.0 Hub (EHCI, hub does internal Full 
Speed conversion) the printer works fine.
Same applies to USB 3.0 XHCI ports, via which the printer also works fine.

The issue is seen on Orange Pi Zero3 (Allwinner H618) and Radxa Rock S 
(Rockchip 3308) boards, with different USB controllers.

There's no USB-level errors (captured with tcpdump -i usbmon0), all URBs 
are success, but they are much slower in OHCI than with EHCI Full Speed 
via hub.

Here's a speed comparison using simple Python script with asks the 
printer status 10000 times.

Direct connection, OHCI:

# python3 speedtest.py
Opening printer at /dev/usb/lp0...
Testing 10000/10000...
Avg delta: 1.916 ms
Min: 1.443 ms
Max: 2.891 ms

Connection via the USB 2.0 hub, EHCI:

# python3 speedtest.py
Opening printer at /dev/usb/lp0...
Testing 10000/10000...
Avg delta: 0.696 ms
Min: 0.590 ms
Max: 1.072 ms

The printer is from year 2002, with USB 1.1 full speed, and was designed 
to work via USB 1.1 controllers.
Any ideas what could be wrong?


# lsusb -vvv
Bus 003 Device 004: ID 04a9:262b Canon, Inc. LaserShot LBP-1120 Printer
Device Descriptor:
   bLength                18
   bDescriptorType         1
   bcdUSB               1.10
   bDeviceClass            0
   bDeviceSubClass         0
   bDeviceProtocol         0
   bMaxPacketSize0         8
   idVendor           0x04a9 Canon, Inc.
   idProduct          0x262b LaserShot LBP-1120 Printer
   bcdDevice            1.00
   iManufacturer           1 Canon
   iProduct                2 Canon CAPT USB Printer
   iSerial                 3 0441BFZ2
   bNumConfigurations      1
   Configuration Descriptor:
     bLength                 9
     bDescriptorType         2
     wTotalLength       0x0020
     bNumInterfaces          1
     bConfigurationValue     1
     iConfiguration          0
     bmAttributes         0xc0
       Self Powered
     MaxPower                0mA
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        0
       bAlternateSetting       0
       bNumEndpoints           2
       bInterfaceClass         7 Printer
       bInterfaceSubClass      1 Printer
       bInterfaceProtocol      2 Bidirectional
       iInterface              0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x01  EP 1 OUT
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0040  1x 64 bytes
         bInterval               0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x82  EP 2 IN
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0040  1x 64 bytes
         bInterval               0
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
   Self Powered



# lsusb -tv
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
     ID 1d6b:0001 Linux Foundation 1.1 root hub
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
     ID 1d6b:0001 Linux Foundation 1.1 root hub
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
     ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
     ID 1d6b:0001 Linux Foundation 1.1 root hub
     |__ Port 1: Dev 4, If 0, Class=Printer, Driver=usblp, 12M
         ID 04a9:262b Canon, Inc. LaserShot LBP-1120 Printer
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
     ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
     ID 1d6b:0002 Linux Foundation 2.0 root hub

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2025-10-22 13:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14  1:56 USB 1.1 Full Speed OHCI slow/high latency ValdikSS
2025-08-14  6:01 ` Greg KH
2025-08-14 14:24 ` Alan Stern
2025-08-14 15:11   ` ValdikSS
2025-08-14 16:40     ` Alan Stern
2025-08-15  8:39       ` ValdikSS
2025-08-15 14:52         ` Alan Stern
2025-08-15 15:53           ` ValdikSS
2025-08-15 17:07             ` Alan Stern
2025-08-15 18:13               ` ValdikSS
2025-08-16  2:04                 ` Alan Stern
2025-09-21 23:11                   ` ValdikSS
2025-09-22 14:16                     ` Alan Stern
2025-09-22 14:38                       ` ValdikSS
2025-09-22 14:43                         ` Alan Stern
2025-09-22 14:48                           ` [PATCH] usb: ohci: delay endpoint descriptor unlinking to reduce transfer latency ValdikSS
2025-10-01 19:27                             ` Alan Stern
2025-10-01 22:34                               ` [PATCH v2] " ValdikSS
2025-10-02 17:05                                 ` Alan Stern
2025-10-22 13:39                               ` [PATCH v2 RESEND] " ValdikSS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox