[PATCH V3] usb: gadget: composite: Fix possible double free memory bug

2019-10-01 Thread Chandana Kishori Chiluveru
composite_dev_cleanup call from the failure of configfs_composite_bind frees up the cdev->os_desc_req and cdev->req. If the previous calls of bind and unbind is successful these will carry stale values. Consider the below sequence of function calls: configfs_composite_bind() composite_dev_

Re: musb: cppi41: broken high speed FTDI functionality when connected to musb directly

2019-10-01 Thread Johan Hovold
On Mon, Sep 30, 2019 at 09:54:11PM +0200, Sebastian Reichel wrote: > Hi, > > On Mon, Sep 30, 2019 at 08:23:30AM -0700, Tony Lindgren wrote: > > Actually playing with the cppi41 timeout might be more suitable here, > > they use the same module clock from what I remember though. So > > maybe increa

Re: musb: cppi41: broken high speed FTDI functionality when connected to musb directly

2019-10-01 Thread Yegor Yefremov
On Tue, Oct 1, 2019 at 10:03 AM Johan Hovold wrote: > > On Mon, Sep 30, 2019 at 09:54:11PM +0200, Sebastian Reichel wrote: > > Hi, > > > > On Mon, Sep 30, 2019 at 08:23:30AM -0700, Tony Lindgren wrote: > > > > Actually playing with the cppi41 timeout might be more suitable here, > > > they use the

[PATCH 4/7] usb: typec: tcpm: Start using struct typec_operations

2019-10-01 Thread Heikki Krogerus
Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/tcpm/tcpm.c | 47 --- 1 file changed, 21 insertions(+), 26 deletions

[PATCH 7/7] usb: typec: Remove the callback members from struct typec_capability

2019-10-01 Thread Heikki Krogerus
There are no more users for them. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 65 +-- include/linux/usb/typec.h | 17 -- 2 files changed, 22 insertions(+), 60 deletions(-) diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/c

[PATCH 5/7] usb: typec: tps6598x: Start using struct typec_operations

2019-10-01 Thread Heikki Krogerus
Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. After this there is not need to keep the capabilities stored anywhere in the driver. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/tps6598x.c | 49

[PATCH 6/7] usb: typec: ucsi: Start using struct typec_operations

2019-10-01 Thread Heikki Krogerus
Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/ucsi.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --g

[PATCH 3/7] usb: typec: Separate the operations vector

2019-10-01 Thread Heikki Krogerus
Introducing struct typec_operations which has the same callbacks as struct typec_capability. The old callbacks are kept for now, but after all users have been converted, they will be removed. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 90 +-

[PATCH 0/7] usb: typec: Small API improvement

2019-10-01 Thread Heikki Krogerus
Hi guys, This series moves the callback members from struct typec_capabilities to a new struct typec_operations. That removes the need for the drivers to keep a copy of the struct typec_capabilites if they don't need it, and struct typec_operations can probable always be constified. The change is

[PATCH 1/7] usb: typec: Copy everything from struct typec_capability during registration

2019-10-01 Thread Heikki Krogerus
Copying everything from struct typec_capability to struct typec_port during port registration. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 55 +-- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/drivers/usb/typec/class.c b/dr

[PATCH 2/7] usb: typec: Introduce typec_get_drvdata()

2019-10-01 Thread Heikki Krogerus
Leaving the private driver_data pointer of the port device to the port drivers. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 11 +++ include/linux/usb/typec.h | 4 2 files changed, 15 insertions(+) diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.

[PATCH v2] usb: typec: tcpm: usb: typec: tcpm: Fix a signedness bug in tcpm_fw_get_caps()

2019-10-01 Thread Dan Carpenter
The "port->typec_caps.data" and "port->typec_caps.type" variables are enums and in this context GCC will treat them as an unsigned int so they can never be less than zero. Fixes: ae8a2ca8a221 ("usb: typec: Group all TCPCI/TCPM code together") Signed-off-by: Dan Carpenter --- v2: preserve the erro

Re: [PATCH v2] usb: typec: tcpm: usb: typec: tcpm: Fix a signedness bug in tcpm_fw_get_caps()

2019-10-01 Thread Heikki Krogerus
On Tue, Oct 01, 2019 at 03:01:17PM +0300, Dan Carpenter wrote: > The "port->typec_caps.data" and "port->typec_caps.type" variables are > enums and in this context GCC will treat them as an unsigned int so they > can never be less than zero. > > Fixes: ae8a2ca8a221 ("usb: typec: Group all TCPCI/TCP

Re: [PATCH 1/7] usb: typec: Copy everything from struct typec_capability during registration

2019-10-01 Thread Guenter Roeck
On 10/1/19 2:48 AM, Heikki Krogerus wrote: Copying everything from struct typec_capability to struct typec_port during port registration. What is the purpose of this patch ? To reduce the number of indirections at runtime, or to avoid having to have cap around ? FWIW, it looks like the code do

Re: [PATCH 3/7] usb: typec: Separate the operations vector

2019-10-01 Thread Guenter Roeck
On 10/1/19 2:48 AM, Heikki Krogerus wrote: Introducing struct typec_operations which has the same callbacks as struct typec_capability. The old callbacks are kept for now, but after all users have been converted, they will be removed. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class

Re: [PATCH 4/7] usb: typec: tcpm: Start using struct typec_operations

2019-10-01 Thread Guenter Roeck
On 10/1/19 2:48 AM, Heikki Krogerus wrote: Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/tcpm/tcpm.c | 47 ---

Re: [PATCH 5/7] usb: typec: tps6598x: Start using struct typec_operations

2019-10-01 Thread Guenter Roeck
On 10/1/19 2:48 AM, Heikki Krogerus wrote: Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. After this there is not need to keep the capabilities stored anywhere in the driver. Signed-off-by: Heikki Kro

Re: [PATCH 6/7] usb: typec: ucsi: Start using struct typec_operations

2019-10-01 Thread Guenter Roeck
On 10/1/19 2:48 AM, Heikki Krogerus wrote: Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/ucsi/ucsi.c | 22 +

Re: [PATCH 5/7] usb: typec: tps6598x: Start using struct typec_operations

2019-10-01 Thread Guenter Roeck
On 10/1/19 2:48 AM, Heikki Krogerus wrote: Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. After this there is not need to keep the capabilities stored anywhere in the driver. Signed-off-by: Heikki Kro

Re: [PATCH 7/7] usb: typec: Remove the callback members from struct typec_capability

2019-10-01 Thread Guenter Roeck
On 10/1/19 2:48 AM, Heikki Krogerus wrote: There are no more users for them. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 65 +-- include/linux/usb/typec.h | 17 -- 2 files changed, 22 insertions(+), 60 deletions(-) diff --git a

Re: [PATCH v2] usb: typec: tcpm: usb: typec: tcpm: Fix a signedness bug in tcpm_fw_get_caps()

2019-10-01 Thread Guenter Roeck
On 10/1/19 5:01 AM, Dan Carpenter wrote: The "port->typec_caps.data" and "port->typec_caps.type" variables are enums and in this context GCC will treat them as an unsigned int so they can never be less than zero. Fixes: ae8a2ca8a221 ("usb: typec: Group all TCPCI/TCPM code together") Signed-off-b

Re: [RFC PATCH 00/22] thunderbolt: Add support for USB4

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:49:54PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 02:38:08PM +0300, Mika Westerberg wrote: > > Hi all, > > > > I'm sending this as RFC because the series is still missing important > > features such as power management so not ready for merging. However,

Re: depmod warning: unknown symbol usb_stor_sense_invalidCDB in 5.4-rc1

2019-10-01 Thread Matthias Maennich
On Mon, Sep 30, 2019 at 10:45:25PM +0200, Stefan Wahren wrote: Hi, during make modules_install for arm/multi_v7_defconfig on current Linux 5.4-rc1, i'm getting the following warnings: depmod: WARNING: /media/stefan/rootfs//lib/modules/5.4.0-rc1-6-g4a80125-dirty/kernel/drivers/usb/storage/ua

Re: musb: cppi41: broken high speed FTDI functionality when connected to musb directly

2019-10-01 Thread Tony Lindgren
* Yegor Yefremov [191001 09:20]: > On Tue, Oct 1, 2019 at 10:03 AM Johan Hovold wrote: > > > > On Mon, Sep 30, 2019 at 09:54:11PM +0200, Sebastian Reichel wrote: > > > Hi, > > > > > > On Mon, Sep 30, 2019 at 08:23:30AM -0700, Tony Lindgren wrote: > > > > > > Actually playing with the cppi41 timeo

RE: [PATCH 00/14] usb: typec: UCSI driver overhaul

2019-10-01 Thread Ajay Gupta
Hi Heikki > -Original Message- > From: Heikki Krogerus > Sent: Thursday, September 26, 2019 3:07 AM > To: Ajay Gupta > Cc: linux-usb@vger.kernel.org > Subject: [PATCH 00/14] usb: typec: UCSI driver overhaul > > Hi Ajay, > > Here's the pretty much complete rewrite of the I/O handling th

Re: [PATCH 4/6] ARM: dts: sunxi: Remove useless phy-names from EHCI and OHCI

2019-10-01 Thread Emmanuel Vadot
Hi Maxime, On Tue, 16 Apr 2019 10:28:00 +0200 Maxime Ripard wrote: > Neither the OHCI or EHCI bindings are using the phy-names property, so we > can just drop it. > > Signed-off-by: Maxime Ripard > --- > arch/arm/boot/dts/sun4i-a10.dtsi | 4 > arch/arm/boot/dts/sun5i.dtsi

Re: musb: cppi41: broken high speed FTDI functionality when connected to musb directly

2019-10-01 Thread Tony Lindgren
Hi, * Tony Lindgren [191001 16:52]: > * Yegor Yefremov [191001 09:20]: > > I've tried to increase the autosuspend_delay_ms and to set control to > > "on" but nothing changes. Below you can see the output of my testing > > script [1] (Py2 only). As one can see, the first cycle i.e. after the > >

Re: musb: cppi41: broken high speed FTDI functionality when connected to musb directly

2019-10-01 Thread Yegor Yefremov
On Wed, Oct 2, 2019 at 12:03 AM Tony Lindgren wrote: > > Hi, > > * Tony Lindgren [191001 16:52]: > > * Yegor Yefremov [191001 09:20]: > > > I've tried to increase the autosuspend_delay_ms and to set control to > > > "on" but nothing changes. Below you can see the output of my testing > > > scrip