Re: [PATCH net] r8152: use cancel_delayed_work for runtime suspend

2014-10-17 Thread Bjørn Mork
Hayes Wang writes: > It would cause dead lock for runtime suspend, when the workqueue > is running and runtime suspend occurs before the workqueue wakes > up the device. The rtl8152_suspend() waits the workqueue to finish > because of calling cancel_delayed_work_sync(). The workqueue waits > the

Re: unfixable usb porthole

2014-10-17 Thread Greg KH
On Thu, Oct 16, 2014 at 08:18:26PM -0400, Gene Heskett wrote: > On Thursday 16 October 2014 18:28:16 Greg KH did opine > And Gene did reply: > > On Thu, Oct 16, 2014 at 06:12:48PM -0400, Gene Heskett wrote: > > > Is there a move afoot to write a checker utility that determines if > > > the usb devi

Re: unfixable usb porthole

2014-10-17 Thread Gene Heskett
On Friday 17 October 2014 02:49:05 Clemens Ladisch did opine And Gene did reply: > Gene Heskett wrote: > > On Thursday 16 October 2014 18:28:16 Greg KH did opine > > > > And Gene did reply: > >> On Thu, Oct 16, 2014 at 06:12:48PM -0400, Gene Heskett wrote: > >>> Is there a move afoot to write a ch

[PATCH net] r8152: return -EBUSY for runtime suspend

2014-10-17 Thread Hayes Wang
Remove calling cancel_delayed_work_sync() for runtime suspend, because it would cause dead lock. Instead, return -EBUSY to avoid the device enters suspending if the net is running and the delayed work is pending or running. The delayed work would try to wake up the device later, so the suspending i

[PATCH v2 06/16] usb: dwc3: add disscramble quirk

2014-10-17 Thread Huang Rui
AMD NL fpga needs to enable disscramble quirk. And this quirk doesn't need on the true soc. Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 8 +++- drivers/usb/dwc3/dwc3-pci.c | 5 + drivers/usb/dwc3/platform_data.h | 4 3 files changed, 16 insertions(+), 1 dele

[PATCH v2 03/16] usb: dwc3: enable hibernation if to be supported

2014-10-17 Thread Huang Rui
It enables hibernation if the function is set in coreConsultant. Suggested-by: Felipe Balbi Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index fa396fc..bf77509 100644 --- a/drivers/usb/

[PATCH v2 00/16] usb: dwc3: add support for AMD NL SoC

2014-10-17 Thread Huang Rui
Hi, The series of patches add AMD NL SoC support for DesignWare USB3 OTG IP with PCI bus glue layer. This controller supported hibernation, LPM erratum and used the 2.80a IP version and amd own phy. Current implementation support both simulation and SoC platform. And already tested with gadget zer

[PATCH v2 01/16] usb: dwc3: add AMD NL support

2014-10-17 Thread Huang Rui
Add PCI device ID of AMD NL SoC. Signed-off-by: Huang Rui --- drivers/usb/dwc3/dwc3-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index a36cf66..3806547 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pc

[PATCH v2 07/16] usb: dwc3: add lpm erratum support

2014-10-17 Thread Huang Rui
When parameter DWC_USB3_LPM_ERRATA_ENABLE is enabled in Andvanced Configuration of coreConsultant, it supports of xHCI BESL Errata Dated 10/19/2011 is enabled in host mode. In device mode it adds the capability to send NYET response based on the BESL value received in the LPM token. This patch add

[PATCH v2 04/16] usb: dwc3: add a flag to check if it is fpga board

2014-10-17 Thread Huang Rui
Some chip vendor is on pre-silicon phase, which needs to use the simulation board. It should have the same product and vendor id with the true soc, but might have some minor different configurations. Below thread discussion proposes to find a method to distinguish between simulation board and soc.

[PATCH v2 02/16] pci: quirks: add quirk to avoid AMD NL to bind with xhci

2014-10-17 Thread Huang Rui
The dwc3 controller is the PCI-E device in AMD NL platform, but the class code of PCI header is 0x0c0330, the same with xHC. That's because it needs to meet the windows enviroment. The dwc3 controller acted as only host mode to bind with windows xhci driver. But on linux, sometimes, it would auto-b

[PATCH v2 08/16] usb: dwc3: add u2exit lfps quirk

2014-10-17 Thread Huang Rui
AMD NL needs to enable u2exit lfps quirk. Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 4 drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/dwc3-pci.c | 3 ++- drivers/usb/dwc3/platform_data.h | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git

[PATCH v2 09/16] usb: dwc3: add P3 in U2 SS inactive quirk

2014-10-17 Thread Huang Rui
AMD NL needs to enable P3 OK for U2/SSInactive on USB3PIPE register. Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 20 drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/dwc3-pci.c | 3 ++- drivers/usb/dwc3/platform_data.h | 1 + 4 files chang

[PATCH v2 05/16] usb: dwc3: add quirks support to be compatible for kinds of SoCs

2014-10-17 Thread Huang Rui
This patch adds a quirks flag at dwc3 structure, and SoCs platform vendor is able to define this flag in platform data at bus glue layer. Then do some independent behaviors at dwc3 core level. Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 2 ++ drivers/usb/dwc3/core.h

[PATCH v2 11/16] usb: dwc3: add delay p1p2p3 quirk

2014-10-17 Thread Huang Rui
AMD NL needs to delay P0 to P1/P2/P3 request when entering U1/U2/U3. Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 3 +++ drivers/usb/dwc3/core.h | 2 ++ drivers/usb/dwc3/dwc3-pci.c | 3 ++- drivers/usb/dwc3/platform_data.h | 1 + 4 files changed, 8 insertions(+),

[PATCH v2 10/16] usb: dwc3: add request p1p2p3 quirk

2014-10-17 Thread Huang Rui
AMD NL needs to enable always request P1/P2/P3 for U1/U2/U3 for AMD own phy. Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 3 +++ drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/dwc3-pci.c | 3 ++- drivers/usb/dwc3/platform_data.h | 1 + 4 files changed, 7 inserti

[PATCH v2 16/16] usb: dwc3: enable usb suspend phy

2014-10-17 Thread Huang Rui
AMD NL needs to suspend usb3 ss phy, but this doesn't enable on simulation board. Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 7 ++- drivers/usb/dwc3/dwc3-pci.c | 3 ++- drivers/usb/dwc3/platform_data.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --

[PATCH v2 14/16] usb: dwc3: enable rx_detect to polling lfps quirk

2014-10-17 Thread Huang Rui
AMD NL needs to enable RX_DETECT to Polling.LFPS control quirk. Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 3 +++ drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/dwc3-pci.c | 3 ++- drivers/usb/dwc3/platform_data.h | 1 + 4 files changed, 7 insertions(+), 1 del

[PATCH v2 12/16] usb: dwc3: add delay phy power change quirk

2014-10-17 Thread Huang Rui
AMD NL needs to delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 respectively. Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 3 +++ drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/dwc3-pci.c | 3 ++- drivers/usb/dwc3/platform

[PATCH v2 13/16] usb: dwc3: add lfps filter quirk

2014-10-17 Thread Huang Rui
AMD NL needs to enable lfps filter quirk. Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 3 +++ drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/dwc3-pci.c | 3 ++- drivers/usb/dwc3/platform_data.h | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a

[PATCH v2 15/16] usb: dwc3: add tx demphasis quirk

2014-10-17 Thread Huang Rui
AMD NL needs to enable Tx Deemphasis quirk. Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 3 +++ drivers/usb/dwc3/core.h | 2 ++ drivers/usb/dwc3/dwc3-pci.c | 3 ++- drivers/usb/dwc3/platform_data.h | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --gi

Re: unfixable usb porthole

2014-10-17 Thread Gene Heskett
On Friday 17 October 2014 03:48:48 Greg KH did opine And Gene did reply: > On Thu, Oct 16, 2014 at 08:18:26PM -0400, Gene Heskett wrote: > > On Thursday 16 October 2014 18:28:16 Greg KH did opine > > > > And Gene did reply: > > > On Thu, Oct 16, 2014 at 06:12:48PM -0400, Gene Heskett wrote: > > >

RE: [PATCH v3 2/2] usb: dwc2: gadget: modify return statement

2014-10-17 Thread David Laight
From: Of Sudip Mukherjee > modified the function to have a single return statement at the end > instead of multiple return statement in the middle of the function > to improve the readability of the code. Many of us would disagree with you there. Early returns actually make the code easier to read

Re: unfixable usb porthole

2014-10-17 Thread Greg KH
On Fri, Oct 17, 2014 at 05:01:51AM -0400, Gene Heskett wrote: > On Friday 17 October 2014 03:48:48 Greg KH did opine > And Gene did reply: > > On Thu, Oct 16, 2014 at 08:18:26PM -0400, Gene Heskett wrote: > > > On Thursday 16 October 2014 18:28:16 Greg KH did opine > > > > > > And Gene did reply:

Re: unfixable usb porthole

2014-10-17 Thread Greg KH
On Fri, Oct 17, 2014 at 04:53:57AM -0400, Gene Heskett wrote: > On Friday 17 October 2014 02:49:05 Clemens Ladisch did opine > And Gene did reply: > > Gene Heskett wrote: > > > On Thursday 16 October 2014 18:28:16 Greg KH did opine > > > > > > And Gene did reply: > > >> On Thu, Oct 16, 2014 at 06:

Re: unfixable usb porthole

2014-10-17 Thread Gene Heskett
On Friday 17 October 2014 05:23:10 Greg KH did opine And Gene did reply: > On Fri, Oct 17, 2014 at 05:01:51AM -0400, Gene Heskett wrote: > > On Friday 17 October 2014 03:48:48 Greg KH did opine > > > > And Gene did reply: > > > On Thu, Oct 16, 2014 at 08:18:26PM -0400, Gene Heskett wrote: > > > >

net2280 driver with usb3380 support doesn't work correctly with g_printer

2014-10-17 Thread buletta
Hi, I am using an USB3380 PCI-e to USB Controller with a 3.16 Kernel and the net2280 kernel driver with support for the USB3380. When I load the g_printer kernel module and connect a windows pc to the usb card plug and play is not working. The device is recognized and usbprint is loaded as driver

Re: unfixable usb porthole

2014-10-17 Thread Peter Stuge
Gene, Gene Heskett wrote: > I think the point they were trying to make is that the device packager, > who may not be the chip vendor, can put, if there is room in its flashrom, > a short commend that would, on plugging it in, cause the machine to > silently go out on the net and become part of

Re: unfixable usb porthole

2014-10-17 Thread Peter Stuge
Gene Heskett wrote: > > There is no "paywall" for USB specs. > > I last looked about a year ago. The only link google could find You should look on usb.org under Developer Documentation instead of on google.com. //Peter -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in

Re: [PATCH v3 2/2] usb: dwc2: gadget: modify return statement

2014-10-17 Thread Sudip Mukherjee
On Fri, Oct 17, 2014 at 09:02:00AM +, David Laight wrote: > From: Of Sudip Mukherjee > > modified the function to have a single return statement at the end > > instead of multiple return statement in the middle of the function > > to improve the readability of the code. > > Many of us would di

Re: [PATCH 1/9] usb: dwc2/gadget: report disconnect event from 'end session' irq

2014-10-17 Thread Marek Szyprowski
Hello, On 2014-10-16 15:33, Felipe Balbi wrote: On Thu, Oct 16, 2014 at 02:57:57PM +0200, Marek Szyprowski wrote: This patch adds a call to s3c_hsotg_disconnect() from 'end session' interrupt to correctly notify gadget subsystem about unplugged usb cable. Signed-off-by: Marek Szyprowski ---

Re: [PATCH 3/9] usb: dwc2/gadget: fix support for soft_connect udc framework feature

2014-10-17 Thread Marek Szyprowski
Hello, On 2014-10-16 15:36, Felipe Balbi wrote: On Thu, Oct 16, 2014 at 02:57:59PM +0200, Marek Szyprowski wrote: Enabling and disabling usb gadget by writing to /sys/class/udc/*hsotg/soft_connect results in calling udc_start/udc_stop functions with the same usb gadget driver, so the driver sho

[PATCH 1/1] usb: core: need to call usb_phy_notify_connect after device setup

2014-10-17 Thread Peter Chen
From: Tony Zheng Since we notify disconnecting based on the usb device is existed (port_dev->child, the child device at roothub is not NULL), we need to notify connect after device has been registered. This fixes a bug that do fast plug in/out test, and the notify_disconnect is not called due to

Re: External USB3 hard drive fails to connect (JMicron bridge 152d:0569)

2014-10-17 Thread Mathias Nyman
On 16.10.2014 19:08, Matej Kenda wrote: > Hi, > > I apologise for a typo. > > On 16. okt. 2014, at 17:15, Matej Kenda wrote: > >> The problem was originaly discovered on 3.13, then I tested on 3.14, 3.16 >> and 3.17. >> >> It did work on any of these kernels. > > Correction: > > It did *no

usb: gadget: How to get the list of available usb functions?

2014-10-17 Thread Krzysztof Opasiak
Dear all, While using USB gadgets I have found below issues. I would like you to share your opinion about this and maybe suggest how we can solve it. When user is composing a gadget using configfs he needs to know exactly the names of usb functions. For example user needs to know that functionfs

Re: [PATCH v3] usb: gadget: function: Remove redundant usb_free_all_descriptors

2014-10-17 Thread Sebastian Andrzej Siewior
* pavi1729 | 2014-10-15 14:47:53 [+0530]: >Removed usb_free_all_descriptors in the bind functions, which >results in double-free corruption of the descriptors on error path. >The usb descriptors are allocated by usb_assign_descriptors. > >Signed-off-by: Pavitrakumar Managutte >Reviewed-by: Robert

Re: usb: gadget: How to get the list of available usb functions?

2014-10-17 Thread Marek Szyprowski
Hello, On 2014-10-17 14:30, Krzysztof Opasiak wrote: While using USB gadgets I have found below issues. I would like you to share your opinion about this and maybe suggest how we can solve it. When user is composing a gadget using configfs he needs to know exactly the names of usb functions. Fo

Re: [PATCH v3] usb: gadget: function: Remove redundant usb_free_all_descriptors

2014-10-17 Thread pavi1729
On Fri, Oct 17, 2014 at 6:09 PM, Sebastian Andrzej Siewior wrote: > * pavi1729 | 2014-10-15 14:47:53 [+0530]: > >>Removed usb_free_all_descriptors in the bind functions, which >>results in double-free corruption of the descriptors on error path. >>The usb descriptors are allocated by usb_assign_de

Re: [PATCHv2] usb: gadget: composite: Provide a list of available functions

2014-10-17 Thread Sebastian Andrzej Siewior
On 2014-07-17 10:32:36 [+0200], Krzysztof Opasiak wrote: > In my opinion the target client is not libusbg but a layer above it, > let's call it gadget tool and gadget daemon. Libusbg should provide > convenient API for all functions which has been merged to kernel. > Library doesn't need to know wh

Re: usb: gadget: How to get the list of available usb functions?

2014-10-17 Thread Sebastian Andrzej Siewior
* Marek Szyprowski | 2014-10-17 14:45:39 [+0200]: >This is a bit more appropriate reference for this: >http://thread.gmane.org/gmane.linux.usb.general/30/ I just replied to this thread. Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message

RE: [PATCHv2] usb: gadget: composite: Provide a list of available functions

2014-10-17 Thread Krzysztof Opasiak
> -Original Message- > From: Sebastian Andrzej Siewior [mailto:bige...@breakpoint.cc] > Sent: Friday, October 17, 2014 3:03 PM > To: Krzysztof Opasiak > Cc: Andrzej Pietrasiewicz; Marek Szyprowski; Greg Kroah-Hartman; > Krzysztof Opasiak; ba...@ti.com; Sebastian Andrzej Siewior; > matt.po

[PATCHv4 4/6] phy: remove the old lookup method

2014-10-17 Thread Heikki Krogerus
The users of the old method are now converted to the new one. Signed-off-by: Heikki Krogerus Tested-by: Vivek Gautam --- drivers/phy/phy-bcm-kona-usb2.c | 2 +- drivers/phy/phy-berlin-sata.c| 2 +- drivers/phy/phy-core.c | 45 +++- dr

[PATCHv4 6/6] usb: dwc3: host: convey the PHYs to xhci

2014-10-17 Thread Heikki Krogerus
On some platforms a PHY may need to be handled also in the host controller driver. Exynos5420 SoC requires some "PHY tuning" based on the USB speed. This patch delivers dwc3's PHYs to the xhci platform device when it's created. Signed-off-by: Heikki Krogerus Tested-by: Vivek Gautam Acked-by: Fel

RE: [PATCHv2] usb: gadget: composite: Provide a list of available functions

2014-10-17 Thread Krzysztof Opasiak
> -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of Krzysztof Opasiak > Sent: Friday, October 17, 2014 4:30 PM > To: 'Sebastian Andrzej Siewior'; 'Krzysztof Opasiak' > Cc: Andrzej Pietrasiewicz; Marek Szyprowski; 'Greg Kroa

[PATCHv4 0/6] phy: simplified phy lookup

2014-10-17 Thread Heikki Krogerus
Hi, So the idea with these is that they should help to make it possible to request phys without caring about how they are mapped to the consumers, meaning, was is the mapping done in DT, ACPI, etc. Mapping phys to consumers can be now done with lookups similarly how clocks can be mapped in clkdev.

[PATCHv4 5/6] base: platform: name the device already during allocation

2014-10-17 Thread Heikki Krogerus
The device name is needed when assigning resources like clocks or GPIOs to devices using lookups. If PLATFORM_DEVICE_AUTO is used, the device name is not know before platform_device_add is called after which it's too late to assign that kind of resources as the drivers most likely have already requ

[PATCHv4 1/6] phy: safer to_phy() macro

2014-10-17 Thread Heikki Krogerus
This makes to_phy() macro work with other variable names besides "dev". Signed-off-by: Heikki Krogerus Tested-by: Vivek Gautam --- include/linux/phy/phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 8cb6f81..9fda683

[PATCHv4 2/6] phy: improved lookup method

2014-10-17 Thread Heikki Krogerus
Removes the need for the phys to be aware of their users even when not using DT. The method is copied from clkdev.c. Signed-off-by: Heikki Krogerus Tested-by: Vivek Gautam --- Documentation/phy.txt | 66 --- drivers/phy/phy-core.c | 135 ++

[PATCHv4 3/6] arm: omap3: twl: use the new lookup method with usb phy

2014-10-17 Thread Heikki Krogerus
Provide complete association for the phy and it's user (musb) with the new phy lookup method. Signed-off-by: Heikki Krogerus --- arch/arm/mach-omap2/twl-common.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mac

Re: [PATCH v2 05/16] usb: dwc3: add quirks support to be compatible for kinds of SoCs

2014-10-17 Thread Felipe Balbi
HI, On Fri, Oct 17, 2014 at 04:53:30PM +0800, Huang Rui wrote: > This patch adds a quirks flag at dwc3 structure, and SoCs platform vendor is > able to define this flag in platform data at bus glue layer. Then do some > independent behaviors at dwc3 core level. > > Signed-off-by: Huang Rui > ---

Re: [PATCH v2 06/16] usb: dwc3: add disscramble quirk

2014-10-17 Thread Felipe Balbi
Hi, On Fri, Oct 17, 2014 at 04:53:31PM +0800, Huang Rui wrote: > AMD NL fpga needs to enable disscramble quirk. And this quirk doesn't need on > the true soc. > > Signed-off-by: Huang Rui > --- > drivers/usb/dwc3/core.c | 8 +++- > drivers/usb/dwc3/dwc3-pci.c | 5 + > driv

Re: [PATCH v2 07/16] usb: dwc3: add lpm erratum support

2014-10-17 Thread Felipe Balbi
On Fri, Oct 17, 2014 at 04:53:32PM +0800, Huang Rui wrote: > When parameter DWC_USB3_LPM_ERRATA_ENABLE is enabled in Andvanced > Configuration > of coreConsultant, it supports of xHCI BESL Errata Dated 10/19/2011 is enabled > in host mode. In device mode it adds the capability to send NYET respons

Re: [PATCH v2 08/16] usb: dwc3: add u2exit lfps quirk

2014-10-17 Thread Felipe Balbi
Hi, On Fri, Oct 17, 2014 at 04:53:33PM +0800, Huang Rui wrote: > AMD NL needs to enable u2exit lfps quirk. > > Signed-off-by: Huang Rui > --- > drivers/usb/dwc3/core.c | 4 > drivers/usb/dwc3/core.h | 1 + > drivers/usb/dwc3/dwc3-pci.c | 3 ++- > drivers/usb/dwc3/pla

Re: [PATCH v2 10/16] usb: dwc3: add request p1p2p3 quirk

2014-10-17 Thread Felipe Balbi
On Fri, Oct 17, 2014 at 04:53:35PM +0800, Huang Rui wrote: > AMD NL needs to enable always request P1/P2/P3 for U1/U2/U3 for AMD own phy. > > Signed-off-by: Huang Rui > --- > drivers/usb/dwc3/core.c | 3 +++ > drivers/usb/dwc3/core.h | 1 + > drivers/usb/dwc3/dwc3-pci.c |

Re: [PATCH v2 09/16] usb: dwc3: add P3 in U2 SS inactive quirk

2014-10-17 Thread Felipe Balbi
On Fri, Oct 17, 2014 at 04:53:34PM +0800, Huang Rui wrote: > AMD NL needs to enable P3 OK for U2/SSInactive on USB3PIPE register. > > Signed-off-by: Huang Rui > --- > drivers/usb/dwc3/core.c | 20 > drivers/usb/dwc3/core.h | 1 + > drivers/usb/dwc3/dwc3-pc

Re: [PATCH v2 11/16] usb: dwc3: add delay p1p2p3 quirk

2014-10-17 Thread Felipe Balbi
Hi, On Fri, Oct 17, 2014 at 04:53:36PM +0800, Huang Rui wrote: > AMD NL needs to delay P0 to P1/P2/P3 request when entering U1/U2/U3. > > Signed-off-by: Huang Rui > --- > drivers/usb/dwc3/core.c | 3 +++ > drivers/usb/dwc3/core.h | 2 ++ > drivers/usb/dwc3/dwc3-pci.c | 3

Re: [PATCH v2 13/16] usb: dwc3: add lfps filter quirk

2014-10-17 Thread Felipe Balbi
On Fri, Oct 17, 2014 at 04:53:38PM +0800, Huang Rui wrote: > AMD NL needs to enable lfps filter quirk. > > Signed-off-by: Huang Rui > --- > drivers/usb/dwc3/core.c | 3 +++ > drivers/usb/dwc3/core.h | 1 + > drivers/usb/dwc3/dwc3-pci.c | 3 ++- > drivers/usb/dwc3/platform_

Re: [PATCH v2 12/16] usb: dwc3: add delay phy power change quirk

2014-10-17 Thread Felipe Balbi
Hi, On Fri, Oct 17, 2014 at 04:53:37PM +0800, Huang Rui wrote: > AMD NL needs to delay PHY power change from P0 to P1/P2/P3 when link state > changing from U0 to U1/U2/U3 respectively. > > Signed-off-by: Huang Rui > --- > drivers/usb/dwc3/core.c | 3 +++ > drivers/usb/dwc3/core.h

Re: unfixable usb porthole

2014-10-17 Thread Alan Stern
On Fri, 17 Oct 2014, Greg KH wrote: > > now that is harming the user even if the code to do it is 100% > > nicely written legal code. > > Again, there should never be a way for a USB device to arbitrarily > execute code on your processor. That's not part of the USB spec, and > does not happen o

Re: [PATCH v2 15/16] usb: dwc3: add tx demphasis quirk

2014-10-17 Thread Felipe Balbi
HI, On Fri, Oct 17, 2014 at 04:53:40PM +0800, Huang Rui wrote: > AMD NL needs to enable Tx Deemphasis quirk. > > Signed-off-by: Huang Rui > --- > drivers/usb/dwc3/core.c | 3 +++ > drivers/usb/dwc3/core.h | 2 ++ > drivers/usb/dwc3/dwc3-pci.c | 3 ++- > drivers/usb/dwc3/p

Re: [PATCH v2 14/16] usb: dwc3: enable rx_detect to polling lfps quirk

2014-10-17 Thread Felipe Balbi
On Fri, Oct 17, 2014 at 04:53:39PM +0800, Huang Rui wrote: > AMD NL needs to enable RX_DETECT to Polling.LFPS control quirk. > > Signed-off-by: Huang Rui > --- > drivers/usb/dwc3/core.c | 3 +++ > drivers/usb/dwc3/core.h | 1 + > drivers/usb/dwc3/dwc3-pci.c | 3 ++- > driv

Re: [PATCH v2 16/16] usb: dwc3: enable usb suspend phy

2014-10-17 Thread Felipe Balbi
Hi, On Fri, Oct 17, 2014 at 04:53:41PM +0800, Huang Rui wrote: > AMD NL needs to suspend usb3 ss phy, but this doesn't enable on simulation > board. > > Signed-off-by: Huang Rui > --- > drivers/usb/dwc3/core.c | 7 ++- > drivers/usb/dwc3/dwc3-pci.c | 3 ++- > drivers/usb/dwc3/

Re: [PATCH v2 01/16] usb: dwc3: add AMD NL support

2014-10-17 Thread Felipe Balbi
HI, On Fri, Oct 17, 2014 at 04:53:26PM +0800, Huang Rui wrote: > Add PCI device ID of AMD NL SoC. > > Signed-off-by: Huang Rui this should be the last patch in the series, with all quirk flags already in place. This avoids bisection points where AMD's platform won't work. -- balbi signature

Re: net2280 driver with usb3380 support doesn't work correctly with g_printer

2014-10-17 Thread Alan Stern
On Fri, 17 Oct 2014 bule...@gmail.com wrote: > Hi, > > I am using an USB3380 PCI-e to USB Controller with a 3.16 Kernel and the > net2280 kernel driver with support for the USB3380. > > When I load the g_printer kernel module and connect a windows pc to the usb > card plug and play is not workin

Re: [PATCH v2 00/16] usb: dwc3: add support for AMD NL SoC

2014-10-17 Thread Felipe Balbi
Hi, On Fri, Oct 17, 2014 at 04:53:25PM +0800, Huang Rui wrote: > The series of patches add AMD NL SoC support for DesignWare USB3 OTG > IP with PCI bus glue layer. This controller supported hibernation, LPM > erratum and used the 2.80a IP version and amd own phy. Current > implementation support b

Re: [PATCHv4 1/6] phy: safer to_phy() macro

2014-10-17 Thread Felipe Balbi
On Fri, Oct 17, 2014 at 05:39:11PM +0300, Heikki Krogerus wrote: > This makes to_phy() macro work with other variable names > besides "dev". > > Signed-off-by: Heikki Krogerus > Tested-by: Vivek Gautam Acked-by: Felipe Balbi > --- > include/linux/phy/phy.h | 2 +- > 1 file changed, 1 inserti

Re: unfixable usb porthole

2014-10-17 Thread Greg KH
On Fri, Oct 17, 2014 at 10:58:15AM -0400, Alan Stern wrote: > On Fri, 17 Oct 2014, Greg KH wrote: > > > > now that is harming the user even if the code to do it is 100% > > > nicely written legal code. > > > > Again, there should never be a way for a USB device to arbitrarily > > execute code on

Re: unfixable usb porthole

2014-10-17 Thread Gene Heskett
On Friday 17 October 2014 05:42:50 Peter Stuge did opine And Gene did reply: > Gene, > > Gene Heskett wrote: > > I think the point they were trying to make is that the device > > packager, who may not be the chip vendor, can put, if there is room > > in its flashrom, a short commend that would, on

Re: [PATCH 3/9] usb: dwc2/gadget: fix support for soft_connect udc framework feature

2014-10-17 Thread Felipe Balbi
On Fri, Oct 17, 2014 at 12:43:48PM +0200, Marek Szyprowski wrote: > Hello, > > On 2014-10-16 15:36, Felipe Balbi wrote: > >On Thu, Oct 16, 2014 at 02:57:59PM +0200, Marek Szyprowski wrote: > >>Enabling and disabling usb gadget by writing to > >>/sys/class/udc/*hsotg/soft_connect results in calling

Re: [PATCH 3/9] usb: dwc2/gadget: fix support for soft_connect udc framework feature

2014-10-17 Thread Felipe Balbi
Hi, On Fri, Oct 17, 2014 at 10:44:35AM -0500, Felipe Balbi wrote: > On Fri, Oct 17, 2014 at 12:43:48PM +0200, Marek Szyprowski wrote: > > Hello, > > > > On 2014-10-16 15:36, Felipe Balbi wrote: > > >On Thu, Oct 16, 2014 at 02:57:59PM +0200, Marek Szyprowski wrote: > > >>Enabling and disabling usb

Re: [PATCH 3/9] usb: dwc2/gadget: fix support for soft_connect udc framework feature

2014-10-17 Thread Felipe Balbi
On Fri, Oct 17, 2014 at 10:46:30AM -0500, Felipe Balbi wrote: > Hi, > > On Fri, Oct 17, 2014 at 10:44:35AM -0500, Felipe Balbi wrote: > > On Fri, Oct 17, 2014 at 12:43:48PM +0200, Marek Szyprowski wrote: > > > Hello, > > > > > > On 2014-10-16 15:36, Felipe Balbi wrote: > > > >On Thu, Oct 16, 2014

Re: unfixable usb porthole

2014-10-17 Thread Alan Stern
On Fri, 17 Oct 2014, Greg KH wrote: > > Given the ability to update a USB device's firmware, a black hat can > > easily modify the firmware of an innocent-looking USB flash drive. The > > new firmware can include an HID interface that presents itself to the > > host as a keyboard. > > > > Whe

Re: [PATCH 3/9] usb: dwc2/gadget: fix support for soft_connect udc framework feature

2014-10-17 Thread Felipe Balbi
On Fri, Oct 17, 2014 at 10:49:25AM -0500, Felipe Balbi wrote: > On Fri, Oct 17, 2014 at 10:46:30AM -0500, Felipe Balbi wrote: > > Hi, > > > > On Fri, Oct 17, 2014 at 10:44:35AM -0500, Felipe Balbi wrote: > > > On Fri, Oct 17, 2014 at 12:43:48PM +0200, Marek Szyprowski wrote: > > > > Hello, > > > >

usb_stor_control_msg() timeout argument

2014-10-17 Thread Mark Knibbs
Hi, In include/linux/usb.h, there is /* * timeouts, in milliseconds, used for sending/receiving control messages * they typically complete within a few frames (msec) after they're issued * USB identifies 5 second timeouts, maybe more in a few cases, and a few * slow devices (like some MGE Elli

Re: usb_stor_control_msg() timeout argument

2014-10-17 Thread Alan Stern
On Fri, 17 Oct 2014, Mark Knibbs wrote: > Hi, > > In include/linux/usb.h, there is > /* > * timeouts, in milliseconds, used for sending/receiving control messages > * they typically complete within a few frames (msec) after they're issued > * USB identifies 5 second timeouts, maybe more in a f

Re: unfixable usb porthole

2014-10-17 Thread Bjørn Mork
Alan Stern writes: > The exploitability lies in what you mentioned above: that you have to > be aware of what you plug into your machine, and that devices that were > previously thought not to be corruptible actually are. Taken together, > these two ingredients make up a recipe for a social e

Re: [PATCH 3/9] usb: dwc2/gadget: fix support for soft_connect udc framework feature

2014-10-17 Thread Felipe Balbi
On Fri, Oct 17, 2014 at 11:02:34AM -0500, Felipe Balbi wrote: > On Fri, Oct 17, 2014 at 10:49:25AM -0500, Felipe Balbi wrote: > > On Fri, Oct 17, 2014 at 10:46:30AM -0500, Felipe Balbi wrote: > > > Hi, > > > > > > On Fri, Oct 17, 2014 at 10:44:35AM -0500, Felipe Balbi wrote: > > > > On Fri, Oct 17

[PATCH 00/28] usb: pending fixes

2014-10-17 Thread Felipe Balbi
Hi, folks, here are the patches I have been testing and I want to send them during the -rc cycle. I have been testing these patches for the past 2 weeks now and they are very stable both on dwc3 and musb. Note that with these, I have almost all gadget drivers passing both USB20CV and USB30CV with

[PATCH 22/28] usb: gadget: udc: USB_GADGET_XILINX should depend on HAS_DMA

2014-10-17 Thread Felipe Balbi
From: Geert Uytterhoeven If NO_DMA=y: drivers/built-in.o: In function `xudc_done': udc-xilinx.c:(.text+0x54f4d2): undefined reference to `usb_gadget_unmap_request' drivers/built-in.o: In function `xudc_dma_send': udc-xilinx.c:(.text+0x54f9f8): undefined reference to `dma_sync_single_for_cpu' dri

[PATCH 27/28] usb: musb: musb_dsps: fix NULL pointer in suspend

2014-10-17 Thread Felipe Balbi
From: Sebastian Andrzej Siewior So testing managed to configure musb in DMA mode but not load the matching cppi41 driver for DMA. This results in |musb-hdrc musb-hdrc.0.auto: Failed to request rx1. |musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517 |platform musb-hdrc.0.au

[PATCH 05/28] usb: dwc3: gadget: fix set_halt() bug with pending transfers

2014-10-17 Thread Felipe Balbi
According to our Gadget Framework API documentation, ->set_halt() *must* return -EAGAIN if we have pending transfers (on either direction) or FIFO isn't empty (on TX endpoints). Fix this bug so that the mass storage gadget can be used without stall=0 parameter. This patch should be backported to

[PATCH 26/28] usb: musb: dsps: start OTG timer on resume again

2014-10-17 Thread Felipe Balbi
From: Sebastian Andrzej Siewior Commit 468bcc2a2ca ("usb: musb: dsps: kill OTG timer on suspend") stopped the timer in suspend path but forgot the re-enable it in the resume path. This patch fixes the behaviour. Cc: # v3.14+ Fixes 468bcc2a2ca "usb: musb: dsps: kill OTG timer on suspend" Signed-

[PATCH 23/28] usb: gadget: f_fs: remove redundant ffs_data_get()

2014-10-17 Thread Felipe Balbi
From: Robert Baldyga During FunctionFS bind, ffs_data_get() function was called twice (in functionfs_bind() and in ffs_do_functionfs_bind()), while on unbind ffs_data_put() was called once (in functionfs_unbind() function). In result refcount never reached value 0, and ffs memory resources has be

[PATCH 15/28] usb: gadget: function: f_obex: fix Interface Descriptor Test

2014-10-17 Thread Felipe Balbi
On USB20CV's Interface Descriptor Test, a series of SetInterface/GetInterface requests are issued and gadget driver is required to always return correct alternate setting. In one step of the test, g_serial with f_obex was returning the wrong value (1 instead of 0). In order to fix this, we will n

[PATCH 19/28] usb: musb: cppi41: restart hrtimer only if not yet done

2014-10-17 Thread Felipe Balbi
From: Thomas Gleixner commit c58d80f52 ("usb: musb: Ensure that cppi41 timer gets armed on premature DMA TX irq") fixed hrtimer scheduling bug. There is one left which does not trigger that often. The following scenario is still possible: lock(&x->lock); hrtimer_start(&x->t); unlock(

[PATCH 21/28] Revert "usb: dwc3: dwc3-omap: Disable/Enable only wrapper interrupts in prepare/complete"

2014-10-17 Thread Felipe Balbi
From: Roger Quadros This reverts commit 02dae36aa649a66c5c6181157ddd806e7b4913fc. That commit is bogus in two ways: 1) There's no way dwc3-omap's ->suspend() can cause any effect on xhci's ->suspend(). Linux device driver model guarantees that a parent's ->suspend() will only be

[PATCH 24/28] usb: ffs: fix regression when quirk_ep_out_aligned_size flag is set

2014-10-17 Thread Felipe Balbi
From: David Cohen The commit '2e4c7553cd usb: gadget: f_fs: add aio support' broke the quirk implemented to align buffer size to maxpacketsize on out endpoint. As result, functionfs does not work on Intel platforms using dwc3 driver (i.e. Bay Trail and Merrifield). This patch fixes the issue. Th

[PATCH 10/28] usb: gadget: function: uvc: manage our video control endpoint

2014-10-17 Thread Felipe Balbi
just like any other endpoint, we must enable/disable our video control endpoint based on calls to our ->set_alt() method. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/function/f_uvc.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/usb/gadget/function/f_uvc.c b/

[PATCH 25/28] usb: gadget: loopback: don't queue requests to bogus endpoints

2014-10-17 Thread Felipe Balbi
A request allocated from e.g. ep1out cannot be queued to any other endpoint. This bug has been in f_loopback at least since mid-2011 and since nobody has really screamed about it, we're not backporting to any stable kernels. Debugged with MUSB since that's the only controller which complains about

[PATCH 28/28] usb: gadget: udc: core: fix kernel oops with soft-connect

2014-10-17 Thread Felipe Balbi
Currently, there's no guarantee that udc->driver will be valid when using soft_connect sysfs interface. In fact, we can very easily trigger a NULL pointer dereference by trying to disconnect when a gadget driver isn't loaded. Fix this bug: ~# echo disconnect > soft_connect [ 33.685743] Unable t

[PATCH 20/28] usb: gadget: composite: enable BESL support

2014-10-17 Thread Felipe Balbi
According to USB 2.0 ECN Errata for Link Power Management (USB2-LPM-Errata-final.pdf), BESL must be enabled if LPM is enabled. This helps with USB30CV TD 9.21 LPM L1 Suspend Resume Test. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/composite.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH 03/28] usb: dwc3: gadget: move isoc endpoint check to unlocked set_halt

2014-10-17 Thread Felipe Balbi
__dwc3_gadget_ep_set_halt() is the function which handles the actual halt feature. In order to cope with some extra cleanup comming as a follow-up patch let's move the isochronous endpoint check there too. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 13 + 1 file chang

[PATCH 18/28] usb: dwc3: ep0: fix Data Phase for transfer sizes aligned to wMaxPacketSize

2014-10-17 Thread Felipe Balbi
According to Section 8.5.3.2 of the USB 2.0 specification, a USB device must terminate a Data Phase with either a short packet or a ZLP (if the previous transfer was a multiple of wMaxPacketSize). For reference, here's what the USB 2.0 specification, section 8.5.3.2 says: " 8.5.3.2 Variable-lengt

[PATCH 14/28] usb: gadget: function: uac2: add a release method

2014-10-17 Thread Felipe Balbi
devices are required to provide a release method. This patch fixes the following WARN(): [ 42.611159] [ cut here ] [ 42.616025] WARNING: CPU: 0 PID: 1453 at drivers/base/core.c:250 device_release+0x94/0xa0() [ 42.624820] Device 'snd_uac2.0' does not have a release()

[PATCH 08/28] usb: gadget: function: uvc: return correct alt-setting

2014-10-17 Thread Felipe Balbi
If our alternate setting has been selected, we must return that on a subsequent Get Interface request even if we're not streaming. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/function/f_uvc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f

[PATCH 01/28] usb: dwc3: trace: don't dereference pointers

2014-10-17 Thread Felipe Balbi
The way trace works is that it won't decode strings until we read the actual trace. Because of that, we can't make assumptions of pointers still being valid at the time we read the trace. In order to avoid that, just copy all fields from every struct pointer we need for our traces. Ths patch fixes

[PATCH 13/28] usb: gadget: function: uac2: prevent double ep disable

2014-10-17 Thread Felipe Balbi
without this check, f_uac2 would try to disable the same endpoint twice. Fix that. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/function/f_uac2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c index fa5111

[PATCH 17/28] usb: dwc3: ep0: return early on NULL requests

2014-10-17 Thread Felipe Balbi
if our list of requests is empty, return early. There's really nothing to be done in case our request list is empty anyway because the only situation where we our list is empty, is when we're transferring ZLPs. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/ep0.c | 9 ++--- 1 file changed

[PATCH 16/28] usb: dwc3: pci: Add PCI ID for Intel Braswell

2014-10-17 Thread Felipe Balbi
From: Alan Cox The device controller is the same but it has different PCI ID. Add this new ID to the driver's list of supported IDs. Signed-off-by: Alan Cox Signed-off-by: Mika Westerberg Signed-off-by: Heikki Krogerus Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-pci.c | 2 ++ 1 fi

[PATCH 11/28] usb: gadget: function: uvc: disable endpoints on ->disable()

2014-10-17 Thread Felipe Balbi
when our ->disable() method is called, we must make sure to teardown all our resources, including endpoints. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/function/f_uvc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadg

  1   2   3   >