zephyr/subsys/usb/class
Emil Obalski 1b353d5726 usb: Avoid creating duplicate OUT transfers.
This commit fixes an issue when more than one USB transfer is
reserved for same OUT endpoint.

There are 2 scenarios when this could happen:
- The Host sends SET_CONFIGURATION(1) request twice.
- The Host triggers Suspend->Resume->Configured
  event sequence for the device.

USB tranfers are not canceled on SUSPEND event
when the device was not configred previously.

Because of that USB transfer slot is reserved twice
for the same OUT endpoint and lead to shortage of USB
transfer slots quickly.

Without this patch CDC ACM class reserves duplicated USB
transfer slots for one transfer. The sequence of
Suspend->Resume events is genereted alongside with
Configured and the stack will shortly run out of transfer
slots.

If the Host, for some reason, decides to send
SET_CONFIGURATION request twice the same issue is seen.
This patch prevents from reserving additional USB transfer
slots twice.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-08-19 13:19:56 +02:00
..
audio device: Apply driver_api/data attributes rename everywhere 2020-08-11 19:30:53 +02:00
hid usb: hid: Allow to send data only if CONFIGURED. 2020-08-13 11:45:31 +02:00
netusb samples: zperf: usb: Enable USB by the application. 2020-08-13 11:49:47 +02:00
bluetooth.c usb: use kernel stacks 2020-08-05 15:21:51 -04:00
bt_h4.c usb: use kernel stacks 2020-08-05 15:21:51 -04:00
cdc_acm.c usb: Avoid creating duplicate OUT transfers. 2020-08-19 13:19:56 +02:00
CMakeLists.txt usb: Add Audio class related files 2020-05-08 15:12:27 +02:00
Kconfig soc: sam0: add support for the BOSSA bootloader 2020-07-22 13:24:37 +02:00
Kconfig.template.composite_device_number kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
loopback.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
mass_storage.c usb: use kernel stacks 2020-08-05 15:21:51 -04:00
usb_dfu.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00