linux/drivers/usb/musb
Thomas Gleixner d2e6d62c9c usb: musb: cppi41: restart hrtimer only if not yet done
commit c58d80f52 ("usb: musb: Ensure that cppi41 timer gets armed on
premature DMA TX irq") fixed hrtimer scheduling bug. There is one left
which does not trigger that often.
The following scenario is still possible:

    lock(&x->lock);
    hrtimer_start(&x->t);
    unlock(&x->lock);

expires:
    t->function();
                                lock(&x->lock);
    lock(&x->lock);             if (!hrtimer_queued(&x->t))
                                        hrtimer_start(&x->t);
                                unlock(&x->lock);

    if (!list_empty(x->early_tx_list))
           ret = HRTIMER_RESTART;
->         hrtimer_forward_now(...)
    } else
           ret = HRTIMER_NORESTART;

    unlock(&x->lock);

and the timer callback returns HRTIMER_RESTART for an armed timer. This
is wrong and we run into the BUG_ON() in __run_hrtimer().
This can happens on SMP or PREEMPT-RT.
The patch fixes the problem by only starting the timer if the timer is
not yet queued.

Cc: stable@vger.kernel.org
Reported-by: Torben Hohn <torbenh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[bigeasy: collected information and created a patch + description based
          on it]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-10-23 09:55:41 -05:00
..
am35x.c usb: hub: rename khubd to hub_wq in documentation and comments 2014-09-23 22:33:19 -07:00
blackfin.c usb: musb: backfin: Introduce the use of the managed version of kzalloc 2014-06-30 12:26:57 -05:00
blackfin.h
cppi_dma.c usb: musb: dma: merge ->start/stop into create/destroy 2013-07-29 13:53:18 +03:00
cppi_dma.h
da8xx.c usb: phy: generic: allow multiples calls to usb_phy_generic_register() 2014-04-21 14:07:25 -05:00
davinci.c usb: musb: davinci: use devm_ functions. 2014-06-30 12:26:48 -05:00
davinci.h
jz4740.c usb: musb: register nop transceiver driver for jz4740 2014-07-10 08:36:50 -05:00
Kconfig usb: musb: omap2plus bus glue needs USB host support 2014-05-14 09:23:32 -05:00
Makefile usb: musb: add support for JZ4740 usb device controller 2013-12-20 09:53:24 -06:00
musb_am335x.c usb: musb: Fix panic upon musb_am335x module removal 2014-06-27 10:53:06 -05:00
musb_core.c usb: musb: core: Convert the musb_platform_reset to have a return value. 2014-07-16 09:59:58 -05:00
musb_core.h usb: musb: core: Convert the musb_platform_reset to have a return value. 2014-07-16 09:59:58 -05:00
musb_cppi41.c usb: musb: cppi41: restart hrtimer only if not yet done 2014-10-23 09:55:41 -05:00
musb_debug.h
musb_debugfs.c
musb_dma.h usb: musb: introduce dma_channel.rx_packet_done 2014-06-30 14:26:24 -05:00
musb_dsps.c usb: musb: dsps: kill OTG timer on suspend 2014-09-16 10:01:44 -05:00
musb_gadget_ep0.c
musb_gadget.c usb: gadget: Refactor request completion 2014-09-25 16:58:50 +02:00
musb_gadget.h usb: musb: add Kconfig options for HOST, GAGDET or DUAL_ROLE modes 2013-05-28 19:22:23 +03:00
musb_host.c usb: musb: fix wrong indentation in musb_host.c 2014-06-30 14:26:27 -05:00
musb_host.h usb: musb: fix prototype for musb_port_reset 2013-12-20 15:05:43 -06:00
musb_io.h
musb_regs.h usb: Fixed a few typos 2014-09-23 22:15:18 -07:00
musb_virthub.c usb: musb: correct use of schedule_delayed_work() 2014-02-20 09:17:24 -06:00
musbhsdma.c usb: musb: dma: merge ->start/stop into create/destroy 2013-07-29 13:53:18 +03:00
musbhsdma.h
omap2430.c usb: musb: omap2430: make sure clocks are enabled when running mailbox 2014-04-15 12:08:02 -05:00
omap2430.h
tusb6010_omap.c usb: musb: tusb6010: Use musb->tusb_revision instead of tusb_get_revision call. 2014-05-16 12:16:31 -05:00
tusb6010.c usb: hub: rename khubd to hub_wq in documentation and comments 2014-09-23 22:33:19 -07:00
tusb6010.h usb: musb: tusb6010: Use musb->tusb_revision instead of tusb_get_revision call. 2014-05-16 12:16:31 -05:00
ux500_dma.c usb: musb: ux500: fix decimal printf format specifiers prefixed with 0x 2014-08-19 09:24:45 -05:00
ux500.c usb: patches for v3.17 merge window 2014-07-21 11:33:41 -07:00