Re: XP USB driver stack/lost bytes on bulk transfer

From: Alexander Grigoriev (alegr_at_earthlink.net)
Date: 01/13/05


Date: Thu, 13 Jan 2005 08:14:26 -0800

I think there is another bug in the scanner's firmware that causes it to
lose data that cannot be transferred fast enough.

64 bytes per transfer will give you 64 kbytes/s, which is too little for
most good scanners.

"bench" <ruh@keba.co.at> wrote in message
news:ad44867b.0501130204.35c548c9@posting.google.com...
> Hello
>
> I loose bytes ( some multiple of 64 bytes ( =MaxPacketSize ) ) with
> Windows XP SP1 on a Gibabyte PC 566 MHz ( single CPU ) with a VIA
> chipset ( USB 1.1 HC ).
>
> The following happens:
> My USB device driver sends 'read' urbs down the stack ( reading a
> picture ~1.5MB from scanner ). USBD_SHORT_TRANSFER_OK ist set and
> MaximumTransferSize ist default ( 4KB ).
> If i read the image with
> urb->UrbBulkOrInterruptTransfer.TransferBufferLength=64 bytes, some 64
> byte-packets get lost in lower drivers.
> When TransferBufferLength is set on some higher value ( multiple of 64
> ) the image is transfered correctly.
>
> Tests:
> Tested some ( faster ) ASUS pcs with Intel chipset -> No problems.
> Downloaded and installed the latest USB hotfix -> No changes.
> Wrote a filter driver 'lower' my driver -> Yes, bytes get lost when
> requesting 64 bytes.
> Wrote a 'HC debug driver' permanent checking the HC registers -> HC
> never reports errors ( did not check transfer descriptors ).
> Counted bytes on USB analyzer -> The whole image is transferred.
> Activated debug outputs in my driver -> OK, also when
> TransferBufferLength=64!
> Changed internal flowings in my usb driver to be faster -> Bytes get
> lost on TransferBufferLength=64 AND TransferBufferLength=128 ( OK, on
> higher values )!
> Tested my own NT and OS/2 drivers on that motherboard ( the image is
> transferred twice faster than under XP ) -> OK.
> Used checked build versions of the XP usb drivers -> did not see any
> errors reported in windbg, but i'm not very experienced in that.
>
> I know, that VIA has ( maybe had? ) some special 'features'
> implemented in USB ( in contrast to Intel ), but for me it looks like
> a bug in the XP USB driver stack; maybe some 'timing issue' ( the
> faster the usb device driver, the more bytes it must request each
> urb!? ).
>
> Any ideas?
>
> Thank you,
> Bernhard Ruhsam
>
> PS: The reason, why i have to request just 64 bytes is, that there's a
> bug in the firmware of the scanner, which does not send zero length
> packets.



Relevant Pages

  • Re: How to Run ASP natively in SQLServer7
    ... > will not be re-inserted into Fogbugz. ... > 'Otherwise new request will be inserted. ... Insert one row of header data into the BUG table ... > 'within the BUG table everytime a new row is inserted. ...
    (microsoft.public.sqlserver.programming)
  • Re: DLINK 614+ - SOHO routers, system DOS
    ... the flaws reported to DLINK on May 24th and posted to bugtraq have ... Rev A's latest firmware available is still 2.30 and therefore IS ... | left in an unstable state immediately followed by a system reboot. ... | along with the request or if no ip address is available for dynamic ...
    (Bugtraq)
  • Re: Class device namespaces
    ... kernel initiated firmware request. ... Are you replacing the udev firmware script here? ...
    (Linux-Kernel)
  • Re: Way to go Adobe!
    ... Adobe all along had stated that the beta would expire ... >> I could not upgrade a router's firmware? ... you tried to pretend it was a> bug ...
    (comp.sys.mac.advocacy)
  • Chriss SR and all SRs
    ... circuitry is switching the wrong antenna input and not giving the full ... With the firmware bug ... This fix will require new firmware to ... to make the diversity circuit try test switches more often and this ...
    (rec.arts.movies.production.sound)