usbnet: Detect short packets as sent by the xHCI controller
commit2423ee233872d07c7607ce26f9225c64b30b0dc3
authorMichael Brown <mcb30@ipxe.org>
Tue, 6 Sep 2022 18:30:52 +0000 (6 19:30 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 27 Sep 2022 05:32:31 +0000 (27 07:32 +0200)
treeeee190e8ef0b4085195e854827dcc1af6dd82f9e
parent954cbf7bb53476e99091f9c99a8014af2491f6ef
usbnet: Detect short packets as sent by the xHCI controller

The xHCI controller will ignore the endpoint MTU and so may deliver
packets of any length.  Detect short packets as being any packet that
has a length of zero or a length that is not a multiple of the MTU.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
Message-Id: <20220906183053.3625472-4-mcb30@ipxe.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-network.c