cdc_acm - fragmented notifications

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

 



Hi,

I'm trying to build an usb device conforming to the CDC ACM device
class. The device uses an interrupt IN endpoint with a max packet size
of 8 bytes.
I tried to send a SERIAL_STATE notification to the host (to report
parity errors, etc.) and noticed, that it is not handled as I would
expect:

Because I have to transmit the notification in two consecutive packets
due to the limited packe size (SERIAL_STATE notification consists of an
8 byte header + 2 byte data), acm_ctrl_irq is called twice, too. So the
notification is not reassembled before processing in acm_ctrl_irq. Of
course acm_ctrl_irq only handles "garbage" in this cases because both
recieved packages are to short.

Obviously the max packet size of the interrup IN endpoint needs to be
equal (or greater) to the size of the largest notification the CDC
device may transmit, to work with the cdc_acm module.

Question:
Is this just a (probably quite realistic) assumption made in the
current kernel code, or is this constraint defined in the usb
specification?

I'm new to the usb stuff and am not sure if i missed something.
Additionally I am confused, because Atmel provides some documentation
how to build a CDC ACM device [1], where the fragmented transmission of
notifications is explicitely stated as one possible implementation.

I'm using kernel 4.4.0.


Tobias


[1] https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=
rja&uact=8&ved=0ahUKEwjWvo-
Ij5_QAhUFbRQKHUSlAa8QFggdMAA&url=http%3A%2F%2Fwww.atmel.com%2Fimages%2F
doc6269.pdf&usg=AFQjCNEQ-Oz__2Dq7ueSsd1JDAceCLPIHg


--
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