zephyr/subsys/usb
Michael Hope 2262ed7b18 netusb: drop the extra byte added for multiple-of-64-byte packets.
This fixes a bug in the cdc_ecm Ethernet over USB driver.  The ECM
spec (section 3.3.1) says that the end of an Ethernet frame is marked
using the USB short packet mechanisim, where the last packet is less
than the maximum packet size.  If the Ethernet frame is a multiple of
the USB maximum packet size then a final zero length packet must be
sent.

Linux however sends a one byte packet (usbnet.c:1393) to work
around hardware issues with zero length packets.

The current Zephyr driver works most of the time except when you send
an Ethernet frame of the right length where the last byte is zero,
such as:

$ ping 192.0.2.1 -s 23 -p 0

Zephyr then drops the last byte, creating a short frame which gets
dropped higher up in the stack.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-03-02 07:34:53 +01:00
..
class netusb: drop the extra byte added for multiple-of-64-byte packets. 2018-03-02 07:34:53 +01:00
CMakeLists.txt subsys: usb: Set Zephyr project USB Vendor and Product IDs 2018-01-15 15:47:53 -05:00
composite.c usb: Rename SYS_LOG_USB to SYS_LOG_USB_DEVICE 2018-01-17 18:53:05 -05:00
composite.h subsys: usb: add composite device support 2017-10-13 09:18:14 -04:00
Kconfig usb: Set Class Handler buffer size to 256 for RNDIS 2018-01-17 18:53:05 -05:00
usb_descriptor.c usb: hid: Add Human Interface Device (HID) class 2018-01-31 07:42:19 -05:00
usb_descriptor.h usb: hid: Add Human Interface Device (HID) class 2018-01-31 07:42:19 -05:00
usb_device.c usb: Clean up code to meet Zephyr standard 2018-01-31 07:42:19 -05:00