Subject: USBD_FORCE_SHORT_XFER
To: None <port-i386@netbsd.org>
From: Pat Laplante <plaplante@vanteon.com>
List: port-i386
Date: 09/30/2004 23:09:10
USBD_FORCE_SHORT_XFER problem..

all, I am working on a DSC (digital still camera) driver that implement 
the dsc spec (that PTP uses to talk to a usb device).  I am using a 
driver because there are a couple of things in the spec that can be done 
using ugen such as:

1) one must send a zero length packet if the last packet of data sent to 
the device is a modulo of the endpoint max packet size.
2) one must make some request to clear a stall when the camera return a 
stall pipe.

Anyway,  in case 1, I coded the write to do this ( if this is the last 
packet sent and that packet size is a modulo of the endpoint maxPacketSize).


result = usbd_bulk_transfer(
    xfer,
    sc->sc_bout_pipe,
    (needshort?USBD_FORCE_SHORT_XFER|USBD_NO_COPY:0),
    10000,
    buffer,
    &n,
    "udscrb"
);

However, whenever I hit this case (where needshort is required), I get 
result = 13 (IO_ERROR).  Am I missing something?

I think it goes through the ohci code.

Thanks
pat