-
Notifications
You must be signed in to change notification settings - Fork 49
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
5.x.x kernels not supported? #43
Comments
5.x.x should be supported. If you have any issue with this kernel version let me know ! (btw i will probably update the kernel of my test platform to a 5.4 version). |
I'm on a Xilinx Petalinux Ultrascale+ system, kernel is 5.4.0, f_fs.c is unchanged from kernel.org, but maybe something under the covers? I have a version of umtprd with debug and can send you the traces. I was able to get mine to work by taking my 4.19 kernel fs.c, (same target), and migrating it forward (compiles no changes, thankfully). It does seem to work perfectly using the 4.19 usb_f_fs.ko compiled for 5.4. I'll post something later today. |
Attached are logs with umtprd compiled with debug. There is a minor change, where in mtp_incoming_packet, the header size is used rather than the actual size, otherwise these logs explode (printing the 65K invalid packet from 5.4 f_fs.c). Again, the f_fs.c from 4.19 will compile and work with the latest umtprd, when dropped into 5.4 kernel build. |
Can you try to uncomment the usb_max_rd_buffer_size, usb_max_wr_buffer_size and read_buffer_cache_size lines in the config file ? |
Sure, when I have a chance to revert my working target back to broken |
This page is quite interesting since this seems to be the same buffer size issue :
And apparently the Xilinx driver appears to be limited to 7KB (see USB_BUFSIZE, not sure if this the same value on your platform) https://forums.xilinx.com/xlnx/attachments/xlnx/ELINUX/29418/1/usb.c The default max buffer size is currently 64KB in uMTP Responder. This definitely appears to be too much for some plateforms (iMX and Xilinx platforms maybe). I will reduce this default value or find a way to get the max USB authorized buffer size on the target. |
Ok, but I think could be more to it. When I used the message size instead of the buffer size there are more errors, by diffing 4.19 and 5.4 you can see the changes in standard driver file ops. Here's a patch that does work. 4.19 -> 5.4 I mean kernel patch |
Follow up: uncommenting these buffer sizes to the defaults works, 5.4.0 on Xilinx Ultrascale+ (Petalinux) works. Issue is closed. |
Note : I have changed/reduced the default built-in values some weeks ago. I think that this should work without changing the configuration with the current master repository. |
I know release notes have 4.x.x testing, just asking.
Also, in mtp_incoming_packet(), if the buffer doesn't match header, the buffer size is used rather than the header size, (I know this because the 5.4 kernel packets are coming out mismatched. This induces errors.
IMO
size = mtp_packet_hdr->length;
when this condition occurs...
wish I had time to help, I'll ask the boss...
The text was updated successfully, but these errors were encountered: