Issue with USB drivers Usbser, Usbccid regarding ZLP

  • Thread starter Thread starter AirconBento
  • Start date Start date
A

AirconBento

Guest
Hello,

I have found some topics discussing about this point, but often/always in the DEVICE->HOST way. I am interested in talking about the opposite one (HOST->DEVICE).

Currenly I have a composite device communicating in USB with through CDC and CCID interfaces. I wanted to use windows built-in drivers for communication. But but when the HOST transfers data with a transfer (in the sense of the USB specification) which size is a multiple of MaxPacketSizeno zero-length packet issued ! (note: same problem with Usbser, Usbccid)

Consequently the USB controller embedded in the device doesn't know that the transfer is actually completed and is still excepting some more data. It's even painful as the controller only trigger interrupt to signal the software when the transfer is achieved.

This makes me think that Microsoft considers that it's not up to the driver to deal with it. It seems to me that (regarding the USB 2.0 standard, see 5.8.3) it should be from drivers responsibility to generate this ZLP if needed.

Because obviously without this ZLP, as only the HOST is aware of the amount of data "expected" we can't expect the DEVICE to know whether the transfer is completed or not as there is no such field in some packet in USB protocole to indicate the size of a USB transfer.

What do you think about this ? Is it normal that the driver seems to rely on upper layer to deal with such concern ?

Continue reading...
 
Back
Top