Re: [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property

2017-01-31 Thread Rafał Miłecki
On 01/31/2017 10:34 PM, Jacek Anaszewski wrote: On 01/31/2017 05:11 PM, Rafał Miłecki wrote: On 01/25/2017 10:04 PM, Jacek Anaszewski wrote: On 01/25/2017 10:03 AM, Rafał Miłecki wrote: On 21 January 2017 at 22:42, Jacek Anaszewski wrote: On 01/21/2017 05:24 PM,

Re: [PATCH 4.10-rc3 12/13] net: ath5k: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Kalle Valo
Russell King writes: > Fix these errors reported by the 0-day builder by replacing the > linux/export.h include with linux/module.h. > > In file included from include/linux/platform_device.h:14:0, > from drivers/net/wireless/ath/ath5k/ahb.c:20: >

Re: [PATCH v5 1/5] usb: dwc2: Add support for STM32F429/439/469 USB OTG HS/FS in FS mode (internal PHY)

2017-01-31 Thread John Youn
On 1/31/2017 5:26 PM, Bruno Herrera wrote: > This patch introduces a new parameter to activate USB OTG HS/FS core > embedded phy transceiver. The STM32F4x9 SoC uses the GGPIO register > to enable the transceiver. > Also add the dwc2_set_params function for stm32f4 otg fs. > > Signed-off-by: Bruno

Re: [PATCH 4.10-rc3 00/13] net: dsa: remove unnecessary phy.h include

2017-01-31 Thread Florian Fainelli
On 01/31/2017 11:17 AM, Russell King - ARM Linux wrote: > Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an > unnecessary dependency for quite a large amount of the kernel. There's > very little which actually requires definitions from phy.h in net/dsa.h > - the include itself

[PATCH 1/2] fs: configfs: make qw_sign attribute symmetric

2017-01-31 Thread Stefan Agner
Currently qw_sign requires UTF-8 character to set, but returns UTF-16 when read. This isn't obvious when simply using cat since the null characters are not visible, but hexdump unveils the true string: # echo MSFT100 > os_desc/qw_sign # hexdump -C os_desc/qw_sign 4d 00 53 00 46 00

[PATCH 2/2] fs: configfs: use hexadecimal values and new line

2017-01-31 Thread Stefan Agner
Other unsigned properties return hexadecimal values, follow this convention when printing b_vendor_code too. Also add newlines to the OS Descriptor support related properties, like other sysfs files use. Signed-off-by: Stefan Agner --- drivers/usb/gadget/configfs.c | 6 +++---

[PATCH v5 4/5] ARM: dts: stm32: Enable USB HS in FS mode (embedded phy) on stm32f429-disco

2017-01-31 Thread Bruno Herrera
This patch enables USB HS working in FS mode on stm32f429-disco with 5V VBUS enable. Signed-off-by: Bruno Herrera --- arch/arm/boot/dts/stm32f429-disco.dts | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/stm32f429-disco.dts

[PATCH v5 3/5] ARM: dts: stm32: Enable USB FS on stm32f469-disco

2017-01-31 Thread Bruno Herrera
This patch enables USB FS on stm32f469-disco with 5V VBUS enable. Signed-off-by: Bruno Herrera --- arch/arm/boot/dts/stm32f469-disco.dts | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/stm32f469-disco.dts

[PATCH v5 5/5] dt-bindings: Document the STM32 USB OTG DWC2 core binding

2017-01-31 Thread Bruno Herrera
This patch adds the documentation for STM32F4x9 USB OTG FS/HS compatible strings. Signed-off-by: Bruno Herrera Acked-by: Rob Herring --- Documentation/devicetree/bindings/usb/dwc2.txt | 4 1 file changed, 4 insertions(+) diff --git

[PATCH v5 1/5] usb: dwc2: Add support for STM32F429/439/469 USB OTG HS/FS in FS mode (internal PHY)

2017-01-31 Thread Bruno Herrera
This patch introduces a new parameter to activate USB OTG HS/FS core embedded phy transceiver. The STM32F4x9 SoC uses the GGPIO register to enable the transceiver. Also add the dwc2_set_params function for stm32f4 otg fs. Signed-off-by: Bruno Herrera ---

[PATCH v5 2/5] ARM: dts: stm32: Add USB FS support for STM32F429 MCU

2017-01-31 Thread Bruno Herrera
This patch adds the USB pins and nodes for USB FS core. Signed-off-by: Bruno Herrera --- arch/arm/boot/dts/stm32f429.dtsi | 31 +++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/stm32f429.dtsi

[PATCH v5 0/5] usb: dwc2: Add support for USB OTG on STM32F4x9

2017-01-31 Thread Bruno Herrera
The STM32F4x9 MCU family has two DWC2 USB OTG cores on it. One core is USB OTG FS and other core is USB OTG HS. The USB FS core only works with its internal phy whilst the USF HS core can work in HS with external ulpi phy or in FS/LS speed with the embedded FS PHY. The goal of this patch series

Re: [PATCH 2/8] power: add power sequence library

2017-01-31 Thread Rafael J. Wysocki
On Tue, Jan 3, 2017 at 7:33 AM, Peter Chen wrote: > We have an well-known problem that the device needs to do some power > sequence before it can be recognized by related host, the typical > example like hard-wired mmc devices and usb devices. > > This power sequence is hard

Re: [PATCH] r8152: Allocate interrupt buffer as part of struct r8152

2017-01-31 Thread Guenter Roeck
On Tue, Jan 31, 2017 at 02:53:47PM -0500, Alan Stern wrote: > On Tue, 31 Jan 2017, Guenter Roeck wrote: > > > When unloading the r8152 driver using the 'unbind' sysfs attribute > > in a system with KASAN enabled, the following error message is seen > > on a regular basis. > > ... > > > The

Re: [PATCH] r8152: Allocate interrupt buffer as part of struct r8152

2017-01-31 Thread Guenter Roeck
On Tue, Jan 31, 2017 at 11:53:31AM -0800, Eric Dumazet wrote: > On Tue, 2017-01-31 at 11:06 -0800, Guenter Roeck wrote: > > When unloading the r8152 driver using the 'unbind' sysfs attribute > > in a system with KASAN enabled, the following error message is seen > > on a regular basis. > > > >

Re: [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property

2017-01-31 Thread Jacek Anaszewski
Hi Rafał, On 01/31/2017 05:11 PM, Rafał Miłecki wrote: > On 01/25/2017 10:04 PM, Jacek Anaszewski wrote: >> On 01/25/2017 10:03 AM, Rafał Miłecki wrote: >>> On 21 January 2017 at 22:42, Jacek Anaszewski >>> wrote: On 01/21/2017 05:24 PM, Rafał Miłecki wrote:

[PATCH v3 0/2] Work-around for DWC_USB3_NUM_EPS = DWC_USB3_NUM_IN_EPS

2017-01-31 Thread Bryan O'Donoghue
This is V3 of the previous patchset. This version implements the suggested change from Felipe to rationalise num_in_eps and num_out_eps down to num_eps directly. The old mapping of OUT/IN endpoint pairs is maintained to ensure that fixed-mapped endpoints - as is possible on some FPGA

[PATCH v3 1/2] usb: dwc3: refactor gadget endpoint count calculation

2017-01-31 Thread Bryan O'Donoghue
- DWC_USB3_NUM indicates the number of Device mode single directional endpoints, including OUT and IN endpoint 0. - DWC_USB3_NUM_IN_EPS indicates the maximum number of Device mode IN endpoints active at any time, including control endpoint 0. It's possible to configure RTL such that

[PATCH v3 2/2] usb: dwc3: remove dwc3_gadget_init_hw_endpoints

2017-01-31 Thread Bryan O'Donoghue
A previous patch in the series reduces the number of callsites of dwc3_gadget_init_hw_endpoints from two to one. This patch removes the redundant step of wrappering one function in the other, which can be done by adding a parameter to dwc3_gadget_init_endpoints and moving the linked-list

Re: [PATCH v3 0/2] Work-around for DWC_USB3_NUM_EPS = DWC_USB3_NUM_IN_EPS

2017-01-31 Thread Bryan O'Donoghue
On 31/01/17 20:58, Bryan O'Donoghue wrote: This is V3 of the previous patchset. This version implements the suggested change from Felipe to rationalise num_in_eps and num_out_eps down to num_eps directly. The old mapping of OUT/IN endpoint pairs is maintained to ensure that fixed-mapped

Re: [PATCH 4.10-rc3 08/13] net: emac: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Timur Tabi
On 01/31/2017 01:19 PM, Russell King wrote: drivers/net/ethernet/qualcomm/emac/emac-sgmii.c:58:12: error: dereferencing pointer to incomplete type 'struct phy_device' Add linux/phy.h to emac-sgmii.c Signed-off-by: Russell King ---

Re: [PATCH] usb: dwc2: introduce config parameter to ignore supplies vusb_a and vusb_d

2017-01-31 Thread Heiner Kallweit
Am 31.01.2017 um 20:23 schrieb Heiner Kallweit: > Am 31.01.2017 um 19:48 schrieb John Youn: >> On 1/30/2017 11:13 PM, Heiner Kallweit wrote: >>> Am 31.01.2017 um 03:32 schrieb John Youn: On 1/28/2017 2:06 PM, Heiner Kallweit wrote: > Supplies for vusb_a and vusb_d are needed only on a

Re: [PATCH] r8152: Allocate interrupt buffer as part of struct r8152

2017-01-31 Thread Alan Stern
On Tue, 31 Jan 2017, Guenter Roeck wrote: > When unloading the r8152 driver using the 'unbind' sysfs attribute > in a system with KASAN enabled, the following error message is seen > on a regular basis. ... > The two-byte allocation in conjunction with code analysis suggests that > the

Re: [PATCH] r8152: Allocate interrupt buffer as part of struct r8152

2017-01-31 Thread Eric Dumazet
On Tue, 2017-01-31 at 11:06 -0800, Guenter Roeck wrote: > When unloading the r8152 driver using the 'unbind' sysfs attribute > in a system with KASAN enabled, the following error message is seen > on a regular basis. > > static int alloc_all_mem(struct r8152 *tp) > @@ -1423,10 +1420,6 @@

RE: linux USB dwc3 not working

2017-01-31 Thread andy_purcell
Felipe, > okay, good. RUN/STOP bit is set. So it still doesn't work? The only thing I > can > think of, is that VBUS_VALID bit in the Mux register isn't set properly. I'm > not in > the office now, but I'll try to get you more info on that. > OK, I have no information about a VBUS_VALID bit

Re: [PATCH v4 1/5] usb: dwc2: Add support for STM32F429/439/469 USB OTG HS/FS in FS mode (internal PHY)

2017-01-31 Thread John Youn
On 1/28/2017 6:21 PM, Bruno Herrera wrote: > This patch introduces a new parameter to activate USB OTG HS/FS core embedded > phy transceiver. The STM32F4x9 SoC uses the GGPIO register to enable the > transceiver. > Also add the dwc2_core_params structure for stm32f4 otg fs. > > Signed-off-by:

Re: [PATCH 4.10-rc3 01/13] net: sunrpc: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Anna Schumaker
Hi Russell, On 01/31/2017 02:18 PM, Russell King wrote: > Removing linux/phy.h from net/dsa.h reveals a build error in the sunrpc > code: > > net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function 'xprt_rdma_bc_put': > net/sunrpc/xprtrdma/svc_rdma_backchannel.c:277:2: error: implicit

Re: [PATCH 4.10-rc3 09/13] iscsi: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Bart Van Assche
On Tue, 2017-01-31 at 19:19 +, Russell King wrote: > drivers/target/iscsi/iscsi_target_login.c:1135:7: error: implicit declaration > of function 'try_module_get' [-Werror=implicit-function-declaration] > > Add linux/module.h to iscsi_target_login.c. > > Signed-off-by: Russell King

[PATCH 4.10-rc3 02/13] net: cgroups: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Russell King
net/core/netprio_cgroup.c:303:16: error: expected declaration specifiers or '...' before string constant MODULE_LICENSE("GPL v2"); ^~~~ Add linux/module.h to fix this. Signed-off-by: Russell King --- net/core/netprio_cgroup.c | 1 + 1

[PATCH 4.10-rc3 05/13] net: bgmac: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Russell King
drivers/net/ethernet/broadcom/bgmac.c:1015:17: error: dereferencing pointer to incomplete type 'struct mii_bus' drivers/net/ethernet/broadcom/bgmac.c:1185:2: error: implicit declaration of function 'phy_start' [-Werror=implicit-function-declaration] drivers/net/ethernet/broadcom/bgmac.c:1198:2:

[PATCH 4.10-rc3 03/13] net: macb: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Russell King
drivers/net/ethernet/cadence/macb.h:862:33: sparse: expected ; at end of declaration drivers/net/ethernet/cadence/macb.h:862:33: sparse: Expected } at end of struct-union-enum-specifier drivers/net/ethernet/cadence/macb.h:862:33: sparse: got phy_interface

[PATCH 4.10-rc3 07/13] net: mvneta: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Russell King
drivers/net/ethernet/marvell/mvneta.c:2694:26: error: storage size of 'status' isn't known drivers/net/ethernet/marvell/mvneta.c:2695:26: error: storage size of 'changed' isn't known drivers/net/ethernet/marvell/mvneta.c:2695:9: error: variable 'changed' has initializer but incomplete type

[PATCH 4.10-rc3 01/13] net: sunrpc: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Russell King
Removing linux/phy.h from net/dsa.h reveals a build error in the sunrpc code: net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function 'xprt_rdma_bc_put': net/sunrpc/xprtrdma/svc_rdma_backchannel.c:277:2: error: implicit declaration of function 'module_put' [-Werror=implicit-function-declaration]

[PATCH 4.10-rc3 04/13] net: lan78xx: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Russell King
drivers/net/usb/lan78xx.c:394:33: sparse: expected ; at end of declaration drivers/net/usb/lan78xx.c:394:33: sparse: Expected } at end of struct-union-enum-specifier drivers/net/usb/lan78xx.c:394:33: sparse: got interface drivers/net/usb/lan78xx.c:403:1: sparse: Expected ; at the end of type

[PATCH 4.10-rc3 09/13] iscsi: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Russell King
drivers/target/iscsi/iscsi_target_login.c:1135:7: error: implicit declaration of function 'try_module_get' [-Werror=implicit-function-declaration] Add linux/module.h to iscsi_target_login.c. Signed-off-by: Russell King --- drivers/target/iscsi/iscsi_target_login.c

[PATCH 4.10-rc3 10/13] MIPS: Octeon: Remove unnecessary MODULE_*()

2017-01-31 Thread Russell King
octeon-platform.c can not be built as a module for two reasons: (a) the Makefile doesn't allow it: obj-y := cpu.o setup.o octeon-platform.o octeon-irq.o csrc-octeon.o (b) the multiple *_initcall() statements, each of which are translated to a module_init() call when attempting a module

[PATCH 4.10-rc3 06/13] net: fman: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Russell King
drivers/net/ethernet/freescale/fman/fman_memac.c:519:21: error: dereferencing pointer to incomplete type 'struct fixed_phy_status' Add linux/phy_fixed.h to fman_memac.c Signed-off-by: Russell King --- drivers/net/ethernet/freescale/fman/fman_memac.c | 1 + 1 file

[PATCH 4.10-rc3 08/13] net: emac: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Russell King
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c:58:12: error: dereferencing pointer to incomplete type 'struct phy_device' Add linux/phy.h to emac-sgmii.c Signed-off-by: Russell King --- drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 1 + 1 file changed, 1

[PATCH 4.10-rc3 11/13] net: liquidio: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Russell King
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error: expected declaration specifiers or '...' before string constant drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: warning: data definition has no type or storage class drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:30: error:

[PATCH 4.10-rc3 13/13] net: dsa: remove unnecessary phy*.h includes

2017-01-31 Thread Russell King
Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions from phy.h in net/dsa.h - the include itself only wants the declaration of a couple of structures and

Re: [PATCH] usb: dwc2: introduce config parameter to ignore supplies vusb_a and vusb_d

2017-01-31 Thread Heiner Kallweit
Am 31.01.2017 um 19:48 schrieb John Youn: > On 1/30/2017 11:13 PM, Heiner Kallweit wrote: >> Am 31.01.2017 um 03:32 schrieb John Youn: >>> On 1/28/2017 2:06 PM, Heiner Kallweit wrote: Supplies for vusb_a and vusb_d are needed only on a minority of systems supported by the dwc2 driver

[PATCH 4.10-rc3 12/13] net: ath5k: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-01-31 Thread Russell King
Fix these errors reported by the 0-day builder by replacing the linux/export.h include with linux/module.h. In file included from include/linux/platform_device.h:14:0, from drivers/net/wireless/ath/ath5k/ahb.c:20: include/linux/device.h:1463:1: warning: data definition has no

[PATCH 4.10-rc3 00/13] net: dsa: remove unnecessary phy.h include

2017-01-31 Thread Russell King - ARM Linux
Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an unnecessary dependency for quite a large amount of the kernel. There's very little which actually requires definitions from phy.h in net/dsa.h - the include itself only wants the declaration of a couple of structures and

[PATCH] r8152: Allocate interrupt buffer as part of struct r8152

2017-01-31 Thread Guenter Roeck
When unloading the r8152 driver using the 'unbind' sysfs attribute in a system with KASAN enabled, the following error message is seen on a regular basis. BUG kmalloc-128 (Not tainted): Poison overwritten - INFO:

Re: [PATCH] usb: dwc2: remove deprecated comment in definition of struct dwc2_core_params

2017-01-31 Thread John Youn
On 1/31/2017 10:55 AM, John Youn wrote: > On 1/28/2017 1:42 PM, Heiner Kallweit wrote: >> Since commit 0a7d0d7fa820 "usb: dwc2: Remove dwc2_set_all_params function" >> this comment isn't applicable any longer. >> >> Signed-off-by: Heiner Kallweit >> --- >>

RE: linux USB dwc3 not working

2017-01-31 Thread Felipe Balbi
Hi Andy, andy_purc...@keysight.com writes: > 00:14.1 USB controller: Intel Corporation Sunrise Point-H USB Device > Controller (OTG) (rev 31) okay, this is dwc3. Good >> I need to ask you to try a newer kernel. Can you try v4.9.6 or v4.10-rc6? >> > > I am now running Ubuntu

Re: [PATCH] usb: dwc2: remove deprecated comment in definition of struct dwc2_core_params

2017-01-31 Thread John Youn
On 1/28/2017 1:42 PM, Heiner Kallweit wrote: > Since commit 0a7d0d7fa820 "usb: dwc2: Remove dwc2_set_all_params function" > this comment isn't applicable any longer. > > Signed-off-by: Heiner Kallweit > --- > drivers/usb/dwc2/core.h | 4 > 1 file changed, 4

Re: [PATCH] usb: dwc2: introduce config parameter to ignore supplies vusb_a and vusb_d

2017-01-31 Thread John Youn
On 1/30/2017 11:13 PM, Heiner Kallweit wrote: > Am 31.01.2017 um 03:32 schrieb John Youn: >> On 1/28/2017 2:06 PM, Heiner Kallweit wrote: >>> Supplies for vusb_a and vusb_d are needed only on a minority of systems >>> supported by the dwc2 driver (AFAIK systems with Samsung SoCs). >>> >>> On all

RE: linux USB dwc3 not working

2017-01-31 Thread andy_purcell
Hello Felipe, See responses below. > -Original Message- > From: Felipe Balbi [mailto:felipe.ba...@linux.intel.com] > Sent: Tuesday, January 31, 2017 5:10 AM > To: PURCELL,ANDY (K-Loveland,ex1) ; linux- > u...@vger.kernel.org > Subject: Re: linux USB dwc3 not

Re: [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property

2017-01-31 Thread Rafał Miłecki
On 01/25/2017 10:04 PM, Jacek Anaszewski wrote: On 01/25/2017 10:03 AM, Rafał Miłecki wrote: On 21 January 2017 at 22:42, Jacek Anaszewski wrote: On 01/21/2017 05:24 PM, Rafał Miłecki wrote: On 20 January 2017 at 23:35, Jacek Anaszewski

Re: [PATCH 2/3] USB: serial: digi_acceleport: fix incomplete rx sanity check

2017-01-31 Thread Johan Hovold
On Tue, Jan 31, 2017 at 05:55:17PM +0100, Greg Kroah-Hartman wrote: > On Tue, Jan 31, 2017 at 05:46:02PM +0100, Johan Hovold wrote: > > On Tue, Jan 31, 2017 at 05:41:52PM +0100, Greg Kroah-Hartman wrote: > > > On Tue, Jan 31, 2017 at 05:17:28PM +0100, Johan Hovold wrote: > > > > Make sure the

[PATCH] usb: gadget: f_hid: fix: Don't access hidg->req without spinlock held

2017-01-31 Thread Krzysztof Opasiak
hidg->req should be accessed only with write_spinlock held as it is set to NULL when we get disabled by host. Signed-off-by: Krzysztof Opasiak --- drivers/usb/gadget/function/f_hid.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [PATCH 2/3] USB: serial: digi_acceleport: fix incomplete rx sanity check

2017-01-31 Thread Greg KH
On Tue, Jan 31, 2017 at 05:46:02PM +0100, Johan Hovold wrote: > On Tue, Jan 31, 2017 at 05:41:52PM +0100, Greg Kroah-Hartman wrote: > > On Tue, Jan 31, 2017 at 05:17:28PM +0100, Johan Hovold wrote: > > > Make sure the received data has the required headers before parsing it. > > > > > > Also drop

Re: [PATCH 1/3] USB: serial: digi_acceleport: fix OOB data sanity check

2017-01-31 Thread Greg KH
On Tue, Jan 31, 2017 at 05:42:39PM +0100, Johan Hovold wrote: > On Tue, Jan 31, 2017 at 05:38:58PM +0100, Greg Kroah-Hartman wrote: > > On Tue, Jan 31, 2017 at 05:17:27PM +0100, Johan Hovold wrote: > > > Make sure to check for short transfers to avoid underflow in a loop > > > condition when

Re: [PATCH 2/3] USB: serial: digi_acceleport: fix incomplete rx sanity check

2017-01-31 Thread Johan Hovold
On Tue, Jan 31, 2017 at 05:41:52PM +0100, Greg Kroah-Hartman wrote: > On Tue, Jan 31, 2017 at 05:17:28PM +0100, Johan Hovold wrote: > > Make sure the received data has the required headers before parsing it. > > > > Also drop the redundant urb-status check, which has already been handled > > by

Re: [PATCH 1/3] USB: serial: digi_acceleport: fix OOB data sanity check

2017-01-31 Thread Johan Hovold
On Tue, Jan 31, 2017 at 05:38:58PM +0100, Greg Kroah-Hartman wrote: > On Tue, Jan 31, 2017 at 05:17:27PM +0100, Johan Hovold wrote: > > Make sure to check for short transfers to avoid underflow in a loop > > condition when parsing the receive buffer. > > > > Also fix an off-by-one error in the

Re: [PATCH 2/3] USB: serial: digi_acceleport: fix incomplete rx sanity check

2017-01-31 Thread Greg KH
On Tue, Jan 31, 2017 at 05:17:28PM +0100, Johan Hovold wrote: > Make sure the received data has the required headers before parsing it. > > Also drop the redundant urb-status check, which has already been handled > by the caller. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by:

Re: [PATCH] Subject: usb/serial/pl2303 add ATEN device ID

2017-01-31 Thread Johan Hovold
On Mon, Jan 30, 2017 at 07:26:40PM +0100, Marcel J.E. Mol wrote: > > Seems that ATEN serial-to-usb devices using pl2303 exist with > different device ids. This patch adds a missing device ID so it > is recognised by the driver. > > Signed-off-by: Marcel J.E. Mol > --- Thanks

Re: [PATCH 3/3] USB: serial: keyspan_pda: fix receive sanity checks

2017-01-31 Thread Greg KH
On Tue, Jan 31, 2017 at 05:17:29PM +0100, Johan Hovold wrote: > Make sure to check for short transfers before parsing the receive buffer > to avoid acting on stale data. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Johan Hovold > --- >

Re: [PATCH 2/2] usb: gadget: function: f_fs: pass companion descriptor along

2017-01-31 Thread Krzysztof Opasiak
On 01/31/2017 04:56 PM, Felipe Balbi wrote: > > Hi, > > Krzysztof Opasiak writes: >> On 01/31/2017 02:08 PM, Felipe Balbi wrote: >>> If we're dealing with SuperSpeed endpoints, we need >>> to make sure to pass along the companion descriptor >>> and initialize fields

Re: [PATCH 1/3] USB: serial: digi_acceleport: fix OOB data sanity check

2017-01-31 Thread Greg KH
On Tue, Jan 31, 2017 at 05:17:27PM +0100, Johan Hovold wrote: > Make sure to check for short transfers to avoid underflow in a loop > condition when parsing the receive buffer. > > Also fix an off-by-one error in the incomplete sanity check which could > lead to invalid data being parsed. > >

[PATCH 3/3] USB: serial: keyspan_pda: fix receive sanity checks

2017-01-31 Thread Johan Hovold
Make sure to check for short transfers before parsing the receive buffer to avoid acting on stale data. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Johan Hovold --- drivers/usb/serial/keyspan_pda.c | 19 ++- 1 file changed, 14 insertions(+), 5

[PATCH 1/3] USB: serial: digi_acceleport: fix OOB data sanity check

2017-01-31 Thread Johan Hovold
Make sure to check for short transfers to avoid underflow in a loop condition when parsing the receive buffer. Also fix an off-by-one error in the incomplete sanity check which could lead to invalid data being parsed. Fixes: 8c209e6782ca ("USB: make actual_length in struct urb field u32") Fixes:

[PATCH 2/3] USB: serial: digi_acceleport: fix incomplete rx sanity check

2017-01-31 Thread Johan Hovold
Make sure the received data has the required headers before parsing it. Also drop the redundant urb-status check, which has already been handled by the caller. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Johan Hovold --- drivers/usb/serial/digi_acceleport.c | 38

Re: [PATCH 1/3] USB: serial: ark3116: fix endpoint-check return value

2017-01-31 Thread Johan Hovold
On Tue, Jan 31, 2017 at 03:35:54PM +0100, Greg Kroah-Hartman wrote: > On Tue, Jan 31, 2017 at 11:51:07AM +0100, Johan Hovold wrote: > > Return -ENODEV rather than -EINVAL on probe errors due to a missing > > endpoint. > > > > Also clean up the endpoint sanity check somewhat and use the interface

Re: [PATCH 2/2] usb: gadget: function: f_fs: pass companion descriptor along

2017-01-31 Thread Felipe Balbi
Hi, Krzysztof Opasiak writes: > On 01/31/2017 02:08 PM, Felipe Balbi wrote: >> If we're dealing with SuperSpeed endpoints, we need >> to make sure to pass along the companion descriptor >> and initialize fields needed by the Gadget >> API. Eventually, f_fs.c should be

Re: [PATCH 2/2] usb: gadget: function: f_fs: pass companion descriptor along

2017-01-31 Thread Krzysztof Opasiak
On 01/31/2017 02:08 PM, Felipe Balbi wrote: > If we're dealing with SuperSpeed endpoints, we need > to make sure to pass along the companion descriptor > and initialize fields needed by the Gadget > API. Eventually, f_fs.c should be converted to use > config_ep_by_speed() like all other

Using functionfs results in use-after-free reported by kasan

2017-01-31 Thread Fabian Vogt
Hi everyone, I'm using usb functionfs for fuzzing host hardware here and so far found two issues on the gadget side (which it wasn't intended for, but any found bug counts!). The first one turned out to be fixed by 08f37148b6a915a6996c7dbef87769b9efee2dba 'usb: gadget: f_fs: Fix iterations on

Re: [PATCH 1/3] USB: serial: ark3116: fix endpoint-check return value

2017-01-31 Thread Greg KH
On Tue, Jan 31, 2017 at 11:51:07AM +0100, Johan Hovold wrote: > Return -ENODEV rather than -EINVAL on probe errors due to a missing > endpoint. > > Also clean up the endpoint sanity check somewhat and use the interface > device for logging a more compact error in case an expected endpoint is >

Re: [PATCH 2/3] USB: serial: ark3116: remove redundant interrupt-urb check

2017-01-31 Thread Greg KH
On Tue, Jan 31, 2017 at 11:51:08AM +0100, Johan Hovold wrote: > Remove redundant check of num_interrupt_in which has already been > verified in probe (killing a NULL-urb would also have been fine). > > Signed-off-by: Johan Hovold > --- > drivers/usb/serial/ark3116.c | 4 ++-- >

Re: [PATCH 3/3] USB: serial: ark3116: use port device for info and error messages

2017-01-31 Thread Greg KH
On Tue, Jan 31, 2017 at 11:51:09AM +0100, Johan Hovold wrote: > Use the port device rather than usb device in info and error messages. > > This makes sure that driver and tty port is included in the messages, > while also making them more uniform. > > Signed-off-by: Johan Hovold

[PATCH] usb: dwc3: wait for end transfer to complete before disable irq

2017-01-31 Thread Tomasz Medrek
From: Chuansheng Liu Currently, in "for (epnum = 2; epnum < DWC3_ENDPOINTS_NUM; epnum++)", it is waiting the DWC3_EP_END_TRANSFER_PENDING flag to be 0 which is cleared in dwc3_endpoint_interrupt(). However, before that,the dwc3 irq was disabled which reasult this flag

Re: dwc3 gadget breaks on system suspend/resume

2017-01-31 Thread Roger Quadros
On 31/01/17 14:03, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: -DALEPENA = 0x000f +DALEPENA = 0x >>> >>> Thanks for the hints. >>> >>> This problem is because reason dwc3_gadget_run_stop() is timing out >>> during the

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-01-31 Thread Mathias Nyman
On 16.01.2017 12:56, Baolin Wang wrote: Hi Mathias, Hi Sorry about the long review delay CC Alan in case my pm assumptions need to be corrected On 13 December 2016 at 15:49, Baolin Wang wrote: Enable the xhci plat runtime PM for parent device to suspend/resume

[PATCH 2/2] usb: gadget: function: f_fs: pass companion descriptor along

2017-01-31 Thread Felipe Balbi
If we're dealing with SuperSpeed endpoints, we need to make sure to pass along the companion descriptor and initialize fields needed by the Gadget API. Eventually, f_fs.c should be converted to use config_ep_by_speed() like all other functions, though. Cc: Signed-off-by:

[PATCH 1/2] usb: dwc3: gadget: make Set Endpoint Configuration macros safe

2017-01-31 Thread Felipe Balbi
Some gadget drivers are bad, bad boys. We notice that ADB was passing bad Burst Size which caused top bits of param0 to be overwritten which confused DWC3 when running this command. In order to avoid future issues, we're going to make sure values passed by macros are always safe for the

Re: linux USB dwc3 not working

2017-01-31 Thread Felipe Balbi
Hi Andy, andy_purc...@keysight.com writes: > Hello, > > I am starting work on a board that has the Intel Skylake chipset, > which has hardware for doing USB-device. Not all SKLs have dwc3 enabled. Can you provide the output of lspci? > The Intel chipset USB-device hardware is the Synopsys

Re: dwc3 gadget breaks on system suspend/resume

2017-01-31 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> -DALEPENA = 0x000f >>> +DALEPENA = 0x >> >> Thanks for the hints. >> >> This problem is because reason dwc3_gadget_run_stop() is timing out >> during the suspend sequence and so dwc3_disconnect_gadget() and

Re: dwc3 gadget breaks on system suspend/resume

2017-01-31 Thread Roger Quadros
Hi, On 30/01/17 15:47, Felipe Balbi wrote: > > Hi, > > Felipe Balbi writes: >> Roger Quadros writes: Roger Quadros writes: >> (hmm, I didn't receive your reply in my intel inbox, only >> gmail. Odd. Replying to myself here, but it

[PATCH 1/3] USB: serial: ark3116: fix endpoint-check return value

2017-01-31 Thread Johan Hovold
Return -ENODEV rather than -EINVAL on probe errors due to a missing endpoint. Also clean up the endpoint sanity check somewhat and use the interface device for logging a more compact error in case an expected endpoint is missing. Signed-off-by: Johan Hovold ---

[PATCH 2/3] USB: serial: ark3116: remove redundant interrupt-urb check

2017-01-31 Thread Johan Hovold
Remove redundant check of num_interrupt_in which has already been verified in probe (killing a NULL-urb would also have been fine). Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 3/3] USB: serial: ark3116: use port device for info and error messages

2017-01-31 Thread Johan Hovold
Use the port device rather than usb device in info and error messages. This makes sure that driver and tty port is included in the messages, while also making them more uniform. Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 16 ++-- 1 file

[bug report] usb: gadget: f_hid: fix: Move IN request allocation to set_alt()

2017-01-31 Thread Dan Carpenter
Hello Krzysztof Opasiak, This is a semi-automatic email about new static checker warnings. The patch 749494b6bdbb: "usb: gadget: f_hid: fix: Move IN request allocation to set_alt()" from Jan 24, 2017, leads to the following Smatch complaint: drivers/usb/gadget/function/f_hid.c:382