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:
> If they mention it, it may be more widely used.
> I'd welcome a patch for the ACM driver.
> Would you provide one?
Thank you for your reply. I think I'll give it a try.
/Tobias
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to
Hi Oliver,
thank you for your patience... :) I have a question to one of your
comments (see below).
Best regards,
Tobias
> Am Samstag, den 18.03.2017, 19:52 +0100 schrieb Tobias Herzog:
> >
> > USB devices may have very limitited endpoint packet sizes, so that
> &
USB devices may have very limited endpoint packet sizes, so that
notifications can not be transferred within one single usb packet.
Reassembling of multiple packages may be necessary.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/class/cdc-acm.c
Adds a similar log message to USB_CDC_NOTIFY_SERIAL_STATE as it is
already done with USB_CDC_NOTIFY_NETWORK_CONNECTION.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/class/cdc-acm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/class/cdc-acm.c b/drive
+ code structure (unneeded goto)
Tobias Herzog (4):
cdc-acm: fix possible invalid access when processing notification
cdc-acm: reassemble fragmented notifications
cdc-acm: log message for serial state notification
cdc-acm: remove unused element of struct acm
drivers/usb/class/cdc-acm.c
write_used was introduced with commit 884b600f63dc ("[PATCH] USB: fix acm
trouble with terminals") but never used since.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/class/cdc-acm.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/class/cdc-acm
Notifications may only be 8 bytes long. Accessing the 9th and
10th byte of unimplemented/unknown notifications may be insecure.
Also check the length of known notifications before accessing anything
behind the 8th byte.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/cla
issues with endianess
* check buffer allocation (kmalloc)
* don't use hard coded size of notification-header
* fixed typo + code structure (unneeded goto)
Tobias Herzog (4):
cdc-acm: reassemble fragmented notifications
cdc-acm: fix possible invalid access when processing notification
cdc-acm
write_used was introduced with commit 884b600f63dc ("[PATCH] USB: fix acm
trouble with terminals") but never used since.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/class/cdc-acm.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/class/cdc-acm
Notifications may only be 8 bytes so long. Accessing the 9th and
10th byte of unimplemented/unknown notifications may be insecure.
Also check the length of known notifications before accessing anything
behind the 8th byte.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/cla
Adds a similar log message to USB_CDC_NOTIFY_SERIAL_STATE as it is
already done with USB_CDC_NOTIFY_NETWORK_CONNECTION.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/class/cdc-acm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/class/cdc-acm.c b/drive
Hi,
thank you for your feedback. I tried to fix all issues with v2. I was
just unsure with one point (see comment).
/tobias
> Am Dienstag, den 14.03.2017, 21:14 +0100 schrieb Tobias Herzog:
> >
> > USB devices may have very limitited endpoint packet sizes, so that
> &
USB devices may have very limitited endpoint packet sizes, so that
notifications can not be transferred within one single usb packet.
Reassembling of multiple packages may be necessary.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/class/cdc-acm.c
USB devices may have very limitited endpoint packet sizes, so that
notifications can not be transferred within one single usb packet.
Reassembling of multiple packages may be necessary.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/class/cdc-acm.c
Notifications may only be 8 bytes so long. Accessing the 9th and
10th byte of unimplemented/unknown notifications may be insecure.
Also check the length of known notifications before accessing anything
behind the 8th byte.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/cla
Adds a similar log message to USB_CDC_NOTIFY_SERIAL_STATE as it is
already done with USB_CDC_NOTIFY_NETWORK_CONNECTION.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/class/cdc-acm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/class/cdc-acm.c b/drive
write_used was introduced with commit 884b600f63dc ("[PATCH] USB: fix acm
trouble with terminals") but never used since.
Signed-off-by: Tobias Herzog <t-her...@gmx.de>
---
drivers/usb/class/cdc-acm.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/class/cdc-acm
18 matches
Mail list logo