[PATCH 1/1] usb: chipidea: refine PHY operation

2014-01-10 Thread Peter Chen
- Delete global_phy due to we can get the phy from phy layer now - using devm_usb_get_phy to instead of usb_get_phy - delete the otg_set_peripheral, which should be handled by otg layer Signed-off-by: Peter Chen --- drivers/usb/chipidea/ci.h |2 - drivers/usb/chipidea/core.c | 69 +++

[PATCH 1/1] usb: phy: delete CONFIG_USB_OTG_FSM

2014-01-10 Thread Peter Chen
We already have CONFIG_USB_OTG which can cover all CONFIG_USB_OTG_FSM does. Cc: Jun Li Cc: Anton Tikhomirov Signed-off-by: Peter Chen --- drivers/usb/phy/Kconfig | 11 +-- drivers/usb/phy/Makefile |2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/usb

Re: [PATCH] xhci: make warnings greppable

2014-01-10 Thread Oliver Neukum
On Thu, 2014-01-09 at 13:18 -0800, Sarah Sharp wrote: > Hi Oliver, > > This looks fine, but it will have to wait until after the merge window, > as my tree is closed to cleanups/features right now. This will be > queued for 3.15. No problem. I had just suffered a fit of frustration for the reaso

Re: [linux-sunxi] Re: [PATCH v3 1/2] ohci-platform: Add support for devicetree instantiation

2014-01-10 Thread Hans de Goede
Hi, On 01/09/2014 10:08 PM, Sergei Shtylyov wrote: On 01/09/2014 10:48 PM, Hans de Goede wrote: Hi, On 01/09/2014 09:14 PM, Sergei Shtylyov wrote: Hello. On 01/09/2014 08:57 PM, Hans de Goede wrote: Add support for ohci-platform instantiation from devicetree, including optionally getting c

RE: [PATCH 1/2] xhci: Avoid infinite loop when sg urb requires too many trbs

2014-01-10 Thread David Laight
From: Sarah Sharp > On Thu, Jan 09, 2014 at 10:56:44AM -0500, Alan Stern wrote: > > On Thu, 9 Jan 2014, David Laight wrote: > > > > > From: Alan Stern ... > > > > > Of course, if this is the pagedaemon trying to write out > > > > > pages in order to generate some free kernel memory all is lost > >

Re: [PATCH v5 3/9] mfd: omap-usb-host: Update DT clock binding information

2014-01-10 Thread Lee Jones
On Thu, 09 Jan 2014, Roger Quadros wrote: > The omap-usb-host driver expects certained named clocks. > Add this information to the DT binding document. > > Use clock names as per function for reference clocks. > > CC: Lee Jones > CC: Samuel Ortiz > Signed-off-by: Roger Quadros > --- > .../de

Re: [PATCH v5 1/9] mfd: omap-usb-host: Use resource managed clk_get()

2014-01-10 Thread Lee Jones
> Use devm_clk_get() instead of clk_get(). > > CC: Lee Jones > CC: Samuel Ortiz > Signed-off-by: Roger Quadros > --- > drivers/mfd/omap-usb-host.c | 81 > + > 1 file changed, 16 insertions(+), 65 deletions(-) Nice clean up. Acked-by: Lee Jones -

Re: [PATCH v3 1/2] ohci-platform: Add support for devicetree instantiation

2014-01-10 Thread Hans de Goede
Hi, On 01/09/2014 09:36 PM, Alan Stern wrote: On Thu, 9 Jan 2014, 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-platf

Re: [PATCH v5 2/9] mfd: omap-usb-host: Get clocks based on hardware revision

2014-01-10 Thread Lee Jones
> Not all revisions have all the clocks so get the necessary clocks > based on hardware revision. > > This should avoid un-necessary clk_get failure messages that were > observed earlier. > > Be more strict and always fail on clk_get() error. > > CC: Lee Jones > CC: Samuel Ortiz > Signed-off-b

RE: [PATCH 2/7] usb: chipidea: add freescale imx28 special write register method

2014-01-10 Thread David Laight
From: Peter Chen ... > +#ifdef > +static inline void imx28_ci_writel(u32 val, volatile void __iomem *addr) > +{ > + __asm__ ("swp %0, %0, [%1]" : : "r"(val), "r"(addr)); > +} > +#else > +static inline void imx28_ci_writel(u32 val, volatile void __iomem *addr) > +{ > +} > +#endif > + > +static

Re: [PATCH 06/10] usb: chipidea: OTG fsm timers initialization.

2014-01-10 Thread Michael Grzeschik
Hi Li Jun, On Wed, Jan 08, 2014 at 05:06:21PM +0800, Li Jun wrote: > This patch adds OTG fsm timers initialization, which use controller's 1ms > interrupt as time out counter, also adds some local timers which are not > in otg_fsm_timer list. > > Signed-off-by: Li Jun > --- > drivers/usb/chipid

Re: [PATCH 05/10] usb: chipidea: add OTG fsm operation functions implemenation.

2014-01-10 Thread Marc Kleine-Budde
On 01/10/2014 03:08 AM, Peter Chen wrote: > On Thu, Jan 09, 2014 at 02:45:24PM +0100, Marc Kleine-Budde wrote: >> On 01/08/2014 10:06 AM, Li Jun wrote: >>> Add OTG HNP and SRP operation functions implementation: >>> - charge vbus >>> - drive vbus >>> - connection signaling >>> - drive sof >>> - sta

RE: [PATCH] usb: Skip U1/U2 LPM disable if device is disconnected.

2014-01-10 Thread Venkatesh Murthy, HemanthX
>-Original Message- >From: Sarah Sharp [mailto:sarah.a.sh...@linux.intel.com] >Sent: Friday, January 10, 2014 12:44 AM >To: Venkatesh Murthy, HemanthX >Cc: Alan Stern; linux-usb@vger.kernel.org; Nandibasappa, GirishX >Subject: Re: [PATCH] usb: Skip U1/U2 LPM disable if device is disconnecte

Re: [PATCH v5 2/9] mfd: omap-usb-host: Get clocks based on hardware revision

2014-01-10 Thread Arnd Bergmann
On Friday 10 January 2014, Lee Jones wrote: > > > > - need_logic_fck = false; > > + /* Set all clocks as invalid to begin with */ > > + omap->ehci_logic_fck = omap->init_60m_fclk = ERR_PTR(-EINVAL); > > + omap->utmi_p1_gfclk = omap->utmi_p2_gfclk = ERR_PTR(-EINVAL); > > + omap

Re: [PATCH 2/7] usb: chipidea: add freescale imx28 special write register method

2014-01-10 Thread gre...@linuxfoundation.org
On Fri, Jan 10, 2014 at 10:25:54AM +, David Laight wrote: > From: Peter Chen > ... > > +#ifdef > > +static inline void imx28_ci_writel(u32 val, volatile void __iomem *addr) > > +{ > > + __asm__ ("swp %0, %0, [%1]" : : "r"(val), "r"(addr)); > > +} > > +#else > > +static inline void imx28_ci_w

Re: [PATCH v5 2/9] mfd: omap-usb-host: Get clocks based on hardware revision

2014-01-10 Thread Lee Jones
On Fri, 10 Jan 2014, Arnd Bergmann wrote: > On Friday 10 January 2014, Lee Jones wrote: > > > > > > - need_logic_fck = false; > > > + /* Set all clocks as invalid to begin with */ > > > + omap->ehci_logic_fck = omap->init_60m_fclk = ERR_PTR(-EINVAL); > > > + omap->utmi_p1_gfclk =

Re: [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst

2014-01-10 Thread walt
On 01/09/2014 03:50 PM, Sarah Sharp wrote: >>> On Tue, Jan 07, 2014 at 03:57:00PM -0800, walt wrote: >> >> The aftermarket usb3 adapter card and the usb3 outboard hard-drive docking >> station are the only two usb3 devices I have. >> >> I've wondered if my xhci problems might be caused by hardware

RE: [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst

2014-01-10 Thread David Laight
From: walt > > In the meantime, try this patch, which is something of a long shot. > > No difference. But I notice the code enables the TRB quirk only if the > xhci_version is specifically 0x95. My debug messages claim that "xHCI > doesn't need link TRB QUIRK" so I'm wondering if adding my asmed

RE: [PATCH 2/7] usb: chipidea: add freescale imx28 special write register method

2014-01-10 Thread David Laight
From: gre...@linuxfoundation.org > > ... > > > +#ifdef > > > +static inline void imx28_ci_writel(u32 val, volatile void __iomem *addr) > > > +{ > > > + __asm__ ("swp %0, %0, [%1]" : : "r"(val), "r"(addr)); > > > +} > > > +#else > > > +static inline void imx28_ci_writel(u32 val, volatile void __iom

Re: [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst

2014-01-10 Thread Alan Stern
On Thu, 9 Jan 2014, Sarah Sharp wrote: > > I can't see anything obvious either. > > However there is no response to the 'stop endpoint' command. > > Section 4.6.9 (page 107 of rev1.0) states that the controller will complete > > any USB IN or OUT transaction before raising the command completion e

[PATCH] libusbg: Rename libgadget to libusbg.

2014-01-10 Thread Krzysztof Opasiak
Dear Matt, I know that you are really busy right now, so I have prepared a patch which does the work which you talked you would like to do. According to previous discussion at [1] there was a name conflict with some old project hosted at github, so libgadget has to be renamed. In discussion you

Re: [PATCH 2/7] usb: chipidea: add freescale imx28 special write register method

2014-01-10 Thread 'gre...@linuxfoundation.org'
On Fri, Jan 10, 2014 at 03:09:03PM +, David Laight wrote: > > > This code ought to be defensive against 'imx28_write_fix' being > > > set when the kernel isn't compiled with CONFIG_SOC_IMX28. > > > This can easily be done by changing the #else block to do an iowrite(). > > > > You missed the l

Re: [PATCH v3 1/2] ohci-platform: Add support for devicetree instantiation

2014-01-10 Thread Alan Stern
On Fri, 10 Jan 2014, Hans de Goede wrote: > >> +static struct usb_ohci_pdata ohci_platform_defaults = { > >> + .power_on = ohci_platform_power_on, > >> + .power_suspend =ohci_platform_power_off, > >> + .power_off =ohci_platform_power_off, > >> }; > > > > I wond

RE: [PATCH] usb: Skip U1/U2 LPM disable if device is disconnected.

2014-01-10 Thread Alan Stern
On Fri, 10 Jan 2014, Venkatesh Murthy, HemanthX wrote: > Yes agree, but I think the multiple loops can be avoided. With the > below change in hub_port_wait_reset around 5 secs is saved for > disconnect detection. > > @@ -2545,15 +2546,15 @@ static int hub_port_wait_reset(struct usb_hub *hub, > i

chipidea : ENDPTFLUSH and ENDPTPRIME register access

2014-01-10 Thread Matthieu CASTET
Hi, ENDPTFLUSH and ENDPTPRIME are registers that are set by software and clear by hardware. The current code manipulate them with "hw_write(ci, register, BIT(n), BIT(n));" This do not look sane to me, because hw_write will read the register, apply the mask and write the value. What happen if t

[RFC 1/2] usb: core: add sanity checks when using bInterfaceClass with new_id

2014-01-10 Thread Wolfram Sang
Check if that field is actually used and if so, bail out if it exeeds a u8. Make it also future-proof by not requiring "exactly three" parameters in new_id, but simply "more than two". Signed-off-by: Wolfram Sang --- drivers/usb/core/driver.c | 5 - 1 file changed, 4 insertions(+), 1 deletio

[RFC 2/2] usb: core: allow a reference device for new_id

2014-01-10 Thread Wolfram Sang
Often, usb drivers need some driver_info to get a device to work. To have access to driver_info when using new_id, allow to pass a reference vendor:product tuple from which new_id will inherit driver_info. Signed-off-by: Wolfram Sang --- Documentation/ABI/testing/sysfs-bus-usb | 10 -- d

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-10 Thread Ben Hutchings
On Sat, 2014-01-11 at 08:56 +1300, Thomas Kear wrote: > USB3 gigabit ethernet adapters with the ASIX AX88179 chipset (LevelOne > USB0401-V3, Plugable USB3-E1000, SIIG JU-NE0211-S1 and others) are > experiencing kernel panics in usb_hcd_map_urb_for_dma since 3.12. [...] > So far as I can tell, the d

Re: [RFC 2/2] usb: core: allow a reference device for new_id

2014-01-10 Thread Greg KH
On Fri, Jan 10, 2014 at 07:36:42PM +0100, Wolfram Sang wrote: > Often, usb drivers need some driver_info to get a device to work. To > have access to driver_info when using new_id, allow to pass a reference > vendor:product tuple from which new_id will inherit driver_info. > > Signed-off-by: Wolfr

Re: [linux-sunxi] Re: [PATCH v3 1/2] ohci-platform: Add support for devicetree instantiation

2014-01-10 Thread Sergei Shtylyov
Hello. On 01/10/2014 12:47 PM, Hans de Goede wrote: Hi, I would like to know why you dropped me from the To: list when replying. I have hardly noticed your reply. Add support for ohci-platform instantiation from devicetree, including optionally getting clks and a phy from devicetree, a

Re: [RFC 2/2] usb: core: allow a reference device for new_id

2014-01-10 Thread Wolfram Sang
> Very nice, I like this a lot! Yay! > We've always had the problem of how to do this before, I don't think > anyone's thought of using a "reference" device in tha past, this should > solve the driver_data issue just fine. To be fair, Bjørn had this idea two years ago, but hesitated to implemen

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-10 Thread Bjørn Mork
Ben Hutchings writes: > On Sat, 2014-01-11 at 08:56 +1300, Thomas Kear wrote: >> USB3 gigabit ethernet adapters with the ASIX AX88179 chipset (LevelOne >> USB0401-V3, Plugable USB3-E1000, SIIG JU-NE0211-S1 and others) are >> experiencing kernel panics in usb_hcd_map_urb_for_dma since 3.12. > [...]

[PATCH net,stable] net: usbnet: fix SG initialisation

2014-01-10 Thread Bjørn Mork
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 pad

Re: [RFC 2/2] usb: core: allow a reference device for new_id

2014-01-10 Thread Bjørn Mork
Greg KH writes: > Very nice, I like this a lot! Agreed! Nice idea. Please go ahead and add it for 3.14. My following comments are just some additional ideas that popped into my head. They can be dealt with later, if they make sense to anyone else. I still see one use case which isn't yet co

Re: [RFC 2/2] usb: core: allow a reference device for new_id

2014-01-10 Thread Bjørn Mork
Wolfram Sang writes: >> We've always had the problem of how to do this before, I don't think >> anyone's thought of using a "reference" device in tha past, this should >> solve the driver_data issue just fine. > > To be fair, Bjørn had this idea two years ago, but hesitated to > implement it. I f

Re: [RFC 2/2] usb: core: allow a reference device for new_id

2014-01-10 Thread Greg KH
On Fri, Jan 10, 2014 at 11:25:13PM +0100, Bjørn Mork wrote: > > I still see one use case which isn't yet covered: Overriding a static > entry. This would be particularily useful for class drivers with per > device exceptions. Is there any real reason why we cannot parse the > dynamic list before

[PATCH v4 0/2] ohci and ehci-platform clks, phy and dt support

2014-01-10 Thread Hans de Goede
Hi All, 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. Changes since v3: -Address all of Alan Stern's review comments -Properly use put_clk in probe error path -Don't do hcd_put until after power_off as power_off

[PATCH v4 1/2] ohci-platform: Add support for devicetree instantiation

2014-01-10 Thread Hans de Goede
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

[PATCH v4 2/2] ehci-platform: Add support for clks and phy passed through devicetree

2014-01-10 Thread Hans de Goede
Currently ehci-platform is only used in combination with devicetree when used with some Via socs. By extending it to (optionally) get clks and a phy from devicetree, and enabling / disabling those on power_on / off, it can be used more generically. Specifically after this commit it can be used for

Re: [PATCH v4 0/2] ohci and ehci-platform clks, phy and dt support

2014-01-10 Thread Sergei Shtylyov
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. Changes since v3: -Address all of Alan

Re: [PATCH v4 0/2] ohci and ehci-platform clks, phy and dt support

2014-01-10 Thread Hans de Goede
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

Re: [PATCH v4 0/2] ohci and ehci-platform clks, phy and dt support

2014-01-10 Thread Bjørn Mork
Hans de Goede writes: > 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

Re: [PATCH v4 0/2] ohci and ehci-platform clks, phy and dt support

2014-01-10 Thread Sergei Shtylyov
On 01/11/2014 01:52 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 bec

Re: [PATCH v4 0/2] ohci and ehci-platform clks, phy and dt support

2014-01-10 Thread Sergei Shtylyov
Hello. On 01/11/2014 02:08 AM, Bjørn Mork 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 h

Re: [PATCH v4 0/2] ohci and ehci-platform clks, phy and dt support

2014-01-10 Thread Hans de Goede
Hi, On 01/11/2014 01:10 AM, Sergei Shtylyov wrote: On 01/11/2014 01:52 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,

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-10 Thread Thomas Kear
On Sat, Jan 11, 2014 at 11:09 AM, Bjørn Mork wrote: > But looking at the code I think I found and obvious miss in the SG list > initialisation. I'll post a proposed fix for that. Would be good if > someone was able to test it. I've built 3.13.0-rc7-next-20140110 with

Re: [PATCH v4 0/2] ohci and ehci-platform clks, phy and dt support

2014-01-10 Thread Bjørn Mork
Sergei Shtylyov writes: >> FWIW I agree with your decision - not that I think that matters to >> anyone :-) > >It matters at least to me, potential user of this stuff. Sorry for not being clear about what "that" was referring to. What I meant to say was: "not that I think *my opinion on the

Re: [PATCH v4 0/2] ohci and ehci-platform clks, phy and dt support

2014-01-10 Thread Sergei Shtylyov
Hello. On 01/11/2014 02:24 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

Re: [PATCH 4/8] IBM Akebono: Add support to the OHCI platform driver for PPC476GTR

2014-01-10 Thread Sergei Shtylyov
Hello. On 11/22/2013 05:08 AM, Alistair Popple wrote: The IBM Akebono board uses the PPC476GTR SoC which has a OHCI compliant USB host interface. This patch adds support for it to the OHCI platform driver. As we use device tree to pass platform specific data instead of platform data we remov

Re: [PATCH 4/8] IBM Akebono: Add support to the OHCI platform driver for PPC476GTR

2014-01-10 Thread Greg KH
On Sat, Jan 11, 2014 at 04:27:53AM +0300, Sergei Shtylyov wrote: > Hello. > > On 11/22/2013 05:08 AM, Alistair Popple wrote: > > >The IBM Akebono board uses the PPC476GTR SoC which has a OHCI > >compliant USB host interface. This patch adds support for it to the > >OHCI platform driver. > > >As

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-10 Thread Bjørn Mork
Thomas Kear writes: > On Sat, Jan 11, 2014 at 11:09 AM, Bjørn Mork wrote: >> But looking at the code I think I found and obvious miss in the SG list >> initialisation. I'll post a proposed fix for that. Would be good if >> someone was able to test it. > > I&#

Re: [RFC 2/2] usb: core: allow a reference device for new_id

2014-01-10 Thread Bjørn Mork
Greg KH writes: > On Fri, Jan 10, 2014 at 11:25:13PM +0100, Bjørn Mork wrote: >> >> I still see one use case which isn't yet covered: Overriding a static >> entry. This would be particularily useful for class drivers with per >> device exceptions. Is there any real reason why we cannot parse the

[PATCH usb-next] usb: core: let dynamic ids override static ids

2014-01-10 Thread Bjørn Mork
This modifies the probing order so that any matching dynamic entry always will be used, even if the driver has a matching static entry. It is sometimes useful to dynamically update existing device entries. With the new ability to set the dynamic entry driver_info field, this can be used to test ne

Re: [PATCH 4/8] IBM Akebono: Add support to the OHCI platform driver for PPC476GTR

2014-01-10 Thread Benjamin Herrenschmidt
On Fri, 2014-01-10 at 16:52 -0800, Greg KH wrote: > > >Signed-off-by: Alistair Popple > > >Acked-by: Alan Stern > > >Cc: linux-usb@vger.kernel.org > > > >Greg, why this patch hasn't been merged? Because it wasn't addressed to > > you (but BenH)? The other, ehci-platform.c patch didn't even g

RE: chipidea : ENDPTFLUSH and ENDPTPRIME register access

2014-01-10 Thread Peter Chen
> > ENDPTFLUSH and ENDPTPRIME are registers that are set by software and > clear by hardware. > > The current code manipulate them with > "hw_write(ci, register, BIT(n), BIT(n));" > > This do not look sane to me, because hw_write will read the register, > apply the mask and write the value. >

3.13-rc7 USB networking oops

2014-01-10 Thread Daniel J Blueman
I hit this on 3.13-rc7 while transferring data over an ASIX88179 USB 3 to gigabit ethernet adapter, transferring data at only 4MB/s. What other debug options apart from SG debug would be useful here? Thanks, Daniel On 30 December 2013 23:26, Daniel J Blueman wrote: > When rsyncing data from a