Re: [PATCH v4 1/2] ohci-platform: Add support for devicetree instantiation
On 11/01/14 11:46, Hans de Goede wrote: Add support for ohci-platform instantiation from devicetree, including optionally getting clks and a phy from devicetree, and enabling / disabling those on power_on / off. This should allow using ohci-platform from devicetree in various cases. Specifically after this commit it can be used for the ohci controller found on Allwinner sunxi SoCs. Signed-off-by: Hans de Goede hdego...@redhat.com --- .../devicetree/bindings/usb/mmio-ohci.txt | 22 +++ drivers/usb/host/ohci-platform.c | 164 ++--- 2 files changed, 162 insertions(+), 24 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/mmio-ohci.txt diff --git a/Documentation/devicetree/bindings/usb/mmio-ohci.txt b/Documentation/devicetree/bindings/usb/mmio-ohci.txt new file mode 100644 index 000..9c776ed --- /dev/null +++ b/Documentation/devicetree/bindings/usb/mmio-ohci.txt @@ -0,0 +1,22 @@ +Generic MMIO OHCI controller + +Required properties: +- compatible : mmio-ohci +- reg : ohci controller register range (address and length) +- interrupts : ohci controller interrupt + +Optional properties: +- clocks : a list of phandle + clock specifier pairs +- phys : phandle + phy specifier pair +- phy-names : usb + +Example: + + ohci0: ohci@0x01c14400 { + compatible = mmio-ohci; + reg = 0x01c14400 0x100; + interrupts = 64; + clocks = usb_clk 6, ahb_gates 2; + phys = usbphy 1; + phy-names = usb; + }; ... snip @@ -83,17 +156,40 @@ static int ohci_platform_probe(struct platform_device *dev) return -ENXIO; } + hcd = usb_create_hcd(ohci_platform_hc_driver, dev-dev, + dev_name(dev-dev)); + if (!hcd) + return -ENOMEM; + + platform_set_drvdata(dev, hcd); + dev-dev.platform_data = pdata; + priv = hcd_to_ohci_priv(hcd); + + if (pdata == ohci_platform_defaults dev-dev.of_node) { + priv-phy = devm_phy_get(dev-dev, usb); + if (IS_ERR(priv-phy)) { + err = PTR_ERR(priv-phy); + if (err == -EPROBE_DEFER) + goto err_put_hcd; + priv-phy = NULL; + } + + for (clk = 0; clk OHCI_MAX_CLKS; clk++) { + priv-clks[clk] = of_clk_get(dev-dev.of_node, clk); + if (IS_ERR(priv-clks[clk])) { + err = PTR_ERR(priv-clks[clk]); + if (err == -EPROBE_DEFER) + goto err_put_clks; + priv-clks[clk] = NULL; + break; + } + } + } Given that you have limited the clock parsing to OHCI_MAX_CLKS, there should be some kind of warning/error message if the DT contains more than OHCI_MAX_CLKS - otherwise you have silent failures when the clocks aren't configured. There is also no note in the binding to indicate this limitation and you shouldn't expect people writing DT files to go digging through the source to check for this. Regards Tony P -- 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: [PATCH net,stable] net: usbnet: fix SG initialisation
On Sat, Jan 11, 2014 at 6:10 AM, Bjørn Mork bj...@mork.no wrote: Commit 60e453a940ac (USBNET: fix handling padding packet) added an extra SG entry in case padding is necessary, but failed to update the initialisation of the list. This can cause list traversal to fall off the end of the list, resulting in an oops. Fixes: 60e453a940ac (USBNET: fix handling padding packet) Reported-by: Thomas Kear tho...@kear.co.nz Cc: Ming Lei ming@canonical.com Signed-off-by: Bjørn Mork bj...@mork.no --- I don't have the hardware to verify this fix. It would be good if someone could test it before it goes to stable... But in case this works, it should go into v3.12 stable. Yes, the problem can only be triggered when the zlp padding packet is needed, I remember I have a quick approach to reproduce and test the case, and I will do it when I return home tonight. Looks the fix is correct, and sorry for introducing the issue. Bjørn drivers/net/usb/usbnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 8494bb53ebdc..aba04f561760 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1245,7 +1245,7 @@ static int build_dma_sg(const struct sk_buff *skb, struct urb *urb) return -ENOMEM; urb-num_sgs = num_sgs; - sg_init_table(urb-sg, urb-num_sgs); + sg_init_table(urb-sg, urb-num_sgs + 1); sg_set_buf(urb-sg[s++], skb-data, skb_headlen(skb)); total_len += skb_headlen(skb); Thanks, -- Ming Lei -- 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
Fwd: Re: [alsa-devel] no reset_resume for driver snd-usb-audio for logitech headset H600
FWD: Any news to the snd-usb-audio issue? Thanks, Bernhard Old Message: - I have tested the patch with kernel 3.12.0 with suspend and hibernate, and the problem is gone. No messages no reset_resume for driver snd-usb-audio? or other negative effects/messages. After resume, the usb_audio_device (Headset) is the master channel in KDE Mixer, as it should be. = So the problem is solved for me. Can you please add the patch to the latest kernels and LTS-kernels or whitelist the workaround for my device (ID 046d:0a29 Logitech, Inc. H600 [Wireless Headset]) Thanks, Bernhard On 2013-10-20 23:35, Takashi Iwai wrote: At Sun, 20 Oct 2013 23:18:13 +0200, baum...@hotmail.com wrote: On 2013-10-09 11:16 (CEST,UTC+2), Takashi Iwai wrote: diff --git a/sound/usb/card.c b/sound/usb/card.c index 9d9de8d..c591a83 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -747,6 +747,7 @@ static struct usb_driver usb_audio_driver = { .disconnect = usb_audio_disconnect, .suspend = usb_audio_suspend, .resume = usb_audio_resume, + .reset_resume = usb_audio_resume, .id_table = usb_audio_ids, .supports_autosuspend = 1, }; Shall I add the line in b/sound/usb/card.c and try it? Which kernel version shall I use? It doesn't matter which kernel version is. The error message should disappear, but I don't know whether any other positive effect you get. As Clemens pointed, there can be some negative effects by this, so it cannot be taken as is. But at least, it'd be good to know the result... thanks, Takashi -- 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
segate external USB3.0 HD cannot work
hi all: I got one segate external usb3.0 HD. When I plug in that device, I will get below error message repeatedly: [ 432.191560] usb 4-1: Set SEL for device-initiated U2 failed. [ 432.191664] usb 4-1: USB disconnect, device number 12 [ 469.061694] xhci_hcd :00:14.0: Timeout while waiting for address device command [ 474.271626] xhci_hcd :00:14.0: Timeout while waiting for address device command [ 474.475859] usb 4-1: device not accepting address 13, error -62 [ 474.592197] usb 4-1: new SuperSpeed USB device number 14 using xhci_hcd [ 474.609564] usb 4-1: New USB device found, idVendor=0bc2, idProduct=a0a5 [ 474.609569] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 474.609572] usb 4-1: Product: Backup+ Desk [ 474.609574] usb 4-1: Manufacturer: Seagate [ 474.609576] usb 4-1: SerialNumber: NA5J3BMX [ 474.613800] usb 4-1: Enable of device-initiated U2 failed. [ 474.617303] usb 4-1: Disable of device-initiated U1 failed. [ 474.620807] usb 4-1: Disable of device-initiated U2 failed. [ 474.620840] usb-storage 4-1:1.0: USB Mass Storage device detected [ 474.620928] scsi17 : usb-storage 4-1:1.0 [ 474.624340] usb 4-1: Set SEL for device-initiated U1 failed. [ 479.629776] usb 4-1: Set SEL for device-initiated U2 failed. [ 479.798030] usb 4-1: USB disconnect, device number 14 1. My kernel version is Linux 3.13.0-rc6 2. PCI information as below 00:14.0 USB controller: Intel Corporation Panther Point USB xHCI Host Controller (rev 04) (prog-if 30 [XHCI]) Subsystem: Lenovo Device 21f7 Flags: bus master, medium devsel, latency 0, IRQ 40 Memory at f260 (64-bit, non-prefetchable) [size=64K] Capabilities: [70] Power Management version 2 Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+ Kernel driver in use: xhci_hcd Is there any configuration I can fine tune to let this device work? appreciate your help in advance, segate.u3.HD.fail.log.tgz Description: GNU Zip compressed data
RE: [PATCH 05/10] usb: chipidea: add OTG fsm operation functions implemenation.
Hi Marc, would you please list the spec (or link) that there is only one OTG port per machine? Sorry I cannot find it quickly. However my motivation of this comment is that a new a subsystem/code should not be written with that just a single otg is in a system use-case in mind, as we've stumbled over the same problem in the past already[1]. Marc [1] There was a global usb phy. Agree with it, we need them per device. Peter
Re: [PATCH 1/2] usb: chipidea: usbmisc: Add support for i.MX27/i.MX31 CPUs
On Mon, Nov 11, 2013 at 11:09:16AM +0400, Alexander Shiyan wrote: Hello. On Sunday, November 10, 2013 03:18 PM, Alexander Shiyan wrote: This adds i.MX27 and i.MX31 as the next user of the usbmisc driver. Signed-off-by: Alexander Shiyanshc_w...@mail.ru --- drivers/usb/chipidea/usbmisc_imx.c | 42 ++ 1 file changed, 42 insertions(+) ... At this point might be good to patch the imx27.dtsi with the usb defines. ... I have a working configuration for i.MX27 USB, but I prefer to make a few more tests before the addition of definitions in DTS. This will be a next step. Thanks. Any news here? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ | -- 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: [PATCH 1/2] usb: chipidea: usbmisc: Add support for i.MX27/i.MX31 CPUs
Hello, On Mon, Nov 11, 2013 at 02:10:10PM +0800, Chris Ruehl wrote: On Monday, November 11, 2013 01:47 PM, Alexander Shiyan wrote: On Monday, November 11, 2013 12:45 PM, Alexander Shiyan wrote: Hi Alexander, On Sunday, November 10, 2013 03:18 PM, Alexander Shiyan wrote: This adds i.MX27 and i.MX31 as the next user of the usbmisc driver. Signed-off-by: Alexander Shiyanshc_w...@mail.ru --- drivers/usb/chipidea/usbmisc_imx.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c ... +static int usbmisc_imx27_init(struct imx_usbmisc_data *data) +{ +unsigned long flags; +u32 val; + +switch (data-index) { +case 0: +val = MX27_OTG_PM_BIT; +break; +case 1: +val = MX27_H1_PM_BIT; +break; +case 2: +val = MX27_H2_PM_BIT; +break; +default: +return -EINVAL; +}; + From my understanding this can not work, the usbmisc-base not point into the usb control register (USB_CTRL). Reference manual 30.5.1.1 says BASE + 0x600 you must add the offset to the readl instruction. Why not work? usbotg: usb@10024000 usbh1: usb@10024200 usbh2: usb@10024400 usbmisc: usbmisc@10024600 So, offset to USB_CTRL should already be defined by DTS. in the usbmisc_imx_probe() the base pointer is loaded from res = platform_get_resource(pdev, IORESOURCE_MEM, 0); data-base = devm_ioremap_resource(pdev-dev, res); (and I did not see any of_ operations) Yes, and this is an address of usbmisc node, not otg. Sorry, you are right. I misunderstood because I didn't see any of sample DTS files define usbmisc yet. At this point might be good to patch the imx27.dtsi with the usb defines. --- a/arch/arm/boot/dts/imx27.dtsi +++ b/arch/arm/boot/dts/imx27.dtsi @@ -30,6 +30,9 @@ spi0 = cspi1; spi1 = cspi2; spi2 = cspi3; + usb0 = usbotg; + usb1 = usbh1; + usb2 = usbh2; }; @@ -404,6 +419,44 @@ iram = iram; }; + usbotg: usb@10024000 { + compatible = fsl,imx27-usb; + reg = 0x10024000 0x200; + interrupts = 56; + clocks = clks 75, clks 62; + clock-names = ipg, ahb; + dr_mode = host; + phy_type = ulpi; + status = disabled; + }; + + usbh1: usb@10024200 { + compatible = fsl,imx27-usb; + reg = 0x10024200 0x200; + interrupts = 54; + clocks = clks 75, clks 62; + clock-names = ipg, ahb; + dr_mode = host; + phy_type = serial; + status = disabled; + }; + + usbh2: usb@10024400 { + compatible = fsl,imx27-usb; + reg = 0x10024400 0x200; + interrupts = 55; + clocks = clks 75, clks 62; + clock-names = ipg, ahb; + dr_mode = host; + phy_type = ulpi; + status = disabled; + }; + + usbmisc: usbmisc@10024600 { + compatible = fsl,imx27-usb; + reg = 0x10024600 0x4; + }; I didn't try to get this up yet, but I wonder if the last compatible here should better be fsl,imx27-usbmisc?! Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ | -- 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: [PATCH 1/2] usb: chipidea: usbmisc: Add support for i.MX27/i.MX31 CPUs
Суббота, 11 января 2014, 13:55 +01:00 от Uwe Kleine-König u.kleine-koe...@pengutronix.de: On Mon, Nov 11, 2013 at 11:09:16AM +0400, Alexander Shiyan wrote: Hello. On Sunday, November 10, 2013 03:18 PM, Alexander Shiyan wrote: This adds i.MX27 and i.MX31 as the next user of the usbmisc driver. Signed-off-by: Alexander Shiyanshc_w...@mail.ru --- drivers/usb/chipidea/usbmisc_imx.c | 42 ++ 1 file changed, 42 insertions(+) ... At this point might be good to patch the imx27.dtsi with the usb defines. ... I have a working configuration for i.MX27 USB, but I prefer to make a few more tests before the addition of definitions in DTS. This will be a next step. Thanks. Any news here? Not ready yet. ---
Re: [PATCH net,stable] net: usbnet: fix SG initialisation
On Sat, Jan 11, 2014 at 5:16 PM, Ming Lei ming@canonical.com wrote: On Sat, Jan 11, 2014 at 6:10 AM, Bjørn Mork bj...@mork.no wrote: Commit 60e453a940ac (USBNET: fix handling padding packet) added an extra SG entry in case padding is necessary, but failed to update the initialisation of the list. This can cause list traversal to fall off the end of the list, resulting in an oops. Fixes: 60e453a940ac (USBNET: fix handling padding packet) Reported-by: Thomas Kear tho...@kear.co.nz Cc: Ming Lei ming@canonical.com Signed-off-by: Bjørn Mork bj...@mork.no Tested-by: Ming Lei ming@canonical.com On one of my arm box, I can reproduce the problem with below command every time: $iperf -c $SRV -l 2398 -n 1 #the 2nd tcp packet length is 1016 and the oops is same with Thomas's. After applying Oliver's patch, I still can see zlp padding packet is appended, but no oops any more. Thanks Oliver for fixing the problem. Thanks, -- Ming Lei -- 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: segate external USB3.0 HD cannot work
On Sat, 2014-01-11 at 18:17 +0800, yoma sophian wrote: hi all: I got one segate external usb3.0 HD. When I plug in that device, I will get below error message repeatedly: [ 432.191560] usb 4-1: Set SEL for device-initiated U2 failed. Is that after the initial plug? [ 432.191664] usb 4-1: USB disconnect, device number 12 [ 469.061694] xhci_hcd :00:14.0: Timeout while waiting for address device command [ 474.271626] xhci_hcd :00:14.0: Timeout while waiting for address device command [ 474.475859] usb 4-1: device not accepting address 13, error -62 [ 474.592197] usb 4-1: new SuperSpeed USB device number 14 using xhci_hcd [ 474.609564] usb 4-1: New USB device found, idVendor=0bc2, idProduct=a0a5 [ 474.609569] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 474.609572] usb 4-1: Product: Backup+ Desk [ 474.609574] usb 4-1: Manufacturer: Seagate [ 474.609576] usb 4-1: SerialNumber: NA5J3BMX [ 474.613800] usb 4-1: Enable of device-initiated U2 failed. [ 474.617303] usb 4-1: Disable of device-initiated U1 failed. [ 474.620807] usb 4-1: Disable of device-initiated U2 failed. It looks like your device has a problem with runtime power management. [ 474.620840] usb-storage 4-1:1.0: USB Mass Storage device detected [ 474.620928] scsi17 : usb-storage 4-1:1.0 [ 474.624340] usb 4-1: Set SEL for device-initiated U1 failed. [ 479.629776] usb 4-1: Set SEL for device-initiated U2 failed. [ 479.798030] usb 4-1: USB disconnect, device number 14 1. My kernel version is Linux 3.13.0-rc6 Can you try a kernel compiled without CONFIG_PM? Regards Oliver -- 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: [PATCH v4 0/2] ohci and ehci-platform clks, phy and dt support
On Fri, 10 Jan 2014, Hans de Goede wrote: Hi, On 01/11/2014 12:50 AM, Sergei Shtylyov wrote: Hello. On 01/11/2014 01:46 AM, Hans de Goede wrote: Here is v4 of my ohci and ehci-platform clks, phy and dt support patch-set, this version should be 100% ready for merging upstream. I see you've decided to completely ignore my opinion. NAK, FWIW. I'm sorry but the whole prefix thing has become a thing of -ETOOMUCHBIKESHEDDING, everyone except you seems to be fine with mmio and and one point in time we need to make a decision and move forward. If this isn't beating a dead horse... Maybe everyone can agree on a name like ohci-generic or generic-ohci. That seems like a pretty good description of the hardware that the platform driver can handle. Alan Stern -- 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: segate external USB3.0 HD cannot work
hi Oliver 2014/1/12 Oliver Neukum oli...@neukum.org: On Sat, 2014-01-11 at 18:17 +0800, yoma sophian wrote: hi all: I got one segate external usb3.0 HD. When I plug in that device, I will get below error message repeatedly: [ 432.191560] usb 4-1: Set SEL for device-initiated U2 failed. Is that after the initial plug? Yes [ 432.191664] usb 4-1: USB disconnect, device number 12 [ 469.061694] xhci_hcd :00:14.0: Timeout while waiting for address device command [ 474.271626] xhci_hcd :00:14.0: Timeout while waiting for address device command [ 474.475859] usb 4-1: device not accepting address 13, error -62 [ 474.592197] usb 4-1: new SuperSpeed USB device number 14 using xhci_hcd [ 474.609564] usb 4-1: New USB device found, idVendor=0bc2, idProduct=a0a5 [ 474.609569] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 474.609572] usb 4-1: Product: Backup+ Desk [ 474.609574] usb 4-1: Manufacturer: Seagate [ 474.609576] usb 4-1: SerialNumber: NA5J3BMX [ 474.613800] usb 4-1: Enable of device-initiated U2 failed. [ 474.617303] usb 4-1: Disable of device-initiated U1 failed. [ 474.620807] usb 4-1: Disable of device-initiated U2 failed. It looks like your device has a problem with runtime power management. [ 474.620840] usb-storage 4-1:1.0: USB Mass Storage device detected [ 474.620928] scsi17 : usb-storage 4-1:1.0 [ 474.624340] usb 4-1: Set SEL for device-initiated U1 failed. [ 479.629776] usb 4-1: Set SEL for device-initiated U2 failed. [ 479.798030] usb 4-1: USB disconnect, device number 14 1. My kernel version is Linux 3.13.0-rc6 Can you try a kernel compiled without CONFIG_PM? Sure. Any update I will let you know Appreciate your help :-) -- 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: [PATCH v4 0/2] ohci and ehci-platform clks, phy and dt support
On 12/01/14 11:30, Alan Stern wrote: On Fri, 10 Jan 2014, Hans de Goede wrote: Hi, On 01/11/2014 12:50 AM, Sergei Shtylyov wrote: Hello. On 01/11/2014 01:46 AM, Hans de Goede wrote: Here is v4 of my ohci and ehci-platform clks, phy and dt support patch-set, this version should be 100% ready for merging upstream. I see you've decided to completely ignore my opinion. NAK, FWIW. I'm sorry but the whole prefix thing has become a thing of -ETOOMUCHBIKESHEDDING, everyone except you seems to be fine with mmio and and one point in time we need to make a decision and move forward. If this isn't beating a dead horse... Maybe everyone can agree on a name like ohci-generic or generic-ohci. That seems like a pretty good description of the hardware that the platform driver can handle. Alan Stern I prefer the -generic option, although generic- is equally fine - Having said that, I don't really care if it's called mmio either (although this does seem less 'descriptive'). Regards Tony Prisk -- 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