[RFC PATCH] gpiolib-acpi: Add ACPI5 event model support to gpio.

2013-01-25 Thread Mathias Nyman
pins have acpi event methods and assigns interrupt handlers that calls the acpi event methods for those pins. Partially based on work by Rui Zhang Signed-off-by: Mathias Nyman --- drivers/gpio/gpiolib-acpi.c | 80 +++ include/linux/acpi_gpio.h |4

Re: [RFC PATCH] gpiolib-acpi: Add ACPI5 event model support to gpio.

2013-01-25 Thread Mathias Nyman
On 01/25/2013 02:54 PM, Linus Walleij wrote: On Fri, Jan 25, 2013 at 12:48 PM, Mathias Nyman wrote: Add ability to handle ACPI events signalled by GPIO interrupts. ACPI5 platforms can use GPIO signaled ACPI events. These GPIO interrupts are handled by ACPI event methods which need to be

[RFC PATCH v2] gpiolib-acpi: Add ACPI5 event model support to gpio.

2013-01-28 Thread Mathias Nyman
pins have acpi event methods and assigns interrupt handlers that calls the acpi event methods for those pins. Partially based on work by Rui Zhang Signed-off-by: Mathias Nyman --- drivers/gpio/gpiolib-acpi.c | 82 +++ include/linux/acpi_gpio.h |4

Re: [RFC PATCH] gpiolib: add gpio get direction support

2012-10-23 Thread Mathias Nyman
On 10/23/2012 01:23 AM, Linus Walleij wrote: On Mon, Oct 22, 2012 at 3:44 PM, Mathias Nyman wrote: If the .get_direction callback is set, then gpiolib will use it for showing correct gpio direction in sysfs and debug. If not set then it will work the old way; e.g. guessing everything is

[RFC PATCH v2] gpiolib: add gpio get direction callback support

2012-10-24 Thread Mathias Nyman
. Signed-off-by: Mathias Nyman --- drivers/gpio/gpiolib.c | 38 +- include/asm-generic/gpio.h |5 - 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index de0213c..141f793 100644 --- a

[PATCH] gpiolib: Don't return -EPROBE_DEFER to sysfs, or for invalid gpios

2012-10-25 Thread Mathias Nyman
gpios requested with invalid numbers, or gpios requested from userspace via sysfs should not try to be deferred on failure. Signed-off-by: Mathias Nyman --- drivers/gpio/gpiolib.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers

Re: [PATCH 1/3] gpio / ACPI: add ACPI support

2012-11-05 Thread Mathias Nyman
On 11/05/2012 01:53 PM, Linus Walleij wrote: On Sat, Nov 3, 2012 at 8:46 AM, Mika Westerberg wrote: +/** + * acpi_get_gpio() - Translate ACPI GPIO pin to GPIO number usable with GPIO API + * @path: ACPI GPIO controller full path name, (e.g. "\\_SB.GPO1") + * @pin: ACPI GPIO pin nu

Re: [PATCH] gpio/lynxpoint: check if the interrupt is enabled in IRQ handler

2013-10-02 Thread Mathias Nyman
interrupt enable bit for the pin as well. Signed-off-by: Mika Westerberg Acked-by: Mathias Nyman -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

[PATCH] x86: add pin control support to Intel low power subsystem

2013-09-13 Thread Mathias Nyman
are possible to add later. Signed-off-by: Mathias Nyman --- arch/x86/Kconfig |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 30c40f0..91f72b5 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -482,11 +482,12 @@ config

[RFC PATCH] gpiolib: add gpio get direction support

2012-10-22 Thread Mathias Nyman
, then gpiolib will use it for showing correct gpio direction in sysfs and debug. If not set then it will work the old way; e.g. guessing everything is input until direction is set. Signed-off-by: Mathias Nyman --- drivers/gpio/gpiolib.c | 64

[PATCH 0/1] gpio: add Lynxpoint chipset gpio driver

2012-12-07 Thread Mathias Nyman
This gpio controller driver for the Intel Lynxpoint LP PCH chipset is designed to work with the new ACPI 5 enumeration model and ACPI 5 GpioIo/GpioInt resource translation recently added to linux-acpi. Mathias Nyman (1): gpio: add Lynxpoint chipset gpio driver. drivers/gpio/Kconfig

[PATCH 1/1] gpio: add Lynxpoint chipset gpio driver.

2012-12-07 Thread Mathias Nyman
Add gpio support for Intel Lynxpoint chipset. Lynxpoint supports 94 gpio pins which can generate interrupts. Driver will fail requests for pins that are marked as owned by ACPI, or set in an alternate mode (non-gpio). Signed-off-by: Mathias Nyman --- drivers/gpio/Kconfig |7

Re: [PATCH 1/1] gpio: add Lynxpoint chipset gpio driver.

2012-12-10 Thread Mathias Nyman
On 12/10/2012 11:48 AM, Linus Walleij wrote: On Fri, Dec 7, 2012 at 3:01 PM, Mathias Nyman wrote: Add gpio support for Intel Lynxpoint chipset. Lynxpoint supports 94 gpio pins which can generate interrupts. Driver will fail requests for pins that are marked as owned by ACPI, or set in an

Re: [PATCH 1/1] gpio: add Lynxpoint chipset gpio driver.

2012-12-11 Thread Mathias Nyman
On 12/11/2012 01:07 AM, Grant Likely wrote: On Fri, 7 Dec 2012 16:01:39 +0200, Mathias Nyman wrote: Add gpio support for Intel Lynxpoint chipset. Lynxpoint supports 94 gpio pins which can generate interrupts. Driver will fail requests for pins that are marked as owned by ACPI, or set in an

Re: [PATCH 1/3] gpio / ACPI: add ACPI support

2012-11-09 Thread Mathias Nyman
On 11/08/2012 09:38 PM, Mika Westerberg wrote: ... +#include +#include +#include +#include +#include + +static int acpi_gpiochip_find(struct gpio_chip *gc, void *data) +{ + acpi_handle handle = data; + acpi_handle gc_handle; + + if (!gc->dev) + return false; + +

Re: [PATCH 1/3] gpio / ACPI: add ACPI support

2012-11-09 Thread Mathias Nyman
On 11/09/2012 04:18 PM, Grant Likely wrote: On Fri, Nov 9, 2012 at 2:11 PM, Mathias Nyman wrote: On 11/08/2012 09:38 PM, Mika Westerberg wrote: ... +#include +#include +#include +#include +#include + +static int acpi_gpiochip_find(struct gpio_chip *gc, void *data) +{ + acpi_handle

[PATCH v2 1/1] gpio: add Intel BayTrail gpio driver

2013-06-13 Thread Mathias Nyman
Add support for gpio on Intel BayTrail platforms. BayTrail supports 3 banks of gpios called SCORE, NCORE ans SUS with 102, 28 and 44 gpio pins. Supports gpio interrupts and ACPI gpio events. Signed-off-by: Mathias Nyman --- drivers/gpio/Kconfig | 12 + drivers/gpio/Makefile

[PATCH v2 0/1] gpio driver for Intel Baytrail platforms

2013-06-13 Thread Mathias Nyman
ps suggested by Andy S. - removed text about pin muxing - added missing 44:th pin to SUS controller - added level triggering option - prevent "forever loop" in case pin is stuck in "interrupt triggered" status, Mathias Nyman (1): gpio: add Intel BayTrail gpio driver

Re: [PATCH v2 0/1] gpio driver for Intel Baytrail platforms

2013-06-14 Thread Mathias Nyman
On 06/13/2013 06:45 PM, Linus Walleij wrote: On Thu, Jun 13, 2013 at 5:06 PM, Mathias Nyman wrote: After looking at the pinctrl subsystem that Linus W. suggested I think pinctrl suits platforms that don't have firmware configuring the pins before the operating system is started, or when

[PATCH v3 1/1] pinctrl: add Intel BayTrail GPIO/pinctrl support

2013-06-18 Thread Mathias Nyman
muxing and expect firmare to set pin muxing and pullup/down properties properly. Signed-off-by: Mathias Nyman --- drivers/pinctrl/Kconfig| 12 + drivers/pinctrl/Makefile |1 + drivers/pinctrl/pinctrl-baytrail.c | 543 3 files changed

[PATCH v3 0/1] Pinctrl/gpio driver for Intel Baytrail platforms

2013-06-18 Thread Mathias Nyman
uctures from pinctrl instead of custom gpio_banks Changes since v1: - generic cleanups suggested by Andy S. - removed text about pin muxing - added missing 44:th pin to SUS controller - added level triggering option - prevent "forever loop" in case pin is stuck in "interrupt trigger

Re: [PATCH v3 1/1] pinctrl: add Intel BayTrail GPIO/pinctrl support

2013-06-19 Thread Mathias Nyman
On 06/18/2013 06:17 PM, Linus Walleij wrote: On Tue, Jun 18, 2013 at 1:33 PM, Mathias Nyman wrote: Add support for gpio on Intel BayTrail platforms. BayTrail supports 3 banks of gpios called SCORE, NCORE ans SUS with 102, 28 and 44 gpio pins. Supports gpio interrupts and ACPI gpio events

Re: [PATCH] gpio: add Intel BayTrail gpio driver

2013-06-03 Thread Mathias Nyman
On 05/30/2013 10:26 PM, Linus Walleij wrote: On Wed, May 29, 2013 at 10:01 AM, Mathias Nyman wrote: Add support for gpio on Intel BayTrail platforms. BayTrail supports 3 banks of gpios called SCORE, NCORE ans SUS with 102, 28 and 43 gpio pins. Supports gpio interrupts Pins may be muxed to

[PATCH] gpio-lynxpoint: Fix warning about unbalanced pm_runtime_enable

2013-08-12 Thread Mathias Nyman
Missing pm_runtime_disable call in driver remove path caused an unbalanaced pm_runtime_enable warning when driver was reloaded Signed-off-by: Mathias Nyman --- drivers/gpio/gpio-lynxpoint.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/gpio/gpio-lynxpoint.c b

Re: [PATCH] gpio / ACPI: Handle ACPI events in accordance with the spec

2013-04-10 Thread Mathias Nyman
On 04/10/2013 10:53 AM, Mika Westerberg wrote: On Tue, Apr 09, 2013 at 03:57:25PM +0200, Rafael J. Wysocki wrote: +void acpi_gpiochip_free_interrupts(struct gpio_chip *chip) +{ + acpi_handle handle; + acpi_status status; + struct list_head *evt_pins; + struct acpi_gpio_ev

Re: [PATCH 2/7] gpio: lynxpoint: remove unnecessary platform_set_drvdata()

2013-05-06 Thread Mathias Nyman
NULL); return 0; } Acked-by: Mathias Nyman -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[RFC PATCH v2 3/4] usb: xhci: add USB2 Link power management BESL support

2013-05-21 Thread Mathias Nyman
USB 3.0 link PM code does. The same xhci_change_max_exit_latency() function is used as with USB3 but code is pulled out from #ifdef CONFIG_PM as USB2.0 BESL LPM funcionality does not depend on CONFIG_PM. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ext-caps.h |1 + drivers/usb/host

[RFC PATCH v2 4/4] usb: add usb2 Link PM variables to sysfs and usb_device

2013-05-21 Thread Mathias Nyman
Adds abitilty to tune L1 timeout (inactivity timer for usb2 link sleep) and BESL (best effort service latency)via sysfs. This also adds a new usb2_lpm_parameters structure with those variables to struct usb_device. Signed-off-by: Mathias Nyman --- drivers/usb/core/sysfs.c | 54

[RFC PATCH v2 0/4] Add usb2 link powermanagement BESL support

2013-05-21 Thread Mathias Nyman
. Changes since v1: -Use kstrto* and unsigned values in sysfs functions as Alan Stern suggested Mathias Nyman (4): usb: xhci: check usb2 port capabilities before adding hw link PM support usb: xhci: define port register names and use them instead of magic numbers usb: xhci: add

[RFC PATCH v2 1/4] usb: xhci: check usb2 port capabilities before adding hw link PM support

2013-05-21 Thread Mathias Nyman
Hardware link powermanagement in usb2 is a per-port capability. Previously support for hw lpm was enabled for all ports if any usb2 port supported it. Now instead cache the capability values and check them for each port individually Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci

[RFC PATCH v2 2/4] usb: xhci: define port register names and use them instead of magic numbers

2013-05-21 Thread Mathias Nyman
Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 16 +++- drivers/usb/host/xhci.c |4 ++-- drivers/usb/host/xhci.h |5 + 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c

Re: [RFC PATCH v2 4/4] usb: add usb2 Link PM variables to sysfs and usb_device

2013-05-22 Thread Mathias Nyman
On 05/21/2013 04:48 PM, Greg KH wrote: On Tue, May 21, 2013 at 01:43:37PM +0300, Mathias Nyman wrote: Adds abitilty to tune L1 timeout (inactivity timer for usb2 link sleep) and BESL (best effort service latency)via sysfs. If you add/remove/change sysfs files, you also need to do the same in

[RFC PATCH v3 1/4] usb: xhci: check usb2 port capabilities before adding hw link PM support

2013-05-23 Thread Mathias Nyman
Hardware link powermanagement in usb2 is a per-port capability. Previously support for hw lpm was enabled for all ports if any usb2 port supported it. Now instead cache the capability values and check them for each port individually Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci

[RFC PATCH v3 4/4] usb: add usb2 Link PM variables to sysfs and usb_device

2013-05-23 Thread Mathias Nyman
Adds abitilty to tune L1 timeout (inactivity timer for usb2 link sleep) and BESL (best effort service latency)via sysfs. This also adds a new usb2_lpm_parameters structure with those variables to struct usb_device. Signed-off-by: Mathias Nyman --- Documentation/ABI/testing/sysfs-bus-usb | 27

[RFC PATCH v3 3/4] usb: xhci: add USB2 Link power management BESL support

2013-05-23 Thread Mathias Nyman
USB 3.0 link PM code does. The same xhci_change_max_exit_latency() function is used as with USB3 but code is pulled out from #ifdef CONFIG_PM as USB2.0 BESL LPM funcionality does not depend on CONFIG_PM. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ext-caps.h |1 + drivers/usb/host

[RFC PATCH v3 0/4] Add usb2 link powermanagement BESL support

2013-05-23 Thread Mathias Nyman
names. Changes since v1: -Use kstrto* and unsigned values in sysfs functions as Alan Stern suggested Changes since v2: - Add Documentation/ABI/testing/sysfs-bus-usb entries for new sysfs attributes - store l1_timeout value in microseconds instead of xHCI specific values Mathias Nyman (4): usb

[RFC PATCH v3 2/4] usb: xhci: define port register names and use them instead of magic numbers

2013-05-23 Thread Mathias Nyman
Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 16 +++- drivers/usb/host/xhci.c |4 ++-- drivers/usb/host/xhci.h |5 + 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c

[PATCH] gpio: add Intel BayTrail gpio driver

2013-05-29 Thread Mathias Nyman
firmare to set pin muxing and pullup/down properties properly. Signed-off-by: Mathias Nyman --- drivers/gpio/Kconfig | 12 + drivers/gpio/Makefile|1 + drivers/gpio/gpio-baytrail.c | 539 ++ 3 files changed, 552 insertions(+), 0 deletions

[PATCH] gpio-lynxpoint: Add X86 dependency and io-port handling header.

2013-03-08 Thread Mathias Nyman
Lynxpoint gpio driver uses X86 specific io-ports to control gpios Signed-off-by: Mathias Nyman --- drivers/gpio/Kconfig |2 +- drivers/gpio/gpio-lynxpoint.c |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index

Re: [PATCH] gpio: msic: Fix calculating register address in msic_gpio_to_oreg()

2012-07-24 Thread Mathias Nyman
TLO + offset + 20; + return INTEL_MSIC_GPIO1HV0CTLO - offset + 20; } static int msic_gpio_direction_input(struct gpio_chip *chip, unsigned offset) Nice, good catch. The last 4 of the 24 gpios will work properly as outputs with this fix. Acked-by: Mathias Nyman -- To unsubscribe from t

[PATCH v2 0/1] gpio: add Lynxpoint chipset gpio driver

2012-12-12 Thread Mathias Nyman
gpio_reg() to lp_gpio_reg() - renamed gpio variable to offset or hwirq where needed. - added comments about register layout - removed __devexit/__devinit macros - removed #ifdefs and added ACPI dependancy instead - added simple runtime pm support - added lp_gpio_free() Mathias Nyman (1): gpio: add

[PATCH v2 1/1] gpio: add Lynxpoint chipset gpio driver.

2012-12-12 Thread Mathias Nyman
Add gpio support for Intel Lynxpoint chipset. Lynxpoint supports 94 gpio pins which can generate interrupts. Driver will fail requests for pins that are marked as owned by ACPI, or set in an alternate mode (non-gpio). Signed-off-by: Mathias Nyman --- drivers/gpio/Kconfig |8

Re: [RFC PATCH] xhci: do not halt the secondary HCD

2016-09-20 Thread Mathias Nyman
cceptable way to upstream the fix, so that the xhci device survives kexec. Any reason you didn't cc: Mathias? Fat fingers - I missed him when grabbing names from get_maintainers. Thanks for adding him in. On Mon, Sep 19, 2016 at 5:11 PM, Mathias Nyman wrote: What kernel version is this?

Re: [PATCH] usb: xhci: mark xhci_unmap_td_bounce_buffer() static

2016-09-26 Thread Mathias Nyman
On 23.09.2016 16:46, Baoyou Xie wrote: We get 1 warning when building kernel with W=1: drivers/usb/host/xhci-ring.c:608:6: warning: no previous prototype for 'xhci_unmap_td_bounce_buffer' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't ne

Re: [PATCH 1/1] usb: xhci: fix return value of xhci_setup_device()

2016-09-06 Thread Mathias Nyman
On 07.09.2016 09:22, Lu Baolu wrote: From: "Lu, Baolu" xhci_setup_device() should return failure with correct error number when xhci host has died, removed or halted. Thanks, will add. Might go to 4.9 as 4.8-rc5 is already out -Mathias

Re: [PATCH 1/1] usb: xhci: fix return value of xhci_setup_device()

2016-09-07 Thread Mathias Nyman
On 07.09.2016 10:54, Lu Baolu wrote: Hi Mathias, On 09/07/2016 02:51 PM, Mathias Nyman wrote: On 07.09.2016 09:22, Lu Baolu wrote: From: "Lu, Baolu" xhci_setup_device() should return failure with correct error number when xhci host has died, removed or halted. Thanks, will add

Re: [PATCH v5 1/1] usb:host:xhci support option to disable the xHCI USB2 HW LPM

2017-08-18 Thread Mathias Nyman
On 17.08.2017 06:19, Thang Q. Nguyen wrote: On Tue, Aug 8, 2017 at 11:27 AM, Thang Q. Nguyen wrote: XHCI specification 1.1 does not require xHCI-compliant controllers to always enable hardware USB2 LPM. However, the current xHCI driver always enable it when seeing HLC=1. This patch supports an

Re: [PATCH v2 7/9] usb: host: modify description for MTK xHCI config

2017-10-17 Thread Mathias Nyman
On 17.10.2017 13:20, Greg Kroah-Hartman wrote: On Fri, Oct 13, 2017 at 01:32:14PM +0300, Mathias Nyman wrote: On 13.10.2017 11:26, Chunfeng Yun wrote: Due to all MediaTek SoCs with xHCI host controller use this driver, remove limitation for specific SoCs Signed-off-by: Chunfeng Yun

Re: [PATCH] usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk

2017-05-29 Thread Mathias Nyman
On 27.05.2017 22:26, Corentin Labbe wrote: When plugging an USB webcam I see the following message: [106385.615559] xhci_hcd :04:00.0: WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk? [106390.583860] handle_tx_event: 913 callbacks suppressed With this patch applied,

Re: [PATCH v2 0/4] usb: xhci: fix build warnings

2017-10-31 Thread Mathias Nyman
On 26.10.2017 13:46, Corentin Labbe wrote: Hello This patchset fix some build warnings on usb/xhci. Regards Changes since v1: - Changed subject of patch Corentin Labbe (4): usb: xhci: remove unused variable last_freed_endpoint usb: xhci: remove unused variable ep usb: xhci: remove un

Re: [PATCH] xhci: Cancel cmd_timer before cleanup the command queue in xhci_hc_died()

2017-11-01 Thread Mathias Nyman
On 01.11.2017 18:03, Greg Kroah-Hartman wrote: On Fri, Sep 29, 2017 at 05:12:47PM +0800, Jeffy Chen wrote: When the cmd_timer fired, it would try to access the command struct. So cancel it before cleanup the command queue in xhci_hc_died(), to avoid use-after-free reported by KASAN: [ 176.95253

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

2017-10-24 Thread Mathias Nyman
Hi Skipping lists, partial review. Many of the questions are real questions that I was wondering about while lookinga the code. Not necessarily thing that must be changed. On 05.09.2017 04:58, Lu Baolu wrote: xHCI compatible USB host controllers(i.e. super-speed USB3 controllers) can be implem

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

2017-11-13 Thread Mathias Nyman
Ok, review last part diff --git a/drivers/usb/host/xhci-dbgtty.c b/drivers/usb/host/xhci-dbgtty.c new file mode 100644 index 000..fe5fef0 --- /dev/null +++ b/drivers/usb/host/xhci-dbgtty.c @@ -0,0 +1,586 @@ +/** + * xhci-dbgtty.c - tty glue for xHCI debug capability + * + * Copyright (C) 201

Re: [PATCH v2] usb:xhci fix panic in xhci_free_virt_devices_depth_first

2017-11-06 Thread Mathias Nyman
On 06.11.2017 14:36, Chen Yu wrote: On 2017/11/6 19:32, Greg KH wrote: A simple process is as below: xhci_plat_probe() | usb_add_hcd() xhci_plat_remove() ||

Re: [PATCH] xhci: create one unified function to calculate TRB TD remainder.

2015-10-06 Thread Mathias Nyman
On 11.09.2015 07:08, chunfeng yun wrote: Hi, On Tue, 2015-09-08 at 14:09 +0300, Mathias Nyman wrote: xhci versions 1.0 and later report the untransferred data remaining in a TD a bit differently than older hosts. We used to have separate functions for these, and needed to check host version

Re: [PATCH v8 0/3] usb: xhci-platform: Configure 64-bit DMA mask if the platform is capable

2015-10-07 Thread Mathias Nyman
On 04.10.2015 12:10, Greg KH wrote: On Wed, Sep 30, 2015 at 02:24:30PM -0700, Duc Dang wrote: On Thu, Sep 17, 2015 at 11:19 AM, Duc Dang wrote: The xhci platform driver does not work with system that only supports 64-bit DMA as it requests 32-bit DMA mask during driver initialization. This pat

Re: [PATCH] xhci: fix warning when CONFIG_PM disabled.

2015-09-01 Thread Mathias Nyman
On 01.09.2015 00:26, Dave Hansen wrote: From: Dave Hansen I have a .config with CONFIG_PM disabled. I get the following whenever compiling the xhci driver: drivers/usb/host/xhci-pci.c:192:13: warning: ‘xhci_pme_quirk’ defined but not used [-Wunused-function] Looks like we just need to m

Re: [PATCH v7 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA

2015-09-01 Thread Mathias Nyman
On 31.08.2015 21:58, Duc Dang wrote: On Thu, Aug 20, 2015 at 12:38 PM, Duc Dang wrote: The xhci platform driver needs to work on systems that either only support 64-bit DMA or only support 32-bit DMA. Attempt to set a coherent dma mask for 64-bit DMA, and attempt again with 32-bit DMA if that f

Re: [PATCH v7 4/5] xhci: mediatek: support MTK xHCI host controller

2015-09-08 Thread Mathias Nyman
Hi On 08.09.2015 09:18, Chunfeng Yun wrote: There some vendor quirks for MTK xhci host controller: 1. It defines some extra SW scheduling parameters for HW to minimize the scheduling effort for synchronous and interrupt endpoints. The parameters are put into reseved DWs of slot context

[PATCH] xhci: create one unified function to calculate TRB TD remainder.

2015-09-08 Thread Mathias Nyman
field for remaining data. To prevent yet another function for calculating remainder we instead want to make one quirk friendly unified function. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 106 ++- drivers/usb/host/xhci.h | 2 + 2

Re: [PATCH] xhci: create one unified function to calculate TRB TD remainder.

2015-09-08 Thread Mathias Nyman
On 08.09.2015 14:46, Oliver Neukum wrote: On Tue, 2015-09-08 at 14:09 +0300, Mathias Nyman wrote: Now Mediatek host has an additional quirk on how it uses the TD Size field for remaining data. To prevent yet another function for calculating remainder we instead want to make one quirk friendly

Re: [PATCH v9 4/5] xhci: mediatek: support MTK xHCI host controller

2015-10-15 Thread Mathias Nyman
On 29.09.2015 06:01, Chunfeng Yun wrote: There some vendor quirks for MTK xhci host controller: 1. It defines some extra SW scheduling parameters for HW to minimize the scheduling effort for synchronous and interrupt endpoints. The parameters are put into reseved DWs of slot context and

Re: [PATCH v9 4/5] xhci: mediatek: support MTK xHCI host controller

2015-10-19 Thread Mathias Nyman
So basically we are trying to use as many microframes as possible with as few packets per microframe as possible. Did I understand this correctly? Yes, you are right. How will devices react if they expect to get 16 packets every 16th microframe, but they get one packet every microframe inste

Re: [PATCH v9 4/5] xhci: mediatek: support MTK xHCI host controller

2015-10-20 Thread Mathias Nyman
On 20.10.2015 09:29, chunfeng yun wrote: hi, On Mon, 2015-10-19 at 14:25 +0300, Mathias Nyman wrote: So basically we are trying to use as many microframes as possible with as few packets per microframe as possible. Did I understand this correctly? Yes, you are right. How will devices

Re: [PATCH] usb: xhci: dbc: Don't decrement runtime PM counter if DBC is not started

2018-06-25 Thread Mathias Nyman
On 25.06.2018 08:20, Kai-Heng Feng wrote: pm_runtime_put_sync() gets called everytime in xhci_dbc_stop(). If dbc is not started, this makes the runtime PM counter incorrectly becomes 0, and calls autosuspend function. Then we'll keep seeing this: [54664.762220] xhci_hcd :00:14.0: Root hub is

Re: I'd like to donate a MacBook Pro

2017-05-11 Thread Mathias Nyman
On 04.05.2017 05:34, Alex Henrie wrote: 2017-05-03 8:58 GMT-06:00 Joerg Roedel : On Wed, May 03, 2017 at 08:35:47AM -0600, Alex Henrie wrote: 2017-05-03 5:58 GMT-06:00 Greg KH : On Tue, May 02, 2017 at 10:55:09PM -0600, Alex Henrie wrote: Today I ran a regression test to determine which commi

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

2018-01-11 Thread Mathias Nyman
On 10.01.2018 06:59, Lu Baolu wrote: Function argument ep_trb for xhci_cleanup_halted_endpoint() isn't needed anymore. Cleanup it. Signed-off-by: Lu Baolu --- Thanks, adding both to queue -Mathias

Re: [PATCH] xhci:Fix NULL pointer in xhci debugfs

2018-01-18 Thread Mathias Nyman
On 19.01.2018 04:13, Zhengjun Xing wrote: Commit dde634057da7 ("xhci: Fix use-after-free in xhci debugfs") causes a null pointer dereference while fixing xhci-debugfs usage of ring pointers that were freed during hibernate. The fix passed addresses to ring pointers instead, but forgot to do this

Re: BUG: KASAN: use-after-free in xhci_trb_virt_to_dma.part.24+0x1c/0x80

2018-01-29 Thread Mathias Nyman
On 28.01.2018 23:43, Paul Menzel wrote: Dear Linux folks, Using Linux 4.15-rc9+ with KASAN enabled on the TUXEDO Book 1406, playing with Bluetooth – disabling a device – I was able to trigger the warning below. Thanks, first guess is that btusb calls usb_set_interface() with URBs still sch

Re: [PATCH v1 1/1] usb: xhci: do not create and register shared_hcd when USB3.0 is disabled

2018-01-18 Thread Mathias Nyman
On 18.01.2018 09:27, Tung Vuong Nguyen wrote: On Tue, Jan 16, 2018 at 9:50 PM, Mathias Nyman wrote: Hi, Sorry about the delay On 04.01.2018 07:17, Thang Q. Nguyen wrote: Hi, On Sat, Dec 16, 2017 at 10:45 AM, Thang Q. Nguyen wrote: From: Tung Nguyen Currently, hcd->shared_hcd alw

Re: [PATCH v1 1/1] usb: xhci: do not create and register shared_hcd when USB3.0 is disabled

2018-01-16 Thread Mathias Nyman
Hi, Sorry about the delay On 04.01.2018 07:17, Thang Q. Nguyen wrote: Hi, On Sat, Dec 16, 2017 at 10:45 AM, Thang Q. Nguyen wrote: From: Tung Nguyen Currently, hcd->shared_hcd always creates and registers to the usb-core. If, for some reasons, USB3 downstream port is disabled, no roothub po

Re: [PATCH] usb: xhci-mtk: fix semicolon.cocci warnings

2018-01-16 Thread Mathias Nyman
On 13.01.2018 08:35, Chunfeng Yun wrote: On Sat, 2018-01-13 at 01:46 +0800, kbuild test robot wrote: From: Fengguang Wu drivers/usb/host/xhci-mtk.c:311:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: a2ecc4df9f84 ("usb: xhci

Re: [PATCH] xhci: Fix USB ports for Dell Inspiron 5775

2018-04-10 Thread Mathias Nyman
On 10.04.2018 07:56, Kai Heng Feng wrote: Hi Matthias, On Mar 18, 2018, at 11:11 PM, Kai-Heng Feng wrote: The Dell Inspiron 5775 is a Raven Ridge. The Enable Slot command timed out when a USB device gets plugged: [ 212.156326] xhci_hcd :03:00.3: Error while assigning device slot ID [ 212.

Re: [PATCH v2] xhci: Fix front USB ports on ASUS PRIME B350M-A

2018-03-08 Thread Mathias Nyman
On 07.03.2018 08:09, Kai Heng Feng wrote: Hi Matthias, Do you have any concern about this patch? Adding patch and sending forward Thanks -Mathias

Re: [PATCH 2/3] usb: xhci: tegra: Add runtime PM support

2018-03-09 Thread Mathias Nyman
On 09.03.2018 10:36, Thierry Reding wrote: On Thu, Mar 08, 2018 at 09:31:07PM +, Jon Hunter wrote: On 01/03/18 14:18, Mathias Nyman wrote: On 14.02.2018 18:34, Jon Hunter wrote: Add runtime PM support to the Tegra XHCI driver and move the function calls to enable/disable the clocks

Re: [PATCH 4.19 014/110] usb: xhci: Prevent bus suspend if a port connect change or polling state is detected

2018-12-13 Thread Mathias Nyman
: Mathias Nyman commit 2f31a67f01a8beb22cae754c53522cb61a005750 upstream. [...] on a current Thinkpad X1 Yoga, this breaks resume from hibernate such that opening the lid has (in the regular use case, see below) no effect any more: The system is configured to hibernate when the lid is closed. So

Re: [PATCH 5/6] xhci: Use device_iommu_mapped()

2018-12-17 Thread Mathias Nyman
On 11.12.2018 15:43, Joerg Roedel wrote: From: Joerg Roedel Replace the dev->iommu_group check with a proper function call that better reprensents its purpose. Cc: Mathias Nyman Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- drivers/usb/host/xhci.c | 2 +- 1 file changed

Re: [PATCH] xhci: fix 'broken_suspend' placement in struct xchi_hcd

2018-12-17 Thread Mathias Nyman
/* Platform specific overrides to generic XHCI hc_driver ops */ Thanks, not sure how I missed that. Greg, in case you want to pick this simple fix to 4.20 still: Acked-by: Mathias Nyman Or prefer me to resend it? -Mathias

Re: [PATCH] USB: quirks: add NO_LPM quirk for Logitech Flare|Meetup|Brio|Rally

2018-12-10 Thread Mathias Nyman
On 08.12.2018 00:18, Kyle Williams wrote: On Tue, Dec 04, 2018 at 04:36:18PM -0500, Alan Stern wrote: On Tue, 4 Dec 2018, Kyle Williams wrote: Description: Some USB device / host controller combinations seem to have problems with Link Power management. In particular it is described that the co

Re: [PATCH v2] usb: xhci: fix small typo

2018-12-11 Thread Mathias Nyman
On 10.12.2018 18:34, Frank Lee wrote: ping.. Thanks Adding to queue for 4.22 -Mathias

Re: kernel: xhci_hcd 0000:00:14.0: ERROR unknown event type 37 - Kernel 4.19.13

2019-01-02 Thread Mathias Nyman
On 01.01.2019 20:57, Nathan Royce wrote: Kernel 4.19.13 00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller Around 400 "unknown event type 37" messages logged in a 2 second span. * Jan 01 02:08:07 computername tvheadend[2370]: linuxdvb: Auvitek AU8522 QAM/8

Re: [PATCH v3] xhci: Add quirk to workaround the errata seen on Cavium Thunder-X2 Soc

2018-10-30 Thread Mathias Nyman
On 30.10.2018 12:48, Cherian, George wrote: Implement workaround for ThunderX2 Errata-129 (documented in CN99XX Known Issues" available at Cavium support site). As per ThunderX2errata-129, USB 2 device may come up as USB 1 if a connection to a USB 1 device is followed by another connection to a U

Re: [PATCH V2 0/5] Tegra xHCI genpd support

2018-10-16 Thread Mathias Nyman
On 15.10.2018 15:40, Jon Hunter wrote: Hi Mathias, On 28/09/18 15:11, Jon Hunter wrote: This series add genpd support for the Tegra xHCI device that requires more than one power-domain to operate. This series is making changes to more than one subsystem and at first glance may look like a main

Re: 3.18 regression: Error while assigning device slot ID, USB3 devices not detected

2015-01-19 Thread Mathias Nyman
On 19.01.2015 15:47, Josh Boyer wrote: > On Mon, Jan 19, 2015 at 8:33 AM, Greg KH wrote: >> On Mon, Jan 19, 2015 at 08:28:19AM -0500, Josh Boyer wrote: >>> On Sun, Jan 18, 2015 at 1:25 AM, Greg KH wrote: On Sun, Jan 18, 2015 at 12:08:18AM -0600, Robert Hancock wrote: > I've got an Intel

Re: [PATCH 1/5] usb: xhci: cleanup xhci_hcd allocation

2015-04-07 Thread Mathias Nyman
Hi On 02.04.2015 15:23, Roger Quadros wrote: > HCD core allocates memory for HCD private data in > usb_create_[shared_]hcd() so make use of that > mechanism to allocate the struct xhci_hcd. > > Introduce struct xhci_driver_overrides to provide > the size of HCD private data and hc_driver operatio

Re: [PATCH 2/5] usb: xhci: plat: Create both HCDs before adding them

2015-04-20 Thread Mathias Nyman
Hi On 02.04.2015 15:23, Roger Quadros wrote: > As xhci_hcd is now allocated by usb_create_hcd(), we don't > need to add the primary HCD before creating the shared HCD. > > Creating the shared HCD before adding the primary HCD is particularly > useful for the OTG use case so that we know at the OT

Re: [PATCH 1/5] usb: xhci: cleanup xhci_hcd allocation

2015-04-13 Thread Mathias Nyman
Hi On 09.04.2015 12:22, Roger Quadros wrote: > Hi, > > On 07/04/15 17:23, Mathias Nyman wrote: >> Hi >> >> On 02.04.2015 15:23, Roger Quadros wrote: >>> HCD core allocates memory for HCD private data in >>> usb_create_[shared_]hcd() so make use

Re: [PATCH] usb: host: xhci-pci: Fix NULL pointer dereference error

2015-05-29 Thread Mathias Nyman
On 26.05.2015 17:15, Roger Quadros wrote: > From: Kishon Vijay Abraham I > > commit 3b8295d5cbf2 (usb: xhci: Fix suspend/resume when used > with OTG core) removes assigning xhci->main_hcd from xhci_gen_setup > and adds it in the probe of xhci-plat and xhci-pci. > > In the case of xhci-pci, xhci_

Re: [PATCH 3/6] xhci: probe phy before add usb_hcd

2015-06-01 Thread Mathias Nyman
On 01.06.2015 17:52, Yingjoe Chen wrote: > On Wed, 2015-05-27 at 07:18 -0500, Felipe Balbi wrote: >> On Wed, May 27, 2015 at 07:48:00PM +0800, chunfeng@mediatek.com wrote: >>> From: Chunfeng Yun >>> >>> find the phy driver before add primary usb_hcd to avoid acessing >>> xHCI register which ma

Re: [PATCH 2/3] usb: xhci: tegra: Add runtime PM support

2018-03-01 Thread Mathias Nyman
On 14.02.2018 18:34, Jon Hunter wrote: Add runtime PM support to the Tegra XHCI driver and move the function calls to enable/disable the clocks, regulators and PHY into the runtime PM callbacks. Signed-off-by: Jon Hunter --- drivers/usb/host/xhci-tegra.c | 80 ++---

Re: [PATCH] xhci: use iopoll for xhci_handshake

2019-02-28 Thread Mathias Nyman
On 28.2.2019 9.09, Greg Kroah-Hartman wrote: On Wed, Feb 27, 2019 at 03:19:17PM -0700, Daniel Kurtz wrote: In cases such as xhci_abort_cmd_ring(), xhci_handshake() is called with a spin lock held (and local interrupts disabled) with a huge 5 second timeout. This can translates to 5 million call

Re: [PATCH] xhci: Convert xhci_handshake() to use readl_poll_timeout()

2019-02-07 Thread Mathias Nyman
On 07.02.2019 02:03, Andrey Smirnov wrote: Xhci_handshake() implements the algorithm already captured by readl_poll_timeout(). Convert the former to use the latter to avoid repetition. readl_poll_timeout() doesn't really work here as it might sleep. iopoll.h: /** * readx_poll_timeout - Perio

Re: [PATCH] xhci: Use ffs() to find page size in xhci_mem_init()

2019-02-07 Thread Mathias Nyman
On 07.02.2019 02:03, Andrey Smirnov wrote: Get page size order using ffs() instead of open coding it with a loop. Signed-off-by: Andrey Smirnov Cc: Mathias Nyman Cc: Greg Kroah-Hartman Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/usb/host/xhci-mem.c | 6

Re: [PATCH] xhci-pci: Set AMD Renoir USB controller to D3 when shutdown

2021-02-10 Thread Mathias Nyman
On 9.2.2021 10.37, Greg Kroah-Hartman wrote: > On Fri, Feb 05, 2021 at 02:50:15PM +0800, Kai-Heng Feng wrote: >> On Fri, Feb 5, 2021 at 2:45 PM Aaron Ma wrote: >>> >>> >>> On 2/5/21 12:27 PM, Kai-Heng Feng wrote: Can you please test the following patch, which should address the root cau

Re: [PATCH v2] usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720

2021-02-03 Thread Mathias Nyman
t;) >> Cc: # 5.1+: ea17a0f153af: phy: marvell: comphy: >> Convert internal SMCC firmware return codes to errno >> Cc: # 5.1+: f768e718911e: usb: host: xhci-plat: add >> priv quirk for skip PHY initialization > > > Mathias, any objection for me taking this now to get into 5.11-final? > > thanks, > > greg k-h > No objections, looks good to me. Acked-by: Mathias Nyman

Re: [RFC PATCH] USB:XHCI:Modify XHCI driver for USB2.0 controller

2021-02-26 Thread Mathias Nyman
On 26.2.2021 10.21, Longfang Liu wrote: > Our current XHCI hardware controller has been customized to only > support USB 2.0 ports. When using the current xhci driver, an xhci > controller device and an ehci controller device will be created > automatically. We want the driver to create only one eh

Re: XHCI vs PCM2903B/PCM2904 part 2

2020-05-20 Thread Mathias Nyman
On 20.5.2020 14.26, Rik van Riel wrote: > After a few more weeks of digging, I have come to the tentative > conclusion that either the XHCI driver, or the USB sound driver, > or both, fail to handle USB errors correctly. > > I have some questions at the bottom, after a (brief-ish) explanation > of

Re: [PATCH] xhci: Do warm-reset when both CAS and XDEV_RESUME are set

2020-08-11 Thread Mathias Nyman
On 10.8.2020 17.07, Kai-Heng Feng wrote: > Sometimes re-plugging a USB device during system sleep renders the device > useless: > [ 173.418345] xhci_hcd :00:14.0: Get port status 2-4 read: 0x14203e2, > return 0x10262 > ... > [ 176.496485] usb 2-4: Waited 2000ms for CONNECT > [ 176.496781] u

Re: [PATCH] x86/hotplug: Silence APIC only after all irq's are migrated

2020-08-20 Thread Mathias Nyman
> Fixes: 60dcaad5736f ("x86/hotplug: Silence APIC and NMI when CPU is dead") > Link: https://lore.kernel.org/lkml/875zdarr4h@nanos.tec.linutronix.de/ > Signed-off-by: Ashok Raj > > To: linux-kernel@vger.kernel.org > To: Thomas Gleixner > Cc: Sukumar Ghorai

Re: [PATCH 0/4] add xhci hooks for USB offload

2021-01-19 Thread Mathias Nyman
On 19.1.2021 12.10, Howard Yen wrote: > To let the xhci driver support USB offload, add hooks for vendor to have > customized behavior for the initialization, memory allocation, irq work, and > device context synchronization. Detail is in each patch commit message. Is this related to the usb audi

  1   2   3   4   5   6   >