Package: src:linux
Version: 6.12.117-1
Severity: normal
Tags: patch

Dear Debian Kernel Team,

A monochrome Datyson T7 enumerates as ASI120MM on Debian 13 amd64.
Camera controls work, but the stock kernel cannot receive an image.
The device advertises an out-of-spec 1024-byte high-speed bulk IN
endpoint. We tested a device-specific workaround on the same host.

Hardware and software
  Intel xHCI 8086:22b5 (rev 35), GIGABYTE GB-BACE-3160
  USB 03c3:120a at 480 Mbit/s, bulk IN endpoint 0x82
  linux-image-6.12.117+deb13-amd64, Debian version 6.12.117-1

To reproduce on this hardware, select the camera in indi_asi_ccd and
request an exposure. A direct libusb capture test also reproduced the
failure with the camera initialized to a 640x480 RAW8 stream.

Stock kernel
  Device endpoint wMaxPacketSize: 0x0400
  xHCI debugfs ep-context: Type Bulk IN, maxp 512
  libusb request for 307200 bytes: LIBUSB_ERROR_OVERFLOW, 0 received
  usbmon recorded completion status -75 and actual length 0.

With the attached change to xhci_endpoint_init(), using the same kernel
and camera firmware, debugfs showed maxp 1024. The same direct transfer
returned all 307200 bytes on the first request and produced a viewable
image. INDI also recorded successive 1280x960 images. This hardware
test covers one camera and one Intel host controller.

Could you track this compatibility issue for trixie and consider a
backport if an appropriate upstream fix becomes available? The attached
diff reproduces the local A/B test. A related, broader upstream proposal
specifically discusses astronomical cameras with 1 KiB packets:
https://lore.kernel.org/linux-usb/[email protected]/

Thank you.
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1441,7 +1441,10 @@
 		err_count = 3;
 	/* HS bulk max packet should be 512, FS bulk supports 8, 16, 32 or 64 */
 	if (usb_endpoint_xfer_bulk(&ep->desc)) {
-		if (udev->speed == USB_SPEED_HIGH)
+		if (udev->speed == USB_SPEED_HIGH &&
+		    !(le16_to_cpu(udev->descriptor.idVendor) == 0x03c3 &&
+		      le16_to_cpu(udev->descriptor.idProduct) == 0x120a &&
+		      ep->desc.bEndpointAddress == 0x82 && max_packet == 1024))
 			max_packet = 512;
 		if (udev->speed == USB_SPEED_FULL) {
 			max_packet = rounddown_pow_of_two(max_packet);

Reply via email to