Re: PATCH: ehci-q.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Date: Sun, 25 Nov 2007 09:07:43 -0800
> To: stevecalfee@xxxxxxxxxxx
> From: s.arcangeli@xxxxxxxxxxxxx
> Subject:  PATCH: ehci-q.c
>
> Hi all,
>
> I apologize for my previous unreadable message... sorry.
>
> I'm workig on a porting on linux of a device driver for a double-side
> scanner.
>
> This device is equipped by a Cypress FX2 usb2.0 controller that, by the
> OEM, is configured
> for bulk I/O with EndPoint "MaxPacketSize=1024", non usb2.0-compliant but
> supported by hardware and software device drivers on MS-Windows systems.
>

Ouch, you have a non-USB device. IE it is out of spec (the only legal HS bulk maxpacket size is 512 bytes). The curse on USB is the fact the windows allows drivers to work around buggy devices - so the devices don't get fixed and windows gets devices that are so buggy that they only work on windows. Maybe that is the MS plan? 

I have been doing stuff with FX2s on both Winxp and Linux. Winxp does not enforce the endpoint restrictions of USB - the app can request any maxpacketsize that the hcd controller can handle. It accepts Full speed isoc packet lengths of 1024. It accepts HS max packets of 1024. The fx2 is very plastic and can also provide out of spec transfers.

Linux on the other hand enforces the spec - even if its hardware can handle the buggy device.

SNIP

> } else if (type == PIPE_BULK) {
> info1 |= (EHCI_TUNE_RL_HS << 28);
> - info1 |= 512 << 16; /* usb2 fixed maxpacket */
> + //info1 |= 512 << 16; /* Original source:
> strictly usb2.0 compliant 512 bytes fixed maxpacket */
> + info1 |= max_bulkpacket(maxp) << 16; /* Uses the
> maxpacket from EP Descriptor, can be only 1024 or 512*/
> info2 |= (EHCI_TUNE_MULT_HS << 30);

This chunk of code must be what winxp is using. Changing this and the other HCD to do a similar thing would allow Linux to use broken (and non-broken) devices. Allowing Linux to run outside the spec will probably be a religious war.

Regards, Steve

_________________________________________________________________
Share life as it happens with the new Windows Live.Download today it's FREE!
http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_sharelife_112007
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

[Index of Archives]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]

  Powered by Linux