Re: [PATCH 1/3] usb: gadget: function: phonet: balance usb_ep_disable calls

2015-02-20 Thread Pavel Machek
> > > > > > In current state I review all 3 patches as: > > > > > > > > > > > > Rejected-by: Pali Rohár > > > > > > [It breaks booting Nokia N900 device] > > > > > > > > > > next step, figure why it's broken. Working just fine here > > > > > on AM335x which has the same musb IP. > > > > > > > >

Re: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)

2015-02-20 Thread Linus Walleij
On Fri, Feb 20, 2015 at 7:41 AM, Robert Baldyga wrote: > Hi David, > > On 02/19/2015 08:59 PM, David Cohen wrote: >> Some Intel platforms have an USB OTG port fully (or partially) >> controlled by GPIOs: >> >> (1) USB ID is connected directly to a pulled up GPIO. >> >> Optionally: >> (2) VBUS is e

Re: gt-s5570 and pl2303.ko

2015-02-20 Thread Milutin Aksic
Hello Greg, I supose that serial communication should work with this older model gt-s5570. I found custom rom with that old kernel version but I don't know how to find newer version for this phone. When I plug the converter to phone I can't see anything in the log that is related to converter but

Re: [PATCH v4 4/4] phy: add phy-hi6220-usb

2015-02-20 Thread zhangfei
On 02/20/2015 12:38 PM, Felipe Balbi wrote: On Fri, Feb 20, 2015 at 11:07:21AM +0800, zhangfei wrote: Hi, Balbi On 02/18/2015 10:35 PM, Felipe Balbi wrote: On Wed, Feb 18, 2015 at 01:44:21PM +0800, zhangfei wrote: Hi, Kishon On 02/18/2015 01:35 PM, Kishon Vijay Abraham I wrote: Hi, On Th

[PATCH] usb: gadget: function: Replace GFP_KERNEL with GFP_ATOMIC

2015-02-20 Thread Tapasweni Pathak
To avoid deadlock, do not call blocking functions with spinlocks held. Replace GFP_KERNEL with GFP_ATOMIC, as the latter will fail if the heap doesn't have enough free pages but will not sleep and hence deadlock can be avoided. Found by Coccinelle. Signed-off-by: Tapasweni Pathak --- Is there a

Re: usb serial: pl2303 driver TxD "break" stays after close() bug

2015-02-20 Thread Jari Ruusu
On 2/20/15, Johan Hovold wrote: > On Thu, Feb 19, 2015 at 03:38:39PM +0200, Jari Ruusu wrote: >> To clear it, you need to poke it with ioctl(fd, TIOCCBRK, 0) >> or disconnect the device. > > That's definitely a bug. > > Care to test the patch below? Your patch fixes the bug. Thanks. -- Jari Ruu

Re: [PATCH v4 4/4] phy: add phy-hi6220-usb

2015-02-20 Thread Felipe Balbi
Hi, On Thu, Feb 12, 2015 at 03:37:26PM +0800, Zhangfei Gao wrote: > Add usb phy controller for hi6220 platform > > Signed-off-by: Zhangfei Gao > --- > drivers/phy/Kconfig | 9 ++ > drivers/phy/Makefile | 1 + > drivers/phy/phy-hi6220-usb.c | 306 > +

Re: [PATCH 1/3] usb: gadget: function: phonet: balance usb_ep_disable calls

2015-02-20 Thread Felipe Balbi
On Fri, Feb 20, 2015 at 09:27:51AM +0100, Pavel Machek wrote: > > > > > > > In current state I review all 3 patches as: > > > > > > > > > > > > > > Rejected-by: Pali Rohár > > > > > > > [It breaks booting Nokia N900 device] > > > > > > > > > > > > next step, figure why it's broken. Working just

Re: gt-s5570 and pl2303.ko

2015-02-20 Thread Greg KH
On Fri, Feb 20, 2015 at 11:22:54AM +0100, Milutin Aksic wrote: > Hello Greg, > I supose that serial communication should work with this older model > gt-s5570. I found custom rom with that old kernel version but I don't > know how to find newer version for this phone. > When I plug the converter to

Re: [PATCH v4 4/4] phy: add phy-hi6220-usb

2015-02-20 Thread zhangfei
Hi, Balbi On 02/20/2015 10:41 PM, Felipe Balbi wrote: +static void hi6220_start_peripheral(struct hi6220_priv *priv, bool on) +{ + struct usb_otg *otg = priv->phy.otg; + + if (!otg->gadget) + return; + + if (on) + usb_gadget_connect(otg->gadget); +

Re: [PATCH v4 4/4] phy: add phy-hi6220-usb

2015-02-20 Thread Felipe Balbi
Hi, On Fri, Feb 20, 2015 at 11:44:37PM +0800, zhangfei wrote: > Hi, Balbi > > On 02/20/2015 10:41 PM, Felipe Balbi wrote: > > >>+static void hi6220_start_peripheral(struct hi6220_priv *priv, bool on) > >>+{ > >>+ struct usb_otg *otg = priv->phy.otg; > >>+ > >>+ if (!otg->gadget) > >>+

Re: gt-s5570 and pl2303.ko

2015-02-20 Thread Milutin Aksic
On 02/20/2015 04:31 PM, Greg KH wrote: On Fri, Feb 20, 2015 at 11:22:54AM +0100, Milutin Aksic wrote: Hello Greg, I supose that serial communication should work with this older model gt-s5570. I found custom rom with that old kernel version but I don't know how to find newer version for this p

Re: [PATCH] usb: gadget: function: Replace GFP_KERNEL with GFP_ATOMIC

2015-02-20 Thread Michal Nazarewicz
On Fri, Feb 20 2015, Tapasweni Pathak wrote: > To avoid deadlock, do not call blocking functions with spinlocks held. > > Replace GFP_KERNEL with GFP_ATOMIC, as the latter will fail if the heap > doesn't have enough free pages but will not sleep and hence deadlock can > be avoided. > > Found by Coc

[PATCH 5/7 linux-next] hso: replace current->state by __set_current_state()

2015-02-20 Thread Fabian Frederick
Use helper functions to access current->state. Direct assignments are prone to races and therefore buggy. Thanks to Peter Zijlstra for the exact definition of the problem. Suggested-By: Peter Zijlstra Signed-off-by: Fabian Frederick --- drivers/net/usb/hso.c | 2 +- 1 file changed, 1 insertion

Re: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)

2015-02-20 Thread David Cohen
Hi, On Thu, Feb 19, 2015 at 11:39:06PM +0100, Paul Bolle wrote: > On Thu, 2015-02-19 at 11:59 -0800, David Cohen wrote: > > As always, comments are welcome. > > Are nits welcome too? > > > +MODULE_LICENSE("GPLv2"); > > You probably meant > MODULE_LICENSE("GPL v2") > > Didn't that trigger a

Re: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)

2015-02-20 Thread Felipe Balbi
On Fri, Feb 20, 2015 at 11:02:26AM -0800, David Cohen wrote: > Hi, > > On Thu, Feb 19, 2015 at 11:39:06PM +0100, Paul Bolle wrote: > > On Thu, 2015-02-19 at 11:59 -0800, David Cohen wrote: > > > As always, comments are welcome. > > > > Are nits welcome too? > > > > > +MODULE_LICENSE("GPLv2"); >

Re: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)

2015-02-20 Thread Paul Bolle
On Fri, 2015-02-20 at 11:02 -0800, David Cohen wrote: > On Thu, Feb 19, 2015 at 11:39:06PM +0100, Paul Bolle wrote: > > On Thu, 2015-02-19 at 11:59 -0800, David Cohen wrote: > > > As always, comments are welcome. > > > > Are nits welcome too? > > > > > +MODULE_LICENSE("GPLv2"); > > > > You proba

Re: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)

2015-02-20 Thread David Cohen
Hi Linus and Robert, CC'ing Heikki as it involves a RFC from him. On Fri, Feb 20, 2015 at 10:53:44AM +0100, Linus Walleij wrote: > On Fri, Feb 20, 2015 at 7:41 AM, Robert Baldyga wrote: > > Hi David, > > > > On 02/19/2015 08:59 PM, David Cohen wrote: > >> Some Intel platforms have an USB OTG por

Re: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)

2015-02-20 Thread David Cohen
On Fri, Feb 20, 2015 at 01:09:00PM -0600, Felipe Balbi wrote: > On Fri, Feb 20, 2015 at 11:02:26AM -0800, David Cohen wrote: > > Hi, > > > > On Thu, Feb 19, 2015 at 11:39:06PM +0100, Paul Bolle wrote: > > > On Thu, 2015-02-19 at 11:59 -0800, David Cohen wrote: > > > > As always, comments are welco

Re: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)

2015-02-20 Thread David Cohen
On Fri, Feb 20, 2015 at 08:10:34PM +0100, Paul Bolle wrote: > On Fri, 2015-02-20 at 11:02 -0800, David Cohen wrote: > > On Thu, Feb 19, 2015 at 11:39:06PM +0100, Paul Bolle wrote: > > > On Thu, 2015-02-19 at 11:59 -0800, David Cohen wrote: > > > > As always, comments are welcome. > > > > > > Are n

USB LG laptop keyboards stop working after Linux 3.9

2015-02-20 Thread Jay Philips
Hello, I was asked by Greg Kroah-Hartman to send this email to the mailing list regarding USB keyboards on LG laptops no longer functioning after Linux 3.9. Below is the text from the bug report i left at ( https://bugzilla.kernel.org/show_bug.cgi?id=93541 ).

Re: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)

2015-02-20 Thread Felipe Balbi
On Fri, Feb 20, 2015 at 11:17:00AM -0800, David Cohen wrote: > Hi Linus and Robert, > > CC'ing Heikki as it involves a RFC from him. > > On Fri, Feb 20, 2015 at 10:53:44AM +0100, Linus Walleij wrote: > > On Fri, Feb 20, 2015 at 7:41 AM, Robert Baldyga > > wrote: > > > Hi David, > > > > > > On 0

Re: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)

2015-02-20 Thread David Cohen
On Fri, Feb 20, 2015 at 01:36:06PM -0600, Felipe Balbi wrote: > On Fri, Feb 20, 2015 at 11:17:00AM -0800, David Cohen wrote: > > Hi Linus and Robert, > > > > CC'ing Heikki as it involves a RFC from him. > > > > On Fri, Feb 20, 2015 at 10:53:44AM +0100, Linus Walleij wrote: > > > On Fri, Feb 20, 2

Re: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)

2015-02-20 Thread Felipe Balbi
On Fri, Feb 20, 2015 at 11:59:27AM -0800, David Cohen wrote: > On Fri, Feb 20, 2015 at 01:36:06PM -0600, Felipe Balbi wrote: > > On Fri, Feb 20, 2015 at 11:17:00AM -0800, David Cohen wrote: > > > Hi Linus and Robert, > > > > > > CC'ing Heikki as it involves a RFC from him. > > > > > > On Fri, Feb

Re: USB LG laptop keyboards stop working after Linux 3.9

2015-02-20 Thread Alan Stern
On Fri, 20 Feb 2015, Jay Philips wrote: > Hello, > > I was asked by Greg Kroah-Hartman to send this email to the mailing list > regarding USB keyboards on LG laptops no longer functioning after Linux > 3.9. Below is the text from the bug report i left at ( > https://bugzilla.kernel.org/show_bu

Re: [PATCH] usb: plusb: Add support for National Instruments host-to-host cable

2015-02-20 Thread David Miller
From: Ben Shelton Date: Mon, 16 Feb 2015 13:47:06 -0600 > The National Instruments USB Host-to-Host Cable is based on the Prolific > PL-25A1 chipset. Add its VID/PID so the plusb driver will recognize it. > > Signed-off-by: Ben Shelton Applied, thanks. -- To unsubscribe from this list: send t

Re: [PATCH] hso: always read interface number from the current altsetting

2015-02-20 Thread David Miller
From: Aleksander Morgado Date: Tue, 17 Feb 2015 11:31:29 +0100 > Always read bInterfaceNumber from the current altsetting, not from the first > one > available in the altsetting array. This is coming from code review, not > related > to any specific bug. > > Signed-off-by: Aleksander Morgado

Re: gt-s5570 and pl2303.ko

2015-02-20 Thread Greg KH
On Fri, Feb 20, 2015 at 05:37:37PM +0100, Milutin Aksic wrote: > > > On 02/20/2015 04:31 PM, Greg KH wrote: > >On Fri, Feb 20, 2015 at 11:22:54AM +0100, Milutin Aksic wrote: > >>Hello Greg, > >>I supose that serial communication should work with this older model > >>gt-s5570. I found custom rom w

Re: USB LG laptop keyboards stop working after Linux 3.9

2015-02-20 Thread Greg KH
On Fri, Feb 20, 2015 at 11:15:52PM +0400, Jay Philips wrote: > Hello, > > I was asked by Greg Kroah-Hartman to send this email to the mailing list > regarding USB keyboards on LG laptops no longer functioning after Linux 3.9. > Below is the text from the bug report i left at ( > https://bugzilla.k

Re: [PATCH v2] extcon: otg_gpio: add driver for USB OTG port controlled by GPIO(s)

2015-02-20 Thread David Cohen
On Fri, Feb 20, 2015 at 02:00:26PM -0600, Felipe Balbi wrote: > On Fri, Feb 20, 2015 at 11:59:27AM -0800, David Cohen wrote: > > On Fri, Feb 20, 2015 at 01:36:06PM -0600, Felipe Balbi wrote: > > > On Fri, Feb 20, 2015 at 11:17:00AM -0800, David Cohen wrote: > > > > Hi Linus and Robert, > > > > > >

Re: [PATCH 1/3] usb: gadget: function: phonet: balance usb_ep_disable calls

2015-02-20 Thread Pavel Machek
On Fri 2015-02-20 08:39:06, Felipe Balbi wrote: > On Fri, Feb 20, 2015 at 09:27:51AM +0100, Pavel Machek wrote: > > > > > > > > In current state I review all 3 patches as: > > > > > > > > > > > > > > > > Rejected-by: Pali Rohár > > > > > > > > [It breaks booting Nokia N900 device] > > > > > > >

Re: Control message failures kill entire XHCI stack

2015-02-20 Thread Devin Heitmueller
> Got one more patch added to the for-usb-next-branch. > It makes sure we allocate enough scratchpad memory for xhci. > > It's one possible cause. > Patch will anyway go to 3.20, but you can try it out first to see if it helps Hi Mathias, Thanks, I'll see if I can get this tested out over the wee

Re: [PATCH] hso: always read interface number from the current altsetting

2015-02-20 Thread Alan Stern
On Fri, 20 Feb 2015, David Miller wrote: > From: Aleksander Morgado > Date: Tue, 17 Feb 2015 11:31:29 +0100 > > > Always read bInterfaceNumber from the current altsetting, not from the > > first one > > available in the altsetting array. This is coming from code review, not > > related > > to

URB IRQ fires on URB after usb_kill_urb() already completed

2015-02-20 Thread Devin Heitmueller
Hi there, I've been trying to track down some memory corruption in my driver for the HVR-950q related to dequeueing of ISOC URBs when shutting down the stream. I enabled SLUB poisoning, and I'm seeing a use-after-free condition in the EHCI driver. See below. Based on my read of the stack, it lo

Re: gt-s5570 and pl2303.ko

2015-02-20 Thread Milutin Aksic
On 02/20/2015 09:22 PM, Greg KH wrote: On Fri, Feb 20, 2015 at 05:37:37PM +0100, Milutin Aksic wrote: On 02/20/2015 04:31 PM, Greg KH wrote: On Fri, Feb 20, 2015 at 11:22:54AM +0100, Milutin Aksic wrote: Hello Greg, I supose that serial communication should work with this older model gt-s5

Re: gt-s5570 and pl2303.ko

2015-02-20 Thread Greg KH
On Fri, Feb 20, 2015 at 11:37:17PM +0100, Milutin Aksic wrote: > > > On 02/20/2015 09:22 PM, Greg KH wrote: > >On Fri, Feb 20, 2015 at 05:37:37PM +0100, Milutin Aksic wrote: > >> > >> > >>On 02/20/2015 04:31 PM, Greg KH wrote: > >>>On Fri, Feb 20, 2015 at 11:22:54AM +0100, Milutin Aksic wrote: >

[PATCH] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-20 Thread Aleksander Morgado
When the control TD doesn't have TRBs in the data stage, the URB actual length is set equal to the transfer buffer length. E.g. with a 64 byte transfer buffer length: Transfer event len = 0, COMP_SHORT_SUCCESS (status) |-> URB actual length set to transfer buffer length = 64 When th

Re: [PATCH] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-20 Thread Aleksander Morgado
On Sat, Feb 21, 2015 at 1:18 AM, Aleksander Morgado wrote: > The current logic, though, doesn't seem to contemplate the case where a TD > has a > TDR in the data stage which actually reports 0 bytes (i.e. transfer event len > equal to transfer buffer len). The logic is currently handling this cas

Re: URB IRQ fires on URB after usb_kill_urb() already completed

2015-02-20 Thread Alan Stern
On Fri, 20 Feb 2015, Devin Heitmueller wrote: > Hi there, > > I've been trying to track down some memory corruption in my driver for > the HVR-950q related to dequeueing of ISOC URBs when shutting down the > stream. I enabled SLUB poisoning, and I'm seeing a use-after-free > condition in the EHC

Re: [PATCH v3] usb: dwc2: gadget reuse ahbcfg assigned from platform

2015-02-20 Thread John Youn
On 2/15/2015 5:50 AM, Zhangfei Gao wrote: > Reuse ahbcfg if assigned from platform > > Input from John: > AHB_SINGLE, NOTI_ALL_DMA_WRIT, REM_MEM_SUPP, HBSTLEN, > and INV_DESC_ENDIANNESS only apply in DMA mode and are > ignored in slave mode operation. > > Signed-off-by: Zhangfei Gao > --- > dri

Re: URB IRQ fires on URB after usb_kill_urb() already completed

2015-02-20 Thread Devin Heitmueller
> But the fact that the call stack passes through qh_completions and > ehci_unlink_async means that the URB in question is _not_ isochronous > (or interrupt for that matter). Does that help? Doh. My mistake. Of course it's a bulk endpoint. This is the price I pay for working on two different U

Re: [PATCH v2] usb: dwc2: Register interrupt handler only once gadget is correctly initialized

2015-02-20 Thread John Youn
On 2/6/2015 8:50 AM, Romain Perier wrote: > Don't register interrupt handler before usb gadget is correctly initialized. > For some embedded platforms which don't have a usb-phy, it crashes the driver > because an interrupt is emitted with non-initialized hardware. > According to devm_request_irq d

Re: [PATCH] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-20 Thread Alan Stern
On Sat, 21 Feb 2015, Aleksander Morgado wrote: > When the control TD doesn't have TRBs in the data stage, the URB actual length > is set equal to the transfer buffer length. E.g. with a 64 byte transfer > buffer > length: > > Transfer event len = 0, COMP_SHORT_SUCCESS (status) >|-

Re: URB IRQ fires on URB after usb_kill_urb() already completed

2015-02-20 Thread Alan Stern
On Fri, 20 Feb 2015, Devin Heitmueller wrote: > > If you want to trace things in greater detail, look at the value of > > urb->use_count at various points. usb_kill_urb won't return until the > > value reaches 0, which should not occur until well after > > usb_hcd_unlink_urb_from_ep returns. > >

Re: [PATCH v3] usb: dwc2: gadget reuse ahbcfg assigned from platform

2015-02-20 Thread zhangfei
Hi, John On 02/21/2015 08:35 AM, John Youn wrote: On 2/15/2015 5:50 AM, Zhangfei Gao wrote: Reuse ahbcfg if assigned from platform Input from John: AHB_SINGLE, NOTI_ALL_DMA_WRIT, REM_MEM_SUPP, HBSTLEN, and INV_DESC_ENDIANNESS only apply in DMA mode and are ignored in slave mode operation. Sig

Re: [PATCH 1/3] usb: gadget: function: phonet: balance usb_ep_disable calls

2015-02-20 Thread Felipe Balbi
Hi, On Fri, Feb 20, 2015 at 10:15:52PM +0100, Pavel Machek wrote: > On Fri 2015-02-20 08:39:06, Felipe Balbi wrote: > > On Fri, Feb 20, 2015 at 09:27:51AM +0100, Pavel Machek wrote: > > > > > > > > > In current state I review all 3 patches as: > > > > > > > > > > > > > > > > > > Rejected-by: Pali

Re: [PATCH 1/3] usb: gadget: function: phonet: balance usb_ep_disable calls

2015-02-20 Thread Felipe Balbi
On Sat, Feb 21, 2015 at 01:14:00AM -0600, Felipe Balbi wrote: > Hi, > > On Fri, Feb 20, 2015 at 10:15:52PM +0100, Pavel Machek wrote: > > On Fri 2015-02-20 08:39:06, Felipe Balbi wrote: > > > On Fri, Feb 20, 2015 at 09:27:51AM +0100, Pavel Machek wrote: > > > > > > > > > > In current state I revie