Re: [PATCH] Add support for usbfs zerocopy.

2015-12-22 Thread Alan Stern
On Tue, 22 Dec 2015, Oliver Neukum wrote: > On Tue, 2015-12-22 at 01:12 +0100, Steinar H. Gunderson wrote: > > On Tue, Dec 15, 2015 at 03:32:45PM +, David Laight wrote: > > > That still isn't entirely correct. > > > > > > Someone with more knowledge than either of us has needs to sort out >

Re: [PATCH v3] usb: dwc3: gadget: handle request->zero

2015-12-22 Thread John Youn
On 12/22/2015 9:31 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >> On 12/3/2015 7:18 AM, Felipe Balbi wrote: >>> So far, dwc3 has always missed request->zero >>> handling for every endpoint. Let's implement >>> that so we can handle cases where transfer must >>>

Re: [PATCH] usb: gadget: rndis: fix itnull.cocci warnings

2015-12-22 Thread Felipe Balbi
Hi, Julia Lawall writes: > On Tue, 22 Dec 2015, Felipe Balbi wrote: > >> Julia Lawall writes: >> >> > The index variable of list_for_each_entry_safe is never NULL. >> > >> > Generated by: scripts/coccinelle/iterators/itnull.cocci >> > >> > CC:

Re: [PATCH] usb: option.c: Fix Cinterion AHxx enumeration.

2015-12-22 Thread Johan Hovold
[ +CC: linux-usb ] On Tue, Dec 22, 2015 at 10:51:32AM +, John Ernberg wrote: > From: John Ernberg > > In certain kernel configurations where the cdc_ether and option drivers > are compiled as modules there can occur a race condition in enumeration. > This causes the

[PATCH] usb: dwc3: gadget: don't send extra ZLP

2015-12-22 Thread John Youn
If the request->length is zero, a ZLP should already be sent due to that and another ZLP is not needed to terminate the transfer. Signed-off-by: John Youn --- drivers/usb/dwc3/gadget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v3 9/9] phy: omap-usb2: use *syscon* framework API to power on/off the PHY

2015-12-22 Thread Rob Herring
On Sun, Dec 20, 2015 at 6:07 AM, Kishon Vijay Abraham I wrote: > Hi Rob, > > On Sunday 20 December 2015 09:09 AM, Rob Herring wrote: >> On Tue, Dec 15, 2015 at 02:46:08PM +0530, Kishon Vijay Abraham I wrote: >>> Deprecate using phy-omap-control driver to power on/off the PHY, >>>

Re: [PATCH v3] usb: dwc3: gadget: handle request->zero

2015-12-22 Thread Alan Stern
On Tue, 22 Dec 2015, John Youn wrote: > >> The following fixes it: > >> > >> - if (ret == 0 && request->zero && (request->length % ep->maxpacket > >> == 0)) > >> + if (ret == 0 && request->zero && (request->length % ep->maxpacket > >> == 0) && > >> + (request->length !=

[PATCH 2/2] USB: EHCI: add a delay when unlinking an active QH

2015-12-22 Thread Alan Stern
Michael Reutman reports that an AMD/ATI EHCI host controller on one of his computers does not stop transferring data when an active bulk QH is unlinked from the async schedule. Apparently that host controller fails to implement the IAA mechanism correctly when an active QH is unlinked. This

[PATCH 1/2] USB: EHCI: store reason for unlinking a QH

2015-12-22 Thread Alan Stern
This patch replaces the "exception" bitflag in the ehci_qh structure with a more explicit "unlink_reason" bitmask. This is for use in the following patch, where we will need to have a good idea of the reason for unlinking a QH, not just "something exceptional happened". Signed-off-by: Alan Stern

RE: [PATCH 0/7][v4] Add OTG support for FSL socs

2015-12-22 Thread Felipe Balbi
Hi, Ramneek Mehresh writes: >> -Original Message- >> From: Felipe Balbi [mailto:ba...@ti.com] >> Sent: Saturday, October 10, 2015 3:04 AM >> To: Mehresh Ramneek-B31383 ; linux- >> ker...@vger.kernel.org >> Cc:

Re: [PATCH v3] usb: dwc3: gadget: handle request->zero

2015-12-22 Thread Felipe Balbi
Hi, John Youn writes: > On 12/22/2015 9:31 AM, Felipe Balbi wrote: >> >> Hi, >> >> John Youn writes: >>> On 12/3/2015 7:18 AM, Felipe Balbi wrote: So far, dwc3 has always missed request->zero handling for every endpoint. Let's

Re: [PATCH v5] extcon: add Maxim MAX3355 driver

2015-12-22 Thread Chanwoo Choi
On 2015년 12월 22일 20:15, Sergei Shtylyov wrote: > Hello. > > On 12/22/2015 4:13 AM, Chanwoo Choi wrote: > >> This patch depend on GPIOLIB configuration as following: >> I modified it with following diff and applied it. >> >> diff --git a/drivers/extcon/Kconfig

libusbg-neXt (libusbgx) v0.1.0 finally released!

2015-12-22 Thread Krzysztof Opasiak
Hello, This is just a note to let you know that v0.1.0 of libusbg-neXt[1] has been just released. In the beginning the library was developed as a github fork[2] of libusbg[3] with many patches sent to Matt and pull requests to mianline repository. Unfortunately libusbg project seems to be

Re: [PATCH v3] usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller

2015-12-22 Thread Rob Herring
On Mon, Dec 21, 2015 at 06:40:04PM +0900, Yoshihiro Shimoda wrote: > R-Car H3 has USB3.0 peripheral controllers. This controller's has the > following features: > - Supports super, high and full speed > - Contains 30 pipes for bulk or interrupt transfer > - Contains dedicated DMA controller >

[PATCH v2 3/3 RESEND] USB: serial: cp210x: New register access functions for large registers

2015-12-22 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change switches large register access to use new block functions. The old functions are removed because now they become unused. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c |

[PATCH v2 1/3 RESEND] USB: serial: cp210x: New 16-bit register access functions.

2015-12-22 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 16-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 155

[PATCH v2 2/3 RESEND] USB: serial: cp210x: New 8-bit and 32-bit register access functions.

2015-12-22 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 8 and 32-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 92

Re: [patch] usb: gadget: f_midi: missing unlock on error path

2015-12-22 Thread SF Markus Elfring
> We added a new error path to this function and we forgot to drop the lock. > > Fixes: e1e3d7ec5da3 ('usb: gadget: f_midi: pre-allocate IN requests') > Signed-off-by: Dan Carpenter > > diff --git a/drivers/usb/gadget/function/f_midi.c >

Re: [PATCH 2/3] usb: phy-generic: register a struct phy device

2015-12-22 Thread Uwe Kleine-König
On Tue, Dec 22, 2015 at 12:06:14PM -0600, Felipe Balbi wrote: > Uwe Kleine-König writes: > > > This is needed to let the omap3 otg controller make use of a generic > > usb-nop-xceiv phy. > > missing SoB If this is your only concern I will happily resend the

Re: [PATCH 2/3] usb: phy-generic: register a struct phy device

2015-12-22 Thread Felipe Balbi
Hi, Uwe Kleine-König writes: > On Tue, Dec 22, 2015 at 12:06:14PM -0600, Felipe Balbi wrote: >> Uwe Kleine-König writes: >> >> > This is needed to let the omap3 otg controller make use of a generic >> > usb-nop-xceiv phy. >> >>

[PATCH 3/3] usb: r8a66597: add locking to r8a66597_check_detect_child

2015-12-22 Thread Heiner Kallweit
Use mutex usb_bus_idr_lock to protect idr_find. Signed-off-by: Heiner Kallweit --- drivers/usb/host/r8a66597-hcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index 1ef8873..bfa7fa3 100644 ---

[PATCH 1/3] usb: core: switch bus numbering to using idr

2015-12-22 Thread Heiner Kallweit
USB bus numbering is based on directly dealing with bitmaps and defines a separate list of busses. This can be simplified and unified by using existing idr functionality. Signed-off-by: Heiner Kallweit --- drivers/usb/core/devices.c | 10 ++

[PATCH 2/3] usb: core: rename mutex usb_bus_list_lock to usb_bus_idr_lock

2015-12-22 Thread Heiner Kallweit
Now that usb_bus_list has been removed and switched to idr rename the related mutex accordingly. Signed-off-by: Heiner Kallweit --- drivers/usb/core/devices.c | 6 +++--- drivers/usb/core/hcd.c | 30 +++--- drivers/usb/core/hub.c | 4 ++--

Re: [PATCH 2/3] usb: phy-generic: register a struct phy device

2015-12-22 Thread Felipe Balbi
Uwe Kleine-König writes: > This is needed to let the omap3 otg controller make use of a generic > usb-nop-xceiv phy. missing SoB -- balbi signature.asc Description: PGP signature

Re: [PATCH 8/9] usb: gadget: rndis: use list_for_each_entry_safe

2015-12-22 Thread Felipe Balbi
Hi, Geliang Tang writes: > Use list_for_each_entry_safe() instead of list_for_each_safe() to > simplify the code. > > Signed-off-by: Geliang Tang there are other cleanups in this patch which shouldn't be here. Please split and I'll apply for v4.6

Re: [PATCH] usb: gadget: rndis: fix itnull.cocci warnings

2015-12-22 Thread Felipe Balbi
Julia Lawall writes: > The index variable of list_for_each_entry_safe is never NULL. > > Generated by: scripts/coccinelle/iterators/itnull.cocci > > CC: Geliang Tang > Signed-off-by: Fengguang Wu > Signed-off-by: Julia Lawall

MX28 with hub cannot reset

2015-12-22 Thread Fabio Estevam
Hi, On a mx28 custom board with a USB hub I can get a USB stick to get detected after applying this change: http://marc.info/?l=linux-usb=145079935324339=2 Things work fine if I boot without the USB stick connected. Then I can insert/remove the USB device and it always gets detected. However,

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-22 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] [...] > It is clear to me that you cannot get away with using the same operation > for resume() and reset_resume() in your driver. It is fundamentally > impossible. Firmware cannot fix it. I would think how to fix it. > Sorry for the length of the

RE: [PATCH 0/7][v4] Add OTG support for FSL socs

2015-12-22 Thread Jun Li
Hi > -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of Felipe Balbi > Sent: Wednesday, December 23, 2015 2:21 AM > To: Ramneek Mehresh ; linux- > ker...@vger.kernel.org > Cc:

[PATCH] usb: dwc3: of-simple: fix build warning on !PM

2015-12-22 Thread Felipe Balbi
if we have a !PM kernel build, our runtime suspend/resume callbacks will be left defined but unused. Add a ifdef CONFIG_PM guard. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-of-simple.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v2 0/2] USB-FHCI: Use return type "int" for two functions

2015-12-22 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 22 Dec 2015 16:43:12 +0100 Another update suggestion was taken into account after a patch was applied from static source code analysis. Markus Elfring (2): Use a signed return type for fhci_create_ep() Use a signed return type

Re: [PATCH v2 0/3] USB: add generic onboard USB HUB driver

2015-12-22 Thread Alan Stern
On Tue, 22 Dec 2015, Peter Chen wrote: > > I don't really understand this. However, you can always specify a USB > > device by giving its port number on the parent hub, and the hub's port > > number on _its_ parent hub, and so on back to the root hub and host > > controller. That works even if

Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-22 Thread Oliver Neukum
On Tue, 2015-12-22 at 09:48 +, Hayes Wang wrote: > Peter Wu [mailto:pe...@lekensteyn.nl] > > Sent: Tuesday, December 08, 2015 10:33 PM > [...] > > I found another problem with runtime PM. When a device is suspended via > > autosuspend and a system suspend takes place, there is no network I/O

Re: [PATCH v5] extcon: add Maxim MAX3355 driver

2015-12-22 Thread Sergei Shtylyov
Hello. On 12/22/2015 4:13 AM, Chanwoo Choi wrote: This patch depend on GPIOLIB configuration as following: I modified it with following diff and applied it. diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig index ba4db7d..3d89e60 100644 --- a/drivers/extcon/Kconfig +++

RE: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-22 Thread Hayes Wang
Peter Wu [mailto:pe...@lekensteyn.nl] > Sent: Tuesday, December 08, 2015 10:33 PM [...] > I found another problem with runtime PM. When a device is suspended via > autosuspend and a system suspend takes place, there is no network I/O > after resume. Triggering a renegotiation (ethtool -r eth1)

Re: USB 3 XHCI Host Controller in Ubuntu

2015-12-22 Thread Andor J Kiss
Hi Mathias, Ok, good to know. How do I add to the quirk list? I contacted SP, they dn't understand how Linux works (told me to update my drivers ). Anyway, maybe I'll look into the USB analyzer. Will a virtual one work, or does one need a hardware device? Regards, Andor On Tue,

Re: USB 3 XHCI Host Controller in Ubuntu

2015-12-22 Thread Mathias Nyman
On 21.12.2015 19:39, Andor J Kiss wrote: Hi Mathias, Yes, native support for the graphics is in Kernel 4.3, not 4.2 (Intel South Lake HD520 chipset). I gather there's been a bit of shoehorning to get 4.2 to work with this board. 4.3 should be in Ubuntu 16.04 (next upgrade - few

[PATCH v2 1/2] USB-FHCI: Use a signed return type for fhci_create_ep()

2015-12-22 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 22 Dec 2015 16:10:14 +0100 The return type "u32" was used by the fhci_create_ep() function even though it will eventually return a negative error code. Improve this implementation detail by using the type "int" instead. This issue

[PATCH v2 2/2] USB-FHCI: Use a signed return type for endpoint_zero_init()

2015-12-22 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 22 Dec 2015 16:24:46 +0100 The return type "u32" was used by the endpoint_zero_init() function even though it can return a value which corresponds to a negative error code from a call of the fhci_create_ep() function. Improve this

[PATCH 1/2] usb: gadget: f_midi: refactor state machine

2015-12-22 Thread Felipe F. Tonello
This refactor includes the following: * Cleaner state machine code; * Reset state if MIDI message parsed is non-conformant; * Fixed bug when a conformant MIDI message was followed by a non-conformant causing the MIDI-USB message to use old temporary data (port->data[0..1]), thus packing a

Re: [patch] usb: gadget: f_midi: missing unlock on error path

2015-12-22 Thread Felipe Ferreri Tonello
Hi Dan, On 21/12/15 13:20, Dan Carpenter wrote: > We added a new error path to this function and we forgot to drop the > lock. > > Fixes: e1e3d7ec5da3 ('usb: gadget: f_midi: pre-allocate IN requests') > Signed-off-by: Dan Carpenter > > diff --git

[PATCH 2/2] usb: gadget: f_midi: added spinlock on transmit function

2015-12-22 Thread Felipe F. Tonello
Since f_midi_transmit is called by both ALSA and USB frameworks, it can potentially cause a race condition between both calls. This is bad because the way f_midi_transmit is implemented can't handle concurrent calls. This is due to the fact that the usb request fifo looks for the next element and

[PATCH] chipidea: imx: Enable PM runtime for mx28

2015-12-22 Thread Fabio Estevam
On a custom mx28 board that has a USB hub we see the following error: hub 1-1:1.0: USB hub found hub 1-1:1.0: 2 ports detected usb 1-1: USB disconnect, device number 2 usb usb1-port1: cannot reset (err = -32) usb usb1-port1: cannot reset (err = -32) usb usb1-port1: cannot reset (err = -32) usb

Re: USB 3 XHCI Host Controller in Ubuntu

2015-12-22 Thread Mathias Nyman
On 22.12.2015 14:16, Andor J Kiss wrote: Hi Mathias, Ok, good to know. How do I add to the quirk list? Once we got code to workaround the issue we can name a quirk for it. Then in drivers/usb/core/quirks.c we set the quirk based on device/vendor ID of the device. But we are not there

Re: [linux-usb-users] g_serial is not working in rx path (K3.14)

2015-12-22 Thread Ramajayam S
On Mon, Dec 14, 2015 at 11:17 PM, Ramajayam S wrote: > On Mon, Dec 14, 2015 at 9:50 PM, Felipe Balbi wrote: >> >> hi, >> >> Ramajayam S writes: >>> Hi >>>We are trying to enable g_serial in Intel platform and facing >>>

Re: [PATCH 1/2] usb: gadget: f_midi: refactor state machine

2015-12-22 Thread Clemens Ladisch
Felipe F. Tonello wrote: > This refactor includes the following: > * Cleaner state machine code; It does not correctly handle system real time messages inserted between the status and data bytes of other messages. > * Reset state if MIDI message parsed is non-conformant; Why? In a byte

Re: [PATCH v3] usb: dwc3: gadget: handle request->zero

2015-12-22 Thread Felipe Balbi
Hi, John Youn writes: > On 12/3/2015 7:18 AM, Felipe Balbi wrote: >> So far, dwc3 has always missed request->zero >> handling for every endpoint. Let's implement >> that so we can handle cases where transfer must >> be finished with a ZLP. >> >> Note that dwc3 is a

Re: [PATCH 1/2] usb: gadget: f_midi: refactor state machine

2015-12-22 Thread Felipe Balbi
Hi, "Felipe F. Tonello" writes: > This refactor includes the following: > * Cleaner state machine code; > * Reset state if MIDI message parsed is non-conformant; > * Fixed bug when a conformant MIDI message was followed by a non-conformant >causing the MIDI-USB

[PATCH] usb: core: devio.c: Removed unnecessary space

2015-12-22 Thread Chase Metzger
Removed an unnecessary space between a function name and arguments. Signed-off-by: Chase Metzger --- drivers/usb/core/devio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 38ae877c..0bcd45e

Re: [PATCH] usb: gadget: rndis: fix itnull.cocci warnings

2015-12-22 Thread Julia Lawall
On Tue, 22 Dec 2015, Felipe Balbi wrote: > Julia Lawall writes: > > > The index variable of list_for_each_entry_safe is never NULL. > > > > Generated by: scripts/coccinelle/iterators/itnull.cocci > > > > CC: Geliang Tang > > Signed-off-by: Fengguang