Re: option driver crashes on modem removal

2015-08-24 Thread Johan Hovold
On Mon, Aug 24, 2015 at 11:32:37AM +0200, Oliver Neukum wrote: On Mon, 2015-08-24 at 11:14 +0200, Yegor Yefremov wrote: Applying your patch doesn't help, i.e. error messages disappear, but I get following crash anyway (kernel 3.18.20): Johan, I think you need to limit the number of retries

Re: [PATCH v3 1/1] USB:option:add ZTE PIDs

2015-08-24 Thread Johan Hovold
On Mon, Aug 24, 2015 at 09:51:33AM +0200, Bjørn Mork wrote: Johan Hovold jo...@kernel.org writes: On Wed, Aug 19, 2015 at 08:51:17AM -0700, Liu.Zhao wrote: #define BENQ_VENDOR_ID0x04a5 #define BENQ_PRODUCT_H10 0x4068 @@ -544,6 +548,14 @@

Re: option driver crashes on modem removal

2015-08-24 Thread Johan Hovold
On Mon, Aug 24, 2015 at 11:14:13AM +0200, Yegor Yefremov wrote: On Mon, Aug 17, 2015 at 5:29 PM, Johan Hovold jo...@kernel.org wrote: This obviously does not solve the underlying issue, but could you try the below patch nonetheless? We don't want these error messages for the valid use case

[PATCH v4 13/13] usb: otg: Add dual-role device (DRD) support

2015-08-24 Thread Roger Quadros
DRD mode is a reduced functionality OTG mode. In this mode we don't support SRP, HNP and dynamic role-swap. In DRD operation, the controller mode (Host or Peripheral) is decided based on the ID pin status. Once a cable plug (Type-A or Type-B) is attached the controller selects the state and

[PATCH v4 11/13] usb: core: hub: Notify OTG fsm when A device sets b_hnp_enable

2015-08-24 Thread Roger Quadros
This is the a_set_b_hnp_enable flag in the OTG state machine diagram and must be set when the A-Host has successfully set the b_hnp_enable feature of the OTG-B-Peripheral attached to it. When this bit changes we kick our OTG FSM to make note of the change and act accordingly. Signed-off-by:

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-24 Thread Bjørn Mork
Eugene Shatokhin eugene.shatok...@rosalab.ru writes: 19.08.2015 15:31, Bjørn Mork пишет: Eugene Shatokhin eugene.shatok...@rosalab.ru writes: The problem is not in the reordering but rather in the fact that dev-flags = 0 is not necessarily atomic w.r.t. clear_bit(EVENT_RX_KILL, dev-flags),

[PATCH v4 04/13] otg-fsm: move usb_bus_start_enum into otg-fsm-ops

2015-08-24 Thread Roger Quadros
This is to prevent missing symbol build error if OTG is enabled (built-in) and HCD core (CONFIG_USB) is module. Signed-off-by: Roger Quadros rog...@ti.com Acked-by: Peter Chen peter.c...@freescale.com --- drivers/usb/common/usb-otg-fsm.c | 6 -- drivers/usb/phy/phy-fsl-usb.c| 2 ++

[PATCH v4 02/13] usb: otg-fsm: support multiple instances

2015-08-24 Thread Roger Quadros
Move the state_changed variable into struct otg_fsm so that we can support multiple instances. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/common/usb-otg-fsm.c | 10 -- include/linux/usb/otg-fsm.h | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git

[PATCH v4 03/13] usb: otg-fsm: Prevent build warning VDBG redefined

2015-08-24 Thread Roger Quadros
If usb/otg-fsm.h and usb/composite.h are included together then it results in the build warning [1]. Prevent that by using dev_vdbg() instead. Also get rid of MPC_LOC which doesn't seem to be used by anyone. [1] - warning fixed by this patch: In file included from

[PATCH v4 05/13] usb: hcd.h: Add OTG to HCD interface

2015-08-24 Thread Roger Quadros
The OTG core will use struct otg_hcd_ops to add/remove the HCD controller. The main purpose of this interface is to avoid directly calling usb_add/remove_hcd() from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB is m. Signed-off-by: Roger Quadros

[PATCH v4 00/13] USB: OTG/DRD Core functionality

2015-08-24 Thread Roger Quadros
Hi, This series centralizes OTG/Dual-role functionality in the kernel. As of now I've got Dual-role functionality working pretty reliably on dra7-evm and am437x-gp-evm. DWC3 controller and platform related patches will be sent separately. Series is based on Greg's usb-next tree. Changelog:

[PATCH v4 01/13] usb: otg-fsm: Add documentation for struct otg_fsm

2015-08-24 Thread Roger Quadros
struct otg_fsm is the interface to the OTG state machine. Document the input, output and internal state variables. Definations are taken from Table 7-2 and Table 7-4 of the USB OTG EH Specification Rev.2.0 Re-arrange some of the members as per use case for more clarity. Signed-off-by: Roger

[PATCH v4 10/13] usb: hcd: Adapt to OTG core

2015-08-24 Thread Roger Quadros
The existing usb_add/remove_hcd() functionality remains unchanged for non-OTG devices. For OTG devices they only register the HCD with the OTG core. Introduce usb_otg_add/remove_hcd() for use by OTG core. These functions actually add/remove the HCD. Signed-off-by: Roger Quadros rog...@ti.com ---

[PATCH v4 08/13] usb: doc: dt-binding: Add otg-controller property

2015-08-24 Thread Roger Quadros
The otg-controller property is used to link the host/gadget controllers to the otg controller. otg-controller property must contain the phandle of the otg controller. The otg core uses this property to tie the host/gadget controllres to the correct otg controller. Signed-off-by: Roger Quadros

[PATCH v4 12/13] usb: gadget: udc: adapt to OTG core

2015-08-24 Thread Roger Quadros
The OTG state machine needs a mechanism to start and stop the gadget controller. Add usb_gadget_start() and usb_gadget_stop(). Register with OTG core when gadget function driver is available and unregister when function driver is unbound. We need to unlock the usb_lock mutexbefore calling

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-24 Thread Eugene Shatokhin
19.08.2015 15:31, Bjørn Mork пишет: Eugene Shatokhin eugene.shatok...@rosalab.ru writes: The problem is not in the reordering but rather in the fact that dev-flags = 0 is not necessarily atomic w.r.t. clear_bit(EVENT_RX_KILL, dev-flags), and vice versa. So the following might be possible,

[PATCH v4 09/13] usb: chipidea: move from CONFIG_USB_OTG_FSM to CONFIG_USB_OTG

2015-08-24 Thread Roger Quadros
CONFIG_USB_OTG_FSM no longer exists and the OTG FSM is available if CONFIG_USB_OTG is defined so move to using CONFIG_USB_OTG. Signed-off-by: Roger Quadros rog...@ti.com --- Documentation/usb/chipidea.txt | 2 +- drivers/usb/chipidea/Makefile | 2 +- drivers/usb/chipidea/ci.h | 2 +-

[PATCH v4 06/13] usb: gadget.h: Add OTG to gadget interface

2015-08-24 Thread Roger Quadros
The OTG core will use struct otg_gadget_ops to start/stop the gadget controller. The main purpose of this interface is to avoid directly calling usb_gadget_start/stop() from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB_GADGET is m. Signed-off-by: Roger

[PATCH v4 07/13] usb: otg: add OTG core

2015-08-24 Thread Roger Quadros
The OTG core instantiates the OTG Finite State Machine per OTG controller and manages starting/stopping the host and gadget controllers based on the bus state. It provides APIs for the following tasks - Registering an OTG capable controller - Registering Host and Gadget controllers to OTG core -

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Alan Stern
On Mon, 24 Aug 2015, Peter Chen wrote: Thanks, that's much clear. At udc driver: __set_halt(struct usb_ep *ep, int value, bool may_fail) { if (may_fail ep queue is not empty) { return false } else { do stall; return true;

RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb host driver

2015-08-24 Thread Alan Stern
On Mon, 24 Aug 2015, Ramneek Mehresh wrote: On Thu, 20 Aug 2015, Ramneek Mehresh wrote: --- a/drivers/usb/host/ehci-fsl.h +++ b/drivers/usb/host/ehci-fsl.h @@ -63,4 +63,22 @@ #define UTMI_PHY_EN (19) #define ULPI_PHY_CLK_SEL(110) #define

[PATCH v3 1/1] USB:option:add ZTE PIDs

2015-08-24 Thread Liu.Zhao
This is intended to add ZTE device PIDs on kernel. Signed-off-by: Liu.Zhao lzsos...@163.com --- drivers/usb/serial/option.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 876423b..6b4a766 100644 ---

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Alan Stern
On Mon, 24 Aug 2015, Peter Chen wrote: On Thu, Aug 20, 2015 at 05:03:46PM -0400, Alan Stern wrote: On Thu, 20 Aug 2015, Felipe Balbi wrote: - When using pattern = 1 as module parameters to compare the data, the packet size must be same between host and device's.

Re: PROBLEM: lsusb -v freezes kernel on Acer ES1-111M

2015-08-24 Thread Alan Stern
On Sun, 23 Aug 2015, Roland Weber wrote: Hello Alan, bisecting turned out to be much simpler than I was afraid of. Here's the result: 638139eb95d2d241781330a321e88c8dafe46078 is the first bad commit commit 638139eb95d2d241781330a321e88c8dafe46078 Author: Petr Mladek pmla...@suse.cz

Re: USB suspend resume issue on Vybrid (Chipidea IP/MXS PHY)

2015-08-24 Thread Felipe Balbi
Hi, On Mon, Aug 24, 2015 at 09:40:04PM +0530, Sanchayan Maity wrote: Hello, I am working on Freescale Vybrid which is a Cortex A5 based SoC, with a Chipidea based USB controller and a Sigmatel Phy or some- thing if my memory serves me right. We are currently in the process of implementing

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Felipe Balbi
On Mon, Aug 24, 2015 at 10:51:04AM -0400, Alan Stern wrote: On Mon, 24 Aug 2015, Peter Chen wrote: Thanks, that's much clear. At udc driver: __set_halt(struct usb_ep *ep, int value, bool may_fail) { if (may_fail ep queue is not empty) { return false }

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Felipe Balbi
On Mon, Aug 24, 2015 at 11:43:21AM -0400, Alan Stern wrote: On Mon, 24 Aug 2015, Peter Chen wrote: On Thu, Aug 20, 2015 at 05:03:46PM -0400, Alan Stern wrote: On Thu, 20 Aug 2015, Felipe Balbi wrote: - When using pattern = 1 as module parameters to compare the data, the

USB suspend resume issue on Vybrid (Chipidea IP/MXS PHY)

2015-08-24 Thread Sanchayan Maity
Hello, I am working on Freescale Vybrid which is a Cortex A5 based SoC, with a Chipidea based USB controller and a Sigmatel Phy or some- thing if my memory serves me right. We are currently in the process of implementing suspend resume and fixing related issues. After resume the USB PHY does not

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-24 Thread David Miller
From: Eugene Shatokhin eugene.shatok...@rosalab.ru Date: Wed, 19 Aug 2015 14:59:01 +0300 So the following might be possible, although unlikely: CPU0 CPU1 clear_bit: read dev-flags clear_bit: clear EVENT_RX_KILL in the read value dev-flags=0;

Re: [PATCH] usb: phy: msm: Unregister driver interest for VBUS and ID events

2015-08-24 Thread Tim Bird
On 08/18/2015 12:56 AM, Ivan T. Ivanov wrote: Right now even if driver failed to probe extcon framework will still deliver its VBUS and ID events, which will lead to random exception codes. Fix this by removing driver interest for VBUS and ID events when probe fail. Fixes: 591fc116f330

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-24 Thread Eugene Shatokhin
24.08.2015 16:29, Bjørn Mork пишет: Eugene Shatokhin eugene.shatok...@rosalab.ru writes: 19.08.2015 15:31, Bjørn Mork пишет: Eugene Shatokhin eugene.shatok...@rosalab.ru writes: The problem is not in the reordering but rather in the fact that dev-flags = 0 is not necessarily atomic w.r.t.

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Alan Stern
On Mon, 24 Aug 2015, Felipe Balbi wrote: Maybe we should add a vendor-specific control request to gadget Zero so that the host can tell the gadget what the transfer size will be. I proposed that many months ago and you were against it, remember ? I believe you -- it sounds like the sort

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-24 Thread Eugene Shatokhin
24.08.2015 20:43, David Miller пишет: From: Eugene Shatokhin eugene.shatok...@rosalab.ru Date: Wed, 19 Aug 2015 14:59:01 +0300 So the following might be possible, although unlikely: CPU0 CPU1 clear_bit: read dev-flags clear_bit: clear

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-24 Thread David Miller
From: Alan Stern st...@rowland.harvard.edu Date: Mon, 24 Aug 2015 14:06:15 -0400 (EDT) On Mon, 24 Aug 2015, David Miller wrote: Atomic operations like clear_bit also will behave that way. Are you certain about that? I couldn't find any mention of it in Documentation/atomic_ops.txt. In

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-24 Thread Alan Stern
On Mon, 24 Aug 2015, David Miller wrote: From: Eugene Shatokhin eugene.shatok...@rosalab.ru Date: Wed, 19 Aug 2015 14:59:01 +0300 So the following might be possible, although unlikely: CPU0 CPU1 clear_bit: read dev-flags clear_bit:

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-24 Thread Alan Stern
On Mon, 24 Aug 2015, Alan Stern wrote: On Mon, 24 Aug 2015, David Miller wrote: From: Eugene Shatokhin eugene.shatok...@rosalab.ru Date: Wed, 19 Aug 2015 14:59:01 +0300 So the following might be possible, although unlikely: CPU0 CPU1 clear_bit:

Re: v4.1.4 xhci: 50%~66% chance of HC died; cleaning up on boot

2015-08-24 Thread Vincent Pelletier
On Mon, 24 Aug 2015 10:15:52 +, David Laight david.lai...@aculab.com wrote: Probably worth determining which xhci controller hardware is being used. I believe it is part of the CPU: http://ark.intel.com/products/78866/Intel-Celeron-Processor-J1800-1M-Cache-up-to-2_58-GHz (from the

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Peter Chen
On Fri, Aug 21, 2015 at 10:16:30AM -0400, Alan Stern wrote: On Fri, 21 Aug 2015, Peter Chen wrote: Thanks, Alan and Felipe. My problem should be the chipidea udc driver does not support functional stall well, it fixes the handling between functional and protocol stall. My

Re: Support of Mark-10 Force Gauge USB

2015-08-24 Thread Johan Hovold
On Thu, Aug 20, 2015 at 06:06:22PM +0200, Sepp Käsbauer wrote: Hi Johan, if you want to take the following patch then the Mark-10 Force Gauge Series 5 is supported by the cp210x driver. We have tested only with kernel 4.1.5 It works perfect. Thanks, Sepp Käsbauer see:

Re: [PATCH v3 1/1] USB:option:add ZTE PIDs

2015-08-24 Thread Johan Hovold
On Wed, Aug 19, 2015 at 08:51:17AM -0700, Liu.Zhao wrote: This is intended to add ZTE device PIDs on kernel. Signed-off-by: Liu.Zhao lzsos...@163.com --- drivers/usb/serial/option.c | 36 1 file changed, 28 insertions(+), 8 deletions(-) diff

RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb host driver

2015-08-24 Thread Ramneek Mehresh
-Original Message- From: Alan Stern [mailto:st...@rowland.harvard.edu] Sent: Thursday, August 20, 2015 7:40 PM To: Mehresh Ramneek-B31383 ramneek.mehr...@freescale.com Cc: linux-ker...@vger.kernel.org; ba...@ti.com; gre...@linuxfoundation.org; linux-usb@vger.kernel.org; Li

Re: [PATCH v3 1/1] USB:option:add ZTE PIDs

2015-08-24 Thread Bjørn Mork
Johan Hovold jo...@kernel.org writes: On Wed, Aug 19, 2015 at 08:51:17AM -0700, Liu.Zhao wrote: #define BENQ_VENDOR_ID 0x04a5 #define BENQ_PRODUCT_H100x4068 @@ -544,6 +548,14 @@ static const struct option_blacklist_info

[PATCH 1/1] usb: chipidea: udc: using the correct stall implementation

2015-08-24 Thread Peter Chen
According to spec, there are functional and protocol stalls. For functional stall, it is for bulk and interrupt endpoints, below are cases for it: - Host sends SET_FEATURE request for Set-Halt, the udc driver needs to set stall, and return true unconditionally. - The gadget driver may call

RE: v4.1.4 xhci: 50%~66% chance of HC died; cleaning up on boot

2015-08-24 Thread David Laight
From: Mathias Nyman Sent: 24 August 2015 10:48 On 23.08.2015 09:37, Vincent Pelletier wrote: I have one machine which fails to get a working USB bus on at least every other boot. This machine having no PS2 ports, bus failure means no keyboard, and a forced power cycle (sadly, there is no

Re: [PATCH] usb: gadget: f_uac1: Convert use of __constant_cpu_to_le16 to cpu_to_le16

2015-08-24 Thread Vaishali Thakkar
On Mon, Aug 24, 2015 at 2:29 PM, David Laight david.lai...@aculab.com wrote: From: Vaishali Thakkar [mailto:vthakkar1...@gmail.com] Sent: 22 August 2015 02:57 ... - .bcdADC = __constant_cpu_to_le16(0x0100), - .wTotalLength =

Re: [PATCH 0/7] Exynos4412-based Trats2 USB gadget (DWC2) fixes

2015-08-24 Thread Krzysztof Kozlowski
On 21.08.2015 21:38, Marek Szyprowski wrote: Dear All, Since v3.19 s3c-hsotg (DWC2) USB controller stopped working on Exynos4412-based Trats2 platform. However on Odroid-U3 (which is also Exynos4412-based) it worked fine all the time. After long investigation it turned out that this was

Re: option driver crashes on modem removal

2015-08-24 Thread Oliver Neukum
On Mon, 2015-08-24 at 11:14 +0200, Yegor Yefremov wrote: Applying your patch doesn't help, i.e. error messages disappear, but I get following crash anyway (kernel 3.18.20): Johan, I think you need to limit the number of retries and schedule a reset when the limit is hit. Regards

Re: v4.1.4 xhci: 50%~66% chance of HC died; cleaning up on boot

2015-08-24 Thread Mathias Nyman
Hi On 23.08.2015 09:37, Vincent Pelletier wrote: Hello, I have one machine which fails to get a working USB bus on at least every other boot. This machine having no PS2 ports, bus failure means no keyboard, and a forced power cycle (sadly, there is no accessible reset button) to try again.

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Peter Chen
On Thu, Aug 20, 2015 at 05:03:46PM -0400, Alan Stern wrote: On Thu, 20 Aug 2015, Felipe Balbi wrote: - When using pattern = 1 as module parameters to compare the data, the packet size must be same between host and device's. why ? The gadget stores the pattern data

RE: [PATCH] usb: gadget: f_uac1: Convert use of __constant_cpu_to_le16 to cpu_to_le16

2015-08-24 Thread David Laight
From: Vaishali Thakkar [mailto:vthakkar1...@gmail.com] Sent: 22 August 2015 02:57 ... - .bcdADC = __constant_cpu_to_le16(0x0100), - .wTotalLength = __constant_cpu_to_le16(UAC_DT_TOTAL_LENGTH), + .bcdADC = cpu_to_le16(0x0100), +

Re: option driver crashes on modem removal

2015-08-24 Thread Yegor Yefremov
Hi Johan, On Mon, Aug 17, 2015 at 5:29 PM, Johan Hovold jo...@kernel.org wrote: On Tue, Aug 11, 2015 at 12:31:47PM +0200, Yegor Yefremov wrote: On Tue, Aug 11, 2015 at 11:58 AM, Bjørn Mork bj...@mork.no wrote: [replaced 'netdev' with 'linux-usb' as this concerns a USB serial driver only]

Re: [PATCH v9 1/7] usb: interface authorization: Declare authorized attribute

2015-08-24 Thread Stefan Koch
Am Montag, den 17.08.2015, 09:34 -0700 schrieb Greg KH: On Sat, Aug 08, 2015 at 11:32:50AM +0200, Stefan Koch wrote: The attribute authorized shows the authorization state for an interface. Signed-off-by: Stefan Koch sk...@suse.de This email bounces, so I have to rip this series out of

[PATCH 1/2] usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared

2015-08-24 Thread Eugene Shatokhin
It is needed to check EVENT_NO_RUNTIME_PM bit of dev-flags in usbnet_stop(), but its value should be read before it is cleared when dev-flags is set to 0. The problem was spotted and the fix was provided by Oliver Neukum oneu...@suse.de. Signed-off-by: Eugene Shatokhin

Re: [PATCH 2/2] usbnet: Fix a race between usbnet_stop() and the BH

2015-08-24 Thread Bjørn Mork
Eugene Shatokhin eugene.shatok...@rosalab.ru writes: The race may happen when a device (e.g. YOTA 4G LTE Modem) is unplugged while the system is downloading a large file from the Net. Hardware breakpoints and Kprobes with delays were used to confirm that the race does actually happen. The

[PATCH v10 0/7] usb: interface authorization

2015-08-24 Thread Stefan Koch
This patch introduces an interface authorization for USB devices. The kernel supports a device authorization because of wireless USB. But the new interface authorization allows to authorize or deauthorize individual interfaces instead authorization or deauthorize a whole device. Therefore the

Re: v4.1.4 xhci: 50%~66% chance of HC died; cleaning up on boot

2015-08-24 Thread Vincent Pelletier
On Mon, 24 Aug 2015 12:48:13 +0300, Mathias Nyman mathias.ny...@linux.intel.com wrote: Do the usb devices work normally after a successful boot? (no suspicious xhci entries in dmesg) There are indeed some suspicious messages in my current dmesg: $ dmesg | grep [xeou]hci [2.115002] xhci_hcd

Re: 4.2 kernel trace when hot unplug a mounted USB/SATA/MMC devices with ext2/ext3/ext4 file system

2015-08-24 Thread Duc Dang
On Sat, Aug 15, 2015 at 1:58 AM, Christoph Hellwig h...@lst.de wrote: On Fri, Aug 14, 2015 at 05:52:44PM -0700, Duc Dang wrote: The commit 08439fec26 ext4: remove block_device_ejected only causes issue with ext4 and trying reverting it helps our test passes with ext4. But how about the same

[PATCH 0/2] usbnet: Fix 2 problems in usbnet_stop()

2015-08-24 Thread Eugene Shatokhin
The following problems found when investigating races in usbnet module are fixed here: 1. EVENT_NO_RUNTIME_PM bit of dev-flags should be read before it is cleared by dev-flags = 0. Thanks to Oliver Neukum for spotting this problem and providing a fix. 2. A race on on skb_queue between

[PATCH] usb: musb: fix cppi channel teardown for isoch transfer

2015-08-24 Thread Bin Liu
After a few iterations of start/stop UVC camera streaming, the streaming stops. This patch adds 250us delay in the cppi channel abort path to let cppi drain properly. Using 50us delay seems to be too aggressive, some webcams are still broken. 250us is the original value used in TI 3.2 kernel.

[PATCH 2/2] usbnet: Fix a race between usbnet_stop() and the BH

2015-08-24 Thread Eugene Shatokhin
The race may happen when a device (e.g. YOTA 4G LTE Modem) is unplugged while the system is downloading a large file from the Net. Hardware breakpoints and Kprobes with delays were used to confirm that the race does actually happen. The race is on skb_queue ('next' pointer) between usbnet_stop()

[PATCH v10 5/7] usb: interface authorization: SysFS part of USB interface authorization

2015-08-24 Thread Stefan Koch
This introduces an attribute for each interface to authorize (1) or deauthorize (0) it: /sys/bus/usb/devices/INTERFACE/authorized Signed-off-by: Stefan Koch stefan.koc...@gmail.com --- drivers/usb/core/sysfs.c | 36 1 file changed, 36 insertions(+) diff

[PATCH v10 6/7] usb: interface authorization: Documentation part

2015-08-24 Thread Stefan Koch
This part adds the documentation for the interface authorization. Signed-off-by: Stefan Koch stefan.koc...@gmail.com --- Documentation/ABI/testing/sysfs-bus-usb | 20 Documentation/usb/authorization.txt | 31 +++ 2 files changed, 51

[PATCH v10 1/7] usb: interface authorization: Declare authorized attribute

2015-08-24 Thread Stefan Koch
The attribute authorized shows the authorization state for an interface. Signed-off-by: Stefan Koch stefan.koc...@gmail.com --- include/linux/usb.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/usb.h b/include/linux/usb.h index 447fe29..3deccab 100644 ---

[PATCH v10 7/7] usb: interface authorization: Use a flag for the default device authorization

2015-08-24 Thread Stefan Koch
With this patch a flag instead of a variable is used for the default device authorization. Signed-off-by: Stefan Koch stefan.koc...@gmail.com --- drivers/usb/core/hcd.c | 31 +-- drivers/usb/core/usb.c | 2 +- include/linux/usb/hcd.h | 16 +--- 3 files

[PATCH v10 2/7] usb: interface authorization: Introduces the default interface authorization

2015-08-24 Thread Stefan Koch
Interfaces are allowed per default. This can disabled or enabled (again) by writing 0 or 1 to /sys/bus/usb/devices/usbX/interface_authorized_default Signed-off-by: Stefan Koch stefan.koc...@gmail.com --- drivers/usb/core/hcd.c | 47 ++

[PATCH v10 4/7] usb: interface authorization: Introduces the USB interface authorization

2015-08-24 Thread Stefan Koch
The kernel supports the device authorization because of wireless USB. These is usable for wired USB devices, too. These new interface authorization allows to enable or disable individual interfaces instead a whole device. If a deauthorized interface will be authorized so the driver probing must

[PATCH v10 3/7] usb: interface authorization: Control interface probing and claiming

2015-08-24 Thread Stefan Koch
Driver probings and interface claims get rejected if an interface is not authorized. Signed-off-by: Stefan Koch stefan.koc...@gmail.com --- drivers/usb/core/driver.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index

Re: [PATCH] usb: dwc2: rename all s3c_* to dwc2_*

2015-08-24 Thread Krzysztof Kozlowski
On 25.08.2015 08:30, John Youn wrote: On 8/18/2015 11:54 AM, Felipe Balbi wrote: this driver has long ago became dwc2.ko with both peripheral and host roles, there's no point in keeping the old function names. Signed-off-by: Felipe Balbi ba...@ti.com ---

Re: [PATCH] usb: dwc2: rename all s3c_* to dwc2_*

2015-08-24 Thread John Youn
On 8/18/2015 11:54 AM, Felipe Balbi wrote: this driver has long ago became dwc2.ko with both peripheral and host roles, there's no point in keeping the old function names. Signed-off-by: Felipe Balbi ba...@ti.com --- arch/arm/mach-s3c64xx/mach-crag6410.c | 4 +-

Re: [PATCH v3] usb: dwc2: add support for big-endian Lantiq SoCs

2015-08-24 Thread Vincent Pelletier
Hello, Just in case it faded from memory, here is why try2 did not get included: On Tue, 17 Mar 2015 19:33:21 -0500, Felipe Balbi ba...@ti.com wrote: On Tue, Mar 17, 2015 at 12:23:03PM -0700, John Youn wrote: Can you hold off on merging this series until we get Yousaf's latest changes

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Peter Chen
On Mon, Aug 24, 2015 at 10:53:50AM -0500, Felipe Balbi wrote: On Mon, Aug 24, 2015 at 10:51:04AM -0400, Alan Stern wrote: On Mon, 24 Aug 2015, Peter Chen wrote: Thanks, that's much clear. At udc driver: __set_halt(struct usb_ep *ep, int value, bool may_fail) { if

Re: [PATCHv2] Input: xpad - Fix double URB submission races

2015-08-24 Thread Laura Abbott
On 08/21/2015 09:50 AM, Dmitry Torokhov wrote: Hi Laura, On Mon, Aug 10, 2015 at 05:26:12PM -0700, Laura Abbott wrote: v2: Created a proper queue for events instead of just dropping them How long does it take for the queue to exhaust your memory if you keep bombarding the driver with

Re: [PATCH 1/7] phy: exynos-usb2: add vbus regulator support

2015-08-24 Thread Marek Szyprowski
Hello, On 2015-08-21 14:44, Kishon Vijay Abraham I wrote: On Friday 21 August 2015 06:08 PM, Marek Szyprowski wrote: Exynos USB2 PHY has separate power supply, which is usually provided by VBUS regulator. This patch adds support for it. VBUS regulator is optional, to keep compatibility with

Re: USB suspend resume issue on Vybrid (Chipidea IP/MXS PHY)

2015-08-24 Thread Peter Chen
On Mon, Aug 24, 2015 at 09:40:04PM +0530, Sanchayan Maity wrote: Hello, I am working on Freescale Vybrid which is a Cortex A5 based SoC, with a Chipidea based USB controller and a Sigmatel Phy or some- thing if my memory serves me right. We are currently in the process of implementing

Re: Some restrictions when using usbtest and g_zero

2015-08-24 Thread Peter Chen
On Mon, Aug 24, 2015 at 02:17:08PM -0400, Alan Stern wrote: On Mon, 24 Aug 2015, Felipe Balbi wrote: Maybe we should add a vendor-specific control request to gadget Zero so that the host can tell the gadget what the transfer size will be. I proposed that many months ago and you were

[PATCH] usb: message: remove redundant declaration

2015-08-24 Thread Kris Borer
Fix the Sparse warning: message.c:1390:21: warning: symbol 'i' shadows an earlier one message.c:1294:13: originally declared here Signed-off-by: Kris Borer kbo...@gmail.com --- drivers/usb/core/message.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/core/message.c

Re: PROBLEM: USB devices not appearing after upgrading 4.1.4 = 4.1.5

2015-08-24 Thread Daurnimator
On 21 August 2015 at 17:48, Daurnimator q...@daurnimator.com wrote: On 21 August 2015 at 17:39, Mathias Nyman mathias.ny...@intel.com wrote: I can't directly see what would cause it. Only theory for now is if one those changes left some port change event uncleared, blocking port status

Re: Re: [PATCH v5]USB:OHCI: BugFix:Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()

2015-08-24 Thread AMAN DEEP
Hi Greg This still doesn't apply at all, please work on sending the patch to yourself and seeing if you can add it to my usb-next git branch. Sorry for the inconvenience to you I think its problem with my email client for sending patch. Now, i will make new patch against latest linux-next