[PATCH] [for 4.11]xhci: plat: Register shutdown for xhci_plat

2017-03-13 Thread Adam Wallis
Shutdown should be called for xhci_plat devices especially for situations where kexec might be used by stopping DMA transactions. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- drivers/usb/host/xhci-plat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/xhci-

[PATCH] [for 4.11]xhci: plat: Register shutdown for xhci_plat

2017-03-13 Thread Adam Wallis
Shutdown should be called for xhci_plat devices especially for situations where kexec might be used by stopping DMA transactions. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- drivers/usb/host/xhci-plat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/xhci-

[PATCH v2][for 4.14] xhci: allow TRACE to work with EVENT ring dequeue

2017-09-22 Thread Adam Wallis
provides a refactor by removing the multiple return exit points into a single return which additionally allows for all rings to use the trace function. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- Changes in v2: undo accidental line removal at end of patch drivers/usb/host/xhci-

[PATCH][for 4.14] xhci: allow TRACE to work with EVENT ring dequeue

2017-09-22 Thread Adam Wallis
provides a refactor by removing the multiple return exit points into a single return which additionally allows for all rings to use the trace function. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- drivers/usb/host/xhci-ring.c | 33 - 1 file chang

Re: [PATCH v3][for 4.14] xhci: allow TRACE to work with EVENT ring dequeue

2017-10-04 Thread Adam Wallis
On 9/26/2017 2:44 AM, Mathias Nyman wrote: > On 25.09.2017 19:09, David Laight wrote: >> From: Adam Wallis >>> Sent: 25 September 2017 13:26 >>> inc_deq() currently bails earlier for EVENT rings than the common return >>> point of the function, due to the fact t

[PATCH V3] usb: host: xhci-plat: allow sysdev to inherit from ACPI

2017-09-05 Thread Adam Wallis
uot;usb: xhci: use bus->sysdev for DMA configuration") Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- Changes in v3: Add "fixes" to commit message per greg k-h Changes in v2: Incorporate the simplified fwnode check as suggested by Mathias drivers/usb/host

Re: [PATCH v2][for 4.14] xhci: allow TRACE to work with EVENT ring dequeue

2017-09-25 Thread Adam Wallis
On 9/25/2017 5:59 AM, Mathias Nyman wrote: > On 22.09.2017 22:55, Adam Wallis wrote: >> inc_deq() currently bails earlier for EVENT rings than the common return >> point of the function, due to the fact that EVENT rings do not have >> link TRBs. The unfortunate side effect of

[PATCH v3][for 4.14] xhci: allow TRACE to work with EVENT ring dequeue

2017-09-25 Thread Adam Wallis
provides a refactor by removing the multiple return exit points into a single return which additionally allows for all rings to use the trace function. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- Changes in v2: undo accidental line removal at end of patch Changes in v3: r

Re: [PATCH] usb: dwc3: Initialize DMA ops/mask for xhci-hcd

2017-08-28 Thread Adam Wallis
On 8/28/2017 9:05 AM, Felipe Balbi wrote: > > Hi, > > Adam Wallis <awal...@codeaurora.org> writes: >> The dma ops from the parent DWC device are not getting passed to the >> child xhci-hcd device. This patch makes use of >> platform_device_register_full to

[PATCH V2] usb: dwc3: Initialize DMA ops/mask for xhci-hcd

2017-08-28 Thread Adam Wallis
. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- drivers/usb/dwc3/host.c | 39 +-- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index 76f0b0d..c289da1 100644 --- a/drivers/usb/dwc3/

Re: [PATCH] usb: dwc3: Initialize DMA ops/mask for xhci-hcd

2017-08-28 Thread Adam Wallis
On 8/25/2017 7:03 PM, Grygorii Strashko wrote: > > > On 08/25/2017 01:02 PM, Adam Wallis wrote: >> The dma ops from the parent DWC device are not getting passed to the >> child xhci-hcd device. This patch makes use of >> platform_device_register_full to set the

Re: [PATCH V2] usb: dwc3: Initialize DMA ops/mask for xhci-hcd

2017-08-28 Thread Adam Wallis
On 8/28/2017 1:57 PM, Vivek Gautam wrote: > Hi Adam, > > > On Mon, Aug 28, 2017 at 10:05 PM, Adam Wallis <awal...@codeaurora.org> wrote: >> The dma ops from the parent DWC device are not getting passed to the >> child xhci-hcd device. This patch makes use of &g

[PATCH] usb: dwc3: Initialize DMA ops/mask for xhci-hcd

2017-08-25 Thread Adam Wallis
. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- drivers/usb/dwc3/host.c | 39 +-- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index 76f0b0d..662e9e2 100644 --- a/drivers/usb/dwc3/

[PATCH] usb: host: xhci-plat: allow sysdev to inherit from ACPI

2017-08-31 Thread Adam Wallis
s not called on the allocated platform device) 2: fwnode exists but is not of type ACPI (this would happen if platform_device_add_properties was called on the allocated device. Instead of type FWNODE_ACPI, you would end up with FWNODE_PDATA) Cc: sta...@vger.kernel.org # 4.12.x Signed-off-by: Adam

[PATCH V2] usb: host: xhci-plat: allow sysdev to inherit from ACPI

2017-09-05 Thread Adam Wallis
.org #4.13.x Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- Changes in v2: Incorporate the simplified fwnode check as suggested by Mathias drivers/usb/host/xhci-plat.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci-plat.c

Re: [PATCH V2] usb: host: xhci-plat: allow sysdev to inherit from ACPI

2017-09-05 Thread Adam Wallis
On 9/5/2017 10:16 AM, Greg Kroah-Hartman wrote: > On Tue, Sep 05, 2017 at 09:57:29AM -0400, Adam Wallis wrote: >> Currently, xhci_plat is not set up properly when the parent device is an >> ACPI node. The conditions that xhci_plat_probe should satisfy are >> >> 1. xh

Re: [PATCH V2] usb: host: xhci-plat: allow sysdev to inherit from ACPI

2017-09-05 Thread Adam Wallis
On 9/5/2017 10:31 AM, Greg Kroah-Hartman wrote: > On Tue, Sep 05, 2017 at 10:25:19AM -0400, Adam Wallis wrote: >> On 9/5/2017 10:16 AM, Greg Kroah-Hartman wrote: >>> On Tue, Sep 05, 2017 at 09:57:29AM -0400, Adam Wallis wrote: >>>> Currently, xhci_plat is not set up p

[PATCH v1] usb: xhci: allow imod-interval to be configurable

2017-11-28 Thread Adam Wallis
at_probe Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 + drivers/usb/host/xhci-plat.c | 15 +++ drivers/usb/host/xhci.c| 7 ++- drivers/usb/host/xhci.h

Re: [PATCH v1] usb: xhci: allow imod-interval to be configurable

2017-11-28 Thread Adam Wallis
On 11/28/2017 2:35 PM, Greg Kroah-Hartman wrote: > On Tue, Nov 28, 2017 at 12:11:46PM -0500, Adam Wallis wrote: >> The xHCI driver currently has the IMOD set to 160, which >> translates to an IMOD interval of 40,000ns (160 * 250)ns >> [..] >> --- a/drivers/usb/host/xhci-

Re: [PATCH 1/2] usb: xhci: add relaxed timing quirk bit

2017-11-22 Thread Adam Wallis
ne "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 Adam -- Adam Wallis Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc.

Re: [PATCH 1/2] usb: xhci: add relaxed timing quirk bit

2017-11-23 Thread Adam Wallis
On 11/23/2017 5:59 AM, Mathias Nyman wrote: > On 23.11.2017 01:32, Adam Wallis wrote: >> On 11/22/2017 10:24 AM, Mathias Nyman wrote: >> [..] >>> >>> We know have at least two hosts/platforms that need custom interrupt >>> moderation >>> va

[PATCH v2] usb: xhci: allow imod-interval to be configurable

2017-11-29 Thread Adam Wallis
at_probe Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- changes from v1: * Removed device_property_read_u32() per suggestion from greg k-h * Used ER_IRQ_INTERVAL_MASK in place of (u16) cast Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 + drivers/usb/host/xhci-plat.c

Re: [PATCH v2] usb: xhci: allow imod-interval to be configurable

2017-11-30 Thread Adam Wallis
ttp://lists.infradead.org/mailman/listinfo/linux-arm-kernel Adam -- Adam Wallis Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. -- To unsubscribe from this list:

Re: [PATCH 1/2] usb: xhci: add relaxed timing quirk bit

2017-11-22 Thread Adam Wallis
On 11/22/2017 10:24 AM, Mathias Nyman wrote: > On 22.11.2017 02:07, Adam Wallis wrote: >> On 11/21/2017 3:06 PM, Rob Herring wrote: >> >> [..] >> >>>> I like where you are going with this. Are you saying that I could read for >>>> a >>>

Re: [PATCH v4] usb: xhci: allow imod-interval to be configurable

2017-12-04 Thread Adam Wallis
On 12/4/2017 9:15 PM, Chunfeng Yun wrote: > On Mon, 2017-12-04 at 09:27 -0500, Adam Wallis wrote: >> The xHCI driver currently has the IMOD set to 160, which >> translates to an IMOD interval of 40,000ns (160 * 250)ns >> >> Commit 0cbd4b34cda9 ("xhci: mediatek:

[PATCH 1/2] usb: xhci: add relaxed timing quirk bit

2017-11-21 Thread Adam Wallis
of the register. This can prevent an "interrupt storm" effect on certain systems. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 + drivers/usb/host/xhci.c| 25 +++---

[PATCH 2/2] usb: host: xhci-plat: check relaxed timing quirk bit

2017-11-21 Thread Adam Wallis
Check sysdev to see if the relaxed timing quirk ("quirk-relaxed-timing") is set. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- drivers/usb/host/xhci-plat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat

[PATCH 0/2] usb: xhci: addition of timing quirk

2017-11-21 Thread Adam Wallis
the future with other similar registers. This change allows for firmware (or scripts) to set these registers as required in place of using hard-coded values which might not be ideal for all platforms. Adam Wallis (2): usb: xhci: add relaxed timing quirk bit usb: host: xhci-plat: check rela

Re: [PATCH 1/2] usb: xhci: add relaxed timing quirk bit

2017-11-21 Thread Adam Wallis
On 11/21/2017 2:11 PM, Rob Herring wrote: > On Tue, Nov 21, 2017 at 12:18:09PM -0500, Adam Wallis wrote: >> Certain systems may run with CPUs at a very slow frequency. This >> patch adds a quirk bit that can be used to relax certain timings, etc. >> >> This quirk might

Re: [PATCH 1/2] usb: xhci: add relaxed timing quirk bit

2017-11-21 Thread Adam Wallis
org/majordomo-info.html > I will provide an updated proposed patch sometime this week. I also hope to get some feedback from Mathias to see what he prefers. Thanks again for the feedback Rob. -- Adam Wallis Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qu

Re: [PATCH v2] usb: xhci: allow imod-interval to be configurable

2017-12-01 Thread Adam Wallis
Hi Chunfeng, On 11/30/2017 10:32 PM, Chunfeng Yun wrote: > Hi, > On Wed, 2017-11-29 at 10:52 -0500, Adam Wallis wrote: >> The xHCI driver currently has the IMOD set to 160, which >> translates to an IMOD interval of 40,000ns (160 * 250)ns >> >> Commit 0cbd4b34cda9

[PATCH v3] usb: xhci: allow imod-interval to be configurable

2017-12-01 Thread Adam Wallis
spec and would need to specify a value outside of the max 8,000 IRQs/second limit specified in the xHCI spec. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- changes from v2: * Added PCI default value [Mathias] * Removed xhci-mtk.h from xhci-plat.c [Chunfeng Yun] * Removed MTK quir

Re: [PATCH v3] usb: xhci: allow imod-interval to be configurable

2017-12-04 Thread Adam Wallis
On 12/4/2017 3:57 AM, Mathias Nyman wrote: > On 03.12.2017 05:22, Chunfeng Yun wrote: >> On Fri, 2017-12-01 at 10:44 -0500, Adam Wallis wrote: >>> The xHCI driver currently has the IMOD set to 160, which >>> translates to an IMOD interval of 40,000ns (160 * 250)ns

[PATCH v4] usb: xhci: allow imod-interval to be configurable

2017-12-04 Thread Adam Wallis
spec and would need to specify a value outside of the max 8,000 IRQs/second limit specified in the xHCI spec. Tested-by: Chunfeng Yun <chunfeng@mediatek.com> Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- changes from v3: * Changed imod-interval to imod-interval-ns [R

Re: [PATCH v3] usb: xhci: allow imod-interval to be configurable

2017-12-04 Thread Adam Wallis
On 12/2/2017 10:22 PM, Chunfeng Yun wrote: > On Fri, 2017-12-01 at 10:44 -0500, Adam Wallis wrote: >> The xHCI driver currently has the IMOD set to 160, which >> translates to an IMOD interval of 40,000ns (160 * 250)ns >> >> Commit 0cbd4b34cda9 ("xhci: mediatek:

Re: [PATCH v4] usb: xhci: allow imod-interval to be configurable

2017-12-04 Thread Adam Wallis
Timur On 12/4/2017 9:58 AM, Timur Tabi wrote: > On 12/4/17 8:27 AM, Adam Wallis wrote: >> If no interval is specified, the default of 40,000ns (IMOD=160) will be >> used. > > ... > >> + - imod-interval-ns: default interrupt moderation interval is 5000ns >

Re: [PATCH v4] usb: xhci: allow imod-interval to be configurable

2017-12-05 Thread Adam Wallis
Rob, On 12/5/2017 3:48 AM, Mathias Nyman wrote: > On 05.12.2017 04:54, Adam Wallis wrote: >> On 12/4/2017 9:15 PM, Chunfeng Yun wrote: >>> On Mon, 2017-12-04 at 09:27 -0500, Adam Wallis wrote: >>>> The xHCI driver currently has the IMOD set to 160, which [..] >

[PATCH] usb: xhci: force all memory allocations to node

2018-05-15 Thread Adam Wallis
The xhci driver forces DMA memory to be node aware, however, there are several ring-related memory allocations that are not memory node aware. This patch resolves those *alloc functions to be allocated on the proper memory node. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- drive

Re: [PATCH] usb: xhci: force all memory allocations to node

2018-05-15 Thread Adam Wallis
On 5/15/2018 11:07 AM, Greg Kroah-Hartman wrote: > On Tue, May 15, 2018 at 09:53:57AM -0400, Adam Wallis wrote: > Does this really do anything? Given the speed of USB3 at the moment, > does fixing the memory to the node the PCI device is on show any > measurable speedups? Last I re

Re: [PATCH] usb: xhci: force all memory allocations to node

2018-05-21 Thread Adam Wallis
On 5/16/2018 2:02 AM, Greg Kroah-Hartman wrote: > On Tue, May 15, 2018 at 04:51:53PM -0400, Adam Wallis wrote: > > Ok, fair enough, I was hoping that "modern" systems would have better > NUMA memory interconnects. I guess that isn't the case still :( Things will ke

Re: [PATCH] usb: xhci: force all memory allocations to node

2018-05-21 Thread Adam Wallis
On 5/21/2018 9:53 AM, Mathias Nyman wrote: > On 21.05.2018 15:56, Adam Wallis wrote: > Not sure if if there's any benefit in allocating the scratchpad structures > from > a closer node, or any harm? xhci driver doesn't really access scratchpad that > frequently. I don't see ho

Re: [PATCH v2] usb: xhci: force all memory allocations to node

2018-05-22 Thread Adam Wallis
On 5/22/2018 6:46 PM, Timur Tabi wrote: > On 5/22/18 1:55 PM, Adam Wallis wrote: >> +    struct device *dev = xhci_to_hcd(xhci)->self.sysdev; > > Since you only use 'dev' to get the NUMA node, you might want to consider this > instead: > > int node = d

[PATCH v2] usb: xhci: force all memory allocations to node

2018-05-22 Thread Adam Wallis
The xhci driver forces DMA memory to be node aware, however, there are several ring-related memory allocations that are not memory node aware. This patch resolves those *alloc functions to be allocated on the proper memory node. Signed-off-by: Adam Wallis <awal...@codeaurora.org> --- change

Re: [PATCH v2] usb: xhci: force all memory allocations to node

2018-05-30 Thread Adam Wallis
Mathias, On 5/22/2018 2:55 PM, Adam Wallis wrote: > The xhci driver forces DMA memory to be node aware, however, there are > several ring-related memory allocations that are not memory node aware. > This patch resolves those *alloc functions to be allocated on the proper >