On Tue, 9 Jul 2002, David Brownell wrote:

> >     * append length=0 packet in the correct situation only,
> >       i.e. basically when (length%maxpacketsize)==0
> 
> Good, that's basically a "should be ==, not !=" patch, yes?
> Whoops!

Exactly!

> >     * make USB_ZERO_PACKET only effective on OUT transaction, because
> >       it's useless for IN and uhci is restricted to out as well.
> 
> A patch recently sent by updating flags handling (removing the
> QUEUE_BULK, including from irda-usb, and renaming DISABLE_SPD)
> should remove any need for this change.  If you use that with your
> patch, the patches should work fine together.  (Do they?)

Well, I saw your patch on l-u-d but didn't try. After ages without luck
finding any 2.5.x which wouldn't deadlock or corrupt fs I was really happy
when I had 2.5.24 stabilized to do some real driver work and testing ;-)

Making it OUT only was basically for consistency with uhci and I agree,
drivers shouldn't set it in the first place - irda-usb doesn't anyway. 

> The deal is that the URB submission code should now verify that
> ZERO_PACKET is only set (from drivers) for writes.  One check for
> all the HCDs, enabled by CONFIG_USB_DEBUG (at least for now).
> No need to add extra instructions to every driver ... ones that
> might not act quite the same ... ;)

Haven't looked into the code but I guess it makes usb_submit_urb()
returning an error when the driver tries to submit an IN urb with
ZERO_PACKET set? Sure, that would be the prefered solution and my
usb_pipeout() protection is obsolete than.

> Good, I'll want 2.5.next to have a slightly simpler patch, since I seem
> to be on a kick for smaller code ... just change to "==".

Yes, without need for the usb_pipeout() protection the fix can be reduced
to a simple "!=" --> "==" - shall I prepare another patch or do you just
include this in one of your next updates?

Martin



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Two, two, TWO treats in one.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to