Yoshihiro Shimoda
c14f8a4032
phy: rcar-gen3-usb2: fix mutex_lock calling in interrupt
This patch fixes an issue that the extcon_set_cable_state_() is possible
to cause "BUG: scheduling while atomic" because this driver calls
extcon_set_cable_state_() in the interrupt handler and mutex_lock()
is possible to be called by like the following call trace.
So, this patch adds a workqueue function to resolve this issue.
[ 9.706504] BUG: scheduling while atomic: systemd-journal/25893/0x00010303
[ 9.714569] Modules linked in:
[ 9.717629] CPU: 0 PID: 25893 Comm: systemd-journal Not tainted 4.7.0-rc4+ #86
[ 9.724844] Hardware name: Renesas Salvator-X board based on r8a7795 (DT)
[ 9.731624] Call trace:
[ 9.734077] [<ffff0000080889f0>] dump_backtrace+0x0/0x1a8
[ 9.739470] [<ffff000008088bac>] show_stack+0x14/0x20
[ 9.744520] [<ffff000008348ab4>] dump_stack+0x94/0xb8
[ 9.749568] [<ffff0000080da18c>] __schedule_bug+0x44/0x58
[ 9.754966] [<ffff0000087c6394>] __schedule+0x4e4/0x598
[ 9.760185] [<ffff0000087c6484>] schedule+0x3c/0xa8
[ 9.765057] [<ffff0000087c6928>] schedule_preempt_disabled+0x20/0x38
[ 9.771408] [<ffff0000080f20dc>] mutex_optimistic_spin+0x18c/0x1d0
[ 9.777583] [<ffff0000087c7ef0>] __mutex_lock_slowpath+0x38/0x140
[ 9.783669] [<ffff0000087c803c>] mutex_lock+0x44/0x60
[ 9.788717] [<ffff00000834ca48>] kobject_uevent_env+0x250/0x500
[ 9.794634] [<ffff0000086ae8c0>] extcon_update_state+0x220/0x298
[ 9.800634] [<ffff0000086ae9d8>] extcon_set_cable_state_+0x78/0x88
[ 9.806812] [<ffff000008376004>] rcar_gen3_device_recognition+0x5c/0xe0
[ 9.813420] [<ffff0000083761bc>] rcar_gen3_phy_usb2_irq+0x3c/0x48
[ 9.819509] [<ffff0000080fae94>] handle_irq_event_percpu+0x94/0x140
[ 9.825769] [<ffff0000080faf88>] handle_irq_event+0x48/0x78
[ 9.831334] [<ffff0000080fe620>] handle_fasteoi_irq+0xb8/0x1b0
[ 9.837162] [<ffff0000080fa3c4>] generic_handle_irq+0x24/0x38
[ 9.842900] [<ffff0000080fa6fc>] __handle_domain_irq+0x5c/0xb8
[ 9.848727] [<ffff000008081520>] gic_handle_irq+0x58/0xb0
Reported-by: Simon Horman <horms@verge.net.au>
Fixes: 2b38543c8d ("phy: rcar-gen3-usb2: add extcon support")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2016-07-04 18:07:39 +05:30
..
2016-05-27 15:26:11 -07:00
2016-05-27 15:26:11 -07:00
2016-05-25 15:29:21 -07:00
2016-05-24 11:00:20 -07:00
2016-05-26 19:34:26 -07:00
2016-05-13 16:54:59 +02:00
2016-05-19 10:02:26 -07:00
2016-05-20 22:31:33 -07:00
2016-05-27 15:26:11 -07:00
2016-05-19 11:27:09 -07:00
2016-05-27 15:26:11 -07:00
2016-05-18 02:48:37 +02:00
2016-05-27 15:26:11 -07:00
2016-05-20 22:02:55 -07:00
2016-05-27 15:26:11 -07:00
2016-05-17 17:05:30 -07:00
2016-05-20 21:26:15 -07:00
2016-05-27 15:26:11 -07:00
2016-05-27 15:26:11 -07:00
2016-05-17 12:42:27 +02:00
2016-05-26 09:48:23 -07:00
2016-05-20 17:58:30 -07:00
2016-05-20 21:20:31 -07:00
2016-05-28 17:37:42 +02:00
2016-05-20 22:20:48 -07:00
2016-05-28 12:04:17 -07:00
2016-05-27 19:14:35 -07:00
2016-05-27 15:26:11 -07:00
2016-05-28 16:41:39 -07:00
2016-05-20 20:57:27 -07:00
2016-05-25 10:40:15 -07:00
2016-05-27 14:28:09 -07:00
2016-05-28 16:15:25 -07:00
2016-05-24 11:00:20 -07:00
2016-05-23 17:04:14 -07:00
2016-05-18 16:38:59 -07:00
2016-05-27 15:26:11 -07:00
2016-05-20 21:20:31 -07:00
2016-05-27 15:26:11 -07:00
2016-05-27 18:49:29 -07:00
2016-05-27 15:26:11 -07:00
2016-05-26 19:34:26 -07:00
2016-05-17 17:14:21 -06:00
2016-05-27 15:26:11 -07:00
2016-05-24 11:00:20 -07:00
2016-05-20 21:20:31 -07:00
2016-07-04 18:07:39 +05:30
2016-05-26 15:35:44 -07:00
2016-05-28 12:32:01 -07:00
2016-05-20 21:26:15 -07:00
2016-05-20 14:06:21 -07:00
2016-05-16 19:17:22 -07:00
2016-05-25 10:40:15 -07:00
2016-05-17 14:45:02 +02:00
2016-05-21 17:07:17 +02:00
2016-05-26 19:34:26 -07:00
2016-05-20 18:33:37 -07:00
2016-05-28 12:04:17 -07:00
2016-05-19 15:20:24 +02:00
2016-05-28 12:23:12 -07:00
2016-05-28 11:04:16 -07:00
2016-05-28 12:04:17 -07:00
2016-05-26 09:23:43 -07:00
2016-05-27 15:26:11 -07:00
2016-05-28 12:04:17 -07:00
2016-05-25 09:47:26 -07:00
2016-05-27 15:26:11 -07:00
2016-05-22 19:44:13 +03:00
2016-05-25 10:19:17 -07:00
2016-05-28 12:04:17 -07:00
2016-05-23 11:18:01 -07:00
2016-05-20 22:02:53 -07:00