Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Minas Harutyunyan
Hi, On 3/16/2018 4:25 PM, Felipe Balbi wrote: > > Hi, > > Minas Harutyunyan writes: > On 09/03/18 14:47, Roger Quadros wrote: >> In the following test we get stuck by sleeping forever in >> _dwc3_set_mode() >> after which dual-role switching doesn't work. >> >> On dra7-

Re: [PATCH v2] staging: typec: rt1711h typec chip driver

2018-03-16 Thread Guenter Roeck
On 03/16/2018 10:52 PM, 李書帆 wrote: Hi Guenter, 2018-03-17 10:16 GMT+08:00 Guenter Roeck : On 03/16/2018 10:40 AM, ShuFan Lee wrote: From: ShuFan Lee Richtek RT1711H Type-C chip driver that works with Type-C Port Controller Manager to provide USB PD and USB Type-C functionalities. Add defini

Re: [PATCH v2] staging: typec: rt1711h typec chip driver

2018-03-16 Thread 李書帆
Hi Guenter, 2018-03-17 10:16 GMT+08:00 Guenter Roeck : > On 03/16/2018 10:40 AM, ShuFan Lee wrote: >> >> From: ShuFan Lee >> >> Richtek RT1711H Type-C chip driver that works with >> Type-C Port Controller Manager to provide USB PD and >> USB Type-C functionalities. >> Add definition of TCPC_CC_ST

Re: [PATCH v2] staging: typec: rt1711h typec chip driver

2018-03-16 Thread Guenter Roeck
On 03/16/2018 10:40 AM, ShuFan Lee wrote: From: ShuFan Lee Richtek RT1711H Type-C chip driver that works with Type-C Port Controller Manager to provide USB PD and USB Type-C functionalities. Add definition of TCPC_CC_STATUS_TOGGLING. Signed-off-by: ShuFan Lee Does this patch require DT revi

Re: [PATCH v4 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-16 Thread Benjamin Herrenschmidt
On Sat, 2018-03-17 at 11:29 +1100, Benjamin Herrenschmidt wrote: > The guest just show config selection messages. I'll dig a bit next week > in case there's an issue with my UDC driver there. I meant the "gadget" just shows ... Cheers, Ben. -- To unsubscribe from this list: send the line "unsubs

Re: [PATCH v4 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-16 Thread Benjamin Herrenschmidt
On Fri, 2018-03-16 at 09:23 +0200, Felipe Balbi wrote: > > > > If I just create a mass storage function set to be "removable" and > > "cdrom" with no file attached, and enable it, I get an endless stream > > of resets. It looks like the host constantly does USB resets. > > > > I suspect the host i

Re: [PATCH v5 1/2] usb/gadget: Add an EP dispose() callback for EP lifetime tracking

2018-03-16 Thread Benjamin Herrenschmidt
On Fri, 2018-03-16 at 13:02 +0200, Felipe Balbi wrote: > Hi, > > Benjamin Herrenschmidt writes: > > Some UDC may want to allocate endpoints dynamically, either because > > the HW supports an arbitrary large number or because (like the Aspeed > > BMC SoCs), the pool of HW endpoints is shared betwe

Re: [PATCH v5 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-16 Thread Benjamin Herrenschmidt
On Sat, 2018-03-17 at 04:29 +0800, kbuild test robot wrote: > Hi Benjamin, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on v4.16-rc4] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: > https:

Re: [PATCH v4 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-16 Thread Benjamin Herrenschmidt
On Fri, 2018-03-16 at 16:56 -0400, Alan Stern wrote: > On Fri, 16 Mar 2018, Benjamin Herrenschmidt wrote: > > > On Thu, 2018-03-15 at 08:03 +1100, Benjamin Herrenschmidt wrote: > > > > > Do you have more comments for the rest of the driver or that's it ? > > > > > > > > so far, that's it. > > >

Re: [PATCH v5 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-16 Thread Benjamin Herrenschmidt
On Sat, 2018-03-17 at 03:29 +0800, kbuild test robot wrote: > Hi Benjamin, > > I love your patch! Yet something to improve: > > [auto build test ERROR on v4.16-rc4] > [also build test ERROR on next-20180316] > [if your patch is applied to the wrong git tree, please drop

[PATCH v2] usb: dwc3: pci: Properly cleanup resource

2018-03-16 Thread Thinh Nguyen
Platform device is allocated before adding resources. Make sure to properly cleanup on error case. Fixes: f1c7e7108109 ("usb: dwc3: convert to pcim_enable_device()") Signed-off-by: Thinh Nguyen --- Changes in v2: - Separate from patch series "usb: dwc3: pci: Make device properties customizable"

[PATCH v5] usb: core: urb: Check SSP isoc ep comp descriptor

2018-03-16 Thread Thinh Nguyen
The maximum bytes per interval for USB SuperSpeed Plus can be set by isoc endpoint companion descriptor when it is above 48K. If the descriptor is provided, then use its value. USB 3.1 spec 9.6.8 Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen --- Changes in v5: - Separate from patch series

[PATCH v5 08/10] usb: dwc3: Check for ESS TX/RX threshold config

2018-03-16 Thread Thinh Nguyen
Check and configure TX/RX threshold for DWC_usb31. Update dwc3 structure with new fields to store these threshold configurations. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/core.c | 55 + drivers/usb/dwc3/core.h | 8 +++ 2 files changed,

[PATCH v5 10/10] usb: dwc3: Check controller type before setting speed

2018-03-16 Thread Thinh Nguyen
DWC_usb3 speed can only be set up to SuperSpeed. Limit the setting to SuperSpeed only should the value be higher. Otherwise, the controller will read an invalid speed value and set the device to an incorrect speed. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/gadget.c | 5 - 1 file chang

[PATCH v5 05/10] usb: dwc3: gadget: Check IP revision for GRXTHRCFG

2018-03-16 Thread Thinh Nguyen
DWC_usb31 controller has a different UsbRxPktCnt bit fields from GRXTHRCFG register. Check for DWC_usb31 IP revision to read the appropriate value. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/gadget.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/

[PATCH v5 09/10] usb: dwc3: Dump LSP and BMU debug info

2018-03-16 Thread Thinh Nguyen
Dump LSP and BMU debug info. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/core.h| 5 + drivers/usb/dwc3/debugfs.c | 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 28d6f6511f6f..4f3b43809917 100644 --- a/drivers/usb/dwc

[PATCH v5 02/10] usb: dwc3: Update DWC_usb31 GTXFIFOSIZ reg fields

2018-03-16 Thread Thinh Nguyen
Update two GTXFIFOSIZ bit fields for the DWC_usb31 controller. TXFDEP is a 15-bit value instead of 16-bit value, and bit 15 is TXFRAMNUM. The GTXFIFOSIZ register for DWC_usb31 is as follows: +---+---+--+ | BITS | Name | Description

[PATCH v5 07/10] usb: dwc3: Make TX/RX threshold configurable

2018-03-16 Thread Thinh Nguyen
DWC_usb31 periodic transfer at 48K+ bytes per interval may need modification to the TX/RX packet threshold to achieve optimal result. Add properties to make it configurable. By default, periodic ESS TX and RX threshold are not enabled. To enable TX or RX threshold (host mode only), both packet thr

[PATCH v5 04/10] usb: dwc3: Add DWC_usb31 GRXTHRCFG bit fields

2018-03-16 Thread Thinh Nguyen
Add new GRXTHRCFG bit field macros for DWC_usb31. The GRXTHRCFG register fields for DWC_usb31 is as follows: +---+--+--+ | BITS | Name | Description | +===+==+===

[PATCH v5 03/10] usb: dwc3: Check IP revision for GTXFIFOSIZ

2018-03-16 Thread Thinh Nguyen
DWC_usb31 controller has different GTXFIFOSIZE bit field for TXFDEF. Check for DWC_usb31 IP revision to read the appropriate bit fields. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/gadget.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/d

[PATCH v5 06/10] usb: dwc3: Add DWC_usb31 GTXTHRCFG reg fields

2018-03-16 Thread Thinh Nguyen
Add new GTXTHRCFG bit field macros for DWC_usb31. The GTXTHRCFG register fields for DWC_usb31 is as follows: +---+--+---+ | BITS | Name | Description | +===+==+=

[PATCH v5 01/10] usb: dwc3: Add SoftReset PHY synchonization delay

2018-03-16 Thread Thinh Nguyen
>From DWC_usb31 programming guide section 1.3.2, once DWC3_DCTL_CSFTRST bit is cleared, we must wait at least 50ms before accessing the PHY domain (synchronization delay). Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/core.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-)

[PATCH v5 00/10] usb: dwc3: Add new updates for DWC_usb31

2018-03-16 Thread Thinh Nguyen
This patch series adds new updates and some fixes for DWC_usb31. Changes in v5: - Remove isoc workaround patches from series - Remove "usb: core: urb: Check SSP isoc ep comp descriptor" from series Changes in v4: - Correctly refer "databook" as "programming guide" - Document more detail about

Re: [RFC PATCH v2 2/3] usb: typec: Bus type for alternate modes

2018-03-16 Thread Guenter Roeck
On Fri, Mar 09, 2018 at 06:19:17PM +0300, Heikki Krogerus wrote: > Introducing a simple bus for the alternate modes. Bus allows > binding drivers to the discovered alternate modes the > partners support. > > Signed-off-by: Heikki Krogerus > --- > Documentation/ABI/obsolete/sysfs-class-typec | 4

Re: [RFC PATCH v2 3/3] usb: typec: tcpm: Support for Alternate Modes

2018-03-16 Thread Guenter Roeck
On Fri, Mar 09, 2018 at 06:19:18PM +0300, Heikki Krogerus wrote: > This adds more complete handling of VDMs and registration of > partner alternate modes, and introduces callbacks for > alternate mode operations. > > Only DFP role is supported for now. > > Signed-off-by: Heikki Krogerus > --- >

[PATCH v2 1/1] drivers/usb/storage: NULL pointer dereference [null-pointer-deref] (CWE 476) problem

2018-03-16 Thread Joe Moriarty
The Parfait (version 2.1.0) static code analysis tool found the following NULL pointer dereference problem. dev_to_shost() in include/scsi/scsi_host.h has the ability to return NULL if the scsi host device does not have the Scsi_host->parent field set. With the possibilty of a NULL pointer being

[PATCH v2 0/1] Parfait changes

2018-03-16 Thread Joe Moriarty
The following patch(s) are bugs found by the static compiler 'Parfait'. Care was taken to make sure false positive results were removed from this patchset. Parfait Overview https://labs.oracle.com/pls/apex/f?p=labs:49:P49_PROJECT_ID:13 v1: Initial release v2: Modifications

Re: [PATCH 3/3] usb: dwc2: Add High Bandwidth ISOC OUT support (fwd)

2018-03-16 Thread Julia Lawall
It looks like the breaks on lines starting with 2235 are indented too much. I don't have line 946, but please check whether there is an issue there. julia -- Forwarded message -- Date: Sat, 17 Mar 2018 04:56:27 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Su

Re: [PATCH v4 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-16 Thread Alan Stern
On Fri, 16 Mar 2018, Benjamin Herrenschmidt wrote: > On Thu, 2018-03-15 at 08:03 +1100, Benjamin Herrenschmidt wrote: > > > > Do you have more comments for the rest of the driver or that's it ? > > > > > > so far, that's it. > > > > Ok. I'll re-send. > > So I'll resend in a minute, doing a few

Re: [PATCH 2/2] usb: dwc3: add clock and resets

2018-03-16 Thread kbuild test robot
Hi Masahiro, I love your patch! Perhaps something to improve: [auto build test WARNING on v4.16-rc4] [also build test WARNING on next-20180316] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits

Re: [PATCH v5 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-16 Thread kbuild test robot
Hi Benjamin, I love your patch! Perhaps something to improve: [auto build test WARNING on v4.16-rc4] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Benjamin-Herrenschmidt/usb-gadget-Add-an-EP-d

Re: [PATCH v5 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-03-16 Thread kbuild test robot
Hi Benjamin, I love your patch! Yet something to improve: [auto build test ERROR on v4.16-rc4] [also build test ERROR on next-20180316] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Benjamin

[RFC] musb: removing otg protocol support

2018-03-16 Thread Bin Liu
Hi, The kernel usb stack and musb drivers have gone through some changes in the past several kernel versions, such as adding otg fsm, musb runtime PM, and musb otg state moving from musb to musb->xceiv... I am wondering if the otg protocol (hnp, srp) functions are already broken in the musb driver

Re: [PATCH v2 0/5] Allow compile-testing NO_DMA (core)

2018-03-16 Thread Christoph Hellwig
Thanks Geert, applied to the dma-mapping tree for 4.17. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 3/3] usb: dwc2: Add High Bandwidth ISOC OUT support

2018-03-16 Thread kbuild test robot
Hi Minas, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20180309] [cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2 v4.16-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0d

Re: [PATCH] staging: typec: rt1711h typec chip driver

2018-03-16 Thread 李書帆
Hi Heikki, 2018-03-16 23:05 GMT+08:00 Heikki Krogerus : > Hi ShuFan, > > On Fri, Mar 16, 2018 at 05:12:49PM +0800, ShuFan Lee wrote: >> +static int rt1711h_init_gpio(struct rt1711h_chip *chip) >> +{ >> + int ret; >> + struct device_node *np = chip->dev->of_node; >> + >> + ret = of_get_

[PATCH v2] staging: typec: rt1711h typec chip driver

2018-03-16 Thread ShuFan Lee
From: ShuFan Lee Richtek RT1711H Type-C chip driver that works with Type-C Port Controller Manager to provide USB PD and USB Type-C functionalities. Add definition of TCPC_CC_STATUS_TOGGLING. Signed-off-by: ShuFan Lee --- drivers/staging/typec/Kconfig | 8 + drivers/staging/typec/Mak

Re: Forcibly bind a device to UAS

2018-03-16 Thread Menion
So in summary Orico is lying about this particular enclosure 2018-03-16 16:20 GMT+01:00 Alan Stern : > On Fri, 16 Mar 2018, Menion wrote: > >> Hi Alan&Greg >> Yes, sorry, I thought it was simpler. I confirm that also the 4 >> endpoints required for UAS operation are missing, so everything is >> co

[PATCH v2 04/21] fbdev: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 01/21] ASoC: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

Re: Forcibly bind a device to UAS

2018-03-16 Thread Alan Stern
On Fri, 16 Mar 2018, Menion wrote: > Hi Alan&Greg > Yes, sorry, I thought it was simpler. I confirm that also the 4 > endpoints required for UAS operation are missing, so everything is > coherent to say "no UASP sorry" > From the VID:PID you can see that the chipset is a JMS567, which does > suppo

Re: [PATCH] staging: typec: rt1711h typec chip driver

2018-03-16 Thread Heikki Krogerus
Hi ShuFan, On Fri, Mar 16, 2018 at 05:12:49PM +0800, ShuFan Lee wrote: > +static int rt1711h_init_gpio(struct rt1711h_chip *chip) > +{ > + int ret; > + struct device_node *np = chip->dev->of_node; > + > + ret = of_get_named_gpio(np, "rt,intr_gpio", 0); > + if (ret < 0) { > +

Re: Forcibly bind a device to UAS

2018-03-16 Thread Menion
Hi Alan&Greg Yes, sorry, I thought it was simpler. I confirm that also the 4 endpoints required for UAS operation are missing, so everything is coherent to say "no UASP sorry" >From the VID:PID you can see that the chipset is a JMS567, which does support UASP: http://www.jmicron.com/PDF/brief/jms56

Re: Forcibly bind a device to UAS

2018-03-16 Thread Alan Stern
On Fri, 16 Mar 2018, Menion wrote: > Hi Greg > Yes Orico is a kind of crap, but it is not so easy to find those kind > of devices. > My concern is that we may see one of this crappy implementation of > device, such that it actually supports perfectly UASP but they > "forgot" to set something in th

[PATCH v2 16/21] remoteproc: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 03/21] crypto: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 00/21] Allow compile-testing NO_DMA (drivers)

2018-03-16 Thread Geert Uytterhoeven
Hi all, If NO_DMA=y, get_dma_ops() returns a reference to the non-existing symbol bad_dma_ops, thus causing a link failure if it is ever used. The intention of this is twofold: 1. To catch users of the DMA API on systems that do no support the DMA mapping API, 2. To avoid buildin

[PATCH v2 10/21] lightnvm: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 08/21] iio: adc: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 07/21] i2c: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH] usb: dwc3: core: Fix broken system suspend/resume on AM437x

2018-03-16 Thread Roger Quadros
On TI's AM437x, the DWC3 controller looses state after a system suspend/resume. We are re-initializing the controller but we miss restoring the PRTCAP register. This causes USB host to break on AM437x after a system suspend/resume. Fix this by restoring the PRTCAP register on system resume. Signe

Re: [PATCH 8/9] usb: host: xhci-rcar: add support for r8a77965

2018-03-16 Thread Greg KH
On Fri, Mar 16, 2018 at 04:33:05PM +0200, Mathias Nyman wrote: > From: Yoshihiro Shimoda > > This patch adds support for r8a77965 (R-Car M3-N). > > Signed-off-by: Yoshihiro Shimoda > Reviewed-by: Rob Herring > Signed-off-by: Mathias Nyman > --- > Documentation/devicetree/bindings/usb/usb-xhc

Re: [PATCH v2 17/21] scsi: hisi_sas: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread John Garry
On 16/03/2018 13:51, Geert Uytterhoeven wrote: Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and

Re: [PATCH v2 3/5] usb: gadget: Add NO_DMA dummies for DMA mapping API

2018-03-16 Thread Greg Kroah-Hartman
On Fri, Mar 16, 2018 at 02:25:42PM +0100, Geert Uytterhoeven wrote: > Add dummies for usb_gadget_{,un}map_request{,_by_dev}(), to allow > compile-testing if NO_DMA=y. > > This prevents the following from showing up later: > > ERROR: "usb_gadget_unmap_request_by_dev" > [drivers/usb/renesas_us

Re: [PATCH usb-next v10 3/8] usb: core: add a wrapper for the USB PHYs on the HCD

2018-03-16 Thread Roger Quadros
+some TI folks Hi Martin, On 18/02/18 20:44, Martin Blumenstingl wrote: > Many SoC platforms have separate devices for the USB PHY which are > registered through the generic PHY framework. These PHYs have to be > enabled to make the USB controller actually work. They also have to be > disabled ag

[PATCH 8/9] usb: host: xhci-rcar: add support for r8a77965

2018-03-16 Thread Mathias Nyman
From: Yoshihiro Shimoda This patch adds support for r8a77965 (R-Car M3-N). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Signed-off-by: Mathias Nyman --- Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 + drivers/usb/host/xhci-rcar.c | 4 2 files

[PATCH 6/9] xhci: refactor xhci_urb_enqueue a bit with minor changes

2018-03-16 Thread Mathias Nyman
make the local ep_state variable a pointer to the actual ring ep_state. This allows us to read fresh ep_state values every time, will be useful later. Also move the streams check out from bulk only case. Even if only bulk tranfers can use streams we shouldn't continue if those flags are set. Main

[PATCH 7/9] xhci: Clear the host side toggle manually when endpoint is soft reset

2018-03-16 Thread Mathias Nyman
Some devices use a clear endpoint halt request as a soft reset, even if the endpoint is not halted. This will clear the toggle and sequence on the device side. xHCI however refuses to reset a non-halted endpoint, so instead we need to issue a configure endpoint command on xHCI to clear its host si

[PATCH 9/9] xhci: Show what USB release number the xHC supports from protocol capablity

2018-03-16 Thread Mathias Nyman
xhci driver displays the supported xHC USB revision in a message during driver load: "Host supports USB 3.1 Enhanced SuperSpeed" Get the USB minor revision number from the xhci protocol capability. This will show the correct supported revisions for new USB 3.2 and later hosts Don't rely on the S

[PATCH 5/9] xhci: Don't always run the default stop endpoint command completion handler

2018-03-16 Thread Mathias Nyman
The default stop endpoint completion handler will give back cancelled URBs, and clean, or move past those canceller TRBs on the ring. This is not always the preferred action. If the stop endpoint command issuer is waiting for a completion skip the default handler and just call the completion. Si

[PATCH 4/9] xhci: zero usb device slot_id member when disabling and freeing a xhci slot

2018-03-16 Thread Mathias Nyman
set udev->slot_id to zero when disabling and freeing the xhci slot. Prevents usb core from calling xhci with a stale slot id. xHC controller may be reset during resume to recover from some error. All slots are unusable as they are disabled and freed. xhci driver starts slot enumeration again from

[PATCH 3/9] usb: xhci: Remove ep_trb from finish_td()

2018-03-16 Thread Mathias Nyman
From: Lu Baolu Function argument ep_trb for finish_td() isn't needed anymore. Cleanup it. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/us

[PATCH 1/9] usb: xhci: Clean up error code in xhci_dbc_tty_register_device()

2018-03-16 Thread Mathias Nyman
From: Dan Carpenter tty_port_register_device() returns error pointers on error, never NULL. The IS_ERR_OR_NULL() function returns either 1 or 0 so it means we return 1 on error instead of a proper error code. The caller only checks for zero vs non-zero so this doesn't affect runtime. Signed-off

[PATCH 0/9] xhci patches for usb-next

2018-03-16 Thread Mathias Nyman
Hi Greg Xhci patches for usb-next, cleanups, support for syncing seq_nr/toggle if a clear endpoint halt request is issued on non-halted endpoints, and other small changes -Mathias Dan Carpenter (1): usb: xhci: Clean up error code in xhci_dbc_tty_register_device() Lu Baolu (2): usb: xhci: Re

[PATCH 2/9] usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint()

2018-03-16 Thread Mathias Nyman
From: Lu Baolu Function argument ep_trb for xhci_cleanup_halted_endpoint() isn't needed anymore. Cleanup it. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/x

[PATCH v2 09/21] iommu: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2] USB: host: sl811: Re-use DEFINE_SHOW_ATTRIBUTE() macro

2018-03-16 Thread Andy Shevchenko
...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Signed-off-by: Andy Shevchenko --- - fix compile error drivers/usb/host/sl811-hcd.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/usb/host/sl811-hc

Re: Forcibly bind a device to UAS

2018-03-16 Thread Menion
Hi Greg Yes Orico is a kind of crap, but it is not so easy to find those kind of devices. My concern is that we may see one of this crappy implementation of device, such that it actually supports perfectly UASP but they "forgot" to set something in the firmware, maybe just the capability My questio

[PATCH v2 13/21] mmc: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 12/21] media: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 19/21] spi: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 05/21] firewire: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 20/21] staging: vc04_services: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

Re: Forcibly bind a device to UAS

2018-03-16 Thread Greg KH
On Fri, Mar 16, 2018 at 02:10:43PM +0100, Menion wrote: > Hi all > I have in my hands a multi bay SATA enclosure, with some unidentified > SATA multiport but using the JMicron JMS567 USB to SATA bridge. > This bridge is known to support UASP but in this particular > implementation, due to something

[PATCH v2 21/21] usb: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 18/21] serial: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 02/21] ata: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 15/21] net: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 06/21] fpga: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 14/21] mtd: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 11/21] mailbox: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 17/21] scsi: hisi_sas: Remove depends on HAS_DMA in case of platform dependency

2018-03-16 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v2 4/5] mm: Add NO_DMA dummies for DMA pool API

2018-03-16 Thread Geert Uytterhoeven
Add dummies for dma{,m}_pool_{create,destroy,alloc,free}(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "dma_pool_destroy" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR: "dma_pool_free" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR: "dma

[PATCH v2 2/5] dma-coherent: Add NO_DMA dummies for managed DMA API

2018-03-16 Thread Geert Uytterhoeven
Add dummies for dmam_{alloc,free}_coherent(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "dmam_alloc_coherent" [drivers/net/ethernet/arc/arc_emac.ko] undefined! ERROR: "dmam_free_coherent" [drivers/net/ethernet/apm/xgene/xgene-enet.ko]

[PATCH v2 1/5] dma-mapping: Convert NO_DMA get_dma_ops() into a real dummy

2018-03-16 Thread Geert Uytterhoeven
If NO_DMA=y, get_dma_ops() returns a reference to the non-existing symbol bad_dma_ops, thus causing a link failure if it is ever used. Make get_dma_ops() return NULL instead, to avoid the link failure. This allows to improve compile-testing, and limits the need to keep on sprinkling dependencies o

[PATCH v2 3/5] usb: gadget: Add NO_DMA dummies for DMA mapping API

2018-03-16 Thread Geert Uytterhoeven
Add dummies for usb_gadget_{,un}map_request{,_by_dev}(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "usb_gadget_unmap_request_by_dev" [drivers/usb/renesas_usbhs/renesas_usbhs.ko] undefined! ERROR: "usb_gadget_map_request_by_dev" [driv

[PATCH v2 0/5] Allow compile-testing NO_DMA (core)

2018-03-16 Thread Geert Uytterhoeven
Hi all, If NO_DMA=y, get_dma_ops() returns a reference to the non-existing symbol bad_dma_ops, thus causing a link failure if it is ever used. The intention of this is twofold: 1. To catch users of the DMA API on systems that do no support the DMA mapping API, 2. To avoid buildin

[PATCH v2 5/5] scsi: Add NO_DMA dummies for SCSI DMA mapping API

2018-03-16 Thread Geert Uytterhoeven
Add dummies for scsi_dma_{,un}map(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "scsi_dma_unmap" [drivers/firewire/firewire-sbp2.ko] undefined! ERROR: "scsi_dma_map" [drivers/firewire/firewire-sbp2.ko] undefined! Signed-off-by: Geert U

[PATCH v2] USB: wusbcore: crypto: Remove VLA usage

2018-03-16 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation instead. The use of stack Variable Length Arrays needs to be avoided, as they can be a vector for stack exhaustion, which can be both a runtime bug or a security flaw. Also, in general, as code evolves it is

Re: [PATCH] USB: wusbcore: crypto: Remove VLA usage

2018-03-16 Thread Gustavo A. R. Silva
I just discovered an issue with this patch. Please, drop it. I'll send v2 shortly. Thanks -- Gustavo On 03/16/2018 08:01 AM, Gustavo A. R. Silva wrote: In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation instead. The use of stack Variable Length Arrays

Re: [PATCH] staging: typec: rt1711h typec chip driver

2018-03-16 Thread 李書帆
Hi Greg, 2018-03-16 21:29 GMT+08:00 Mats Karrman : > Hi, > > On 2018-03-16 13:58, Greg KH wrote: > >> On Fri, Mar 16, 2018 at 05:12:49PM +0800, ShuFan Lee wrote: >>> >>> From: ShuFan Lee >>> >>> Richtek RT1711H Type-C chip driver that works with >>> Type-C Port Controller Manager to provide USB P

Re: [PATCH] staging: typec: rt1711h typec chip driver

2018-03-16 Thread Mats Karrman
Hi, On 2018-03-16 13:58, Greg KH wrote: On Fri, Mar 16, 2018 at 05:12:49PM +0800, ShuFan Lee wrote: From: ShuFan Lee Richtek RT1711H Type-C chip driver that works with Type-C Port Controller Manager to provide USB PD and USB Type-C functionalities. Add definition of TCPC_CC_STATUS_TOGGLING.

[PATCH] USB: wusbcore: crypto: Remove VLA usage

2018-03-16 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation instead. The use of stack Variable Length Arrays needs to be avoided, as they can be a vector for stack exhaustion, which can be both a runtime bug or a security flaw. Also, in general, as code evolves it is

Forcibly bind a device to UAS

2018-03-16 Thread Menion
Hi all I have in my hands a multi bay SATA enclosure, with some unidentified SATA multiport but using the JMicron JMS567 USB to SATA bridge. This bridge is known to support UASP but in this particular implementation, due to something weird/buggy (most probably the firmware) doesn't who up as UASP c

Re: [PATCH] staging: typec: rt1711h typec chip driver

2018-03-16 Thread Greg KH
On Fri, Mar 16, 2018 at 05:12:49PM +0800, ShuFan Lee wrote: > From: ShuFan Lee > > Richtek RT1711H Type-C chip driver that works with > Type-C Port Controller Manager to provide USB PD and > USB Type-C functionalities. > Add definition of TCPC_CC_STATUS_TOGGLING. > > Signed-off-by: ShuFan Lee >

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Felipe Balbi
Hi, Minas Harutyunyan writes: On 09/03/18 14:47, Roger Quadros wrote: > In the following test we get stuck by sleeping forever in _dwc3_set_mode() > after which dual-role switching doesn't work. > > On dra7-evm's dual-role port, > - Load g_zero gadget driver and enumerat

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Minas Harutyunyan
Hi, On 3/16/2018 3:03 PM, Roger Quadros wrote: > On 16/03/18 13:00, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros writes: >> >>> Hi Felipe, >>> >>> On 09/03/18 14:47, Roger Quadros wrote: In the following test we get stuck by sleeping forever in _dwc3_set_mode() after which dual-rol

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Roger Quadros
On 16/03/18 13:00, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: > >> Hi Felipe, >> >> On 09/03/18 14:47, Roger Quadros wrote: >>> In the following test we get stuck by sleeping forever in _dwc3_set_mode() >>> after which dual-role switching doesn't work. >>> >>> On dra7-evm's dual-role

Re: [PATCH v5 1/2] usb/gadget: Add an EP dispose() callback for EP lifetime tracking

2018-03-16 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > Some UDC may want to allocate endpoints dynamically, either because > the HW supports an arbitrary large number or because (like the Aspeed > BMC SoCs), the pool of HW endpoints is shared between multiple gadgets. > > The allocation side can be done rather ea

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Felipe Balbi
Hi, Roger Quadros writes: > Hi Felipe, > > On 09/03/18 14:47, Roger Quadros wrote: >> In the following test we get stuck by sleeping forever in _dwc3_set_mode() >> after which dual-role switching doesn't work. >> >> On dra7-evm's dual-role port, >> - Load g_zero gadget driver and enumerate to

  1   2   >