tech-kern archive

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

Re: Potential problem with reading data from usb devices with ugen(4)



	hello.  For completeness, let me be more clear about what happens when
I attempt to send zero length packets to a USB device now that I've sorted
out the other issues.  
	With ehci(4) and options DIAGNOSTIC turned on, I get a 
panic: curlen == 0.

Without options DIAGNOSTIC and ehci(4), things appear to work, but the call
back routine never gets called for the ZLP transaction itself.
subsequent writes work, but the device reports that it's missing the ZLP
transaction, by reporting that it's missing a packet and by also reporting
that the packet prior to the missing packet is too large.

	Using the uhci(4) driver is similar to using the ehci(4) driver
without options DIAGNOSTIC.  

The version of ehci.c I'm using is shown below.  Also, I show how I'm
trying to generate the zero-length packet.   Should I be using a different
technique for generating the ZLP?

-thanks
-Brian

	I'm using ehci.c as follows:
/*	$NetBSD: ehci.c,v 1.154.4.3 2011/05/20 19:31:46 bouyer Exp $ */

[ . . . ]

					dbuf = (char *)usbd_get_buffer(xfer);
					usbd_setup_xfer(xfer,
					    sce->pipeh, sce, NULL, 0,
					    USBD_FORCE_SHORT_XFER | USBD_NO_COPY, USBD_NO_TIMEOUT,
					    ugen_bulkwb_intr);
					err = usbd_transfer(xfer);




Home | Main Index | Thread Index | Old Index