usb: host: ehci-sched: try to turn on io watchdog as long as periodic_count > 0
authorXu Yang <xu.yang_2@nxp.com>
Wed, 9 Aug 2023 06:53:27 +0000 (14:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Aug 2023 08:03:22 +0000 (10:03 +0200)
commitc272dabf2d43c3523af1a40be3127e7a1f84540a
treed5ea68475035f41e029392583d377a607e53d023
parent3ddde5aa43cf302aa8ac6d4d5fa6166a09bb0a00
usb: host: ehci-sched: try to turn on io watchdog as long as periodic_count > 0

If initially isoc_count = 0, periodic_count > 0 and the io watchdog is
not started (e.g. just timed out), then the io watchdog may not run after
submitting isoc urbs and enable_periodic(). The isoc urbs may not complete
forever if the controller had already stopped periodic schedule.

This will try to call turn_on_io_watchdog() for each enable_periodic() to
ensure the io watchdog functions properly.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20230809065327.952368-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-sched.c