Re: [PATCH v3 4/6] dt-bindings: Consolidate ChipIdea USB ci13xxx bindings

2015-06-01 Thread Ivan T. Ivanov
On Fri, 2015-05-29 at 11:38 -0500, Rob Herring wrote: > Combine the ChipIdea USB binding into a single document to reduce > duplication and fragmentation. This marks use of the old PHY bindings as > deprecated. Future compatible bindings should use generic PHY binding. > > Signed-off-by: Rob Herr

Re: [PATCH 7/9] xhci: remove XHCI_TRUST_TX_LENGTH quirk and handle it as default

2015-06-01 Thread Mathias Nyman
On 31.05.2015 09:44, Greg KH wrote: > On Fri, May 29, 2015 at 11:15:51AM -0300, Rodrigo Severo wrote: >> On Fri, May 29, 2015 at 11:01 AM, Mathias Nyman >> wrote: >>> Now including Renesas uPD720201 we got four xhci vendors that return >>> Success instead of short transfer when there are still uns

[PATCH v2 0/9] xhci features for usb next

2015-06-01 Thread Mathias Nyman
Hi Greg Second try These xhci patches for usb-next include Roger Quardros series allowing xhci to work nicely with OTG core. Other patches optimize resume time for xhci, and remove a common quirk that we can detect and handle by default. Changes since v1: Remove the if() statement for AMD quirks

[PATCH v2 1/9] usb: xhci: cleanup xhci_hcd allocation

2015-06-01 Thread Mathias Nyman
From: Roger Quadros HCD core allocates memory for HCD private data in usb_create_[shared_]hcd() so make use of that mechanism to allocate the struct xhci_hcd. Introduce struct xhci_driver_overrides to provide the size of HCD private data and hc_driver operation overrides. As of now we only need

[PATCH v2 7/9] xhci: remove XHCI_TRUST_TX_LENGTH quirk and handle it as default

2015-06-01 Thread Mathias Nyman
Now including Renesas uPD720201 we got four xhci vendors that return Success instead of short transfer when there are still unstraferred bytes left. The driver anyway checks the untransferred bytes and suggest adding the quirk if needed, so we can as well make it default behavior and get rid of the

[PATCH v2 4/9] usb: xhci: fix xhci locking up during hcd remove

2015-06-01 Thread Mathias Nyman
From: Roger Quadros The problem seems to be that if a new device is detected while we have already removed the shared HCD, then many of the xhci operations (e.g. xhci_alloc_dev(), xhci_setup_device()) hang as command never completes. I don't think XHCI can operate without the shared HCD as we'v

[PATCH v2 2/9] usb: xhci: plat: Create both HCDs before adding them

2015-06-01 Thread Mathias Nyman
From: Roger Quadros As xhci_hcd is now allocated by usb_create_hcd(), we don't need to add the primary HCD before creating the shared HCD. Creating the shared HCD before adding the primary HCD is particularly useful for the OTG use case so that we know at the OTG core if the HCD is in single con

[PATCH v2 5/9] usb: xhci: Fix suspend/resume when used with OTG core

2015-06-01 Thread Mathias Nyman
From: Roger Quadros In the OTG case, the controller might not yet have been added or is removed before the system suspends. Assign xhci->main_hcd during probe to prevent NULL pointer de-reference in xhci_suspend/resume(). Use the hcd->state flag to check if HCD is halted and if that is so do no

[PATCH v2 8/9] xhci: Return correct number of tranferred bytes for stalled control endpoints

2015-06-01 Thread Mathias Nyman
Fix the xhci driver from bluntly setting the transferred length to 0 if we get a STALL on anything else than the data stage of a control transfer. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xh

[PATCH v2 9/9] usb: host: xhci: remove incorrect comment about mutex

2015-06-01 Thread Mathias Nyman
From: Chris Bainbridge The comment stating that xhci_setup_device() is protected by the address mutex is not true since commit 6fecd4f2a58c ("USB: separate usb_address0 mutexes for each bus") as xhci handles two buses. Signed-off-by: Chris Bainbridge Signed-off-by: Mathias Nyman --- drivers/u

[PATCH v2 3/9] usb: xhci: Allow usb_add/remove_hcd() to be called repeatedly

2015-06-01 Thread Mathias Nyman
From: Roger Quadros Don't set xhci->shared_hcd to NULL in xhci_stop() as we have still not de-allocated it. It was resulting in a NULL pointer de-reference if usb_add/remove_hcd() is called repeatedly. We want repeated add/remove to work for the OTG use case. Signed-off-by: Roger Quadros Signe

[PATCH v2 6/9] xhci: optimize xhci bus resume time

2015-06-01 Thread Mathias Nyman
We used to write the root port state changes in turn for every port, sleeping 20ms after every port state change. Suspended usb2 ports need two state changes, taking minimun 40ms per port. Now instead poll the Port Link State Change (PLC) bit as the state change to U0 will set this bit. Suspended

Re: [cdc_ncm] guidance and help refactoring cdc_ncm

2015-06-01 Thread Oliver Neukum
On Mon, 2015-06-01 at 08:53 +0200, Enrico Mioso wrote: > A 32-bit version of the driver (talking 32-bit NCM) is here: > http://www.gstorm.eu/cdc_ncm.c > I modified the original driver with the help of a very talented friend. > It works: but there seem to be no real reasons to implement this proper

Re: [cdc_ncm] guidance and help refactoring cdc_ncm

2015-06-01 Thread Enrico Mioso
Thank you Oliver for the reply. On Mon, 1 Jun 2015, Oliver Neukum wrote: ==Date: Mon, 1 Jun 2015 09:48:26 ==From: Oliver Neukum ==To: Enrico Mioso ==Cc: Greg KH , linux-usb@vger.kernel.org, ==net...@vger.kernel.org, you...@gmail.com ==Subject: Re: [cdc_ncm] guidance and help refactoring cd

Re: [PATCH v4 1/2] phy-sun4i-usb: Add full support for usb0 phy / OTG

2015-06-01 Thread Maxime Ripard
On Sun, May 31, 2015 at 06:10:25PM +0200, Hans de Goede wrote: > + /* We either want both gpio pins or neither (when in host mode) */ > + if (!data->id_det_gpio != !data->vbus_det_gpio) { > + dev_err(dev, "failed to get id or vbus detect pin\n"); > + return -ENODEV;

Re: [PATCH v4 1/2] phy-sun4i-usb: Add full support for usb0 phy / OTG

2015-06-01 Thread Hans de Goede
Hi, On 01-06-15 11:22, Maxime Ripard wrote: On Sun, May 31, 2015 at 06:10:25PM +0200, Hans de Goede wrote: + /* We either want both gpio pins or neither (when in host mode) */ + if (!data->id_det_gpio != !data->vbus_det_gpio) { + dev_err(dev, "failed to get id or vbus

Re: [RFC PATCH 2/2] usb: dwc3: Add chained TRB support for ep0

2015-06-01 Thread Kishon Vijay Abraham I
Hi Felipe, On Friday 06 February 2015 08:18 PM, Felipe Balbi wrote: Hi, On Fri, Feb 06, 2015 at 05:25:35PM +0530, Kishon Vijay Abraham I wrote: dwc3 can do only max packet aligned transfers. So in case request length is not max packet aligned and is bigger than DWC3_EP0_BOUNCE_SIZE two chained

Re: [cdc_ncm] guidance and help refactoring cdc_ncm

2015-06-01 Thread Oliver Neukum
On Mon, 2015-06-01 at 10:24 +0200, Enrico Mioso wrote: > We are failing on some cases only because of the position we put the > NDP part > of the NCM frame. Infact, this 32-bit driver will work when the 16 bit > one > does, and fail when the 16 bit one does. I think the discussion would benefit

Re: [PATCH] usb: isp1760: fix null dereference if kzalloc returns null

2015-06-01 Thread Sergei Shtylyov
Hello. On 6/1/2015 1:41 AM, Colin Ian King wrote: From: Colin Ian King If kzalloc returns null then isp1760_ep_alloc_request performs a null pointer deference on req. Dereference, not "deference". Shall I send v2 for this stupid typo then? Definitely, especially as your chang

Re: [cdc_ncm] guidance and help refactoring cdc_ncm

2015-06-01 Thread Enrico Mioso
Thank you Oliver, thank you all for reading this thread and the attention. For a more detailed discussion and how we got here, you might google for the thread: "Is this 32-bit NCM?" and "Is this 32-bit NCM?y" (follow up). Where the "y" letter comes from a mistake of mine. The specification does o

Re: [cdc_ncm] guidance and help refactoring cdc_ncm

2015-06-01 Thread Oliver Neukum
On Mon, 2015-06-01 at 13:41 +0200, Enrico Mioso wrote: > Thank you Oliver, thank you all for reading this thread and the attention. > For a more detailed discussion and how we got here, you might google for the > thread: > "Is this 32-bit NCM?" > and > "Is this 32-bit NCM?y" (follow up). > Where t

Re: [cdc_ncm] guidance and help refactoring cdc_ncm

2015-06-01 Thread Enrico Mioso
On Mon, 1 Jun 2015, Oliver Neukum wrote: ==Date: Mon, 1 Jun 2015 14:00:22 ==From: Oliver Neukum ==To: Enrico Mioso ==Cc: you...@gmail.com, Greg KH , linux-usb@vger.kernel.org, ==net...@vger.kernel.org ==Subject: Re: [cdc_ncm] guidance and help refactoring cdc_ncm == ==On Mon, 2015-06-01 at

Re: [PATCH 1/1] usb: Remove Vernier devices from lsusb and hid_ignore_list

2015-06-01 Thread Jiri Kosina
On Sun, 31 May 2015, Dennis O'Brien wrote: > From: Dennis O'Brien > > Removes Vernier Software & Technology devices from the ldusb > driver and the hid_ignore_list table of the usbhid driver in the > Linux tree. These devices will now be supported via the hidraw > driver. > > A user space driv

Re: [PATCHv3 1/4] phy: phy-core: Make GENERIC_PHY an invisible option

2015-06-01 Thread Kishon Vijay Abraham I
Hi, On Friday 29 May 2015 08:34 PM, Felipe Balbi wrote: Hi, On Fri, May 29, 2015 at 05:04:38PM +0530, Kishon Vijay Abraham I wrote: Hi Felipe, On Wednesday 27 May 2015 12:09 AM, Felipe Balbi wrote: On Tue, May 26, 2015 at 11:37:17AM -0700, Arun Ramamurthy wrote: Hi On 15-05-26 07:19 AM, Fe

Re: [hid:for-next 63/64] drivers/hid/hid-logitech-hidpp.c:1504:46: error: 'HIDPP_QUIRK_MULTI_INPUT' undeclared here (not in a function)

2015-06-01 Thread Jiri Kosina
On Mon, 1 Jun 2015, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git for-next > head: 856bfcac85d56f45bc24439eb236d9faeb84970a > commit: 1fb1c98e3be33a119e2b1dff03786ec356546d0e [63/64] Merge branch > 'for-4.2/logitech' into for-next > config: i386-

Re: [PATCH][V2] usb: isp1760: fix null dereference if kzalloc returns null

2015-06-01 Thread Sergei Shtylyov
Hello. On 6/1/2015 1:43 AM, Colin King wrote: From: Colin Ian King If kzalloc returns null then isp1760_ep_alloc_request performs a null pointer dereference on req. Check for null to avoid this. I told you there's no dereference and yet you're repeating it again. :-( Detected with sm

Re: [PATCH 1/1] USB-SERIAL : Changing usb_serial_generic_open prototype

2015-06-01 Thread Johan Hovold
On Sat, May 30, 2015 at 06:47:20PM +0530, Abhishek Bist wrote: > While designing a usb to uart converter driver open function I am using > usb_serial_generic_open, but wouldn't find need to pass tty as an argument. > As it is not performing any task for further significance. > So, This patch

Re: [PATCH] USB: serial: Use setup_timer

2015-06-01 Thread Johan Hovold
On Mon, Jun 01, 2015 at 06:41:57AM +0530, Vaishali Thakkar wrote: > Use the timer API function setup_timer instead of structure field > assignments to initialize a timer. > > A simplified version of the Coccinelle semantic patch that performs > this transformation is as follows: > > @change@ > ex

Re: Fwd: Add capacity to disable usb port at boot parameter

2015-06-01 Thread Alan Stern
On Sun, 31 May 2015, Quentin Deldycke wrote: > Hi, > > On a asrock Z97 Extreme 6 motherboard, the system provides: > - 6 usb3 port in backplate > - 1 usb (2-3? i don't know) port on the board near power switch > - 2 usb sockets (to be used with brackets) on the board near power switch >- i

Re: [PATCH 3/6] xhci: probe phy before add usb_hcd

2015-06-01 Thread Yingjoe Chen
On Wed, 2015-05-27 at 07:18 -0500, Felipe Balbi wrote: > On Wed, May 27, 2015 at 07:48:00PM +0800, chunfeng@mediatek.com wrote: > > From: Chunfeng Yun > > > > find the phy driver before add primary usb_hcd to avoid acessing > > xHCI register which may hangup the system when the phy is not loa

[PATCH] usb: buffer: fix 2 coding style issues

2015-06-01 Thread Kris Borer
Fixed two coding style issues: sizeof parens and newline after declaration Signed-off-by: Kris Borer --- drivers/usb/core/buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index 506b969..89f2e77 100644 --- a/drive

Re: [PATCH 3/6] xhci: probe phy before add usb_hcd

2015-06-01 Thread Mathias Nyman
On 01.06.2015 17:52, Yingjoe Chen wrote: > On Wed, 2015-05-27 at 07:18 -0500, Felipe Balbi wrote: >> On Wed, May 27, 2015 at 07:48:00PM +0800, chunfeng@mediatek.com wrote: >>> From: Chunfeng Yun >>> >>> find the phy driver before add primary usb_hcd to avoid acessing >>> xHCI register which ma

Re: [PATCH 4/6] usb: phy: add usb3.0 phy driver for mt65xx SoCs

2015-06-01 Thread Felipe Balbi
On Wed, May 27, 2015 at 07:48:01PM +0800, chunfeng@mediatek.com wrote: > From: Chunfeng Yun > > Signed-off-by: Chunfeng Yun no commit log => no commit, sorry. And it's too late for v4.2. I'll defer this until v4.3 -- balbi signature.asc Description: Digital signature

[GIT PULL] USB patches for v4.2 merge window

2015-06-01 Thread Felipe Balbi
Hi Greg, Here's my giant pull request for v4.2 merge window. This time "only" 96 non-merge commits. The important stuff is listed below. Let me know if you require any changes to the pull request. cheers The following changes since commit b787f68c36d49bb1d9236f403813641efa74a031: Linux 4.1-

Re: usb: gadget: f_fs: O_NONBLOCK waits MAX_SCHEDULE_TIMEOUT

2015-06-01 Thread Baxter, Jim
> > FunctionFS is very specific, because read/write operations are > directly translated into USB requests, which are asynchronous, so > you cannot use O_NONBLOCK. > > If you need non-blocking API you can use Asynchronous I/O (AIO). You > can find some examples in kernel

Re: [PATCH v5 00/22] usb: third series of updates for dwc2 driver

2015-06-01 Thread John Youn
On 5/26/2015 8:21 AM, Felipe Balbi wrote: > On Tue, May 26, 2015 at 03:18:32PM +, Kaukab, Yousaf wrote: >>> -Original Message- >>> From: Felipe Balbi [mailto:ba...@ti.com] >>> Sent: Tuesday, May 26, 2015 11:12 PM >>> To: Heiko Stuebner >>> Cc: Kaukab, Yousaf; linux-usb@vger.kernel.org;

Re: [PATCH v4 0/2] Remaining sunxi musb patches

2015-06-01 Thread Felipe Balbi
On Mon, Jun 01, 2015 at 11:30:45AM -0700, Hans de Goede wrote: > Hi, > > On Sunday, May 31, 2015 at 6:10:32 PM UTC+2, Hans de Goede wrote: > > > > Hi Kishon & Felipe, > > > > Here is an updated version of the remaining (not yet merged in Felipe's > > tree) > > sunxi musb patches. > > > > The "

Re: [PATCH v5 00/22] usb: third series of updates for dwc2 driver

2015-06-01 Thread Felipe Balbi
On Mon, Jun 01, 2015 at 06:16:03PM +, John Youn wrote: > On 5/26/2015 8:21 AM, Felipe Balbi wrote: > > On Tue, May 26, 2015 at 03:18:32PM +, Kaukab, Yousaf wrote: > >>> -Original Message- > >>> From: Felipe Balbi [mailto:ba...@ti.com] > >>> Sent: Tuesday, May 26, 2015 11:12 PM > >>>

Re: [PATCHv3 1/4] phy: phy-core: Make GENERIC_PHY an invisible option

2015-06-01 Thread Felipe Balbi
On Mon, Jun 01, 2015 at 06:22:41PM +0530, Kishon Vijay Abraham I wrote: > Hi, > > On Friday 29 May 2015 08:34 PM, Felipe Balbi wrote: > >Hi, > > > >On Fri, May 29, 2015 at 05:04:38PM +0530, Kishon Vijay Abraham I wrote: > >>Hi Felipe, > >> > >>On Wednesday 27 May 2015 12:09 AM, Felipe Balbi wrote:

Re: [RFC PATCH 2/2] usb: dwc3: Add chained TRB support for ep0

2015-06-01 Thread Felipe Balbi
Hi, On Mon, Jun 01, 2015 at 03:23:48PM +0530, Kishon Vijay Abraham I wrote: > >>+ transferred = transfer_size - length; > >>+ buf = (u8 *)buf + transferred; > >>+ ur->actual += transferred; > > > >this is dangerous. The extra size is because you *must* align OUT to >

[PATCH 4/5] USB: bcma: add bcm53xx support

2015-06-01 Thread Hauke Mehrtens
The Broadcom ARM SoCs with this usb core need a different initialization and they have a different core id. This patch adds support for these USB 2.0 core. Signed-off-by: Felix Fietkau Signed-off-by: Hauke Mehrtens --- drivers/usb/host/bcma-hcd.c | 71 +++

[PATCH 2/5] USB: bcma: replace numbers with constants

2015-06-01 Thread Hauke Mehrtens
The constants for these numbers were added long time ago, use them. Signed-off-by: Hauke Mehrtens --- drivers/usb/host/bcma-hcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/bcma-hcd.c b/drivers/usb/host/bcma-hcd.c index 976b4e1..b4ec4ec 100644 --- a/dr

[PATCH 5/5] USB: bcma: add support for controlling bus power through GPIO

2015-06-01 Thread Hauke Mehrtens
On some boards a GPIO is needed to activate USB controller. Make it possible to specify such a GPIO in device tree. Signed-off-by: Felix Fietkau Signed-off-by: Hauke Mehrtens --- drivers/usb/host/bcma-hcd.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/us

[PATCH 1/5] USB: bcma: remove chip id check

2015-06-01 Thread Hauke Mehrtens
I have never seen any bcma device with an USB host core which was not a SoC, the bcma devices have an USB device core with a different core id. Some SoC have IDs with 47XX and 53XX in decimal form which would be rejected by this check. Instead of fixing this check just remove it. Signed-off-by: Ha

[PATCH 3/5] USB: bcma: use devm_kzalloc

2015-06-01 Thread Hauke Mehrtens
Instead of manually handling the frees use devm. There was also a free missing in the unregister call which is not needed with devm. Signed-off-by: Hauke Mehrtens --- drivers/usb/host/bcma-hcd.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/bcma

[PATCH 2/2] Bluetooth: btusb: Add reset_resume function

2015-06-01 Thread Laura Abbott
Some USB hubs may lose power across suspend/resume. Add a reset_resume callback to properly reset those bluetoot devices. Signed-off-by: Laura Abbott --- Now the setup function is called again with the HCI_RESET_RESUME flag set. The various functions could then use that RESET_RESUME flag to dete

[PATCH 1/2] Bluetooth: Add reset_resume function

2015-06-01 Thread Laura Abbott
Bluetooth devices off of some buses such as USB may lose power across suspend/resume. When this happens, drivers may need to have the setup function called again and behave differently than a cold power on. Add a reset_resume function for drivers to call. During the reset_resume case, the flag HCI_

Re: [PATCH 1/2] Bluetooth: Add reset_resume function

2015-06-01 Thread Marcel Holtmann
Hi Laura, > Bluetooth devices off of some buses such as USB may lose power across > suspend/resume. When this happens, drivers may need to have the setup > function called again and behave differently than a cold power on. > Add a reset_resume function for drivers to call. During the > reset_resum

Re: [PATCH 2/2] Bluetooth: btusb: Add reset_resume function

2015-06-01 Thread Marcel Holtmann
Hi Laura, > Some USB hubs may lose power across suspend/resume. > Add a reset_resume callback to properly reset those bluetoot devices. > > Signed-off-by: Laura Abbott > --- > Now the setup function is called again with the HCI_RESET_RESUME > flag set. The various functions could then use that R

patch "usb: phy: Allow compile test of GPIO consumers if !GPIOLIB" added to usb-next

2015-06-01 Thread gregkh
This is a note to let you know that I've just added the patch titled usb: phy: Allow compile test of GPIO consumers if !GPIOLIB to my usb git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git in the usb-next branch. The patch will show up in the nex

Re: [GIT PULL] USB patches for v4.2 merge window

2015-06-01 Thread Greg KH
On Mon, Jun 01, 2015 at 11:21:52AM -0500, Felipe Balbi wrote: > Hi Greg, > > Here's my giant pull request for v4.2 merge window. > > This time "only" 96 non-merge commits. The important > stuff is listed below. > > Let me know if you require any changes to the pull request. > > cheers > > The

RE: usb: gadget: f_fs: O_NONBLOCK waits MAX_SCHEDULE_TIMEOUT

2015-06-01 Thread Peter Chen
> > Thank you, that sounds like the best approach. > In this case I think perhaps the long wait without any data is an > problem with the imx6 Chipidea USB controller. > >>> > >>> What's the possible problem? > >> > >> Sorry for the delay in replying, I have been getting some

Re: [PATCH 3/6] xhci: probe phy before add usb_hcd

2015-06-01 Thread Roger Quadros
Mathias. On 01/06/15 18:17, Mathias Nyman wrote: On 01.06.2015 17:52, Yingjoe Chen wrote: On Wed, 2015-05-27 at 07:18 -0500, Felipe Balbi wrote: On Wed, May 27, 2015 at 07:48:00PM +0800, chunfeng@mediatek.com wrote: From: Chunfeng Yun find the phy driver before add primary usb_hcd to av

[RFC cdc_ncm] introducing allocation mode

2015-06-01 Thread Enrico Mioso
First of all - hello everyone, and thank you for the help. I am here to learn something - so I am happy about having the opportunity of discussing this with you. I am a newbie in development, sure. On Mon, 1 Jun 2015, Oliver Neukum wrote: ==Date: Mon, 1 Jun 2015 14:00:22 ==From: Oliver Neukum =

Re: [PATCH 3/5] USB: bcma: use devm_kzalloc

2015-06-01 Thread Rafał Miłecki
On 2 June 2015 at 00:13, Hauke Mehrtens wrote: > @@ -239,10 +240,8 @@ static int bcma_hcd_probe(struct bcma_device *dev) > ohci_addr = 0x18009000; > > usb_dev->ohci_dev = bcma_hcd_create_pdev(dev, true, ohci_addr); > - if (IS_ERR(usb_dev->ohci_dev)) { > -

Re: [PATCH 4/5] USB: bcma: add bcm53xx support

2015-06-01 Thread Rafał Miłecki
On 2 June 2015 at 00:13, Hauke Mehrtens wrote: > @@ -159,6 +160,56 @@ static void bcma_hcd_init_chip(struct bcma_device *dev) > } > } > > +static void bcma_hcd_init_chip_arm(struct bcma_device *dev) > +{ > + struct bcma_device *arm_core; > + void __iomem *dmu; > + u32 va