Re: [PATCH 2/6] usb: core: TPL should apply for both OTG and EH

2014-08-22 Thread Peter Chen
On Mon, Aug 11, 2014 at 11:25:44AM +0530, Pratyush Anand wrote: > Hi Peter, > > On Thu, Aug 07, 2014 at 02:45:15PM +0800, Peter Chen wrote: > > According to On-The-Go and Embedded Host Supplement to the USB Revision > > 2.0 Specification, the targeted hosts (non-PC hosts) include both > > embedded

[PATCH 1/1] HID: usbhid: add usb_clear_halt determination for next hid_start_in

2014-08-22 Thread CheChun Kuo
HID IR device will not response to any command send from host when it is finishing paring and tring to reset itself. During this period of time, usb_cleaer_halt will be fail and if hid_start_in soon again, we has the possibility trap in infinite loop. Signed-off-by: CheChun Kuo --- dri

Re: [PATCH 1/1] HID: usbhid: add usb_clear_halt determination for next hid_start_in

2014-08-22 Thread Jiri Kosina
On Fri, 22 Aug 2014, CheChun Kuo wrote: > HID IR device will not response to any command send from host when > it is finishing paring and tring to reset itself. During this period of > time, usb_cleaer_halt will be fail and if hid_start_in soon again, we > has the possibility trap in infi

Re: [PATCH RESEND v2 7/7] ARM: dts: vf610-twr: Add USB support

2014-08-22 Thread Shawn Guo
On Tue, Aug 19, 2014 at 12:24:37AM +0400, Sergei Shtylyov wrote: > Hello. > > On 08/19/2014 12:07 AM, Stefan Agner wrote: > > >Add USB support for Freescale Vybrid tower. The USB hosts over-current > >protection signal is not connected is not connected to the PHY's over- > >Yes, we all under

Re: [PATCH RESEND v2 0/7] vf610: Add USB support

2014-08-22 Thread Shawn Guo
On Mon, Aug 18, 2014 at 10:07:10PM +0200, Stefan Agner wrote: > Stefan Agner (7): > ARM: dts: vf610: Add USB PHY and controller > ARM: imx: clk-vf610: Add USBPHY clocks ... > ARM: dts: vf610: Add usbmisc for non-core registers ... > ARM: dts: vf610-colibri: Add USB support > ARM: dts: vf6

Re: [linux-usb] USB Gadget drivers Windows 7/8 support and .bAlternateSetting in interface descriptor

2014-08-22 Thread Xuebing Wang
Hi Community, I finally fix the UAC1 on Windows 7 host issue. Thanks for your help. I will submit patches after more testing. On 08/22/2014 10:43 AM, Xuebing Wang wrote: On 08/21/2014 04:24 PM, Sebastian Andrzej Siewior wrote: On 08/20/2014 02:13 AM, Peter Chen wrote: Thanks, so Xunbing,

[PATCH V5 0/2] usb: gadget: zero: Add support for interrupt EP

2014-08-22 Thread Amit Virdi
This patchset adds support for interrupt EP and the corresponding test cases to gadget zero. The code has been rebased and tested on Kernel v3.15-rc5 V4 -> V5 - Rebased on Felipe Balbi's testing/next - Build tested - No other change V3 -> V4 - Edited the commit message to provide more informa

[PATCH V5 2/2] usbtest: Add interrupt EP testcases

2014-08-22 Thread Amit Virdi
Two simple test cases for interrupt endpoints are added to the usbtest.c file. These are simple non-queued interrupt IN and interrupt OUT transfers. Currently, only gadget zero is capable of executing the interrupt EP test cases. However, extending the same to other gadgets is extremely simple and

[PATCH V5 1/2] usb: gadget: zero: Add support for interrupt EP

2014-08-22 Thread Amit Virdi
Interrupt endpoints behave quite similar to the bulk endpoints with the difference that the endpoints expect data sending/reception request at particular intervals till the whole data has not been transmitted. The interrupt EP support is added to gadget zero. A new alternate setting (=2) has been

Re: [PATCH v3 0/6] usb: host: change TPL support behaviour

2014-08-22 Thread Pratyush Anand
On Tue, Aug 19, 2014 at 09:51:51AM +0800, Peter Chen wrote: > Changes for v3: > - Add possible role switch for unsupported HNP capable OTG B-peripheral, > see USB OTG & EH 2.0 spec page 38, this feature was deleted wrongly > at previous revision patches. > > Changes for v2: > - Move TPL support ju

[RFC 1/2] USB: OTG: Hold wakeupsource when VBUS present

2014-08-22 Thread Kiran Kumar Raparthy
From: Todd Poynor USB: OTG: Hold wakeupsource when VBUS present Enabled by default, can disable with: echo N > /sys/module/otg_wakeupsource/parameters/enabled This is one of the number of patches from the Android AOSP common.git tree, which is used on almost all Android devices. so I wanted

[RFC 2/2] usb: otg: Temporarily hold wakeupsource on charger and disconnect events

2014-08-22 Thread Kiran Kumar Raparthy
From: Todd Poynor usb: otg: Temporarily hold wakeupsource on charger and disconnect events Allow other parts of the system to react to the charger connect/disconnect event without allowing the system to suspend before the other parts can process the event. This wakeup_source times out after 2 se

Re: [PATCH 1/1] HID: usbhid: add usb_clear_halt determination for next hid_start_in

2014-08-22 Thread vichy
hi Jiri: 2014-08-22 15:45 GMT+08:00 Jiri Kosina : > On Fri, 22 Aug 2014, CheChun Kuo wrote: > >> HID IR device will not response to any command send from host when >> it is finishing paring and tring to reset itself. During this period of >> time, usb_cleaer_halt will be fail and if hid_star

Re: [PATCH v5 3/4] usb: hcd: Caibrate PHY post hcd reset

2014-08-22 Thread Andreas Färber
Hi, s/Caibrate/Calibrate/ Cheers, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vge

[PATCH 0/4] usb: renesas_usbhs: fixes this driver in gadget mode

2014-08-22 Thread Yoshihiro Shimoda
If we tested this driver as gadget and g_ncm driver using iperf, some issues below happened: - Oops happened. - A transaction didn't finish in PIO mode. - A transaction didn't finish in DMA mode if the "zero" flag is set. - The driver didn't cancel a transaction if dequeue() is called. This pa

[PATCH 1/4] usb: renesas_usbhs: fix the behavior of some usbhs_pkt_handle

2014-08-22 Thread Yoshihiro Shimoda
Some gadget drivers will call usb_ep_queue() more than once before the first queue doesn't finish. However, this driver didn't handle it correctly. So, this patch fixes the behavior of some usbhs_pkt_handle using the "running" flag. Otherwise, the oops below happens if we use g_ncm driver and when

[PATCH 3/4] usb: renesas_usbhs: fix the condition of is_done in usbhsf_dma_push_done

2014-08-22 Thread Yoshihiro Shimoda
This patch fixes the condition of is_done in usbhsf_dma_push_done(). This function will be called after a transmission finished by DMAC. So, the function should check if the transmission packet is short packet or not. Also the function should call try_run to send the zero packet by the pio handler

[PATCH 2/4] usb: renesas_usbhs: protect mod->irq_{bemp,brdy}sts by spin lock

2014-08-22 Thread Yoshihiro Shimoda
This patch protects the mod->irq_bempsts and mod->irq_brdysts by spin lock in the usbhs_status_get_each_irq() because other functions will write them during spin lock. Otherwise, the driver will clears the BRDYSTS and/or BEMPSTS wrongly, and then, the transaction will not finish. Also since the dri

[PATCH 4/4] usb: renesas_usbhs: fix the usb_pkt_pop()

2014-08-22 Thread Yoshihiro Shimoda
This patch fixes the usb_pkt_pop(). If a gadget driver calls usb_ep_dequeue(), this driver will call the usb_pkt_pop(). So, the usb_pkt_pop() should cancel the transaction. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/fifo.c | 30 +++--- 1 file changed

Re: [PATCH v2 0/9] Tegra xHCI support

2014-08-22 Thread Tomeu Vizoso
On 21 August 2014 19:26, Andrew Bresticker wrote: > On Thu, Aug 21, 2014 at 6:34 AM, Tomeu Vizoso wrote: >> On 18 August 2014 19:08, Andrew Bresticker wrote: >>> >>> Tested on Venice2, Jetson TK1, and Big with a variety of USB2.0 and >>> USB3.0 memory sticks and ethernet dongles using controller

[PATCH v2 0/3] Small fixes and clean up

2014-08-22 Thread Krzysztof Opasiak
Dear Matt, This is a small series which fix usbg_set_function_attrs() which previously tried to set attributes which are read only on configfs. I have also went through code and marked attributes which should not change during function calls with const qualifiers. Third patch is a small enhancem

[PATCH v2 1/3] libusbg: Don't try to set read only attribute

2014-08-22 Thread Krzysztof Opasiak
Some of function attributes are read only on configfs, so library should not try to set them and accept only empty values in functions which set multiple attributes at single call. Signed-off-by: Krzysztof Opasiak --- src/usbg.c | 26 +++--- 1 file changed, 19 insertions(+)

[PATCH v2 2/3] libusbg: Add missing const qualifiers

2014-08-22 Thread Krzysztof Opasiak
Const qualifers should be placed in all functions which don't need to modify provided buffers to allow caller to pass literals or pointers to non-modifable space. Signed-off-by: Krzysztof Opasiak --- include/usbg/usbg.h | 28 +++--- src/usbg.c | 79 ++

[PATCH v2 3/3] libusbg: Use reentrant functions to avoid static buffers usage

2014-08-22 Thread Krzysztof Opasiak
ether_aton() and ether_ntoa() use static buffers which are overwritten by next call of this function so those functions should not be used in multithread environment. Signed-off-by: Krzysztof Opasiak --- include/usbg/usbg.h |1 + src/usbg.c | 16 ++-- 2 files changed,

[PATCH v2 00/16] Add import from/export to file functionality

2014-08-22 Thread Krzysztof Opasiak
Dear Matt, This quite big series adds new part of libusbg API which allows to import/export gadget/function/configuration from/to file. Motivation: Libusbg allows to create a binary file which set up custom gadget. This is useful but if we have to create custom binary for each gadget we wast a l

[PATCH v2 02/16] libusbg: Add guards for libconfig version

2014-08-22 Thread Krzysztof Opasiak
Changes sent to libcofngi has not been merged yet, so add compatibility defines to make all compile and work. Signed-off-by: Krzysztof Opasiak --- src/usbg.c |9 + 1 file changed, 9 insertions(+) diff --git a/src/usbg.c b/src/usbg.c index b1b5f44..dfaf66c 100644 --- a/src/usbg.c +++

[PATCH v2 05/16] libusbg: Add export config functionality

2014-08-22 Thread Krzysztof Opasiak
Configuration may have several functions if we add strings and some attributes it gives a few shell commands to set it up. To avoid this add export cofiguration which allows to store usb configuration in a file. Signed-off-by: Krzysztof Opasiak --- include/usbg/usbg.h |8 ++ src/usbg.c

[PATCH v2 08/16] libusbg: Add errors which may happen during parsing

2014-08-22 Thread Krzysztof Opasiak
Signed-off-by: Krzysztof Opasiak --- include/usbg/usbg.h |4 src/usbg.c | 24 2 files changed, 28 insertions(+) diff --git a/include/usbg/usbg.h b/include/usbg/usbg.h index 3a66ae3..3d3cba0 100644 --- a/include/usbg/usbg.h +++ b/include/usbg/usbg.h @@

[PATCH v2 06/16] libusbg: Add export gadget functionality

2014-08-22 Thread Krzysztof Opasiak
Whole gadget setting process take a lot of simple commands (or lines of code). Those shell commands may take a while or require dedicated script and hard-coding gadget configuration. To avoid such situation add to library ability to export a whole gadget into file. Signed-off-by: Krzysztof Opasiak

[PATCH v2 03/16] libusbg: Add label field to usbg_function structure

2014-08-22 Thread Krzysztof Opasiak
Add some field where additional label for function can be stored. Signed-off-by: Krzysztof Opasiak --- src/usbg.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/usbg.c b/src/usbg.c index dfaf66c..e5ed240 100644 --- a/src/usbg.c +++ b/src/usbg.c @@ -84,7 +84,8 @@ s

[PATCH v2 04/16] libusbg: Add export function functionality

2014-08-22 Thread Krzysztof Opasiak
Function settings may be complicated and their configuration may take a long while. To save time it would be convenient to allow for storing function settings in a file. Signed-off-by: Krzysztof Opasiak --- include/usbg/usbg.h | 11 src/usbg.c | 156 +

[PATCH v2 07/16] libusbg: examples: Add sample application to export gadget

2014-08-22 Thread Krzysztof Opasiak
Add sample C code which shows how to use new functionality of libusbg - gadget export. This program allows to export chosen gadget from configfs to a file. Signed-off-by: Krzysztof Opasiak --- examples/Makefile.am |3 +- examples/gadget-export.c | 81 +++

[PATCH v2 01/16] libusbg: Add dependency to libconfig

2014-08-22 Thread Krzysztof Opasiak
This library is used to import and export gadget/function/config to and from file. Signed-off-by: Krzysztof Opasiak --- configure.ac|1 + libusbg.pc.in |2 +- src/Makefile.am |4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac ind

[PATCH v2 14/16] libusbg: Add functions to get import error text and line

2014-08-22 Thread Krzysztof Opasiak
Signed-off-by: Krzysztof Opasiak --- include/usbg/usbg.h | 43 +++ src/usbg.c | 48 2 files changed, 91 insertions(+) diff --git a/include/usbg/usbg.h b/include/usbg/usbg.h index 23783eb..a934a7

[PATCH v2 09/16] libusbg: Allow to store error information in usbg_gadget

2014-08-22 Thread Krzysztof Opasiak
If error occurred during parsing user should have an oportunity to get details about place and type of error. Signed-off-by: Krzysztof Opasiak --- src/usbg.c |8 1 file changed, 8 insertions(+) diff --git a/src/usbg.c b/src/usbg.c index 74f6bfd..929f1c7 100644 --- a/src/usbg.c +++

[PATCH v2 13/16] libusbg: Add import gadget functionality

2014-08-22 Thread Krzysztof Opasiak
Whole gadget can be exported to file using usbg_export_gadget(). This commit adds complementary API function usbg_import_gadget() which allows to import whole gadget (including attrs, strings, configs, functions and bindings) from file to configfs. Signed-off-by: Krzysztof Opasiak --- include/us

[PATCH v2 10/16] libusbg: Add import function functionality

2014-08-22 Thread Krzysztof Opasiak
Functions can be exported to file using usbg_export_function(). This commit adds complementary API function usbg_import_function() which allows to import function from file to configfs. Signed-off-by: Krzysztof Opasiak --- include/usbg/usbg.h | 13 src/usbg.c | 188 +

[PATCH v2 11/16] libusbg: Add import config functionality

2014-08-22 Thread Krzysztof Opasiak
Configurations can be exported to file using usbg_export_config(). This commit adds complementary API function usbg_import_config() which allows to import configuration (with attrs, strings and bindings) from file to chosen gadget. Signed-off-by: Krzysztof Opasiak --- include/usbg/usbg.h | 11

[PATCH v2 15/16] libusbg: examples: Add gadget-import sample app

2014-08-22 Thread Krzysztof Opasiak
Signed-off-by: Krzysztof Opasiak --- examples/Makefile.am |3 +- examples/gadget-import.c | 79 ++ src/usbg.c |6 ++-- 3 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 examples/gadget-import.c diff --git

[PATCH v2 12/16] libusbg: Allow to store error information in usbg_state

2014-08-22 Thread Krzysztof Opasiak
If error occurred during parsing user should have an opportunity to get details about place and type of error. Signed-off-by: Krzysztof Opasiak --- src/usbg.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/src/usbg.c b/src/usbg.c index 3e4725d..3527c1b 100644 --- a/src/usbg.c +++

[PATCH v2 16/16] libusbg: doc: Add document about gadget schemes

2014-08-22 Thread Krzysztof Opasiak
Add document which clarify reasons of implementing gadget schemes and also describes syntax of such files. Signed-off-by: Krzysztof Opasiak --- doc/gadget_schemes.txt | 301 1 file changed, 301 insertions(+) create mode 100644 doc/gadget_schemes

Re: [PATCH v2 02/16] libusbg: Add guards for libconfig version

2014-08-22 Thread Sergei Shtylyov
Hello. On 8/22/2014 3:59 PM, Krzysztof Opasiak wrote: Changes sent to libcofngi has not been merged yet, Perhaps libconfig? so add compatibility defines to make all compile and work. Signed-off-by: Krzysztof Opasiak [...] WBR, Sergei -- To unsubscribe from this list: send the line

[PATCH 2/2] leds: usb: Add LED trigger for USB host activity

2014-08-22 Thread Michal Sojka
With this patch, USB host activity can be signaled by blinking a LED. This should work with all host controllers. Tested only with musb. Signed-off-by: Michal Sojka --- drivers/leds/trigger/Kconfig | 8 ++ drivers/leds/trigger/Makefile | 1 + drivers/leds/trigger/ledtri

[PATCH 1/2] leds: usb: Add LED trigger for USB gadget activity

2014-08-22 Thread Michal Sojka
With this patch, USB gadget activity can be signaled by blinking a LED. Since there is no generic code where to put the trigger for all USB controllers, each USB controller needs to call the trigger individually. This patch adds the call only for the musb controller where I can test it. Signed-of

[PATCH] drivers: usb: gadget: fusb300_udc.h: Fix typo in include guard

2014-08-22 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/usb/gadget/udc/fusb300_udc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/fusb300_udc.h b/drivers/usb/gadget/udc/fusb300_udc.h index ae811d8..ad39f89 100644 --- a/drivers/usb/gadget/udc/fusb300_udc.h +++ b/

Re: [PATCH] usb: phy: twl4030-usb: Fix lost interrupts after ID pin goes down

2014-08-22 Thread Grazvydas Ignotas
Hi, On Thu, Aug 21, 2014 at 7:48 PM, Tony Lindgren wrote: > Commit 249751f22380 ("usb: phy: twl4030-usb: poll for ID disconnect") > added twl4030_id_workaround_work() to deal with lost interrupts > after ID pin goes down. However, this currently only works for the > insertion. The PHY interrupts

Re: [PATCH 1/1] HID: usbhid: add usb_clear_halt determination for next hid_start_in

2014-08-22 Thread Alan Stern
On Fri, 22 Aug 2014, vichy wrote: > hi Jiri: > > 2014-08-22 15:45 GMT+08:00 Jiri Kosina : > > On Fri, 22 Aug 2014, CheChun Kuo wrote: > > > >> HID IR device will not response to any command send from host when > >> it is finishing paring and tring to reset itself. During this period of > >>

Re: [PATCH] drivers: usb: gadget: fusb300_udc.h: Fix typo in include guard

2014-08-22 Thread Felipe Balbi
On Fri, Aug 22, 2014 at 02:59:32PM +0200, Rasmus Villemoes wrote: you need a commit log. Has this always been there ? Which commit are you fixing ? > Signed-off-by: Rasmus Villemoes > --- > drivers/usb/gadget/udc/fusb300_udc.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --

Re: [RFC 1/2] USB: OTG: Hold wakeupsource when VBUS present

2014-08-22 Thread Alan Stern
On Fri, 22 Aug 2014, Kiran Kumar Raparthy wrote: > From: Todd Poynor > > USB: OTG: Hold wakeupsource when VBUS present > > Enabled by default, can disable with: >echo N > /sys/module/otg_wakeupsource/parameters/enabled > > This is one of the number of patches from the Android AOSP common.g

[PATCH v2] drivers: usb: gadget: fusb300_udc.h: Fix typo in include guard

2014-08-22 Thread Rasmus Villemoes
Clearly this was meant to be an include guard, but a trailing underscore was missing. It has been this way since the file was introduced in 0fe6f1d1 ("usb: udc: add Faraday fusb300 driver"). Signed-off-by: Rasmus Villemoes --- drivers/usb/gadget/udc/fusb300_udc.h | 2 +- 1 file changed, 1 insert

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread Alan Stern
On Thu, 21 Aug 2014, Christoph Hellwig wrote: > On Thu, Aug 21, 2014 at 05:43:41PM -0400, Martin K. Petersen wrote: > > Alan> Okay, here's a patch that implements the suggestion, except that I > > Alan> put the flag in the Scsi_Host structure instead of the template. > > Alan> This was to minimize

Re: [PATCH v2] drivers: usb: gadget: fusb300_udc.h: Fix typo in include guard

2014-08-22 Thread Felipe Balbi
On Fri, Aug 22, 2014 at 04:44:33PM +0200, Rasmus Villemoes wrote: > Clearly this was meant to be an include guard, but a trailing > underscore was missing. It has been this way since the file was > introduced in 0fe6f1d1 ("usb: udc: add Faraday fusb300 driver"). > right here you need to have: Fi

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread Christoph Hellwig
On Fri, Aug 22, 2014 at 10:53:42AM -0400, Alan Stern wrote: > Good idea. An enhanced patch is below. If I can get a Tested-By: from > Tiziano and one or two Acked-By: responses, I'll submit this for the > current and stable kernels. > > Sending the initial INQUIRY command to LUNs larger than 0 i

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread Martin K. Petersen
> "Alan" == Alan Stern writes: Alan> Sending the initial INQUIRY command to LUNs larger than 0 involves Alan> a chicken-and-egg problem -- we don't know whether to fill in the Alan> LUN bits in the command until we know the SCSI level, and we don't Alan> know the SCSI level until the INQUIRY

Re: [PATCH v2] drivers: usb: gadget: fusb300_udc.h: Fix typo in include guard

2014-08-22 Thread Rasmus Villemoes
Felipe Balbi writes: > On Fri, Aug 22, 2014 at 04:44:33PM +0200, Rasmus Villemoes wrote: >> Clearly this was meant to be an include guard, but a trailing >> underscore was missing. It has been this way since the file was >> introduced in 0fe6f1d1 ("usb: udc: add Faraday fusb300 driver"). >> > >

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread Alan Stern
On Fri, 22 Aug 2014, Christoph Hellwig wrote: > On Fri, Aug 22, 2014 at 10:53:42AM -0400, Alan Stern wrote: > > Good idea. An enhanced patch is below. If I can get a Tested-By: from > > Tiziano and one or two Acked-By: responses, I'll submit this for the > > current and stable kernels. > > > >

[PATCH] Including XHCI_TRUST_TX_LENGTH for Renesas uPD720202 USB 3.0 chip.

2014-08-22 Thread Rodrigo Severo
Renesas uPD720202 USB 3.0 chip needs XHCI_TRUST_TX_LENGTH quirk workaround as per below logs produced when using a Diammond video capture dongle: Aug 21 18:07:33 [kernel] handle_tx_event: 67 callbacks suppressed Aug 21 18:07:33 [kernel] xhci_hcd :01:00.0: WARN Successful completion on short

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-22 Thread James Bottomley
On Fri, 2014-08-22 at 10:53 -0400, Alan Stern wrote: > On Thu, 21 Aug 2014, Christoph Hellwig wrote: > > > On Thu, Aug 21, 2014 at 05:43:41PM -0400, Martin K. Petersen wrote: > > > Alan> Okay, here's a patch that implements the suggestion, except that I > > > Alan> put the flag in the Scsi_Host s

[PATCH v3 9/9] usb: chipidea: add support to the generic PHY framework in ChipIdea

2014-08-22 Thread Antoine Ténart
This patch adds support of the PHY framework for ChipIdea drivers. Changes are done in both the ChipIdea common code and in the drivers accessing the PHY. This is done by adding a new PHY member in ChipIdea's structures and by taking care of it in the code. Signed-off-by: Antoine Ténart --- driv

[PATCH v3 8/9] usb: chipidea: move usb_otg into struct ci_hdrc

2014-08-22 Thread Antoine Ténart
Move the usb_otg member from struct usb_phy to struct ci_hdrc. Rework its initialization taking in account this modification. Signed-off-by: Antoine Ténart --- drivers/usb/chipidea/ci.h | 1 + drivers/usb/chipidea/host.c| 8 +++- drivers/usb/chipidea/otg_fsm.c | 15 ++-

[PATCH v3 2/9] usb: rename phy to usb_phy in OTG

2014-08-22 Thread Antoine Ténart
This patch prepares the introduction of the generic PHY support in the USB OTG common functions. The USB PHY member of the OTG structure is renamed to 'usb_phy' and modifications are done in all drivers accessing it. Renaming this pointer will allow to keep the compatibility for USB PHY drivers. S

[PATCH v3 3/9] usb: add support to the generic PHY framework in OTG

2014-08-22 Thread Antoine Ténart
This patch adds support of the PHY framework in OTG and keeps the USB PHY compatibility. Here the only modification is to add PHY member in the OTG structure, along with the USB PHY one. Signed-off-by: Antoine Ténart --- include/linux/usb/otg.h | 3 +++ 1 file changed, 3 insertions(+) diff --gi

[PATCH v3 7/9] usb: rename transceiver and phy to usb_phy in ChipIdea

2014-08-22 Thread Antoine Ténart
This patch prepares the introduction of the generic PHY support in the USB ChipIdea common functions. The USB PHY member of the ChipIdea structure ('transceiver') is renamed to 'usb_phy', the 'phy' member of the ChipIdea pdata structure is renamed to 'usb_phy' and modifications are done in all driv

[PATCH v3 5/9] usb: rename gen_phy to phy in HCD

2014-08-22 Thread Antoine Ténart
The patch adding support to the generic PHY framework introduced a 'gen_phy' member in the HCD structure. Rename it to 'phy' to have a consistent USB framework. Signed-off-by: Antoine Ténart Acked-by: Alan Stern --- drivers/usb/core/hcd.c | 22 +++--- include/linux/usb/hcd.h |

[PATCH v3 4/9] usb: rename phy to usb_phy in HCD

2014-08-22 Thread Antoine Ténart
The USB PHY member of the HCD structure is renamed to 'usb_phy' and modifications are done in all drivers accessing it. Signed-off-by: Antoine Ténart Acked-by: Alan Stern --- drivers/usb/chipidea/host.c | 2 +- drivers/usb/core/hcd.c| 20 ++-- drivers/usb/core/hub.c

[PATCH v3 0/9] usb: add support for the generic PHY framework

2014-08-22 Thread Antoine Ténart
Hi all, This is an attempt to add more common USB code aware of the generic PHY framework, while keeping the compatibility for the USB PHY one. It does not add the full support, some USB PHY specific functions not being available currently in the generic PHY subsystem (e.g. usb_phy_set_power()). B

[PATCH v3 6/9] usb: allow to supply the PHY in the drivers when using HCD

2014-08-22 Thread Antoine Ténart
This patch modify the generic code handling PHYs to allow them to be supplied from the drivers. This adds checks to ensure no PHY was already there when looking for one in the generic code. This also makes sure we do not modify its state in the generic HCD functions, it was provided by the driver.

[PATCH v3 1/9] usb: move the OTG state from the USB PHY to the OTG structure

2014-08-22 Thread Antoine Ténart
Before using the PHY framework instead of the USB PHY one, we need to move the OTG state into another place, since it won't be available when USB PHY isn't used. This patch moves the OTG state into the OTG structure, and makes all the needed modifications in the drivers using the OTG state. Signed

Re: [PATCH v2] drivers: usb: gadget: fusb300_udc.h: Fix typo in include guard

2014-08-22 Thread Felipe Balbi
Hi, On Fri, Aug 22, 2014 at 05:21:12PM +0200, Rasmus Villemoes wrote: > Felipe Balbi writes: > > > On Fri, Aug 22, 2014 at 04:44:33PM +0200, Rasmus Villemoes wrote: > >> Clearly this was meant to be an include guard, but a trailing > >> underscore was missing. It has been this way since the file

Re: [PATCH] usb: phy: twl4030-usb: Fix lost interrupts after ID pin goes down

2014-08-22 Thread Tony Lindgren
Hi, * Grazvydas Ignotas [140822 06:21]: > Hi, > > On Thu, Aug 21, 2014 at 7:48 PM, Tony Lindgren wrote: > > Commit 249751f22380 ("usb: phy: twl4030-usb: poll for ID disconnect") > > added twl4030_id_workaround_work() to deal with lost interrupts > > after ID pin goes down. However, this current

Re: [PATCH] usb: phy: twl4030-usb: Fix regressions to runtime PM on omaps

2014-08-22 Thread Tony Lindgren
* Kishon Vijay Abraham I [140821 21:52]: > > > > Kishon, this regression fix would be nice to get into the v3.17-rc > > series if no objections. If you don't have other fixes, I can also > > queue via arm-soc with proper acks. > > I can queue this one up once put_autosuspend() is used. Great, t

Re: [PATCH v3 6/9] usb: allow to supply the PHY in the drivers when using HCD

2014-08-22 Thread Sergei Shtylyov
Hello. On 08/22/2014 07:50 PM, Antoine Ténart wrote: This patch modify the generic code handling PHYs to allow them to be supplied from the drivers. This adds checks to ensure no PHY was already there when looking for one in the generic code. This also makes sure we do not modify its state in t

[PATCH v2 5/5] usb: phy: samsung: remove old common USB PHY code

2014-08-22 Thread Bartlomiej Zolnierkiewicz
drivers/usb/phy/phy-samsung-usb[2,3] drivers got replaced by drivers/phy/phy-samsung-usb[2,3] ones and the old common Samsung USB PHY code is no longer used. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Kyungmin Park Reviewed-by: Vivek Gautam Reviewed-by: Jingoo Han Acked-by: Kishon Vija

[PATCH v2 3/5] usb: phy: samsung: remove old USB 2.0 PHY driver

2014-08-22 Thread Bartlomiej Zolnierkiewicz
drivers/usb/phy/phy-samsung-usb2 driver got replaced by drivers/phy/phy-samsung-usb2 one and is no longer used. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Kyungmin Park Reviewed-by: Vivek Gautam Reviewed-by: Jingoo Han Acked-by: Kishon Vijay Abraham I Cc: Kamil Debski --- drivers/us

[PATCH v2 2/5] ARM: dts: remove old USB2 PHY node for Exynos5250

2014-08-22 Thread Bartlomiej Zolnierkiewicz
drivers/usb/phy/phy-samsung-usb2 driver got replaced by drivers/phy/phy-samsung-usb2 one. Remove the leftover USB2 PHY node (EHCI/OHCI USB nodes are using the new one already) from Exynos5250 dtsi file. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Kyungmin Park Reviewed-by: Vivek Gautam

[PATCH v2 1/5] ARM: dts: remove old USB2 PHY node hook for Arndale

2014-08-22 Thread Bartlomiej Zolnierkiewicz
drivers/usb/phy/phy-samsung-usb2 driver got replaced by drivers/phy/phy-samsung-usb2 one. Remove the leftover hook from Arndale dts file. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Kyungmin Park Reviewed-by: Vivek Gautam Reviewed-by: Jingoo Han Acked-by: Kishon Vijay Abraham I Cc: Ma

[PATCH v2 4/5] usb: phy: samsung: remove old USB 3.0 PHY driver

2014-08-22 Thread Bartlomiej Zolnierkiewicz
drivers/usb/phy/phy-samsung-usb3 driver got replaced by drivers/phy/phy-samsung-usb3 one and is no longer used. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Kyungmin Park Reviewed-by: Vivek Gautam Reviewed-by: Jingoo Han Acked-by: Kishon Vijay Abraham I Cc: Kamil Debski --- drivers/us

[PATCH v2 0/5] usb: phy: samsung: remove old USB PHY code

2014-08-22 Thread Bartlomiej Zolnierkiewicz
Hi, This patch series removes the old Samsung USB PHY drivers that got replaced by the new ones using the generic PHY layer. Depends on: - v3.17-rc1 branch of Linus' kernel Changes since v1 (https://lkml.org/lkml/2014/8/14/241): - rebased on v3.17-rc1 kernel - added Acked-by-s from Kishon Vijay

Re: [PATCH v3 6/9] usb: allow to supply the PHY in the drivers when using HCD

2014-08-22 Thread Sergei Shtylyov
On 08/22/2014 08:53 PM, Sergei Shtylyov wrote: This patch modify the generic code handling PHYs to allow them to be supplied from the drivers. This adds checks to ensure no PHY was already there when looking for one in the generic code. This also makes sure we do not modify its state in the gene

Re: [RFC 1/2] USB: OTG: Hold wakeupsource when VBUS present

2014-08-22 Thread Felipe Balbi
Hi, On Fri, Aug 22, 2014 at 03:19:32PM +0530, Kiran Kumar Raparthy wrote: > From: Todd Poynor > > USB: OTG: Hold wakeupsource when VBUS present > > Enabled by default, can disable with: I would turn this around and make it disabled by default so that it doesn't change behavior for distro kerne

[RFC PATCH 01/20] xhci: cleanup remaining cycle bit toggles via ternary conditional

2014-08-22 Thread Dan Williams
These can simply be toggled via xor. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-ring.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 749fc68eb5c1..0efbbf0b6233 100644 --- a/drivers/

[RFC PATCH 02/20] xhci: remove invalid cast of xhci to a usb_device in xhci_log_ctx trace

2014-08-22 Thread Dan Williams
An xhci controller device is a pci or a platform device, never a usb_device. Cc: Xenia Ragiadakou Signed-off-by: Dan Williams --- drivers/usb/host/xhci-trace.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trac

Re: [PATCH 0/5] usb: phy: samsung: remove old USB PHY code

2014-08-22 Thread Bartlomiej Zolnierkiewicz
by Kukjin Kim. > Are we deleting the phy drivers or not ? Yes, we are deleting them. It has been agreed on by Kishon and Vivek. > Please rebase on v3.17-rc1 and resend with all Acks in place. Done: https://lkml.org/lkml/2014/8/22/446 Please note that if you want to apply it t

[RFC PATCH 04/20] xhci: increase trb segment size, kill ->segment_pool

2014-08-22 Thread Dan Williams
TRB segments are allocated relatively infrequently and would benefit from being larger (to reduce probability of overrunning a segment in a TD fragment). We already burn a page satisfying a single segment allocation, so there's little reason to not allocate in page-sized chunks in the first instan

[RFC PATCH 05/20] xhci: prepare for mid-segment link-trbs

2014-08-22 Thread Dan Williams
Break the assumption that link-trbs are always located at the end of a segment. Introduce ->link to struct xhci_segment and use that every place that looks up the link-trb for a segment. This is meant to be functionally equivalent to the existing driver and is just a search and replace for hard c

[RFC PATCH 03/20] xhci: introduce xhci_to_dev

2014-08-22 Thread Dan Williams
Replace many occurrences of xhci_to_hcd(xhci)->self.controller with a helper. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-mem.c | 29 - drivers/usb/host/xhci.c |6 +++--- drivers/usb/host/xhci.h | 13 + 3 files changed, 24 inserti

[RFC PATCH 11/20] xhci: provide helpers for retrieving 'enqueue' and 'dequeue' pointers

2014-08-22 Thread Dan Williams
In prepartion for converting ring management from pointers to power-of-2 indexes, introduce xhci_ring_dequeue(), xhci_ring_enqueue(), xhci_ring_set_dequeue(), and xhci_ring_set_enqueue(). Signed-off-by: Dan Williams --- drivers/usb/host/xhci-dbg.c | 16 ++-- drivers/usb/host/xhci-mem.c | 1

[RFC PATCH 06/20] xhci: drop 'xhci' argument to last_trb

2014-08-22 Thread Dan Williams
last_trb() can simply distinguish event rings by the ring ->type. With this in place the 'xhci' parameter can be removed from last_trb_on_last_seg(), next_trb(), and inc_deq(). Signed-off-by: Dan Williams --- drivers/usb/host/xhci-ring.c | 75 -- 1 file

[RFC PATCH 07/20] xhci: make xhci_segments doubly linked

2014-08-22 Thread Dan Williams
In preparation for dynamic ring expansion while walking scatterlists for v1.0+ xhci hosts make it possible to walk backwards through ring segments. Certainly this could be done in an open-coded fashion, but it improves readability to use established list manipulation helper routines. Signed-off-b

[RFC PATCH 08/20] xhci: refactor inc_enq(), share a common advance_enq() with prepare_ring()

2014-08-22 Thread Dan Williams
There are two locations where we advance the enqueue pointer through a chain of link trbs, in inc_enq() and prepare_ring(). Factor that into a common advance_enq(). Also, in preparation for per-ring operations factor out the differences between the event-rings, chain-quirk-rings and normal endpoi

[RFC PATCH 12/20] xhci: introduce struct xhci_ring_pointer

2014-08-22 Thread Dan Williams
Consolidate ring pointer tracking variables into their own type. This simplifies the calling convention of some routines and allows for the later introduction of integer ring index variables. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-dbg.c |8 + drivers/usb/host/xhci-mem.c |

[RFC PATCH 13/20] xhci: use %pad for printing dma_addr_t

2014-08-22 Thread Dan Williams
Clean up verbose (unsigned long long) casts. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-dbg.c | 70 - drivers/usb/host/xhci-mem.c | 46 --- drivers/usb/host/xhci-ring.c | 41 +++- drivers/us

[RFC PATCH 09/20] xhci: introduce ring ops to handle event vs non-event rings

2014-08-22 Thread Dan Williams
It's confusing (to me at least) to keep on remembering the differences between event rings (managed by the hardware) and non-event rings managed by the host. Replace "if (ring->type == FOO)" branches with ring ops that are specific to the type of ring. This is a tradeoff of direct code readabilit

[RFC PATCH 00/20] xhci: implement xhci-v1+ td-fragment rules, test

2014-08-22 Thread Dan Williams
Sending as an RFC primarily to get feedback on the unit testing approach while there's still time to yell at me in person at LinuxCon. Including Rusty in pursuit of comments on how to do mocked interfaces for testing purposes in-tree. === This series updates the xhci driver to honor all the rule

[RFC PATCH 10/20] xhci: clarify "ring valid" checks

2014-08-22 Thread Dan Williams
All rings have ->dequeue = ->enqueue = "first trb in first segment", so it is redundant to check if ->dequeue is NULL when ->ring is set. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-hub.c |5 ++--- drivers/usb/host/xhci-ring.c |2 +- 2 files changed, 3 insertions(+), 4 deletio

[RFC PATCH 17/20] xhci: combine xhci_queue_bulk_tx() and queue_bulk_sg_tx()

2014-08-22 Thread Dan Williams
The only difference between these two routines is that the latter handles a scatterlist of more than one entry. Fake a single entry scatterlist for the non-sg case, and delete the duplicate code. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-ring.c | 158 +--

[RFC PATCH 16/20] xhci: refactor prepare_transfer()

2014-08-22 Thread Dan Williams
In preparation for honoring xhci-v1.0+ td-fragment handling rules break out the subroutines of prepare_transfer(). Rather than calculating the number of trbs required and expanding the ring, v1.0+ hosts will dynamically resize the ring as it discovers td-fragments that end up straddling a segment

[RFC PATCH 18/20] xhci: add xhci_ring_reap_td() helper

2014-08-22 Thread Dan Williams
TDs from endpoint rings are open-coded cleaned up in a duplicate fashion in two places. Provide common helper. This is later used to as a place to inject ring-type-specific post-reap operations. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-ring.c | 17 + 1 files chan

[RFC PATCH 14/20] xhci: power-of-2 ring sizes

2014-08-22 Thread Dan Williams
In preparation for dynamic ring expansion while walking scatterlists for v1.0+ xhci hosts force the ring sizes to be a power-of-2. This property combined with the conversion of segments to a doubly linked list allows for translating ring pointers to integers enabling simple math to interrogate the

[RFC PATCH 15/20] xhci: kill ->num_trbs_free_temp in struct xhci_ring

2014-08-22 Thread Dan Williams
This can simply be done inline in xhci_queue_isoc_tx(). Signed-off-by: Dan Williams --- drivers/usb/host/xhci-ring.c |6 +++--- drivers/usb/host/xhci.h |1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c in

  1   2   >