Re: [PATCH] usb: core: add support for USB_REQ_SET_ISOCH_DELAY

2017-11-14 Thread Felipe Balbi
Hi, Felipe Balbi writes: > Greg Kroah-Hartman writes: >> On Thu, Nov 09, 2017 at 03:41:54PM +0200, Felipe Balbi wrote: >>> USB SS and SSP hubs provide wHubDelay values on their hub descriptor >>> which we should inform the USB Device about. >>> >>> The USB Specification 3.0 explains, on sectio

Re: [PATCH] usb: core: add support for USB_REQ_SET_ISOCH_DELAY

2017-11-14 Thread Felipe Balbi
Hi, Felipe Balbi writes: >>> But we should return an error, right? Are devices that don't expect >> >> Right, I'm not sure :-) Do we care if we get a stall on this one? >> >>> this request going to have problems? >> >> No idea. I assume we won't. I can add the error and handle it from the >> ca

[RFC PATCH v2 0/7] typec: tcpm: Add sink side support for PPS

2017-11-14 Thread Adam Thomson
s for referencing correct license. NOTE: Code changes are based on linux-next tag 'next-20171114' to pick up the move out of staging of TCPM related code. Adam Thomson (7): typec: tcpm: Add PD Rev 3.0 definitions to PD header typec: tcpm: Add ADO header for Alert message handling typec

[RFC PATCH v2 2/7] typec: tcpm: Add ADO header for Alert message handling

2017-11-14 Thread Adam Thomson
This commit adds a header providing definitions for handling Alert messages. Currently the header only focuses on handling incoming alerts. Signed-off-by: Adam Thomson --- include/linux/usb/pd_ado.h | 42 ++ 1 file changed, 42 insertions(+) create mode 10

[RFC PATCH v2 5/7] power: supply: Add type for USB PD PPS chargers

2017-11-14 Thread Adam Thomson
This adds a type to represent USB PPS chargers as defined in the USB Power Delivery Specification Revision 3.0 V1.1 Signed-off-by: Adam Thomson Reviewed-by: Sebastian Reichel --- drivers/power/supply/power_supply_sysfs.c | 2 +- include/linux/power_supply.h | 1 + 2 files changed,

[RFC PATCH v2 7/7] typec: tcpm: Add support for sink PPS related messages

2017-11-14 Thread Adam Thomson
This commit adds sink side support for Get_Status, Status, Get_PPS_Status and PPS_Status handling. As there's the potential for a partner to respond with Not_Supported handling of this message is also added. Sending of Not_Supported is added is added to handle messages received but not yet handled.

[RFC PATCH v2 3/7] typec: tcpm: Add SDB header for Status message handling

2017-11-14 Thread Adam Thomson
This commit adds a header providing definitions for handling Status messages. Currently the header only focuses on handling incoming Status messages. Signed-off-by: Adam Thomson --- include/linux/usb/pd_ext_sdb.h | 31 +++ 1 file changed, 31 insertions(+) create mode

[RFC PATCH v2 6/7] typec: tcpm: Represent source supply through power_supply class

2017-11-14 Thread Adam Thomson
This commit adds a power_supply class instance to represent a PD source's voltage and current properties. This provides an interface for reading these properties from user-space or other drivers. For PPS enabled Sources, this also provides write access to set the current and voltage and allows for

[RFC PATCH v2 1/7] typec: tcpm: Add PD Rev 3.0 definitions to PD header

2017-11-14 Thread Adam Thomson
This commit adds definitions for PD Rev 3.0 messages, including APDO PPS and extended message support for TCPM. Signed-off-by: Adam Thomson --- include/linux/usb/pd.h | 174 + 1 file changed, 162 insertions(+), 12 deletions(-) diff --git a/include

[RFC PATCH v2 4/7] typec: tcpm: Add core support for sink side PPS

2017-11-14 Thread Adam Thomson
This commit adds code to handle requesting of PPS APDOs. Switching between standard PDOs and APDOs, and re-requesting an APDO to modify operating voltage/current will be triggered by an external call into TCPM. Signed-off-by: Adam Thomson --- drivers/usb/typec/tcpm.c | 476 ++

Re: [GIT PULL] USB/PHY driver changes for 4.15-rc1

2017-11-14 Thread Greg KH
On Mon, Nov 13, 2017 at 09:29:36PM -0800, Linus Torvalds wrote: > On Mon, Nov 13, 2017 at 8:19 AM, Greg KH wrote: > > > > Other major thing is the typec code that moved out of staging and into > > the "real" part of the drivers/usb/ tree, which was nice to see happen. > > Hmm. So now it asks me a

Re: [GIT PULL] USB/PHY driver changes for 4.15-rc1

2017-11-14 Thread Heikki Krogerus
On Mon, Nov 13, 2017 at 09:29:36PM -0800, Linus Torvalds wrote: > On Mon, Nov 13, 2017 at 8:19 AM, Greg KH wrote: > > > > Other major thing is the typec code that moved out of staging and into > > the "real" part of the drivers/usb/ tree, which was nice to see happen. > > Hmm. So now it asks me a

Re: USB mouse not working in certain ports

2017-11-14 Thread Mathias Nyman
On 11.11.2017 18:58, David Novák wrote: Summary: Problematic mouse works when it's not in Bus 005. It works OK in both UEFI and Windows while in the same port. Keyboards and different mouse works in all ports. Problematic mouse: Genius NetScroll 200 Different mouse: Logitech B100 Keyboard: Zalm

[PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device

2017-11-14 Thread Hans de Goede
Just like all previous UAS capable Seagate disk enclosures, this one needs a US_FL_NO_ATA_1X quirk. Cc: sta...@vger.kernel.org # 3.16 Reported-by: Wido Signed-off-by: Hans de Goede --- drivers/usb/storage/unusual_uas.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/stora

Re: [PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device

2017-11-14 Thread Hans de Goede
Hi, On 14-11-17 15:00, Hans de Goede wrote: Just like all previous UAS capable Seagate disk enclosures, this one needs a US_FL_NO_ATA_1X quirk. Cc: sta...@vger.kernel.org # 3.16 Reported-by: Wido Signed-off-by: Hans de Goede So far we've been adding quirks for Seagate drives on a one by on

Re: [GIT PULL] USB/PHY driver changes for 4.15-rc1

2017-11-14 Thread Guenter Roeck
On 11/14/2017 05:17 AM, Greg KH wrote: On Mon, Nov 13, 2017 at 09:29:36PM -0800, Linus Torvalds wrote: On Mon, Nov 13, 2017 at 8:19 AM, Greg KH wrote: Other major thing is the typec code that moved out of staging and into the "real" part of the drivers/usb/ tree, which was nice to see happen.

Re: [GIT PULL] USB/PHY driver changes for 4.15-rc1

2017-11-14 Thread Heikki Krogerus
Hi Guenter, On Tue, Nov 14, 2017 at 06:48:21AM -0800, Guenter Roeck wrote: > On 11/14/2017 05:17 AM, Greg KH wrote: > > On Mon, Nov 13, 2017 at 09:29:36PM -0800, Linus Torvalds wrote: > > > On Mon, Nov 13, 2017 at 8:19 AM, Greg KH > > > wrote: > > > > > > > > Other major thing is the typec code

Re: [PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device

2017-11-14 Thread Alan Stern
On Tue, 14 Nov 2017, Hans de Goede wrote: > Hi, > > On 14-11-17 15:00, Hans de Goede wrote: > > Just like all previous UAS capable Seagate disk enclosures, this > > one needs a US_FL_NO_ATA_1X quirk. > > > > Cc: sta...@vger.kernel.org # 3.16 > > Reported-by: Wido > > Signed-off-by: Hans de Goed

Re: [GIT PULL] USB/PHY driver changes for 4.15-rc1

2017-11-14 Thread Guenter Roeck
On Tue, Nov 14, 2017 at 05:02:53PM +0200, Heikki Krogerus wrote: > Hi Guenter, > > On Tue, Nov 14, 2017 at 06:48:21AM -0800, Guenter Roeck wrote: > > On 11/14/2017 05:17 AM, Greg KH wrote: > > > On Mon, Nov 13, 2017 at 09:29:36PM -0800, Linus Torvalds wrote: > > > > On Mon, Nov 13, 2017 at 8:19 AM

[PATCH] USB: gadget: don't dereference g until after it has been null checked

2017-11-14 Thread Colin King
From: Colin Ian King Avoid dereferencing pointer g until after g has been sanity null checked; move the assignment of cdev much later when it is required into a more local scope. Detected by CoverityScan, CID#1222135 ("Dereference before null check") Fixes: b785ea7ce662 ("usb: gadget: composite

Re: usbip port number limits

2017-11-14 Thread Juan Zea
Hi, I've been working on the issue. This is what I found about multi-controller setup: The problem comes from the usbip tool trying to connect usb2 devices to usb3 ports, like this: - usbip tool asks vhci driver for free port. - If the first port (usb2) is already occupied, vhci answers wit

Re: [GIT PULL] USB/PHY driver changes for 4.15-rc1

2017-11-14 Thread Greg KH
On Tue, Nov 14, 2017 at 08:10:10AM -0800, Guenter Roeck wrote: > On Tue, Nov 14, 2017 at 05:02:53PM +0200, Heikki Krogerus wrote: > > Hi Guenter, > > > > On Tue, Nov 14, 2017 at 06:48:21AM -0800, Guenter Roeck wrote: > > > On 11/14/2017 05:17 AM, Greg KH wrote: > > > > On Mon, Nov 13, 2017 at 09:2

Re: [GIT PULL] USB/PHY driver changes for 4.15-rc1

2017-11-14 Thread Greg KH
On Tue, Nov 14, 2017 at 03:23:33PM +0200, Heikki Krogerus wrote: > On Mon, Nov 13, 2017 at 09:29:36PM -0800, Linus Torvalds wrote: > > On Mon, Nov 13, 2017 at 8:19 AM, Greg KH wrote: > > > > > > Other major thing is the typec code that moved out of staging and into > > > the "real" part of the dri

Re: [PATCH 1/2 v6] typec: tcpm: Validate source and sink caps

2017-11-14 Thread Guenter Roeck
On Sun, Nov 12, 2017 at 04:23:16PM -0800, Badhri Jagan Sridharan wrote: > The source and sink caps should follow the following rules. > This patch validates whether the src_caps/snk_caps adheres > to it. > > 6.4.1 Capabilities Message > A Capabilities message (Source Capabilities message or Sink >

Re: [PATCH 2/2 v6] typec: tcpm: Only request matching pdos

2017-11-14 Thread Guenter Roeck
On Sun, Nov 12, 2017 at 04:23:17PM -0800, Badhri Jagan Sridharan wrote: > At present, TCPM code assumes that local device supports > variable/batt pdos and always selects the pdo with highest > possible power within the board limit. This assumption > might not hold good for all devices. To overcome

Re: [PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device

2017-11-14 Thread Hans de Goede
Hi, On 11/14/2017 04:25 PM, Alan Stern wrote: On Tue, 14 Nov 2017, Hans de Goede wrote: Hi, On 14-11-17 15:00, Hans de Goede wrote: Just like all previous UAS capable Seagate disk enclosures, this one needs a US_FL_NO_ATA_1X quirk. Cc: sta...@vger.kernel.org # 3.16 Reported-by: Wido Signed

[PATCH] uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices

2017-11-14 Thread Hans de Goede
We've been adding this as a quirk on a per device basis hoping that newer disk enclosures would do better, but that has not happened, so simply apply this quirk to all Seagate devices. Signed-off-by: Hans de Goede --- drivers/usb/storage/uas-detect.h | 4 1 file changed, 4 insertions(+) di

Re: [PATCH] Re: xhci bandwidth problem with isochronous endpoints

2017-11-14 Thread Curt Meyers
On 11/08/2017 12:19 PM, Curt Meyers wrote: On 11/08/2017 03:42 AM, Mathias Nyman wrote: On 07.11.2017 02:05, Curt Meyers wrote: On 11/06/2017 06:57 AM, Mathias Nyman wrote: On 03.11.2017 23:37, Curt Meyers wrote: On 09/19/2017 06:00 AM, Mathias Nyman wrote: On 08.09.2017 20:35, Curt Meyers

Re: usbip port number limits

2017-11-14 Thread Shuah Khan
On 11/14/2017 09:25 AM, Juan Zea wrote: > Hi, > >I've been working on the issue. This is what I found about > multi-controller setup: > > The problem comes from the usbip tool trying to connect usb2 devices to usb3 > ports, like this: > > - usbip tool asks vhci driver for free port. > - If

Problems with Fibocom-L831EU on Thinkpad x270

2017-11-14 Thread Alexander Mikhalevich
Hi, I've recently bought Thinkpad x270 with Fibocom-L831EU WWAN module which is MBIM device. If I try to use it on my Gentoo Linux (kernel 4.12.12, libmbim 1.14) it doesn't work. The symptoms are the same as it was described in this mailing list earlier: https://www.spinics.net/lists/linux-usb/m

Re: usbip port number limits

2017-11-14 Thread Shuah Khan
On 11/14/2017 01:36 PM, Shuah Khan wrote: > On 11/14/2017 09:25 AM, Juan Zea wrote: >> Hi, >> >>I've been working on the issue. This is what I found about >> multi-controller setup: >> >> The problem comes from the usbip tool trying to connect usb2 devices to usb3 >> ports, like this: >> >> -

Re: [PATCH 4.4 27/56] cdc_ncm: Set NTB format again after altsetting switch for Huawei devices

2017-11-14 Thread Ben Hutchings
On Tue, 2017-07-11 at 17:21 +0200, Enrico Mioso wrote: > From: Enrico Mioso > > commit 2b02c20ce0c28974b44e69a2e2f5ddc6a470ad6f upstream. [...] > --- a/drivers/net/usb/cdc_ncm.c > +++ b/drivers/net/usb/cdc_ncm.c > @@ -724,8 +724,10 @@ int cdc_ncm_bind_common(struct usbnet *d >   u8 *buf; >  

[PATCH] usb: dwc3: Enable the USB snooping

2017-11-14 Thread Ran Wang
Add support for USB3 snooping by asserting bits in register DWC3_GSBUSCFG0 for data and descriptor. Signed-off-by: Changming Huang Signed-off-by: Rajesh Bhagat Signed-off-by: Ran Wang --- drivers/usb/dwc3/core.c | 24 drivers/usb/dwc3/core.h | 10 ++ 2 files ch

Re: Problems with Fibocom-L831EU on Thinkpad x270

2017-11-14 Thread Bjørn Mork
On November 15, 2017 12:42:17 AM GMT+01:00, Alexander Mikhalevich wrote: >Hi, >I've recently bought Thinkpad x270 with Fibocom-L831EU WWAN module >which is MBIM device. If I try to use it on my Gentoo Linux (kernel >4.12.12, libmbim 1.14) it doesn't work. >The symptoms are the same as it was de

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-14 Thread Lu Baolu
Hi, On 11/14/2017 03:28 PM, Felipe Balbi wrote: > Hi, > > Mathias Nyman writes: >>> +static int dbc_buf_alloc(struct dbc_buf *db, unsigned int size) >>> +{ >>> + db->buf_buf = kzalloc(size, GFP_KERNEL); >>> + if (!db->buf_buf) >>> + return -ENOMEM; >>> + >>> + db->buf_size = size;

Re: usbip port number limits

2017-11-14 Thread Yuyang Du
On Tue, Nov 14, 2017 at 04:17:33PM -0700, Shuah Khan wrote: > On 11/14/2017 01:36 PM, Shuah Khan wrote: > Hi Yuyang Du, > > I am looking at the USB3 support patch and not finding where > USB_SPEED_LOW is handled. Any reason why dropping support for > that? > Hi Shuah, It's been a while since th