Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full Speed require usb_max_packet_size=0x40 vs high speed usb_max_packet_size=0x200 #83

Open
KonstantinBYvitebsk opened this issue Sep 11, 2022 · 0 comments

Comments

@KonstantinBYvitebsk
Copy link

My device kernel 5.15.32
I have moved to 5.14.32 from 4.14.98.
After this moving I have the problem. I have two devices with almost the same HW. But one of the devices works on FS and second on HS. Both have the same firmware.
With HS device all works properly out from the box.
But FS works if I set usb_max_packet_size 0x40

It seems to me it is related to the problem.
In dmesg on PC side I see the warrnings:
[74296.865345] usb 1-3: new full-speed USB device number 71 using xhci_hcd
[74297.013754] usb 1-3: not running at top speed; connect to a high speed hub
[74297.014254] usb 1-3: config 1 interface 2 altsetting 0 endpoint 0x83 has invalid maxpacket 512, setting to 64
[74297.014256] usb 1-3: config 1 interface 2 altsetting 0 endpoint 0x2 has invalid maxpacket 512, setting to 64
[74297.015471] usb 1-3: New USB device found, idVendor=2672, idProduct=004d, bcdDevice= 5.15
[74297.015473] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[uMTPrd - 02:32:16 - Info] Version: v1.6.2 compiled the Dec 26 2021@18:42:14
[uMTPrd - 02:32:16 - Info] (c) 2018 - 2021 Viveris Technologies
[uMTPrd - 02:32:16 - Debug] init_mtp_responder
[uMTPrd - 02:32:16 - Debug] init_inotify_handler : inotify_fd = 3
[uMTPrd - 02:32:16 - Debug] msgqueue_handler_init : current exec path : /usr/bin/umtprd
[uMTPrd - 02:32:16 - Debug] msgqueue_handler_init : msgqueue_id = 0
[uMTPrd - 02:32:16 - Debug] init_mtp_responder : Ok !
[uMTPrd - 02:32:16 - Debug] msgqueue_thread : Thread started
[uMTPrd - 02:32:16 - Info] Add storage Sys Disk - Root Path: /media/mtp/ - UID: -1 - GID: -1 - Flags: 0x00000000
[uMTPrd - 02:32:16 - Debug] mtp_add_storage : /media/mtp/
[uMTPrd - 02:32:16 - Debug] mtp_get_storage_id_by_name : Sys Disk
[uMTPrd - 02:32:16 - Debug] mtp_add_storage : Storage FFFF0001 mapped to /media/mtp/ (Sys Disk) (Flags: 0x00000000)
[uMTPrd - 02:32:16 - Info] USB Device path : /dev/ffs-mtp/ep0
[uMTPrd - 02:32:16 - Info] USB In End point path : /dev/ffs-mtp/ep1
[uMTPrd - 02:32:16 - Info] USB Out End point path : /dev/ffs-mtp/ep2
[uMTPrd - 02:32:16 - Info] USB Event End point path : /dev/ffs-mtp/ep3
[uMTPrd - 02:32:16 - Info] USB Max packet size : 0x200 bytes
[uMTPrd - 02:32:16 - Info] USB Max write buffer size : 0x4000 bytes
[uMTPrd - 02:32:16 - Info] USB Max read buffer size : 0x4000 bytes
[uMTPrd - 02:32:16 - Info] Read file buffer size : 0x4000 bytes
[uMTPrd - 02:32:16 - Info] Manufacturer string : Sys Manufacturer
[uMTPrd - 02:32:16 - Info] Product string : Sys
[uMTPrd - 02:32:16 - Info] Serial string : SysSerial
[uMTPrd - 02:32:16 - Info] Firmware Version string : Rev A
[uMTPrd - 02:32:16 - Info] Interface string : MTP
[uMTPrd - 02:32:16 - Info] USB Vendor ID : 0x2672
[uMTPrd - 02:32:16 - Info] USB Product ID : 0x004D
[uMTPrd - 02:32:16 - Info] USB class ID : 0x06
[uMTPrd - 02:32:16 - Info] USB subclass ID : 0x01
[uMTPrd - 02:32:16 - Info] USB Protocol ID : 0x01
[uMTPrd - 02:32:16 - Info] USB Device version : 0x3008
[uMTPrd - 02:32:16 - Info] USB FunctionFS Mode
[uMTPrd - 02:32:16 - Info] Wait for connection : 0
[uMTPrd - 02:32:16 - Info] Loop on disconnect : 1
[uMTPrd - 02:32:16 - Info] Show hidden files : 1
[uMTPrd - 02:32:16 - Info] File creation umask : System default umask
[uMTPrd - 02:32:16 - Info] Default UID : 0
[uMTPrd - 02:32:16 - Info] Default GID : 0
[uMTPrd - 02:32:16 - Info] inotify : no
[uMTPrd - 02:32:16 - Debug] fill_if_descriptor:
[uMTPrd - 02:32:16 - Debug] 09 04 00 00 03 06 01 01 01 .........
[uMTPrd - 02:32:16 - Debug] fill_ep_descriptor:
[uMTPrd - 02:32:16 - Debug] 07 05 81 02 00 02 00 .......
[uMTPrd - 02:32:16 - Debug] fill_ep_descriptor:
[uMTPrd - 02:32:16 - Debug] 07 05 02 02 00 02 00 .......
[uMTPrd - 02:32:16 - Debug] fill_ep_descriptor:
[uMTPrd - 02:32:16 - Debug] 07 05 83 03 1C 00 06 .......
[uMTPrd - 02:32:16 - Debug] fill_if_descriptor:
[uMTPrd - 02:32:16 - Debug] 09 04 00 00 03 06 01 01 01 .........
[uMTPrd - 02:32:16 - Debug] fill_ep_descriptor:
[uMTPrd - 02:32:16 - Debug] 07 05 81 02 00 02 00 .......
[uMTPrd - 02:32:16 - Debug] fill_ep_descriptor:
[uMTPrd - 02:32:16 - Debug] 07 05 02 02 00 02 00 .......
[uMTPrd - 02:32:16 - Debug] fill_ep_descriptor:
[uMTPrd - 02:32:16 - Debug] 07 05 83 03 1C 00 06 .......
[uMTPrd - 02:32:16 - Debug] init_usb_mtp_gadget :
[uMTPrd - 02:32:16 - Debug] 03 00 00 00 50 00 00 00 03 00 00 00 04 00 00 00 ....P...........
[uMTPrd - 02:32:16 - Debug] 04 00 00 00 09 04 00 00 03 06 01 01 01 07 05 81 ................
[uMTPrd - 02:32:16 - Debug] 02 00 02 00 07 05 02 02 00 02 00 07 05 83 03 1C ................
[uMTPrd - 02:32:16 - Debug] 00 06 09 04 00 00 03 06 01 01 01 07 05 81 02 00 ................
[uMTPrd - 02:32:16 - Debug] 02 00 07 05 02 02 00 02 00 07 05 83 03 1C 00 06 ................
[uMTPrd - 02:32:16 - Debug] write string :
[uMTPrd - 02:32:16 - Debug] 02 00 00 00 16 00 00 00 01 00 00 00 01 00 00 00 ................
[uMTPrd - 02:32:16 - Debug] 09 04 4D 54 50 00 00 00 00 00 00 00 00 00 00 00 ..MTP...........
[uMTPrd - 02:32:16 - Debug] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[uMTPrd - 02:32:16 - Debug] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[uMTPrd - 02:32:16 - Debug] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[uMTPrd - 02:32:16 - Debug] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[uMTPrd - 02:32:16 - Debug] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[uMTPrd - 02:32:16 - Debug] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[uMTPrd - 02:32:16 - Debug] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[uMTPrd - 02:32:16 - Debug] 00 00 ..
[uMTPrd - 02:32:16 - Debug] init_usb_mtp_gadget : USB config done
[uMTPrd - 02:32:16 - Debug] uMTP Responder : FunctionFS Mode - entering handle_ffs_ep0
[uMTPrd - 02:32:16 - Debug] handle_ffs_ep0 : Entering...
[uMTPrd - 02:32:18 - Debug] 1 event(s)
[uMTPrd - 02:32:18 - Debug] EP0 FFS BIND
[uMTPrd - 02:32:18 - Debug] Select without timeout
[uMTPrd - 02:32:19 - Debug] 1 event(s)
[uMTPrd - 02:32:19 - Debug] EP0 FFS ENABLE
[uMTPrd - 02:32:19 - Debug] Init end point /dev/ffs-mtp/ep1 (0)
[uMTPrd - 02:32:19 - Debug] init_ep (0):
[uMTPrd - 02:32:19 - Debug] 01 00 00 00 07 05 81 02 00 02 00 07 05 81 02 00 ................
[uMTPrd - 02:32:19 - Debug] 02 00 ..
[uMTPrd - 02:32:19 - Debug] init_ep (0): FunctionFS Mode - Don't write the endpoint descriptor.
[uMTPrd - 02:32:19 - Debug] Init end point /dev/ffs-mtp/ep2 (1)
[uMTPrd - 02:32:19 - Debug] init_ep (1):
[uMTPrd - 02:32:19 - Debug] 01 00 00 00 07 05 02 02 00 02 00 07 05 02 02 00 ................
[uMTPrd - 02:32:19 - Debug] 02 00 ..
[uMTPrd - 02:32:19 - Debug] init_ep (1): FunctionFS Mode - Don't write the endpoint descriptor.
[uMTPrd - 02:32:19 - Debug] Init end point /dev/ffs-mtp/ep3 (2)
[uMTPrd - 02:32:19 - Debug] init_ep (2):
[uMTPrd - 02:32:19 - Debug] 01 00 00 00 07 05 83 03 1C 00 06 07 05 83 03 1C ................
[uMTPrd - 02:32:19 - Debug] 00 06 ..
[uMTPrd - 02:32:19 - Debug] init_ep (2): FunctionFS Mode - Don't write the endpoint descriptor.
[uMTPrd - 02:32:19 - Debug] Select without timeout
[uMTPrd - 02:32:19 - Debug] --------------------------------------------------
[uMTPrd - 02:32:19 - Debug] Incoming_packet : 0x1ef3ec0 - rawsize : 16
[uMTPrd - 02:32:19 - Debug] MTP Packet size : 16 bytes
[uMTPrd - 02:32:19 - Debug] MTP Operation : 0x0001 (OPERATION)
[uMTPrd - 02:32:19 - Debug] MTP code : 0x1002 (MTP_OPERATION_OPEN_SESSION)
[uMTPrd - 02:32:19 - Debug] MTP Tx ID : 0x00000000
[uMTPrd - 02:32:19 - Debug] Header :
[uMTPrd - 02:32:19 - Debug] 10 00 00 00 01 00 02 10 00 00 00 00 ............
[uMTPrd - 02:32:19 - Debug] Payload :
[uMTPrd - 02:32:19 - Debug] 01 00 00 00 ....
[uMTPrd - 02:32:19 - Debug] init_fs_db called
[uMTPrd - 02:32:19 - Debug] Open session - ID 0x00000001
[uMTPrd - 02:32:19 - Debug] Status response (12 Bytes):
[uMTPrd - 02:32:19 - Debug] 0C 00 00 00 03 00 01 20 00 00 00 00 ............
[uMTPrd - 02:32:19 - Debug] --------------------------------------------------
[uMTPrd - 02:32:19 - Debug] Incoming_packet : 0x1ef3ec0 - rawsize : 12
[uMTPrd - 02:32:19 - Debug] MTP Packet size : 12 bytes
[uMTPrd - 02:32:19 - Debug] MTP Operation : 0x0001 (OPERATION)
[uMTPrd - 02:32:19 - Debug] MTP code : 0x1001 (MTP_OPERATION_GET_DEVICE_INFO)
[uMTPrd - 02:32:19 - Debug] MTP Tx ID : 0x00000001
[uMTPrd - 02:32:19 - Debug] Header :
[uMTPrd - 02:32:19 - Debug] 0C 00 00 00 01 00 01 10 01 00 00 00 ............
[uMTPrd - 02:32:19 - Debug] Payload :
[uMTPrd - 02:32:19 - Debug]
[uMTPrd - 02:32:19 - Debug] MTP_OPERATION_GET_DEVICE_INFO response (279 Bytes):
[uMTPrd - 02:32:19 - Debug] 17 01 00 00 02 00 01 10 01 00 00 00 64 00 06 00 ............d...
[uMTPrd - 02:32:19 - Debug] 00 00 64 00 26 6D 00 69 00 63 00 72 00 6F 00 73 ..d.&m.i.c.r.o.s
[uMTPrd - 02:32:19 - Debug] 00 6F 00 66 00 74 00 2E 00 63 00 6F 00 6D 00 3A .o.f.t...c.o.m..
[uMTPrd - 02:32:19 - Debug] 00 20 00 31 00 2E 00 30 00 3B 00 20 00 61 00 6E ...1...0.;...a.n
[uMTPrd - 02:32:19 - Debug] 00 64 00 72 00 6F 00 69 00 64 00 2E 00 63 00 6F .d.r.o.i.d...c.o
[uMTPrd - 02:32:19 - Debug] 00 6D 00 3A 00 20 00 31 00 2E 00 30 00 3B 00 00 .m.....1...0.;..
[uMTPrd - 02:32:19 - Debug] 00 00 00 19 00 00 00 01 10 02 10 03 10 04 10 05 ................
[uMTPrd - 02:32:19 - Debug] 10 07 10 08 10 09 10 0B 10 0C 10 0D 10 14 10 15 ................
[uMTPrd - 02:32:19 - Debug] 10 16 10 1B 10 01 98 02 98 03 98 04 98 05 98 C1 ................
[uMTPrd - 02:32:19 - Debug] 95 C2 95 C3 95 C4 95 C5 95 08 00 00 00 02 40 03 ..............@.
[uMTPrd - 02:32:19 - Debug] 40 04 40 05 40 0C 40 07 40 06 40 01 C8 02 00 00 @.@.@.@.@.@.....
[uMTPrd - 02:32:19 - Debug] 00 01 50 02 D4 00 00 00 00 02 00 00 00 00 30 01 ..P...........0.
[uMTPrd - 02:32:19 - Debug] 30 11 53 00 79 00 73 00 20 00 4D 00 61 00 6E 00 0.S.y.s...M.a.n.
[uMTPrd - 02:32:19 - Debug] 75 00 66 00 61 00 63 00 74 00 75 00 72 00 65 00 u.f.a.c.t.u.r.e.
[uMTPrd - 02:32:19 - Debug] 72 00 00 00 04 53 00 79 00 73 00 00 00 06 52 00 r....S.y.s....R.
[uMTPrd - 02:32:19 - Debug] 65 00 76 00 20 00 41 00 00 00 0E 58 00 78 00 78 e.v...A....X.x.x
[uMTPrd - 02:32:19 - Debug] 00 78 00 53 00 79 00 73 00 53 00 65 00 72 00 69 .x.S.y.s.S.e.r.i
[uMTPrd - 02:32:19 - Debug] 00 61 00 6C 00 00 00 .a.l...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant