Tasklist
FS#9917 - Cowon D2 Usb Serial
| Task Type |
Patches |
| Category |
Drivers |
| Status |
Unconfirmed |
| Assigned To |
No-one |
| Player Type |
Another |
| Severity |
Low |
| Priority |
Normal |
| Reported Version |
Daily build (which?) |
| Due in Version |
Undecided |
| Due Date |
Undecided |
| Percent Complete |
|
| Private |
No
|
|
Details
Here's a patch to have a functional usb_serial driver allowing the use of "Logf over Usb" debug function.
patch_logf.patch
(4.4 KiB)
firmware/export/usb_core.h | 4 +--
firmware/export/config-cowond2.h | 5 +++
firmware/system.c | 1
firmware/target/arm/usb-tcc.c | 52 +++++++++++++++++++++------------------
firmware/usb.c | 2 +
5 files changed, 37 insertions(+), 27 deletions(-)
|
Loading...
Occasionally there are some repeated and/or missing characters at the end of logf lines - presumably the rest of your changes are aimed at fixing that? Unfortunately when I apply the full patch my D2 freezes when I connect the USB cable.
Could you maybe explain what your changes are doing? I'm quite unfamiliar with the existing USB driver so need all the help I can get...
I get some code from ifp_usb_serial.c, from the usb_get_packet and usb_send functions to have word-aligned data in memory before sending/reading register.
Another part of the patch in usb_drv_send_nonblocking :
- ep->count = count;
+ ep->count = 0;
is a bug fix I think because ep->count contains the number of send bytes and this value is changed in usb_drv_write_ep. I assumed it must be set to 0 before first call to usb_drv_write_ep.
Without this fix I got a Panic because the number of bytes send is incorrectly reported to usb_serial_transfer_complete.
It seems that recents changes in usb_serial.c made it works without this patch because the number of send bytes is not used anymore in usb_serial_transfer_complete.
I will update my working copy tonight and try to reproduce the freeze.
After some tests it finally worked without any changes. I experience very strange behaviors with usb.
There's some factors I don't understand.
I made an update of the patch with rev 20283.
This does not make usb mass storage work, and this is quite old.