Re: [PATCH] Revert "usb: dwc3: pci: Use devm functions to get the phy GPIOs"

2018-12-09 Thread Hans de Goede
Hi, Thank you. On 06-12-18 19:42, Stephan Gerhold wrote: Commit 211f658b7b40 ("usb: dwc3: pci: Use devm functions to get the phy GPIOs") changed the code to claim the PHY GPIOs permanently for Intel Baytrail devices. This causes issues when the actual PHY driver attempts to claim the same GPIO

[GIT PULL] USB/PHY driver fixes for 4.20-rc6

2018-12-09 Thread Greg KH
The following changes since commit 2595646791c319cadfdbf271563aac97d0843dc7: Linux 4.20-rc5 (2018-12-02 15:07:55 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git tags/usb-4.20-rc6 for you to fetch changes up to 3caad34eab57e622dad48

Re: [PATCH] Revert "usb: dwc3: pci: Use devm functions to get the phy GPIOs"

2018-12-09 Thread Andy Shevchenko
On Thu, Dec 6, 2018 at 8:49 PM Stephan Gerhold wrote: > > Commit 211f658b7b40 ("usb: dwc3: pci: Use devm functions to get > the phy GPIOs") changed the code to claim the PHY GPIOs permanently > for Intel Baytrail devices. > > This causes issues when the actual PHY driver attempts to claim the > sa

Re: [PATCH] Revert "usb: dwc3: pci: Use devm functions to get the phy GPIOs"

2018-12-09 Thread Hans de Goede
Hi, On 09-12-18 15:44, Andy Shevchenko wrote: On Thu, Dec 6, 2018 at 8:49 PM Stephan Gerhold wrote: Commit 211f658b7b40 ("usb: dwc3: pci: Use devm functions to get the phy GPIOs") changed the code to claim the PHY GPIOs permanently for Intel Baytrail devices. This causes issues when the actu

Re: [PATCH] Revert "usb: dwc3: pci: Use devm functions to get the phy GPIOs"

2018-12-09 Thread Stephan Gerhold
On Sun, Dec 09, 2018 at 04:44:16PM +0200, Andy Shevchenko wrote: > On Thu, Dec 6, 2018 at 8:49 PM Stephan Gerhold wrote: > > > > Commit 211f658b7b40 ("usb: dwc3: pci: Use devm functions to get > > the phy GPIOs") changed the code to claim the PHY GPIOs permanently > > for Intel Baytrail devices. >

Re: [PATCH] Revert "usb: dwc3: pci: Use devm functions to get the phy GPIOs"

2018-12-09 Thread Hans de Goede
Hi, On 09-12-18 16:07, Stephan Gerhold wrote: On Sun, Dec 09, 2018 at 04:44:16PM +0200, Andy Shevchenko wrote: On Thu, Dec 6, 2018 at 8:49 PM Stephan Gerhold wrote: Commit 211f658b7b40 ("usb: dwc3: pci: Use devm functions to get the phy GPIOs") changed the code to claim the PHY GPIOs permane

[PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-09 Thread Greg KH
From: Hui Peng The function hso_probe reads if_num from the USB device (as an u8) and uses it without a length check to index an array, resulting in an OOB memory read in hso_probe or hso_get_config_data. Added a length check for both locations and updated hso_probe to bail on error. Reported-by

Re: [PATCH] Revert "usb: dwc3: pci: Use devm functions to get the phy GPIOs"

2018-12-09 Thread Stephan Gerhold
On Sun, Dec 09, 2018 at 04:28:07PM +0100, Hans de Goede wrote: > Hi, > > On 09-12-18 16:07, Stephan Gerhold wrote: > > On Sun, Dec 09, 2018 at 04:44:16PM +0200, Andy Shevchenko wrote: > > > On Thu, Dec 6, 2018 at 8:49 PM Stephan Gerhold > > > wrote: > > > > > > > > Commit 211f658b7b40 ("usb: dw

Re: [GIT PULL] USB/PHY driver fixes for 4.20-rc6

2018-12-09 Thread pr-tracker-bot
The pull request you sent on Sun, 9 Dec 2018 12:16:46 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git tags/usb-4.20-rc6 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/50a5528a4b19b7324f0796ea2fedf32530a11ff8 Thank you! -- Deet-doot-dot, I am a

[PATCH 0/1] usb: dwc2: fix hot plugging on Amlogic devices

2018-12-09 Thread Martin Blumenstingl
This is a follow-up to an issue I had a while ago but never had the time to debug it: [0] Short summary: - on Meson8b USB devices are only detected if they are plugged in before booting Linux - if they are plugged in after booting Linux they are not detected (except when running "lsusb -v" as a

[PATCH 1/1] usb: dwc2: disable power_down on Amlogic devices

2018-12-09 Thread Martin Blumenstingl
Disable power_down by setting the parameter to DWC2_POWER_DOWN_PARAM_NONE. This fixes a problem on various Amlogic Meson SoCs where USB devices are only recognized when plugged in before booting Linux. A hot-plugged USB device was not detected even though the device got power (my USB thumb drive fo

Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-09 Thread David Miller
From: Greg KH Date: Sun, 9 Dec 2018 17:32:45 +0100 > + } else { > port_spec = hso_get_config_data(interface); > + if (IS_ERR_VALUE((long)port_spec)) > + goto exit; 'port_spec' is an 'int', it makes no sense to cast it 3 times all the way back to

Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-09 Thread David Miller
From: Mathias Payer Date: Sun, 9 Dec 2018 21:02:25 +0100 > Passing an int to the macro results in a compiler warning. One option would be > to test for the individual errors (instead of using the macro) with the > drawback > that future extensions that return different errors may be missed. Anot

Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-09 Thread Mathias Payer
Hi David, >> +} else { >> port_spec = hso_get_config_data(interface); >> +if (IS_ERR_VALUE((long)port_spec)) >> +goto exit; > > 'port_spec' is an 'int', it makes no sense to cast it 3 times all the > way back to 'int' to figure out if it is a negat

Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-09 Thread Mathias Payer
FYI, this issue has been assigned CVE-2018-19985. Thanks, Mathias On 12/9/18 5:32 PM, Greg KH wrote: > From: Hui Peng > > The function hso_probe reads if_num from the USB device (as an u8) and uses > it without a length check to index an array, resulting in an OOB memory read > in hso_probe or

Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-09 Thread Mathias Payer
> The whole kernel is full of situations where an int is returned and if it's > negative it's an error. Why is this location so different? > > Just check < 0 and be done with it. OK, whatever you prefer. I've attached the updated patch. (Greg, please add your Signed-off-by). Best, Mathias comm

Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in

2018-12-09 Thread David Miller
From: Mathias Payer Date: Sun, 9 Dec 2018 21:17:58 +0100 > I've attached the updated patch. (Greg, please add your Signed-off-by). Patches should be posted inline, not as attachments as per process/submitting-patches.rst

[PATCH] USB: serial: option: add Fibocom NL668 series

2018-12-09 Thread Jörgen Storvist
Added USB serial option driver support for Fibocom NL668 series cellular module. Reserved USB endpoints 4 and 5 for network interfaces. Signed-off-by: Jörgen Storvist drivers/usb/serial/option.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/ser

Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in

2018-12-09 Thread Mathias Payer
On 12/9/18 9:40 PM, David Miller wrote: > From: Mathias Payer > Date: Sun, 9 Dec 2018 21:17:58 +0100 > >> I've attached the updated patch. (Greg, please add your Signed-off-by). > > Patches should be posted inline, not as attachments as per > process/submitting-patches.rst Sorry! And thanks f

new device: vendor: 1c9e product: 3003 (4G Systems W21s)

2018-12-09 Thread Bjoern Franke
Hi, the device 1c9e/3003 is a 3G-stick sold as "4G Systems W21s", "1und1 UMTS Antenne" and several other names. After usb-modeswitching to configuration 2 and inserting usbserial for it, it provides ttyUSB[0-3] whereas ttyUSB1 works for connection. BR Bjoern Franke

[PATCH] USB: serial: option: add Fibocom NL668 series (fixed line break issue)

2018-12-09 Thread Jörgen Storvist
Added USB serial option driver support for Fibocom NL668 series cellular module. Reserved USB endpoints 4 and 5 for network interfaces. Signed-off-by: Jörgen Storvist drivers/usb/serial/option.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/

Re: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-09 Thread Peter Chen
> > +static struct cdns3_endpoint *cdns3_find_available_ss_ep(struct > > cdns3_device *priv_dev, > > + struct > > usb_endpoint_descriptor *desc) > > why is this function called ss_ep? This doesn't seem like only for superspeed > endpoints. >

Re: [PATCH 1/1] usb: dwc2: disable power_down on Amlogic devices

2018-12-09 Thread Minas Harutyunyan
On 12/9/2018 11:01 PM, Martin Blumenstingl wrote: > Disable power_down by setting the parameter to > DWC2_POWER_DOWN_PARAM_NONE. This fixes a problem on various Amlogic > Meson SoCs where USB devices are only recognized when plugged in before > booting Linux. A hot-plugged USB device was not detect

Re: [PATCH] USB: serial: option: add Fibocom NL668 series (fixed line break issue)

2018-12-09 Thread Lars Melin
On 12/10/2018 06:21, Jörgen Storvist wrote: Added USB serial option driver support for Fibocom NL668 series cellular module. Reserved USB endpoints 4 and 5 for network interfaces. Signed-off-by: Jörgen Storvist drivers/usb/serial/option.c | 5 + 1 file changed, 5 insertions(+) diff --gi

RE: [PATCH v7 09/10] usb: dwc3: Check for IOC/LST bit in both event->status and TRB->ctrl fields

2018-12-09 Thread Felipe Balbi
Hi, Anurag Kumar Vulisha writes: > HI Felipe, > >>-Original Message- >>From: Felipe Balbi [mailto:ba...@kernel.org] >>Sent: Friday, December 07, 2018 11:42 AM >>To: Anurag Kumar Vulisha ; Greg Kroah-Hartman >>; Shuah Khan ; Alan Stern >>; Johan Hovold ; Jaejoong Kim >>; Benjamin Herrensc

Re: new device: vendor: 1c9e product: 3003 (4G Systems W21s)

2018-12-09 Thread Greg KH
On Sun, Dec 09, 2018 at 10:05:03PM +0100, Bjoern Franke wrote: > Hi, > > the device 1c9e/3003 is a 3G-stick sold as "4G Systems W21s", "1und1 > UMTS Antenne" and several other names. > > After usb-modeswitching to configuration 2 and inserting usbserial for > it, it provides ttyUSB[0-3] whereas t

Re: [PATCH] USB: serial: option: add Fibocom NL668 series

2018-12-09 Thread Greg KH
On Sun, Dec 09, 2018 at 09:41:13PM +0100, Jörgen Storvist wrote: > Added USB serial option driver support for Fibocom NL668 series cellular > module. > Reserved USB endpoints 4 and 5 for network interfaces. > > Signed-off-by: Jörgen Storvist > > drivers/usb/serial/option.c | 5 + > 1 file ch

Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-09 Thread Greg KH
On Sun, Dec 09, 2018 at 09:17:58PM +0100, Mathias Payer wrote: > > The whole kernel is full of situations where an int is returned and if it's > > negative it's an error. Why is this location so different? > > > > Just check < 0 and be done with it. > > OK, whatever you prefer. My fault, I was

[PATCH] usb: dwc3: gadget: Disable CSP for stream OUT ep

2018-12-09 Thread Tejas Joglekar
In stream mode, when fast-forwarding TRBs, the stream number is not cleared causing the new stream to not get assigned. So we don't want controller to carry on transfers when short packet is received. So disable the CSP for stream capable endpoint. This is based on the 3.30a Programming guide, whe

[PATCH] usb: dwc3: gadget: Handle 0 xfer length for OUT EP

2018-12-09 Thread Tejas Joglekar
For OUT endpoints, zero-length transfers require MaxPacketSize buffer as per the DWC_usb3 programming guide 3.30a section 4.2.3.3. This patch fixes this by explicitly checking zero length transfer to correctly pad up to MaxPacketSize. Signed-off-by: Tejas Joglekar --- drivers/usb/dwc3/gadget.c

Re: [PATCH] usb: dwc3: gadget: Handle 0 xfer length for OUT EP

2018-12-09 Thread Felipe Balbi
Hi, Tejas Joglekar writes: > For OUT endpoints, zero-length transfers require MaxPacketSize buffer as > per the DWC_usb3 programming guide 3.30a section 4.2.3.3. > > This patch fixes this by explicitly checking zero length > transfer to correctly pad up to MaxPacketSize. > > Signed-off-by: Tejas