From: Sasha Levin <Alexander.Levin@microsoft.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: Vincent Pelletier <plr.vincent@gmail.com>,
Felipe Balbi <felipe.balbi@linux.intel.com>,
Sasha Levin <Alexander.Levin@microsoft.com>
Subject: [PATCH AUTOSEL for 4.9 43/49] usb: dwc3: gadget: Wait longer for controller to end command processing
Date: Sun, 28 Jan 2018 22:28:04 +0000 [thread overview]
Message-ID: <20180128222727.22404-43-alexander.levin@microsoft.com> (raw)
In-Reply-To: <20180128222727.22404-1-alexander.levin@microsoft.com>
From: Vincent Pelletier <plr.vincent@gmail.com>
[ Upstream commit 8722e095f5a44d0e409e45c5ddc2ee9cf589c777 ]
DWC3_DEPCMD_ENDTRANSFER has been witnessed to require around 600 iterations
before controller would become idle again after unplugging the USB cable
with AIO reads submitted.
Bump timeout from 500 iterations to 1000 so dwc3_stop_active_transfer does
not receive -ETIMEDOUT and does not WARN:
[ 81.326273] ------------[ cut here ]------------
[ 81.335341] WARNING: CPU: 0 PID: 1874 at drivers/usb/dwc3/gadget.c:2627 dwc3_stop_active_transfer.constprop.23+0x69/0xc0 [dwc3]
[ 81.347094] Modules linked in: usb_f_fs libcomposite configfs bnep btsdio bluetooth ecdh_generic brcmfmac brcmutil dwc3 intel_powerclamp coretemp ulpi kvm_intel udc_core kvm irqbypass crc32_pclmul crc32c_intel pcbc dwc3_pci aesni_intel aes_i586 crypto_simd cryptd ehci_pci ehci_hcd basincove_gpadc industrialio gpio_keys usbcore usb_common
[ 81.378142] CPU: 0 PID: 1874 Comm: irq/34-dwc3 Not tainted 4.14.0-edison+ #119
[ 81.385545] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
[ 81.394548] task: f5b1be00 task.stack: f420a000
[ 81.399219] EIP: dwc3_stop_active_transfer.constprop.23+0x69/0xc0 [dwc3]
[ 81.406086] EFLAGS: 00010086 CPU: 0
[ 81.409672] EAX: 0000001f EBX: f5729800 ECX: c132a2a2 EDX: 00000000
[ 81.416096] ESI: f4054014 EDI: f41cf400 EBP: f420be10 ESP: f420bdf4
[ 81.422521] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[ 81.428061] CR0: 80050033 CR2: b7a3f000 CR3: 01d94000 CR4: 001006d0
[ 81.434483] Call Trace:
[ 81.437063] __dwc3_gadget_ep_disable+0xa3/0x2b0 [dwc3]
[ 81.442438] ? _raw_spin_lock_irqsave+0x32/0x40
[ 81.447135] dwc3_gadget_ep_disable+0xbf/0xe0 [dwc3]
[ 81.452269] usb_ep_disable+0x1c/0xd0 [udc_core]
[ 81.457048] ffs_func_eps_disable.isra.15+0x3b/0x90 [usb_f_fs]
[ 81.463070] ffs_func_set_alt+0x7d/0x310 [usb_f_fs]
[ 81.468132] ffs_func_disable+0x14/0x20 [usb_f_fs]
[ 81.473075] reset_config+0x5b/0x90 [libcomposite]
[ 81.478023] composite_disconnect+0x2b/0x50 [libcomposite]
[ 81.483685] dwc3_disconnect_gadget+0x39/0x50 [dwc3]
[ 81.488808] dwc3_gadget_disconnect_interrupt+0x21b/0x250 [dwc3]
[ 81.495014] dwc3_thread_interrupt+0x2a8/0xf70 [dwc3]
[ 81.500219] ? __schedule+0x78c/0x7e0
[ 81.504027] irq_thread_fn+0x18/0x30
[ 81.507715] ? irq_thread+0xb7/0x180
[ 81.511400] irq_thread+0x111/0x180
[ 81.515000] ? irq_finalize_oneshot+0xe0/0xe0
[ 81.519490] ? wake_threads_waitq+0x30/0x30
[ 81.523806] kthread+0x107/0x110
[ 81.527131] ? disable_percpu_irq+0x50/0x50
[ 81.531439] ? kthread_stop+0x150/0x150
[ 81.535397] ret_from_fork+0x19/0x24
[ 81.539136] Code: 89 d8 c7 45 ec 00 00 00 00 c7 45 f0 00 00 00 00 c7 45 f4 00 00 00 00 e8 56 ef ff ff 85 c0 74 12 50 68 b9 1c 14 f8 e8 64 0f f7 c8 <0f> ff 58 5a 8d 76 00 8b 83 98 00 00 00 c6 83 a0 00 00 00 00 83
[ 81.559295] ---[ end trace f3133eec81a473b8 ]---
Number of iterations measured on 4 consecutive unplugs:
[ 1088.799777] dwc3_send_gadget_ep_cmd(cmd=331016, params={0, 0, 0}) iterated 605 times
[ 1222.024986] dwc3_send_gadget_ep_cmd(cmd=331016, params={0, 0, 0}) iterated 580 times
[ 1317.590452] dwc3_send_gadget_ep_cmd(cmd=331016, params={0, 0, 0}) iterated 598 times
[ 1453.218314] dwc3_send_gadget_ep_cmd(cmd=331016, params={0, 0, 0}) iterated 594 times
Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
---
drivers/usb/dwc3/gadget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 16c67120d72b..f483c3b1e971 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -247,7 +247,7 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd,
struct dwc3_gadget_ep_cmd_params *params)
{
struct dwc3 *dwc = dep->dwc;
- u32 timeout = 500;
+ u32 timeout = 1000;
u32 reg;
int cmd_status = 0;
--
2.11.0
next prev parent reply other threads:[~2018-01-28 22:29 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-28 22:27 [PATCH AUTOSEL for 4.9 01/49] usb: build drivers/usb/common/ when USB_SUPPORT is set Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 02/49] ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 03/49] ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 04/49] ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 05/49] ARM: dts: logicpd-som-lv: Fix gpmc addresses for NAND and enet Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 06/49] ARM: dts: logicpd-somlv: Fix wl127x pinmux Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 08/49] ARM: dts: am437x-cm-t43: Correct the dmas property of spi0 Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 07/49] ARM: dts: am4372: Correct the interrupts_properties of McASP Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 09/49] perf top: Fix window dimensions change handling Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 11/49] media: s5k6aa: describe some function parameters Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 10/49] perf bench numa: Fixup discontiguous/sparse numa nodes Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 12/49] pinctrl: sunxi: Fix A80 interrupt pin bank Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 14/49] i40iw: Correct ARP index mask Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 13/49] pinctrl: sunxi: Fix A64 UART mux value Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 15/49] RDMA/cma: Make sure that PSN is not over max allowed Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 17/49] scripts/kernel-doc: Don't fail with status != 0 if error encountered with -none Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 16/49] sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 18/49] ipvlan: Add the skb->mark as flow4's member to lookup route Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 20/49] powerpc/perf: Fix oops when grouping different pmu events Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 19/49] m68k: add missing SOFTIRQENTRY_TEXT linker section Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 21/49] s390/dasd: prevent prefix I/O error Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 22/49] ARM: dts: Fix elm interrupt compiler warning Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 23/49] gianfar: fix a flooded alignment reports because of padding issue Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 24/49] net_sched: red: Avoid devision by zero Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 25/49] net_sched: red: Avoid illegal values Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 26/49] dccp: CVE-2017-8824: use-after-free in DCCP code Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 27/49] btrfs: Fix possible off-by-one in btrfs_search_path_in_tree Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 29/49] net: ethernet: arc: fix error handling in emac_rockchip_probe Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 28/49] brcmfmac: Avoid build error with make W=1 Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 30/49] 509: fix printing uninitialized stack memory when OID is empty Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 32/49] dmaengine: ioat: Fix error handling path Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 31/49] gianfar: Disable EEE autoneg by default Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 33/49] dmaengine: at_hdmac: fix potential NULL pointer dereference in atc_prep_dma_interleaved Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 35/49] netfilter: nfnetlink_cthelper: Add missing permission checks Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 34/49] xfrm: Fix stack-out-of-bounds read on socket policy lookup Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 37/49] netfilter: xt_osf: Add missing permission checks Sasha Levin
2018-01-28 22:27 ` [PATCH AUTOSEL for 4.9 36/49] clk: fix a panic error caused by accessing NULL pointer Sasha Levin
2018-01-28 22:28 ` [PATCH AUTOSEL for 4.9 38/49] ASoC: rockchip: disable clock on error Sasha Levin
2018-01-28 22:28 ` [PATCH AUTOSEL for 4.9 40/49] xfrm: Fix stack-out-of-bounds with misconfigured transport mode policies Sasha Levin
2018-01-28 22:28 ` [PATCH AUTOSEL for 4.9 39/49] spi: sun4i: disable clocks in the remove function Sasha Levin
2018-01-28 22:28 ` [PATCH AUTOSEL for 4.9 41/49] drm/armada: fix leak of crtc structure Sasha Levin
2018-01-28 22:28 ` [PATCH AUTOSEL for 4.9 42/49] dmaengine: jz4740: disable/unprepare clk if probe fails Sasha Levin
2018-01-28 22:28 ` Sasha Levin [this message]
2018-01-28 22:28 ` [PATCH AUTOSEL for 4.9 44/49] usb: dwc3: of-simple: fix missing clk_disable_unprepare Sasha Levin
2018-01-28 22:28 ` [PATCH AUTOSEL for 4.9 45/49] mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep Sasha Levin
2018-01-28 22:28 ` [PATCH AUTOSEL for 4.9 46/49] x86/mm/kmmio: Fix mmiotrace for page unaligned addresses Sasha Levin
2018-01-28 22:28 ` [PATCH AUTOSEL for 4.9 47/49] platform/x86: dell-laptop: Fix keyboard max lighting for Dell Latitude E6410 Sasha Levin
2018-01-28 22:28 ` [PATCH AUTOSEL for 4.9 48/49] xen: XEN_ACPI_PROCESSOR is Dom0-only Sasha Levin
2018-01-28 22:28 ` [PATCH AUTOSEL for 4.9 49/49] hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180128222727.22404-43-alexander.levin@microsoft.com \
--to=alexander.levin@microsoft.com \
--cc=felipe.balbi@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=plr.vincent@gmail.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®