Skip to content

Commit e60a4ef

Browse files
jfischer-nostephanosio
authored andcommitted
drivers: udc: do not update MPS for isochronous endpoints
Zero data payload size for isochronous endpoints is a is a valid setting for default interface. Also do not update MPS of control endpoint since it is set by the driver. Signed-off-by: Johann Fischer <[email protected]>
1 parent da3e3d3 commit e60a4ef

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/usb/udc/udc_common.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ static void ep_update_mps(const struct device *dev,
253253
uint16_t *const mps)
254254
{
255255
struct udc_device_caps caps = udc_caps(dev);
256-
const uint16_t spec_iso_mps = caps.hs ? 1024 : 1023;
257256
const uint16_t spec_int_mps = caps.hs ? 1024 : 64;
258257
const uint16_t spec_bulk_mps = caps.hs ? 512 : 64;
259258

@@ -269,12 +268,10 @@ static void ep_update_mps(const struct device *dev,
269268
case USB_EP_TYPE_INTERRUPT:
270269
*mps = MIN(cfg->caps.mps, spec_int_mps);
271270
break;
272-
case USB_EP_TYPE_ISO:
273-
*mps = MIN(cfg->caps.mps, spec_iso_mps);
274-
break;
275271
case USB_EP_TYPE_CONTROL:
276-
*mps = 64U;
277-
break;
272+
__fallthrough;
273+
case USB_EP_TYPE_ISO:
274+
__fallthrough;
278275
default:
279276
return;
280277
}

0 commit comments

Comments
 (0)