Re: [PATCH v5 00/22] usb: third series of updates for dwc2 driver
Hi, Am Mittwoch, 29. April 2015, 22:08:58 schrieb Mian Yousaf Kaukab: Hi, This patchset consists of some bug fixes and feature enhancements for the dwc2 driver. All the patches are verified on dwc2 v3.0a with dedicated fifos. Main focus of testing was with dma enabled. Although basic testing without dma was also done. This is based on testing/next branch in Felipe's git. Thank you, Best regards, Yousaf History: v5: - Fixed comments from Felipe Balbi v4: - Fixed comment from Julius Werner v3: - Fixed comments from Julius Werner and Sergei Shtylyov - Dropped usb: dwc2: allow dwc2_pci to be a module even when dwc2 is statically linked due to http://marc.info/?l=linux-usbm=142661773703793w=2 - usb: dwc2: host: ensure qtb exists before dereferencing it is added to fix a NULL pointer dereferencing bug v2: - Fixed comments from John Youn and Julius Werner - Fixed regression, found by John, when switching to gadget mode after running host mode - Added patch to add core parameter for enabling/disabling hibernation - Added patch to build dwc2_pci.ko independent from dwc2.ko v1: - Fixed comments from John Youn and Robert Baldyga - Dropped all changes to pci.c due to http://permalink.gmane.org/gmane.linux.usb.general/123411 - Added patch to remove unnecessary EXPORT_SYMBOL_GPL calls With this series applied I get the warning below about a sleeping function, that is not present without it. This happens quite often (on boot, when going to suspend, etc). Other than that, usb still works and the dwc2 now also finally suspends :-D, so on a rk3288 Tested-by: Heiko Stuebner he...@sntech.de -- 8 -- [ 19.799200] BUG: sleeping function called from invalid context at mm/slab.c:2863 [ 19.806601] in_atomic(): 1, irqs_disabled(): 128, pid: 101, name: kworker/0:2 [ 19.813728] INFO: lockdep is turned off. [ 19.817649] irq event stamp: 0 [ 19.820702] hardirqs last enabled at (0): [ (null)] (null) [ 19.826720] hardirqs last disabled at (0): [c00273f4] copy_process.part.46+0x430/0x1784 [ 19.834916] softirqs last enabled at (0): [c00273f4] copy_process.part.46+0x430/0x1784 [ 19.843104] softirqs last disabled at (0): [ (null)] (null) [ 19.849126] CPU: 0 PID: 101 Comm: kworker/0:2 Tainted: GW 4.1.0-rc4+ #1963 [ 19.857208] Hardware name: Rockchip (Device Tree) [ 19.861916] Workqueue: events usbnet_deferred_kevent [ 19.866910] [c00189a0] (unwind_backtrace) from [c0013b04] (show_stack+0x20/0x24) [ 19.874659] [c0013b04] (show_stack) from [c075c154] (dump_stack+0x8c/0xbc) [ 19.881888] [c075c154] (dump_stack) from [c0053188] (___might_sleep+0x238/0x284) [ 19.889636] [c0053188] (___might_sleep) from [c0053264] (__might_sleep+0x90/0xa4) [ 19.897468] [c0053264] (__might_sleep) from [c0154aa8] (kmem_cache_alloc_trace+0x90/0x3e0) [ 19.906081] [c0154aa8] (kmem_cache_alloc_trace) from [c0442a68] (_dwc2_hcd_urb_enqueue+0x298/0x464) [ 19.915476] [c0442a68] (_dwc2_hcd_urb_enqueue) from [c042a748] (usb_hcd_submit_urb+0x7bc/0x8f0) [ 19.924522] [c042a748] (usb_hcd_submit_urb) from [c042c158] (usb_submit_urb+0x45c/0x4ac) [ 19.932961] [c042c158] (usb_submit_urb) from [c042cc60] (usb_start_wait_urb+0x54/0x148) [ 19.941314] [c042cc60] (usb_start_wait_urb) from [c042cf44] (usb_control_msg+0xac/0xe0) [ 19.949668] [c042cf44] (usb_control_msg) from [c041c4d4] (__usbnet_read_cmd+0xc0/0x104) [ 19.958021] [c041c4d4] (__usbnet_read_cmd) from [c041c63c] (usbnet_read_cmd+0x64/0x84) [ 19.966294] [c041c63c] (usbnet_read_cmd) from [bf13c790] (__smsc95xx_read_reg+0x68/0xa4 [smsc95xx]) [ 19.975698] [bf13c790] (__smsc95xx_read_reg [smsc95xx]) from [bf13c80c] (__smsc95xx_phy_wait_not_busy+0x40/0x8c [smsc95xx]) [ 19.987180] [bf13c80c] (__smsc95xx_phy_wait_not_busy [smsc95xx]) from [bf13cd04] (__smsc95xx_mdio_read+0x48/0x110 [smsc95xx]) [ 19.998836] [bf13cd04] (__smsc95xx_mdio_read [smsc95xx]) from [bf13cde8] (smsc95xx_mdio_read+0x1c/0x20 [smsc95xx]) [ 20.009539] [bf13cde8] (smsc95xx_mdio_read [smsc95xx]) from [bf13ce34] (smsc95xx_link_reset+0x48/0x2d4 [smsc95xx]) [ 20.020237] [bf13ce34] (smsc95xx_link_reset [smsc95xx]) from [c041f7e4] (usbnet_deferred_kevent+0x244/0x344) [ 20.030410] [c041f7e4] (usbnet_deferred_kevent) from [c0044d28] (process_one_work+0x360/0x7f4) [ 20.039367] [c0044d28] (process_one_work) from [c00454a8] (worker_thread+0x2b0/0x414) [ 20.047546] [c00454a8] (worker_thread) from [c004afe8] (kthread+0x104/0x11c) [ 20.054947] [c004afe8] (kthread) from [c0010010] (ret_from_fork+0x14/0x24) [ 20.062456] smsc95xx 2-1.1:1.0 eth0: kevent 4 may have been dropped [ 20.071768] smsc95xx 2-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1 [ 20.089180] smsc95xx 2-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at
Re: [PATCH net,stable-4.0] cdc_ncm: Fix tx_bytes statistics
* David Miller da...@davemloft.net [2015-05-22 14:34:21 -0400]: From: Bjørn Mork bj...@mork.no Date: Fri, 22 May 2015 13:15:22 +0200 The tx_curr_frame_payload field is u32. When we try to calculate a small negative delta based on it, we end up with a positive integer close to 2^32 instead. So the tx_bytes pointer increases by about 2^32 for every transmitted frame. Fix by calculating the delta as a signed long. Cc: Ben Hutchings ben.hutchi...@codethink.co.uk Reported-by: Florian Bruhin m...@the-compiler.org Fixes: 7a1e890e2168 (usbnet: Fix tx_bytes statistic running backward in cdc_ncm) Signed-off-by: Bjørn Mork bj...@mork.no Applied and queued up for -stable. Thank you, and thanks Bjørn for the quick fix! Florian -- http://www.the-compiler.org | m...@the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ pgprlO5mKuBfT.pgp Description: PGP signature
Re: [Bulk] seagate SRD00f2 expansion 4Tb desktop drive does not work on USB 3.0 Part 3 xhci-debug
I submitted a case to tech support at seagate case number: 04853786 On 05/23/2015 09:00 AM, Donald Harter wrote: I am adding some xhci debug information to my previous report since that seems more relevant. At the start of the debug, I had just removed the drive from a usb 2.0 port, and plugged it into a usb 3.0 port. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Bulk] seagate SRD00f2 expansion 4Tb desktop drive does not work on USB 3.0 Part 2 xhci-debug
I am adding some xhci debug information to my previous report since that seems more relevant. At the start of the debug, I had just removed the drive from a usb 2.0 port, and plugged it into a usb 3.0 port. May 23 08:52:05 pc_u kernel: [53875.075976] xhci_hcd :00:14.0: Port Status Change Event for port 3 May 23 08:52:05 pc_u kernel: [53875.075979] xhci_hcd :00:14.0: port resume event for port 3 May 23 08:52:05 pc_u kernel: [53875.075981] xhci_hcd :00:14.0: resume HS port 3 May 23 08:52:05 pc_u kernel: [53875.075983] xhci_hcd :00:14.0: handle_port_status: starting port polling. May 23 08:52:05 pc_u kernel: [53875.135221] xhci_hcd :00:14.0: Resume USB2 port 3 May 23 08:52:05 pc_u kernel: [53875.135230] xhci_hcd :00:14.0: Port Status Change Event for port 3 May 23 08:52:05 pc_u kernel: [53875.135240] xhci_hcd :00:14.0: get port status, actual port 2 status = 0xfe3 May 23 08:52:05 pc_u kernel: [53875.135241] xhci_hcd :00:14.0: Get port status returned 0x40503 May 23 08:52:05 pc_u kernel: [53875.135262] xhci_hcd :00:14.0: clear port suspend/resume change, actual port 2 status = 0xe03 May 23 08:52:05 pc_u kernel: [53875.151222] xhci_hcd :00:14.0: get port status, actual port 2 status = 0xe03 May 23 08:52:05 pc_u kernel: [53875.151224] xhci_hcd :00:14.0: Get port status returned 0x503 May 23 08:52:05 pc_u kernel: [53875.255453] xhci_hcd :00:14.0: // Ding dong! May 23 08:52:05 pc_u kernel: [53875.255496] xhci_hcd :00:14.0: Slot 15 output ctx = 0x4018f1000 (dma) May 23 08:52:05 pc_u kernel: [53875.255498] xhci_hcd :00:14.0: Slot 15 input ctx = 0x401e2a000 (dma) May 23 08:52:05 pc_u kernel: [53875.255499] xhci_hcd :00:14.0: Set slot id 15 dcbaa entry 8804028f2078 to 0x4018f1000 May 23 08:52:06 pc_u kernel: [53875.343311] usb 3-3.4: new high-speed USB device number 14 using xhci_hcd May 23 08:52:06 pc_u kernel: [53875.343314] xhci_hcd :00:14.0: Set root hub portnum to 3 May 23 08:52:06 pc_u kernel: [53875.343315] xhci_hcd :00:14.0: Set fake root hub portnum to 3 May 23 08:52:06 pc_u kernel: [53875.343315] xhci_hcd :00:14.0: udev-tt = (null) May 23 08:52:06 pc_u kernel: [53875.343316] xhci_hcd :00:14.0: udev-ttport = 0x0 May 23 08:52:06 pc_u kernel: [53875.343317] xhci_hcd :00:14.0: Slot ID 15 Input Context: May 23 08:52:06 pc_u kernel: [53875.343318] xhci_hcd :00:14.0: @880401e2a000 (virt) @401e2a000 (dma) 0x00 - drop flags May 23 08:52:06 pc_u kernel: [53875.343319] xhci_hcd :00:14.0: @880401e2a004 (virt) @401e2a004 (dma) 0x03 - add flags May 23 08:52:06 pc_u kernel: [53875.343320] xhci_hcd :00:14.0: @880401e2a008 (virt) @401e2a008 (dma) 0x00 - rsvd2[0] May 23 08:52:06 pc_u kernel: [53875.343321] xhci_hcd :00:14.0: @880401e2a00c (virt) @401e2a00c (dma) 0x00 - rsvd2[1] May 23 08:52:06 pc_u kernel: [53875.343321] xhci_hcd :00:14.0: @880401e2a010 (virt) @401e2a010 (dma) 0x00 - rsvd2[2] May 23 08:52:06 pc_u kernel: [53875.343322] xhci_hcd :00:14.0: @880401e2a014 (virt) @401e2a014 (dma) 0x00 - rsvd2[3] May 23 08:52:06 pc_u kernel: [53875.343323] xhci_hcd :00:14.0: @880401e2a018 (virt) @401e2a018 (dma) 0x00 - rsvd2[4] May 23 08:52:06 pc_u kernel: [53875.343324] xhci_hcd :00:14.0: @880401e2a01c (virt) @401e2a01c (dma) 0x00 - rsvd2[5] May 23 08:52:06 pc_u kernel: [53875.343324] xhci_hcd :00:14.0: Slot Context: May 23 08:52:06 pc_u kernel: [53875.343325] xhci_hcd :00:14.0: @880401e2a020 (virt) @401e2a020 (dma) 0x834 - dev_info May 23 08:52:06 pc_u kernel: [53875.343326] xhci_hcd :00:14.0: @880401e2a024 (virt) @401e2a024 (dma) 0x03 - dev_info2 May 23 08:52:06 pc_u kernel: [53875.343327] xhci_hcd :00:14.0: @880401e2a028 (virt) @401e2a028 (dma) 0x00 - tt_info May 23 08:52:06 pc_u kernel: [53875.343328] xhci_hcd :00:14.0: @880401e2a02c (virt) @401e2a02c (dma) 0x00 - dev_state May 23 08:52:06 pc_u kernel: [53875.343328] xhci_hcd :00:14.0: @880401e2a030 (virt) @401e2a030 (dma) 0x00 - rsvd[0] May 23 08:52:06 pc_u kernel: [53875.343329] xhci_hcd :00:14.0: @880401e2a034 (virt) @401e2a034 (dma) 0x00 - rsvd[1] May 23 08:52:06 pc_u kernel: [53875.343330] xhci_hcd :00:14.0: @880401e2a038 (virt) @401e2a038 (dma) 0x00 - rsvd[2] May 23 08:52:06 pc_u kernel: [53875.343331] xhci_hcd :00:14.0: @880401e2a03c (virt) @401e2a03c (dma) 0x00 - rsvd[3] May 23 08:52:06 pc_u kernel: [53875.343332] xhci_hcd :00:14.0: IN Endpoint 00 Context (ep_index 00): May 23 08:52:06 pc_u kernel: [53875.343332] xhci_hcd :00:14.0: @880401e2a040 (virt) @401e2a040 (dma) 0x00 - ep_info May 23 08:52:06 pc_u kernel: [53875.34] xhci_hcd :00:14.0: @880401e2a044 (virt) @401e2a044 (dma) 0x400026 - ep_info2 May 23 08:52:06 pc_u kernel: [53875.343334] xhci_hcd :00:14.0: @880401e2a048 (virt) @401e2a048 (dma)
[PATCH] USB: musb: Fix order of conditions for assigning end point operations
Currently we always assign one of the two common implementations of ep_offset and ep_select operations, overwriting any platform-specific implementations. Fixes: d026e9c76aac (usb: musb: Change end point selection to use ...) Signed-off-by: Ben Hutchings b...@decadent.org.uk --- This is untested; I just spotted this while backporting Tony's work on multiplatform support. Ben. drivers/usb/musb/musb_core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 3789b08..6dca3d7 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2021,13 +2021,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) if (musb-ops-quirks) musb-io.quirks = musb-ops-quirks; - /* At least tusb6010 has it's own offsets.. */ - if (musb-ops-ep_offset) - musb-io.ep_offset = musb-ops-ep_offset; - if (musb-ops-ep_select) - musb-io.ep_select = musb-ops-ep_select; - - /* ..and some devices use indexed offset or flat offset */ + /* Most devices use indexed offset or flat offset */ if (musb-io.quirks MUSB_INDEXED_EP) { musb-io.ep_offset = musb_indexed_ep_offset; musb-io.ep_select = musb_indexed_ep_select; @@ -2036,6 +2030,12 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) musb-io.ep_select = musb_flat_ep_select; } + /* At least tusb6010 has its own offsets */ + if (musb-ops-ep_offset) + musb-io.ep_offset = musb-ops-ep_offset; + if (musb-ops-ep_select) + musb-io.ep_select = musb-ops-ep_select; + if (musb-ops-fifo_mode) fifo_mode = musb-ops-fifo_mode; else -- Ben Hutchings Experience is what causes a person to make new mistakes instead of old ones. signature.asc Description: This is a digitally signed message part