Re: [PATCHv11 2/3] usb: USB Type-C connector class

2016-11-22 Thread Heikki Krogerus
Hi Greg, On Mon, Nov 21, 2016 at 03:46:08PM +0100, Greg KH wrote: > > > > + > > > > +config TYPEC > > > > + tristate > > > > > > Hah, that says NOTHING about what this code is at all. > > > > Alone the class driver does nothing. Why would the user need to be > > aware of if it when selecti

Re: Flood of hub_ext_port_status failed (err = -71) messages

2016-11-22 Thread Greg KH
On Mon, Nov 21, 2016 at 09:52:56PM +, Simon Arlott wrote: > I have a 5-port USB 2.0 hub attached to a USB 3.0 host by a long length > of Cat 5e cable (via a pair of cheap USB<->Cat5e adapters from eBay) > that only works at full speed and doesn't stay connected all the time. Sounds like some c

Re: [PATCHv11 2/3] usb: USB Type-C connector class

2016-11-22 Thread Greg KH
On Tue, Nov 22, 2016 at 09:58:13AM +0200, Heikki Krogerus wrote: > Hi Greg, > > On Mon, Nov 21, 2016 at 03:46:08PM +0100, Greg KH wrote: > > > > > + > > > > > +config TYPEC > > > > > + tristate > > > > > > > > Hah, that says NOTHING about what this code is at all. > > > > > > Alone the class

Re: Flood of hub_ext_port_status failed (err = -71) messages

2016-11-22 Thread Mathias Nyman
On 21.11.2016 23:52, Simon Arlott wrote: I have a 5-port USB 2.0 hub attached to a USB 3.0 host by a long length of Cat 5e cable (via a pair of cheap USB<->Cat5e adapters from eBay) that only works at full speed and doesn't stay connected all the time. This wouldn't be a problem except that the

Re: [PATCHv11 2/3] usb: USB Type-C connector class

2016-11-22 Thread Heikki Krogerus
On Mon, Nov 21, 2016 at 07:33:45AM -0800, Guenter Roeck wrote: > On 11/21/2016 06:23 AM, Heikki Krogerus wrote: > > On Mon, Nov 21, 2016 at 03:11:03PM +0200, Heikki Krogerus wrote: > > > Hi Greg, > > > > > > On Mon, Nov 21, 2016 at 11:35:28AM +0100, Greg KH wrote: > > > > > +static void typec_part

Re: Flood of hub_ext_port_status failed (err = -71) messages

2016-11-22 Thread Simon Arlott
On 22/11/16 08:37, Mathias Nyman wrote: > On 21.11.2016 23:52, Simon Arlott wrote: >> 2016-06-17T09:56:09.219+01:00 kernel: xhci_hcd :00:14.0: URB >> transfer length is wrong, xHC issue? req. len = 4, act. len = 4294967292 > > Your broken hardware triggered another interesting issue. > The l

Re: [PATCHv11 2/3] usb: USB Type-C connector class

2016-11-22 Thread Heikki Krogerus
Hi Greg, On Mon, Nov 21, 2016 at 03:45:06PM +0100, Greg KH wrote: > > We could allocate an extra structure for the partner when > > typec_connect() is called, but we would do that just for the sake of > > having something to free in the release hook. It would not be useful > > for anything. It wou

Re: Flood of hub_ext_port_status failed (err = -71) messages

2016-11-22 Thread Mathias Nyman
On 22.11.2016 11:52, Simon Arlott wrote: On 22/11/16 08:37, Mathias Nyman wrote: On 21.11.2016 23:52, Simon Arlott wrote: 2016-06-17T09:56:09.219+01:00 kernel: xhci_hcd :00:14.0: URB transfer length is wrong, xHC issue? req. len = 4, act. len = 4294967292 Your broken hardware triggered

Re: [PATCH 0/5] usb: dwc2: fix parameter handling

2016-11-22 Thread Felipe Balbi
Hi, John Youn writes: > On 11/20/2016 1:26 PM, Stefan Wahren wrote: >> This patch series fixes several parameter handling issues >> found on bcm2835 in gadget mode. It's based on Felipe's USB next. >> >> Stefan Wahren (5): >> usb: dwc2: Do not set host parameter in peripheral mode >> usb: d

Re: [PATCH 5/5] usb: dwc2: fix kernel-doc for dwc2_set_param

2016-11-22 Thread Felipe Balbi
Hi, Stefan Wahren writes: > Since there is no parameter @value replace it with @legacy. > > Fixes: 05ee799f202 ("usb: dwc2: Move gadget settings into core_params") > Signed-off-by: Stefan Wahren > --- > drivers/usb/dwc2/params.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > di

Re: [PATCH net 1/2] r8152: fix the sw rx checksum is unavailable

2016-11-22 Thread Mark Lord
On 16-11-18 07:03 AM, Mark Lord wrote: On 16-11-18 02:57 AM, Hayes Wang wrote: .. Besides, the maximum data length which the RTL8152 would send to the host is 16KB. That is, if the agg_buf_sz is 16KB, the host wouldn't split it. However, you still see problems for it. How does the RTL8152 know

Re: [PATCHv11 2/3] usb: USB Type-C connector class

2016-11-22 Thread Heikki Krogerus
On Tue, Nov 22, 2016 at 12:51:11PM +0200, Heikki Krogerus wrote: > Hi Greg, > > On Mon, Nov 21, 2016 at 03:45:06PM +0100, Greg KH wrote: > > > We could allocate an extra structure for the partner when > > > typec_connect() is called, but we would do that just for the sake of > > > having something

Re: [PATCHv11 2/3] usb: USB Type-C connector class

2016-11-22 Thread Heikki Krogerus
On Mon, Nov 21, 2016 at 03:45:06PM +0100, Greg KH wrote: > Again, free the device for which this release function is being called > for, that is why it is there. I will. Thanks, -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord.

Re: [PATCH 5/5] usb: dwc2: fix kernel-doc for dwc2_set_param

2016-11-22 Thread Stefan Wahren
Hi Felipe, Am 22.11.2016 um 13:23 schrieb Felipe Balbi: > Hi, > > Stefan Wahren writes: >> Since there is no parameter @value replace it with @legacy. >> >> Fixes: 05ee799f202 ("usb: dwc2: Move gadget settings into core_params") >> Signed-off-by: Stefan Wahren >> --- >> drivers/usb/dwc2/params.

Re: [PATCH 5/5] usb: dwc2: fix kernel-doc for dwc2_set_param

2016-11-22 Thread Felipe Balbi
Hi, Stefan Wahren writes: > Hi Felipe, > > Am 22.11.2016 um 13:23 schrieb Felipe Balbi: >> Hi, >> >> Stefan Wahren writes: >>> Since there is no parameter @value replace it with @legacy. >>> >>> Fixes: 05ee799f202 ("usb: dwc2: Move gadget settings into core_params") >>> Signed-off-by: Stefan Wa

[PATCHv12 1/3] lib/string: add sysfs_match_string helper

2016-11-22 Thread Heikki Krogerus
Make a simple helper for matching strings with sysfs attribute files. In most parts the same as match_string(), except sysfs_match_string() uses sysfs_streq() instead of strcmp() for matching. This is more convenient when used with sysfs attributes. Signed-off-by: Heikki Krogerus --- include/lin

[PATCHv12 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2016-11-22 Thread Heikki Krogerus
This adds driver for the USB Type-C PHY on Intel WhiskeyCove PMIC which is available on some of the Intel Broxton SoC based platforms. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/Kconfig | 14 ++ drivers/usb/typec/Makefile | 1 + drivers/usb/typec/typec_wcove.c | 372 +

[PATCHv12 2/3] usb: USB Type-C connector class

2016-11-22 Thread Heikki Krogerus
The purpose of USB Type-C connector class is to provide unified interface for the user space to get the status and basic information about USB Type-C connectors on a system, control over data role swapping, and when the port supports USB Power Delivery, also control over power role swapping and Alt

[PATCHv12 0/3] USB Type-C Connector class

2016-11-22 Thread Heikki Krogerus
The USB Type-C class is meant to provide unified interface to the userspace to present the USB Type-C ports in a system. Changes since v11: - The port drivers are responsible of removing the alternate modes (just like the documentation already said). Changes since v10: - Using ATTRIBUTE_GROUPS

Re: [v5,3/5] USB: ohci: da8xx: Allow a regulator to handle VBUS

2016-11-22 Thread Axel Haslam
On Mon, Nov 21, 2016 at 5:29 PM, David Lechner wrote: > On 11/21/2016 04:22 AM, Axel Haslam wrote: >> >> Hi David, >> >> Thanks for the review, >> > > You're welcome. > @@ -160,15 +212,41 @@ static void ohci_da8xx_ocic_handler(struct da8xx_ohci_root_hub *hub, hu

[PATCH] usb: musb: mark PM functions as __maybe_unused

2016-11-22 Thread Arnd Bergmann
Building without CONFIG_PM causes a harmless warning: drivers/usb/musb/musb_core.c:2041:12: error: ‘musb_run_resume_work’ defined but not used [-Werror=unused-function] Removing the #ifdef around the PM code and instead marking the suspend/resume functions as __maybe_unused will do the right thi

Re: [PATCH v3 3/5] net: asix: Fix AX88772x resume failures

2016-11-22 Thread Jon Hunter
Hi Allan, On 18/11/16 15:09, Jon Hunter wrote: > Hi Allan, > > On 14/11/16 09:45, ASIX_Allan [Office] wrote: >> Hi Jon, >> >> Please help to double check if the USB host controller of your Terga >> platform had been powered OFF while running the ax88772_suspend() routine or >> not? > > Sorry fo

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-22 Thread Wim Osterholt
On Mon, Nov 21, 2016 at 02:19:32PM +0100, Oliver Neukum wrote: > I don't understand it, bit please test the attached patch > with dynamic debugging for cdc-acm and the kernel log level > at maximum. > diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c > index 6895f9e..f03b5db

Re: [PATCH] usb: gadget: uvc: fix returnvar.cocci warnings

2016-11-22 Thread Laurent Pinchart
Hi Andrzej and Julia, Could one of you please submit a patch to fix this ? On Thursday 17 Sep 2015 13:18:04 Andrzej Pietrasiewicz wrote: > Hi Julia, > > W dniu 17.09.2015 o 10:57, Julia Lawall pisze: > > Coccinelle suggests the following patch. But the code is curious. Is the > > function expe

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-22 Thread Bjørn Mork
Wim Osterholt writes: > On Mon, Nov 21, 2016 at 02:19:32PM +0100, Oliver Neukum wrote: >> On Thu, 2016-11-17 at 17:11 +0100, Wim Osterholt wrote: >> >> > Nov 17 15:07:51 localhost kernel: Check point 10 >> > Nov 17 15:07:51 localhost kernel: BUG: unable to handle kernel NULL >> > pointer deref

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-22 Thread Bjørn Mork
Wim Osterholt writes: > On Mon, Nov 21, 2016 at 02:19:32PM +0100, Oliver Neukum wrote: > >> I don't understand it, bit please test the attached patch >> with dynamic debugging for cdc-acm and the kernel log level >> at maximum. > >> diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc

Re: [PATCH v6 3/5] USB: ohci: da8xx: Allow a regulator to handle VBUS

2016-11-22 Thread David Lechner
On 11/21/2016 10:30 AM, Axel Haslam wrote: Using a regulator to handle VBUS will eliminate the need for platform data and callbacks, and make the driver more generic allowing different types of regulators to handle VBUS. The regulator equivalents to the platform callbacks are: set_power ->

Re: [PATCH v6 1/5] USB: ohci: da8xx: use ohci priv data instead of globals

2016-11-22 Thread David Lechner
On 11/21/2016 10:30 AM, Axel Haslam wrote: Instead of global variables, use the extra_priv_size of the ohci driver. We cannot yet move the ocic mask because this is used on the interrupt handler which is registerded through platform s/registerded/registered/ data and does not have an hcd poi

Re: [PATCH v6 3/5] USB: ohci: da8xx: Allow a regulator to handle VBUS

2016-11-22 Thread Axel Haslam
On Tue, Nov 22, 2016 at 9:37 PM, David Lechner wrote: > On 11/21/2016 10:30 AM, Axel Haslam wrote: >> >> Using a regulator to handle VBUS will eliminate the need for >> platform data and callbacks, and make the driver more generic >> allowing different types of regulators to handle VBUS. >> >> The

Re: [PATCH v6 3/5] USB: ohci: da8xx: Allow a regulator to handle VBUS

2016-11-22 Thread David Lechner
On 11/22/2016 02:46 PM, Axel Haslam wrote: On Tue, Nov 22, 2016 at 9:37 PM, David Lechner wrote: On 11/21/2016 10:30 AM, Axel Haslam wrote: Using a regulator to handle VBUS will eliminate the need for platform data and callbacks, and make the driver more generic allowing different types of re

Re: [PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-22 Thread Christian Lamparter
On Monday, November 21, 2016 7:32:30 PM CET John Youn wrote: > On 11/21/2016 1:10 PM, Christian Lamparter wrote: > > On Monday, November 21, 2016 12:16:31 PM CET John Youn wrote: > >> On 11/18/2016 12:18 PM, Christian Lamparter wrote: > >>> On Friday, November 18, 2016 8:16:08 AM CET Rob Herring wr

Re: [PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-22 Thread Rob Herring
On Tue, Nov 22, 2016 at 2:51 PM, Christian Lamparter wrote: > On Monday, November 21, 2016 7:32:30 PM CET John Youn wrote: >> On 11/21/2016 1:10 PM, Christian Lamparter wrote: >> > On Monday, November 21, 2016 12:16:31 PM CET John Youn wrote: >> >> On 11/18/2016 12:18 PM, Christian Lamparter wrote

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-22 Thread Wim Osterholt
On Tue, Nov 22, 2016 at 06:50:28PM +0100, Bjørn Mork wrote: > > iCountryCodeRelDate4 04052004 > > wCountryCode 0x4803 > > No excuse for crashing of course, but that's one of the sickets > descriptor sets I've seen today. Who got the bright idea to put the > communi

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-22 Thread Wim Osterholt
On Tue, Nov 22, 2016 at 07:08:30PM +0100, Bjørn Mork wrote: > > On kernel 4.8.8 this crashes hard and produces over a serial link: > > Huh? That device shouldn't ever enter that code path AFAICS. > Unless you wouldn't happen to add a dynamic entry for this device, No idea of what you mean h

RE: [PATCH net 1/2] r8152: fix the sw rx checksum is unavailable

2016-11-22 Thread Hayes Wang
Mark Lord [mailto:ml...@pobox.com] > Sent: Friday, November 18, 2016 8:03 PM [..] > How does the RTL8152 know that the limit is 16KB, > rather than some other number? Is this a hardwired number > in the hardware, or is it a parameter that the software > sends to the chip during initialization? It

[RFC][PATCH 2/3] HACK: dwc2: force dual use of uphy and phy

2016-11-22 Thread John Stultz
I can't seem to figure out how to connect a generic phy device to the usb UDC logic, as the dwc2 code seems to exclusively work with either generic phys or usb-phys. So to try to make this work with the phy-hi6220-usb driver, tweak the dwc2 logic to support call hooks to both phy and uphy devices.

[RFC][PATCH 1/3] phy: phy-hi6220-usb: Wire up extconn support to hikey's phy driver

2016-11-22 Thread John Stultz
This wires extconn support to hikey's phy driver, and connects it to the usb UDC layer via a usb_phy structure. Not sure if this is the right way to connect phy -> UDC, but I'm lacking a clear example. Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anders

[RFC][PATCH 0/3] Try to connect hikey's usb phy to dwc2 driver

2016-11-22 Thread John Stultz
After earlier attempts[1] at submitting somewhat hackish fixes to the dwc2 driver, I realized the core issue seemed to be the overly simplistic phy driver. I've connected the phy-hi6220-usb.c driver to extcon so it now gets connection and disconnection signals on the usb gadget cable. And I modifi

[RFC][PATCH 3/3] usb: dwc2: Avoid suspending if we're in gadget mode

2016-11-22 Thread John Stultz
I've found when booting HiKey with the usb gadget cable attached if I then try to connect via adb, I get an infinite spew of: dwc2 f72c.usb: dwc2_hsotg_ep_sethalt(ep ffc0790ecb18 ep1out, 0) dwc2 f72c.usb: dwc2_hsotg_ep_sethalt(ep ffc0790eca18 ep1in, 0) It seems that the usb autosu

[PATCH] arm/dts: ls1021a: Add dma-coherent property to usb3 node

2016-11-22 Thread Changming Huang
This sets dma ops as coherent for usb 3.0 platform device Signed-off-by: Changming Huang Signed-off-by: Rajesh Bhagat --- arch/arm/boot/dts/ls1021a.dtsi |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index 368e219..81fb4d9

[PATCH] fsl/usb: Add FSL USB Gadget entry in platform device id table

2016-11-22 Thread Changming Huang
Add FSL USB Gadget entry in platform device id table Signed-off-by: Changming Huang Signed-off-by: Suresh Gupta --- drivers/usb/gadget/udc/fsl_udc_core.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-22 Thread Bjørn Mork
On November 23, 2016 1:54:57 AM CET, Wim Osterholt wrote: >On Tue, Nov 22, 2016 at 07:08:30PM +0100, Bjørn Mork wrote: >> > On kernel 4.8.8 this crashes hard and produces over a serial link: >> >> Huh? That device shouldn't ever enter that code path AFAICS. >> Unless you wouldn't happen t