Re: v3.11-rc1 USB regressions
On 25.07.2013 02:30, Aaro Koskinen wrote: > On Wed, Jul 24, 2013 at 09:04:28PM +0200, Daniel Mack wrote: >> On 24.07.2013 20:51, Aaro Koskinen wrote: When I revert fe4cb0912f8e737f8e4b8b38b9e692f8062f5423 and 8b125df5b24cfb0ec7fa1971e343cc0badc1827d, it works like before (3.10): >>> >>> I'm now running -rc2 with above fixes and reverts (the only way to get >>> USB working). I'm seeing an additional issue, the following crash happens >>> always on N900 when doing "poweroff": >> >> Yes, with the mentioned patches reverted, musb_to_hcd() will return a >> faulty pointer. You can't easily revert them unfortunately. >> >> Your platform needs a real fix, I just have trouble understanding why a >> removed usb_add_hcd() would make the gadget code fail. >> >> Sorry for the trouble, but I don't currently have a board with musb in >> gadget mode to reproduce this issue. > > If you have any ideas what to look for, I can maybe try to debug this > issue. Please try changing the .mode field of musb_board_data to MUSB_OTG in your board file (arch/arm/mach-omap2/board-rx51.c). That should bring back the call to usb_add_hcd(), provided that you have USB_MUSB_DUAL_ROLE=y. I still don't see a reason why this is should be necessary for peripheral-only use though. Daniel -- 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: v3.11-rc1 USB regressions
Hi, On Wed, Jul 24, 2013 at 09:04:28PM +0200, Daniel Mack wrote: > On 24.07.2013 20:51, Aaro Koskinen wrote: > >> When I revert fe4cb0912f8e737f8e4b8b38b9e692f8062f5423 and > >> 8b125df5b24cfb0ec7fa1971e343cc0badc1827d, it works like before (3.10): > > > > I'm now running -rc2 with above fixes and reverts (the only way to get > > USB working). I'm seeing an additional issue, the following crash happens > > always on N900 when doing "poweroff": > > Yes, with the mentioned patches reverted, musb_to_hcd() will return a > faulty pointer. You can't easily revert them unfortunately. > > Your platform needs a real fix, I just have trouble understanding why a > removed usb_add_hcd() would make the gadget code fail. > > Sorry for the trouble, but I don't currently have a board with musb in > gadget mode to reproduce this issue. If you have any ideas what to look for, I can maybe try to debug this issue. Below are some logs with additional DEBUGs enabled. Broken: [4.111480] udc musb-hdrc.0.auto: registering UDC driver [g_ether] [4.136962] using random self ethernet address [4.144134] using random host ethernet address [4.151000] g_ether gadget: adding config #1 'CDC Ethernet (ECM)'/bf03f2c0 [4.160552] g_ether gadget: adding 'cdc_ethernet'/cef92e40 to config 'CDC Ethernet (ECM)'/bf03f2c0 [4.186828] usb0: HOST MAC f6:4a:86:02:5d:ec [4.193939] usb0: MAC 26:e9:7c:49:4a:2e [4.200256] g_ether gadget: CDC Ethernet: dual speed IN/ep1in OUT/ep1out NOTIFY/ep2in [4.210906] g_ether gadget: cfg 1/bf03f2c0 speeds: high full [4.219207] g_ether gadget: interface 0 = cdc_ethernet/cef92e40 [4.227874] g_ether gadget: interface 1 = cdc_ethernet/cef92e40 [4.236480] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 [4.245635] g_ether gadget: g_ether ready [4.261627] twl4030_usb twl4030_usb: twl4030_phy_resume [4.281433] usb0: eth_open [4.560974] musb-hdrc musb-hdrc.0.auto: ** IRQ peripheral usb000d tx0001 rx [4.570983] musb-hdrc musb-hdrc.0.auto: <== DevCtl=99, int_usb=0xd [4.579681] musb-hdrc musb-hdrc.0.auto: SUSPEND (b_idle) devctl 99 [4.588378] musb-hdrc musb-hdrc.0.auto: BUS RESET as b_peripheral [4.596984] musb-hdrc musb-hdrc.0.auto: RX ep0 fifo fa0ab020 count 8 buf c0c55df0 [4.607055] musb-hdrc musb-hdrc.0.auto: TX ep0 fifo fa0ab020 count 18 buf cef1a000 [4.617248] musb-hdrc musb-hdrc.0.auto: ** IRQ peripheral usb0008 tx0001 rx [4.627044] musb-hdrc musb-hdrc.0.auto: <== DevCtl=99, int_usb=0x8 [4.728790] musb-hdrc musb-hdrc.0.auto: ** IRQ peripheral usb000c tx0001 rx [4.738616] musb-hdrc musb-hdrc.0.auto: <== DevCtl=99, int_usb=0xc [4.747222] musb-hdrc musb-hdrc.0.auto: BUS RESET as b_peripheral [4.755645] musb-hdrc musb-hdrc.0.auto: RX ep0 fifo fa0ab020 count 8 buf c0c55df0 [4.765533] musb-hdrc musb-hdrc.0.auto: ** IRQ peripheral usb0008 tx0001 rx [4.775207] musb-hdrc musb-hdrc.0.auto: <== DevCtl=99, int_usb=0x8 [4.784637] musb-hdrc musb-hdrc.0.auto: ** IRQ peripheral usb0008 tx0001 rx [4.794281] musb-hdrc musb-hdrc.0.auto: <== DevCtl=99, int_usb=0x8 [4.802703] musb-hdrc musb-hdrc.0.auto: RX ep0 fifo fa0ab020 count 8 buf c0c55df0 [4.812500] musb-hdrc musb-hdrc.0.auto: TX ep0 fifo fa0ab020 count 18 buf cef1a000 [4.822509] musb-hdrc musb-hdrc.0.auto: ** IRQ peripheral usb0008 tx0001 rx [4.832153] musb-hdrc musb-hdrc.0.auto: <== DevCtl=99, int_usb=0x8 [4.840576] musb-hdrc musb-hdrc.0.auto: RX ep0 fifo fa0ab020 count 8 buf c0c55dd0 [4.850372] musb-hdrc musb-hdrc.0.auto: TX ep0 fifo fa0ab020 count 9 buf cef1a000 [4.860198] musb-hdrc musb-hdrc.0.auto: ** IRQ peripheral usb0008 tx0001 rx [4.869781] musb-hdrc musb-hdrc.0.auto: <== DevCtl=99, int_usb=0x8 [4.878112] musb-hdrc musb-hdrc.0.auto: RX ep0 fifo fa0ab020 count 8 buf c0c55ce8 [4.887847] musb-hdrc musb-hdrc.0.auto: TX ep0 fifo fa0ab020 count 64 buf cef1a000 [4.897674] musb-hdrc musb-hdrc.0.auto: ** IRQ peripheral usb0008 tx0001 rx [4.907257] musb-hdrc musb-hdrc.0.auto: <== DevCtl=99, int_usb=0x8 [4.915588] musb-hdrc musb-hdrc.0.auto: TX ep0 fifo fa0ab020 count 24 buf cef1a040 [4.925506] musb-hdrc musb-hdrc.0.auto: ** IRQ peripheral usb0008 tx0001 rx [4.935089] musb-hdrc musb-hdrc.0.auto: <== DevCtl=99, int_usb=0x8 [4.943450] musb-hdrc musb-hdrc.0.auto: RX ep0 fifo fa0ab020 count 8 buf c0c55ce8 [4.953247] musb-hdrc musb-hdrc.0.auto: TX ep0 fifo fa0ab020 count 4 buf cef1a000 [4.963012] musb-hdrc musb-hdrc.0.auto: ** IRQ peripheral usb0008 tx0001 rx [4.972595] musb-hdrc musb-hdrc.0.auto: <== DevCtl=99, int_usb=0x8 [4.980926] musb-hdrc musb-hdrc.0.auto: RX ep0 fifo fa0ab020 count 8 buf c0c55ce8 [4.990692] musb-hdrc musb-hdrc.0.auto: TX ep0 fifo fa0ab020 count 32 buf cef1a000 [5.000549] musb-hdrc musb-hdrc.0.auto: ** IRQ peripheral usb0008 tx0001 rx [5.010101] musb-hdrc musb-hdrc.0.a
Re: v3.11-rc1 USB regressions
Hi Aaro, On 24.07.2013 20:51, Aaro Koskinen wrote: > On Tue, Jul 16, 2013 at 08:57:10PM +0300, Aaro Koskinen wrote: >> Here are full details: >> >> Kernel v3.11-rc1 and the following USB fixes: >> ARM: omap2: fix musb usage for n8x0 >> musb: omap: Fix: pass all the resources to musb core > > [...] > >> When I revert fe4cb0912f8e737f8e4b8b38b9e692f8062f5423 and >> 8b125df5b24cfb0ec7fa1971e343cc0badc1827d, it works like before (3.10): > > I'm now running -rc2 with above fixes and reverts (the only way to get > USB working). I'm seeing an additional issue, the following crash happens > always on N900 when doing "poweroff": Yes, with the mentioned patches reverted, musb_to_hcd() will return a faulty pointer. You can't easily revert them unfortunately. Your platform needs a real fix, I just have trouble understanding why a removed usb_add_hcd() would make the gadget code fail. Sorry for the trouble, but I don't currently have a board with musb in gadget mode to reproduce this issue. Thanks, Daniel -- 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: v3.11-rc1 USB regressions
Hi, On Tue, Jul 16, 2013 at 08:57:10PM +0300, Aaro Koskinen wrote: > On Tue, Jul 16, 2013 at 08:33:06AM +0200, Daniel Mack wrote: > > > fe4cb0912f8e737f8e4b8b38b9e692f8062f5423 > > > usb: musb: gadget: remove hcd initialization > > > (Reverting this fixes error "cdc_ether: probe of 4-1:1.0 failed > > >with error -110" seen on the host side.) > > > > Which role does your musb-based hardware have in this case, and which > > MUSB_* config symbols do you set? You should have USB_MUSB_GADGET. > > Here are full details: > > Kernel v3.11-rc1 and the following USB fixes: > ARM: omap2: fix musb usage for n8x0 > musb: omap: Fix: pass all the resources to musb core [...] > When I revert fe4cb0912f8e737f8e4b8b38b9e692f8062f5423 and > 8b125df5b24cfb0ec7fa1971e343cc0badc1827d, it works like before (3.10): I'm now running -rc2 with above fixes and reverts (the only way to get USB working). I'm seeing an additional issue, the following crash happens always on N900 when doing "poweroff": [ 33.198699] musb-hdrc musb-hdrc.0.auto: remove, state 4 [ 33.206817] usb usb1: USB disconnect, device number 1 [ 33.215332] musb-hdrc musb-hdrc.0.auto: USB bus 1 deregistered [ 33.225128] Unable to handle kernel NULL pointer dereference at virtual address 0028 [ 33.236083] pgd = c0914000 [ 33.241149] [0028] *pgd=8efc8831, *pte=, *ppte= [ 33.250213] Internal error: Oops: 17 [#1] ARM [ 33.257141] Modules linked in: usb_f_ecm g_ether u_ether libcomposite configfs omapfb cfbcopyarea cfbimgblt cfbfillrect panel_acx565akm [ 33.275146] CPU: 0 PID: 760 Comm: poweroff Not tainted 3.11.0-rc2-n9xx #1 [ 33.284881] task: cefb8680 ti: c08c6000 task.ti: c08c6000 [ 33.293151] PC is at usb_remove_hcd+0x10/0x178 [ 33.300384] LR is at musb_gadget_stop+0x184/0x1a8 [ 33.307830] pc : []lr : []psr: 2013 [ 33.307830] sp : c08c7da0 ip : c08c7dc0 fp : c08c7dbc [ 33.324920] r10: r9 : c08c6000 r8 : 2013 [ 33.332916] r7 : cf814010 r6 : cf814fa0 r5 : cf814fa0 r4 : [ 33.342315] r3 : c0262b80 r2 : 0001 r1 : c0d9edd0 r0 : [ 33.351715] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 33.361846] Control: 10c5387d Table: 80914019 DAC: 0015 [ 33.370483] Process poweroff (pid: 760, stack limit = 0xc08c6238) [ 33.379486] Stack: (0xc08c7da0 to 0xc08c8000) [ 33.386627] 7da0: c0262b80 cf814fa0 c08c7de4 c08c7dc0 c0261688 c02499cc [ 33.397918] 7dc0: c0261504 cef2d200 cf814fa0 cf93fc44 c0d9d698 c0c8bb9c c08c7dfc c08c7de8 [ 33.409149] 7de0: c0262dd8 c0261510 bf03f3a4 cef2d200 c08c7e14 c08c7e00 c0263894 c0262d60 [ 33.420440] 7e00: cf814010 cf93fc10 c08c7e24 c08c7e18 c0261c80 c026380c c08c7e3c c08c7e28 [ 33.431732] 7e20: c025b2a4 c0261c78 cf93fc1c cf93fc10 c08c7e4c c08c7e40 c01e88ec c025b27c [ 33.443023] 7e40: c08c7e74 c08c7e50 c01e55d0 c01e88d8 4321fedc 4321fedc 00070784 [ 33.454315] 7e60: fee1dead c000e848 c08c7e84 c08c7e78 c00553c4 c01e55ac c08c7fa4 c08c7e88 [ 33.465606] 7e80: c0055658 c0055394 0020 cef3add0 c0c72f6c [ 33.476898] 7ea0: c08c7ecc c08c7eb0 c017a914 c01791d0 0001 0001 c0c74078 [ 33.488159] 7ec0: c08c7efc c08c7ed0 c00524b8 c017a8e8 0001 0007 c0337640 c0c5d9e4 [ 33.499328] 7ee0: b6e5d670 c08c7fb0 b6f28000 c08c7fac c08c7f00 c0008514 c033764c [ 33.510498] 7f00: c08c7f04 c08c7f04 7fff cefc1c00 0001 0010 [ 33.521667] 7f20: 0002 c08c7f00 cefc1c00 cef4da00 cefc1c00 [ 33.532836] 7f40: cf803858 cf8037d4 c00e0528 c08c7f84 c08c7f60 c00ea404 c00d1bb0 [ 33.544067] 7f60: 0004 0055 0024 c000e848 c08c7fa4 c08c7f88 [ 33.555297] 7f80: c00e0698 c00ea3a4 0001 0004 0055 0058 c08c7fa8 [ 33.566528] 7fa0: c000e6a0 c00554a4 0001 0004 fee1dead 28121969 4321fedc 00070784 [ 33.577789] 7fc0: 0001 0004 0055 0058 b6f28000 [ 33.589080] 7fe0: b6e5d740 be88ccc0 000605f8 b6e5d758 6010 fee1dead 8fefe821 8fefec21 [ 33.600402] Backtrace: [ 33.605621] [] (usb_remove_hcd+0x0/0x178) from [] (musb_gadget_stop+0x184/0x1a8) [ 33.620666] r5:cf814fa0 r4: [ 33.627166] [] (musb_gadget_stop+0x0/0x1a8) from [] (usb_gadget_remove_driver+0x84/0xa4) [ 33.643005] r8:c0c8bb9c r7:c0d9d698 r6:cf93fc44 r5:cf814fa0 r4:cef2d200 r3:c0261504 [ 33.656890] [] (usb_gadget_remove_driver+0x0/0xa4) from [] (usb_del_gadget_udc+0x94/0xd4) [ 33.673065] r4:cef2d200 r3:bf03f3a4 [ 33.679718] [] (usb_del_gadget_udc+0x0/0xd4) from [] (musb_gadget_cleanup+0x14/0x18) [ 33.695465] r5:cf93fc10 r4:cf814010 [ 33.702178] [] (musb_gadget_cleanup+0x0/0x18) from [] (musb_shutdown+0x34/0x94) [ 33.717651] [] (musb_shutdown+0x0/0x94) from [] (platform_drv_shutdown+0x20/0x24) [ 33.733489] r5:cf93fc10 r4:cf93fc1c [
Re: v3.11-rc1 USB regressions
On Tue, Jul 16, 2013 at 08:30:21PM +0200, Daniel Mack wrote: > On 16.07.2013 20:26, Aaro Koskinen wrote: > > Hi, > > > > On Tue, Jul 16, 2013 at 11:22:47AM +0300, Felipe Balbi wrote: > >>> On Tue, Jul 16, 2013 at 12:30:00PM +0530, Kishon Vijay Abraham I wrote: > On Tuesday 16 July 2013 12:03 PM, Daniel Mack wrote: > > Hi Aaro, > > > > On 16.07.2013 00:56, Aaro Koskinen wrote: > >> Hi, > >> > >> I think USB tree introduced regressions in v3.11-rc1, at least for some > >> OMAP devices using legacy boot. > > > > Thanks for checking the tree so early. > > > >> I have only bisected these; I have no > >> idea what the real fixes are but the following reverts make Nokia > >> OMAP2+ > >> boards again usable for kernel development work (they need working USB > >> connection for interacting with the device): > >> > >> 1) USB peripheral mode (g_ether) is broken on Nokia N900, N950 and N9 > >>(USB_MUSB_OMAP2PLUS). To make it it work, I need to revert three > >>commits: > >> > >>09fc7d22b024692b2fe8a943b246de1af307132b > >>usb: musb: fix incorrect usage of resource pointer > >>(Reverting this fixes the g_ether probe failure "couldn't find > >> an available UDC") > > I've posted a patch fixing the issue > http://comments.gmane.org/gmane.linux.usb.general/89541 > There were some comments on it. I'll be posting a new version for it. > >>> > >>> hmm, n8x0 used tusb6010, so perhaps a similar patch needs to be cooked > >>> for that too. Right now, let's to the minimum fix, which is just to > >>> increment the array size to 3 and for v3.12 we do the changes that I > >>> suggested. > >> > >> this should solve the problem on n900 and n8x0, it's pretty much > >> kishon's original patch, so I guess it deserves his authorship: > > > > Thanks, and yes it fixes this issue. I tested both N900 and N800, so > > feel free to add my Tested-by. > > Together with my patch I take it? Does your Tested-by apply to this one > as well? I tested also that one (ARM: omap2: fix musb usage for n8x0), so yes, it's for both patches. A. -- 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: v3.11-rc1 USB regressions
On 16.07.2013 20:26, Aaro Koskinen wrote: > Hi, > > On Tue, Jul 16, 2013 at 11:22:47AM +0300, Felipe Balbi wrote: >>> On Tue, Jul 16, 2013 at 12:30:00PM +0530, Kishon Vijay Abraham I wrote: On Tuesday 16 July 2013 12:03 PM, Daniel Mack wrote: > Hi Aaro, > > On 16.07.2013 00:56, Aaro Koskinen wrote: >> Hi, >> >> I think USB tree introduced regressions in v3.11-rc1, at least for some >> OMAP devices using legacy boot. > > Thanks for checking the tree so early. > >> I have only bisected these; I have no >> idea what the real fixes are but the following reverts make Nokia OMAP2+ >> boards again usable for kernel development work (they need working USB >> connection for interacting with the device): >> >> 1) USB peripheral mode (g_ether) is broken on Nokia N900, N950 and N9 >>(USB_MUSB_OMAP2PLUS). To make it it work, I need to revert three >>commits: >> >> 09fc7d22b024692b2fe8a943b246de1af307132b >> usb: musb: fix incorrect usage of resource pointer >> (Reverting this fixes the g_ether probe failure "couldn't find >> an available UDC") I've posted a patch fixing the issue http://comments.gmane.org/gmane.linux.usb.general/89541 There were some comments on it. I'll be posting a new version for it. >>> >>> hmm, n8x0 used tusb6010, so perhaps a similar patch needs to be cooked >>> for that too. Right now, let's to the minimum fix, which is just to >>> increment the array size to 3 and for v3.12 we do the changes that I >>> suggested. >> >> this should solve the problem on n900 and n8x0, it's pretty much >> kishon's original patch, so I guess it deserves his authorship: > > Thanks, and yes it fixes this issue. I tested both N900 and N800, so > feel free to add my Tested-by. Together with my patch I take it? Does your Tested-by apply to this one as well? Thanks, Daniel -- 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: v3.11-rc1 USB regressions
Hi, On Tue, Jul 16, 2013 at 11:22:47AM +0300, Felipe Balbi wrote: > > On Tue, Jul 16, 2013 at 12:30:00PM +0530, Kishon Vijay Abraham I wrote: > > > On Tuesday 16 July 2013 12:03 PM, Daniel Mack wrote: > > > > Hi Aaro, > > > > > > > > On 16.07.2013 00:56, Aaro Koskinen wrote: > > > >> Hi, > > > >> > > > >> I think USB tree introduced regressions in v3.11-rc1, at least for some > > > >> OMAP devices using legacy boot. > > > > > > > > Thanks for checking the tree so early. > > > > > > > >> I have only bisected these; I have no > > > >> idea what the real fixes are but the following reverts make Nokia > > > >> OMAP2+ > > > >> boards again usable for kernel development work (they need working USB > > > >> connection for interacting with the device): > > > >> > > > >> 1) USB peripheral mode (g_ether) is broken on Nokia N900, N950 and N9 > > > >>(USB_MUSB_OMAP2PLUS). To make it it work, I need to revert three > > > >>commits: > > > >> > > > >>09fc7d22b024692b2fe8a943b246de1af307132b > > > >>usb: musb: fix incorrect usage of resource pointer > > > >>(Reverting this fixes the g_ether probe failure "couldn't find > > > >> an available UDC") > > > > > > I've posted a patch fixing the issue > > > http://comments.gmane.org/gmane.linux.usb.general/89541 > > > There were some comments on it. I'll be posting a new version for it. > > > > hmm, n8x0 used tusb6010, so perhaps a similar patch needs to be cooked > > for that too. Right now, let's to the minimum fix, which is just to > > increment the array size to 3 and for v3.12 we do the changes that I > > suggested. > > this should solve the problem on n900 and n8x0, it's pretty much > kishon's original patch, so I guess it deserves his authorship: Thanks, and yes it fixes this issue. I tested both N900 and N800, so feel free to add my Tested-by. > diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c > index 6708a3b..f44e8b5 100644 > --- a/drivers/usb/musb/omap2430.c > +++ b/drivers/usb/musb/omap2430.c > @@ -481,7 +481,7 @@ static u64 omap2430_dmamask = DMA_BIT_MASK(32); > > static int omap2430_probe(struct platform_device *pdev) > { > - struct resource musb_resources[2]; > + struct resource musb_resources[3]; > struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; > struct omap_musb_board_data *data; > struct platform_device *musb; > @@ -581,6 +581,11 @@ static int omap2430_probe(struct platform_device *pdev) > musb_resources[1].end = pdev->resource[1].end; > musb_resources[1].flags = pdev->resource[1].flags; > > + musb_resources[2].name = pdev->resource[2].name; > + musb_resources[2].start = pdev->resource[2].start; > + musb_resources[2].end = pdev->resource[2].end; > + musb_resources[2].flags = pdev->resource[2].flags; > + > ret = platform_device_add_resources(musb, musb_resources, > ARRAY_SIZE(musb_resources)); > if (ret) { > diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c > index 2c06a89..6f8a9ca 100644 > --- a/drivers/usb/musb/tusb6010.c > +++ b/drivers/usb/musb/tusb6010.c > @@ -1156,7 +1156,7 @@ static u64 tusb_dmamask = DMA_BIT_MASK(32); > > static int tusb_probe(struct platform_device *pdev) > { > - struct resource musb_resources[2]; > + struct resource musb_resources[3]; > struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; > struct platform_device *musb; > struct tusb6010_glue*glue; > @@ -1199,6 +1199,11 @@ static int tusb_probe(struct platform_device *pdev) > musb_resources[1].end = pdev->resource[1].end; > musb_resources[1].flags = pdev->resource[1].flags; > > + musb_resources[2].name = pdev->resource[2].name; > + musb_resources[2].start = pdev->resource[2].start; > + musb_resources[2].end = pdev->resource[2].end; > + musb_resources[2].flags = pdev->resource[2].flags; > + > ret = platform_device_add_resources(musb, musb_resources, > ARRAY_SIZE(musb_resources)); > if (ret) { > > -- > balbi A. -- 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: v3.11-rc1 USB regressions
Hi, On Tue, Jul 16, 2013 at 08:33:06AM +0200, Daniel Mack wrote: > > fe4cb0912f8e737f8e4b8b38b9e692f8062f5423 > > usb: musb: gadget: remove hcd initialization > > (Reverting this fixes error "cdc_ether: probe of 4-1:1.0 failed > > with error -110" seen on the host side.) > > Which role does your musb-based hardware have in this case, and which > MUSB_* config symbols do you set? You should have USB_MUSB_GADGET. I have USB_MUSB_DUAL_ROLE set. But also with USB_MUSB_GADGET the result is the same. The N900/RX-51 board file sets mode to MUSB_PERIPHERAL (see mach-omap2/board-rx51.c). > From 5f33d42f2dffb82d22b83a030f14fe2331a935b7 Mon Sep 17 00:00:00 2001 > From: Daniel Mack > Date: Tue, 16 Jul 2013 08:19:49 +0200 > Subject: [PATCH] ARM: omap2: fix musb usage for n8x0 > > Commit b7e2e75a8c ("usb: gadget: drop unused USB_GADGET_MUSB_HDRC") > dropped a config symbol that was unused by the musb core, but it turns > out that board support code still had references to it. > > As the core now handles both dual role and host-only modes, we can just > pass MUSB_OTG as mode from board files. This looks fine, however, I currently cannot test the host mode. A. > Signed-off-by: Daniel Mack > --- > arch/arm/mach-omap2/board-n8x0.c | 4 > arch/arm/mach-omap2/usb-musb.c | 5 + > 2 files changed, 1 insertion(+), 8 deletions(-) > > diff --git a/arch/arm/mach-omap2/board-n8x0.c > b/arch/arm/mach-omap2/board-n8x0.c > index f6eeb87..827d150 100644 > --- a/arch/arm/mach-omap2/board-n8x0.c > +++ b/arch/arm/mach-omap2/board-n8x0.c > @@ -122,11 +122,7 @@ static struct musb_hdrc_config musb_config = { > }; > > static struct musb_hdrc_platform_data tusb_data = { > -#ifdef CONFIG_USB_GADGET_MUSB_HDRC > .mode = MUSB_OTG, > -#else > - .mode = MUSB_HOST, > -#endif > .set_power = tusb_set_power, > .min_power = 25, /* x2 = 50 mA drawn from VBUS as peripheral */ > .power = 100, /* Max 100 mA VBUS for host mode */ > diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c > index 8c4de27..bc89723 100644 > --- a/arch/arm/mach-omap2/usb-musb.c > +++ b/arch/arm/mach-omap2/usb-musb.c > @@ -38,11 +38,8 @@ static struct musb_hdrc_config musb_config = { > }; > > static struct musb_hdrc_platform_data musb_plat = { > -#ifdef CONFIG_USB_GADGET_MUSB_HDRC > .mode = MUSB_OTG, > -#else > - .mode = MUSB_HOST, > -#endif > + > /* .clock is set dynamically */ > .config = &musb_config, > > -- > 1.8.1.4 > -- 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: v3.11-rc1 USB regressions
On Tue, Jul 16, 2013 at 11:08:36AM +0300, Felipe Balbi wrote: > Hi, > > On Tue, Jul 16, 2013 at 12:30:00PM +0530, Kishon Vijay Abraham I wrote: > > On Tuesday 16 July 2013 12:03 PM, Daniel Mack wrote: > > > Hi Aaro, > > > > > > On 16.07.2013 00:56, Aaro Koskinen wrote: > > >> Hi, > > >> > > >> I think USB tree introduced regressions in v3.11-rc1, at least for some > > >> OMAP devices using legacy boot. > > > > > > Thanks for checking the tree so early. > > > > > >> I have only bisected these; I have no > > >> idea what the real fixes are but the following reverts make Nokia OMAP2+ > > >> boards again usable for kernel development work (they need working USB > > >> connection for interacting with the device): > > >> > > >> 1) USB peripheral mode (g_ether) is broken on Nokia N900, N950 and N9 > > >>(USB_MUSB_OMAP2PLUS). To make it it work, I need to revert three > > >>commits: > > >> > > >> 09fc7d22b024692b2fe8a943b246de1af307132b > > >> usb: musb: fix incorrect usage of resource pointer > > >> (Reverting this fixes the g_ether probe failure "couldn't find > > >> an available UDC") > > > > I've posted a patch fixing the issue > > http://comments.gmane.org/gmane.linux.usb.general/89541 > > There were some comments on it. I'll be posting a new version for it. > > hmm, n8x0 used tusb6010, so perhaps a similar patch needs to be cooked > for that too. Right now, let's to the minimum fix, which is just to > increment the array size to 3 and for v3.12 we do the changes that I > suggested. this should solve the problem on n900 and n8x0, it's pretty much kishon's original patch, so I guess it deserves his authorship: diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 6708a3b..f44e8b5 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -481,7 +481,7 @@ static u64 omap2430_dmamask = DMA_BIT_MASK(32); static int omap2430_probe(struct platform_device *pdev) { - struct resource musb_resources[2]; + struct resource musb_resources[3]; struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; struct omap_musb_board_data *data; struct platform_device *musb; @@ -581,6 +581,11 @@ static int omap2430_probe(struct platform_device *pdev) musb_resources[1].end = pdev->resource[1].end; musb_resources[1].flags = pdev->resource[1].flags; + musb_resources[2].name = pdev->resource[2].name; + musb_resources[2].start = pdev->resource[2].start; + musb_resources[2].end = pdev->resource[2].end; + musb_resources[2].flags = pdev->resource[2].flags; + ret = platform_device_add_resources(musb, musb_resources, ARRAY_SIZE(musb_resources)); if (ret) { diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 2c06a89..6f8a9ca 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c @@ -1156,7 +1156,7 @@ static u64 tusb_dmamask = DMA_BIT_MASK(32); static int tusb_probe(struct platform_device *pdev) { - struct resource musb_resources[2]; + struct resource musb_resources[3]; struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; struct platform_device *musb; struct tusb6010_glue*glue; @@ -1199,6 +1199,11 @@ static int tusb_probe(struct platform_device *pdev) musb_resources[1].end = pdev->resource[1].end; musb_resources[1].flags = pdev->resource[1].flags; + musb_resources[2].name = pdev->resource[2].name; + musb_resources[2].start = pdev->resource[2].start; + musb_resources[2].end = pdev->resource[2].end; + musb_resources[2].flags = pdev->resource[2].flags; + ret = platform_device_add_resources(musb, musb_resources, ARRAY_SIZE(musb_resources)); if (ret) { -- balbi signature.asc Description: Digital signature
Re: v3.11-rc1 USB regressions
Hi, On Tue, Jul 16, 2013 at 12:30:00PM +0530, Kishon Vijay Abraham I wrote: > On Tuesday 16 July 2013 12:03 PM, Daniel Mack wrote: > > Hi Aaro, > > > > On 16.07.2013 00:56, Aaro Koskinen wrote: > >> Hi, > >> > >> I think USB tree introduced regressions in v3.11-rc1, at least for some > >> OMAP devices using legacy boot. > > > > Thanks for checking the tree so early. > > > >> I have only bisected these; I have no > >> idea what the real fixes are but the following reverts make Nokia OMAP2+ > >> boards again usable for kernel development work (they need working USB > >> connection for interacting with the device): > >> > >> 1) USB peripheral mode (g_ether) is broken on Nokia N900, N950 and N9 > >>(USB_MUSB_OMAP2PLUS). To make it it work, I need to revert three > >>commits: > >> > >>09fc7d22b024692b2fe8a943b246de1af307132b > >>usb: musb: fix incorrect usage of resource pointer > >>(Reverting this fixes the g_ether probe failure "couldn't find > >> an available UDC") > > I've posted a patch fixing the issue > http://comments.gmane.org/gmane.linux.usb.general/89541 > There were some comments on it. I'll be posting a new version for it. hmm, n8x0 used tusb6010, so perhaps a similar patch needs to be cooked for that too. Right now, let's to the minimum fix, which is just to increment the array size to 3 and for v3.12 we do the changes that I suggested. -- balbi signature.asc Description: Digital signature
Re: v3.11-rc1 USB regressions
Hi, On Tuesday 16 July 2013 12:03 PM, Daniel Mack wrote: > Hi Aaro, > > On 16.07.2013 00:56, Aaro Koskinen wrote: >> Hi, >> >> I think USB tree introduced regressions in v3.11-rc1, at least for some >> OMAP devices using legacy boot. > > Thanks for checking the tree so early. > >> I have only bisected these; I have no >> idea what the real fixes are but the following reverts make Nokia OMAP2+ >> boards again usable for kernel development work (they need working USB >> connection for interacting with the device): >> >> 1) USB peripheral mode (g_ether) is broken on Nokia N900, N950 and N9 >>(USB_MUSB_OMAP2PLUS). To make it it work, I need to revert three >>commits: >> >> 09fc7d22b024692b2fe8a943b246de1af307132b >> usb: musb: fix incorrect usage of resource pointer >> (Reverting this fixes the g_ether probe failure "couldn't find >> an available UDC") I've posted a patch fixing the issue http://comments.gmane.org/gmane.linux.usb.general/89541 There were some comments on it. I'll be posting a new version for it. Thanks Kishon -- 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: v3.11-rc1 USB regressions
Hi Aaro, On 16.07.2013 00:56, Aaro Koskinen wrote: > Hi, > > I think USB tree introduced regressions in v3.11-rc1, at least for some > OMAP devices using legacy boot. Thanks for checking the tree so early. > I have only bisected these; I have no > idea what the real fixes are but the following reverts make Nokia OMAP2+ > boards again usable for kernel development work (they need working USB > connection for interacting with the device): > > 1) USB peripheral mode (g_ether) is broken on Nokia N900, N950 and N9 >(USB_MUSB_OMAP2PLUS). To make it it work, I need to revert three >commits: > > 09fc7d22b024692b2fe8a943b246de1af307132b > usb: musb: fix incorrect usage of resource pointer > (Reverting this fixes the g_ether probe failure "couldn't find >an available UDC") Can't say much about this one, but I'd like you to only keep this one reverted and sort out the regressions in the musb core first. > fe4cb0912f8e737f8e4b8b38b9e692f8062f5423 > usb: musb: gadget: remove hcd initialization > (Reverting this fixes error "cdc_ether: probe of 4-1:1.0 failed >with error -110" seen on the host side.) Which role does your musb-based hardware have in this case, and which MUSB_* config symbols do you set? You should have USB_MUSB_GADGET. > 8b125df5b24cfb0ec7fa1971e343cc0badc1827d > usb: musb: eliminate musb_to_hcd > (Reverting this fixes compilation error cause by the previous >revert.) > > 2) USB peripheral mode (g_ether) is broken also on Nokia N800 and N810 >(USB_MUSB_TUSB6010). In addition to the above, I need to also revert >the following: > > b7e2e75a8c6062afe1dd88b0b299938e5d36dff8 > usb: gadget: drop unused USB_GADGET_MUSB_HDRC > >(This commit is clearly incorrect - code checking for this still >remain in the tree (see e.g. N8x0 board file), so it's not "unused".) Good catch, I didn't expect board files to depend on config symbols that have no effect on the driver itself. Please check the attached patch and let me know if it helps. Thanks, Daniel >From 5f33d42f2dffb82d22b83a030f14fe2331a935b7 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Tue, 16 Jul 2013 08:19:49 +0200 Subject: [PATCH] ARM: omap2: fix musb usage for n8x0 Commit b7e2e75a8c ("usb: gadget: drop unused USB_GADGET_MUSB_HDRC") dropped a config symbol that was unused by the musb core, but it turns out that board support code still had references to it. As the core now handles both dual role and host-only modes, we can just pass MUSB_OTG as mode from board files. Signed-off-by: Daniel Mack --- arch/arm/mach-omap2/board-n8x0.c | 4 arch/arm/mach-omap2/usb-musb.c | 5 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index f6eeb87..827d150 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -122,11 +122,7 @@ static struct musb_hdrc_config musb_config = { }; static struct musb_hdrc_platform_data tusb_data = { -#ifdef CONFIG_USB_GADGET_MUSB_HDRC .mode = MUSB_OTG, -#else - .mode = MUSB_HOST, -#endif .set_power = tusb_set_power, .min_power = 25, /* x2 = 50 mA drawn from VBUS as peripheral */ .power = 100, /* Max 100 mA VBUS for host mode */ diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 8c4de27..bc89723 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -38,11 +38,8 @@ static struct musb_hdrc_config musb_config = { }; static struct musb_hdrc_platform_data musb_plat = { -#ifdef CONFIG_USB_GADGET_MUSB_HDRC .mode = MUSB_OTG, -#else - .mode = MUSB_HOST, -#endif + /* .clock is set dynamically */ .config = &musb_config, -- 1.8.1.4
v3.11-rc1 USB regressions
Hi, I think USB tree introduced regressions in v3.11-rc1, at least for some OMAP devices using legacy boot. I have only bisected these; I have no idea what the real fixes are but the following reverts make Nokia OMAP2+ boards again usable for kernel development work (they need working USB connection for interacting with the device): 1) USB peripheral mode (g_ether) is broken on Nokia N900, N950 and N9 (USB_MUSB_OMAP2PLUS). To make it it work, I need to revert three commits: 09fc7d22b024692b2fe8a943b246de1af307132b usb: musb: fix incorrect usage of resource pointer (Reverting this fixes the g_ether probe failure "couldn't find an available UDC") fe4cb0912f8e737f8e4b8b38b9e692f8062f5423 usb: musb: gadget: remove hcd initialization (Reverting this fixes error "cdc_ether: probe of 4-1:1.0 failed with error -110" seen on the host side.) 8b125df5b24cfb0ec7fa1971e343cc0badc1827d usb: musb: eliminate musb_to_hcd (Reverting this fixes compilation error cause by the previous revert.) 2) USB peripheral mode (g_ether) is broken also on Nokia N800 and N810 (USB_MUSB_TUSB6010). In addition to the above, I need to also revert the following: b7e2e75a8c6062afe1dd88b0b299938e5d36dff8 usb: gadget: drop unused USB_GADGET_MUSB_HDRC (This commit is clearly incorrect - code checking for this still remain in the tree (see e.g. N8x0 board file), so it's not "unused".) A. -- 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