Skip to content

Commit 2461c38

Browse files
committed
Change i.MX21 host driver default USB Interrupt Transfer polling interval to 1ms
Prevent the host from being set to poll every frame as this causes excessive polling resulting in excessive EMC emissions Fixes torvalds#114
1 parent e60d5a8 commit 2461c38

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: drivers/usb/host/imx21-hcd.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,8 @@ static void schedule_nonisoc_etd(struct imx21 *imx21, struct urb *urb)
909909
u8 dir;
910910
u8 bufround;
911911
u8 datatoggle;
912-
u8 interval = 0;
912+
/* Default polling interval of 1ms */
913+
u8 interval = 1;
913914
u8 relpolpos = 0;
914915

915916
if (etd_num < 0) {
@@ -972,7 +973,8 @@ static void schedule_nonisoc_etd(struct imx21 *imx21, struct urb *urb)
972973
etd->len = count;
973974

974975
if (usb_pipeint(pipe)) {
975-
interval = urb->interval;
976+
/* Guard to prevent against excessive polling */
977+
interval = (urb->interval == 0) ? 1 : urb->interval;
976978
relpolpos = (readl(imx21->regs + USBH_FRMNUB) + 1) & 0xff;
977979
}
978980

0 commit comments

Comments
 (0)