Re: starting a new hw driver for gadget support

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

 



On Thu, 26 Jan 2012, Klaus Rudolph wrote:

> I am starting a new hardware driver for the gadget framework.
> Enumeration works fine, the host recognize the device and the host
> class driver is loaded as expected. The kernel message on the host
> system is like this:
> 
> [25250.196665] cdc_subset 6-1:2.1: usb0: register 'cdc_subset' at usb-0000:00:1d.0-1, Linux Device, ae:6d:04:54:4e:b0
> [25260.872006] usb0: no IPv6 routers present
> 
> My problem:
> After the enumeration I receive a 24 bytes packet on ep 0. How to
> handle that packet? There is no request pending in the queue so I
> could not copy the data from the fifo to the request buffer and call
> the req->complete callback. Is there any callback in any structure
> where I can send the packet to the upper gadget layer?

No.  Are you sure you didn't lose a SETUP packet?

> Maybe there is any starter documentation on this topic?

There is the USB-2.0 specification, freely available from www.usb.org.  
It is surpisingly readable.  It will tell you that such a packet is a
violation of the USB protocol.

Can you find out what the host thinks it is sending?  If the host runs 
Linux then you can use usbmon.  See the instructions in 
Documentation/usb/usbmon.txt.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux