Re: [PATCH] HID: alps: fix stick device not working after resume

2016-09-19 Thread Kai Heng Feng
On Mon, Sep 19, 2016 at 8:37 PM, Jiri Kosina wrote: > On Mon, 19 Sep 2016, Kai-Heng Feng wrote: > >> The stick device does not work after resume, add U1_SP_ABS_MODE flag can >> make the device work after resume. > > Do you happen to have any more details on why

Re: [PATCH] HID: alps: fix stick device not working after resume

2016-09-21 Thread Kai Heng Feng
On Wed, Sep 21, 2016 at 8:00 PM, Jiri Kosina wrote: > On Mon, 19 Sep 2016, Kai Heng Feng wrote: > >> >> The stick device does not work after resume, add U1_SP_ABS_MODE flag can >> >> make the device work after resume. >> > >> > Do you happen to have

[PATCH] usb: quirks: add delay init quirk for Corsair Strafe RGB keyboard

2017-08-15 Thread Kai-Heng Feng
issue. Hence add the quirk for Corsair Strafe RGB. BugLink: https://bugs.launchpad.net/bugs/1678477 Signed-off-by: Kai-Heng Feng --- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 574da2b4529c..1ea5060dae69

Re: [PATCH] Input: i8042 - add Gigabyte P57 to the keyboard reset table

2017-08-17 Thread Kai-Heng Feng
On Wed, Jul 12, 2017 at 11:39 AM, Kai-Heng Feng wrote: > Similar to other Gigabyte laptops, the touchpad on P57 requires a > keyboard reset to detect Elantech touchpad correctly. > > BugLink: https://bugs.launchpad.net/bugs/1594214 > Signed-off-by: Kai-Heng Feng > --- >

[PATCH] usb: xhci: Renesas uPD720202 needs short TX quirk

2017-08-17 Thread Kai-Heng Feng
? [77122.622952] handle_tx_event: 541 callbacks suppressed No more warning messages with XHCI_TRUST_TX_LENGTH applied. BugLink: https://bugs.launchpad.net/bugs/1710548 Signed-off-by: Kai-Heng Feng --- drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH] usb: xhci: Renesas uPD720202 needs short TX quirk

2017-08-18 Thread Kai-Heng Feng
Hi, On Fri, Aug 18, 2017 at 3:22 PM, Felipe Balbi wrote: > > hi, > > Kai-Heng Feng writes: >> When plugging Logitech C920 webcam, warning messages filled up dmesg: >> [77117.655018] xhci_hcd :0c:00.0: WARN Successful completion on short >> TX: ne

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-19 Thread Kai-Heng Feng
On Tue, Jun 20, 2017 at 2:32 AM, Alan Stern wrote: > > It's possible that the test was invalid. Kai-Heng did not say whether > /sys/.../power/wakeup was set to "enabled" for both the EHCI controller > and the USB root hub beneath it, before the test was started. If > either of them was set to "d

Re: [PATCH] PCI: Workaround AMD EHCI controller PME bug

2017-06-19 Thread Kai-Heng Feng
On Tue, Jun 20, 2017 at 2:01 AM, Bjorn Helgaas wrote: > > Applied (patch below) to pci/pm for v4.13, thanks! > > Note that I added parens because bitwise NOT is higher precedence than > bitwise shift right, and I think we want the shift before the NOT. Please > double-check. You are right. NOT s

[PATCH v4] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-19 Thread Kai-Heng Feng
ht is supported only when at least two modes are present. Signed-off-by: Kai-Heng Feng --- v4: Change commit log - not all models have ON token. v3: Change the logic, there should be at least two modes present to claim it supports backlight. Suggested by Pali Rohár. v2: The only token can be

Re: [PATCH] pinctrl: amd: don't load pinctrl-amd on Gigabyte AM4 boards

2017-05-26 Thread Kai-Heng Feng
On Fri, May 26, 2017 at 6:09 PM, Thomas Gleixner wrote: > On Thu, 25 May 2017, Kai-Heng Feng wrote: > >> On Gigabyte AM4 boards, pinctrl-amd generates tons of irq, makes the >> system not able to boot properly. >> >> Don't load the module until Gigabyte fixes

[PATCH] usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub

2017-11-13 Thread Kai-Heng Feng
KY-688 USB 3.1 Type-C Hub internally uses a Genesys Logic hub to connect to Realtek r8153. Similar to commit ("7496cfe5431f2 usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter"), no-lpm can make r8153 ethernet work. Signed-off-by: Kai-Heng Feng --- drivers/usb/core/qu

[PATCH] Input: elan_i2c - add ELAN0611 to the ACPI table

2017-10-19 Thread Kai-Heng Feng
ELAN0611 touchpad uses elan_i2c as its driver. It can be found on Lenovo ideapad 320-15IKB. So add it to ACPI table to enable the touchpad. BugLink: https://bugs.launchpad.net/bugs/1723736 Signed-off-by: Kai-Heng Feng --- drivers/input/mouse/elan_i2c_core.c | 1 + 1 file changed, 1 insertion

[PATCH net-next v4 2/2] r8169: Reinstate ASPM Support

2018-06-21 Thread Kai-Heng Feng
ed on the work from Chunhao Lin . Signed-off-by: Kai-Heng Feng --- v4: - Improve commit message. - Move the empty line to where it belongs. v3: - Change commit message wording. - Rename the function to rtl_hw_aspm_clkreq_enable(). v2: - Remove module parameter. - Remove pci_disable_link_

Re: [PATCH 4/5] memstick: rtsx_usb_ms: Support runtime power management

2018-08-23 Thread Kai-Heng Feng
Hi Ulf, Sorry for the late reply. at 21:14, Ulf Hansson wrote: On 31 July 2018 at 08:17, Kai-Heng Feng wrote: In order to let host's parent device, rtsx_usb, to use USB remote wake up signaling to do card detection, it needs to be suspended. Hence it's necessary to add runtime

Re: [PATCH 4/5] memstick: rtsx_usb_ms: Support runtime power management

2018-08-23 Thread Kai-Heng Feng
at 21:29, Ulf Hansson wrote: [...] -#ifdef CONFIG_PM_SLEEP -static int rtsx_usb_ms_suspend(struct device *dev) +#ifdef CONFIG_PM +static int rtsx_usb_ms_runtime_suspend(struct device *dev) { struct rtsx_usb_ms *host = dev_get_drvdata(dev); struct memstick_host *msh = host->ms

Re: [PATCH] ACPI / LPSS: Avoid PM quirks on suspend and resume from S3

2018-07-25 Thread Kai-Heng Feng
Hi Rafael, > On 2018Jul24, at 18:36, Rafael J. Wysocki wrote: > > On Tuesday, July 24, 2018 11:13:42 AM CEST Rafael J. Wysocki wrote: >> On Tuesday, July 24, 2018 10:46:09 AM CEST Kai Heng Feng wrote: >>> Hi Rafael, >>> >>>> On Jun 1

Re: [PATCH] ACPI / LPSS: Avoid PM quirks on suspend and resume from S3

2018-07-26 Thread Kai-Heng Feng
> On 2018Jul26, at 16:14, Rafael J. Wysocki wrote: > > On Thu, Jul 26, 2018 at 5:46 AM, Kai-Heng Feng > wrote: >> Hi Rafael, >> >>> On 2018Jul24, at 18:36, Rafael J. Wysocki wrote: >>> >>> On Tuesday, July 24, 2018 11:13:42 AM CEST Rafa

[PATCH] Revert "ACPI / bus: Parse tables as term_list for Dell XPS 9570 and Precision M5530"

2018-07-19 Thread Kai-Heng Feng
Cc: Mario Limonciello Signed-off-by: Kai-Heng Feng --- drivers/acpi/bus.c | 38 +++--- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 84b4a62018eb..f61f8927d843 100644 --- a/drivers/acpi/bus.c +++ b/drivers/

[PATCH] Bluetooth: btusb: Disable Bluetooth controller during S3

2018-07-31 Thread Kai-Heng Feng
https://bugzilla.kernel.org/show_bug.cgi?id=199451 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200039 Signed-off-by: Kai-Heng Feng --- drivers/bluetooth/btusb.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 572fd75fbcf6..60f2832

Re: [PATCH] ACPI / LPSS: Avoid PM quirks on suspend and resume from S3

2018-07-24 Thread Kai Heng Feng
LPSS: Consolidate runtime PM and system sleep handling) Link: https://bugs.launchpad.net/bugs/1774950 Reported-by: Kai-Heng Feng Tested-by: Kai-Heng Feng Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_lpss.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) Index: lin

[PATCH 1/5] misc: rtsx_usb: Use USB remote wakeup signaling for card insertion detection

2018-07-25 Thread Kai-Heng Feng
Although rtsx_usb doesn't support card removal detection, card insertion will resume rtsx_usb by USB remote wakeup signaling. When rtsx_usb gets resumed, also resumes its child devices, rtsx_usb_sdmmc and rtsx_usb_ms, to notify them there's a card in its slot. Signed-off-by: Kai

[PATCH 0/5 v3] Keep rtsx_usb suspended when there's no card

2018-07-25 Thread Kai-Heng Feng
Hi, This is based on Ulf's work [1] [2]. This patch series can keep rtsx_usb suspended, to save ~0.5W on Intel platforms and ~1.5W on AMD platforms. [1] https://patchwork.kernel.org/patch/10440583/ [2] https://patchwork.kernel.org/patch/10445725/ Kai-Heng Feng (5): misc: rtsx_usb: Us

[PATCH 3/5] memstick: rtsx_usb_ms: Use ms_dev() helper

2018-07-25 Thread Kai-Heng Feng
Use ms_dev() helper for consistency. Signed-off-by: Kai-Heng Feng --- drivers/memstick/host/rtsx_usb_ms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/memstick/host/rtsx_usb_ms.c b/drivers/memstick/host/rtsx_usb_ms.c index 4f64563df7de..cd12f3d1c088 100644

[PATCH 2/5] memstick: Prevent memstick host from getting runtime suspended during card detection

2018-07-25 Thread Kai-Heng Feng
rs on, so the host can be inadvertently suspended. Increment rpm count before calling memstick_check(), and decrement rpm count afterward, as now we are sure the memstick host should be suspended or not. Signed-off-by: Kai-Heng Feng --- drivers/memstick/core/memstick.c | 4 1 file chang

[PATCH 4/5] memstick: rtsx_usb_ms: Support runtime power management

2018-07-25 Thread Kai-Heng Feng
ection function from kthread to delayed_work, which can be scheduled when the host is resumed and can be canceled when the host is suspended. Use an idle function check if there's no card and the power mode is MEMSTICK_POWER_OFF. If both criteria are met, put the device to suspend. Signed-o

[PATCH 5/5] misc: rtsx_usb: / memstick: rtsx_usb_ms: Avoid long delay before system suspend

2018-07-25 Thread Kai-Heng Feng
There's a long power-on delay at the end of rtsx_usb_ms_set_param(). This delay is noticeable right before system suspend. To prevent already suspended memstick host from getting powered on by PM core, use DPM_FLAG_SMART_SUSPEND to avoid the situation. Signed-off-by: Kai-Heng Feng --- dr

[PATCH] ACPI: Parse entire table as a term_list for Dell XPS 9570 and Precision M5530

2018-01-29 Thread Kai-Heng Feng
I2CN can be correctly set up, and _INI can get run. The ACPI table in this machine is designed to get parsed this way. Also, change the quirk table to a more generic name. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198515 Cc: Mario Limonciello Signed-off-by: Kai-Heng Feng --- v2: A

Re: [PATCH] ACPI: Parse entire table as a term_list for Dell XPS 9570 and Precision M5530

2018-01-30 Thread Kai Heng Feng
> On 31 Jan 2018, at 2:17 AM, Andy Shevchenko wrote: > > On Tue, Jan 30, 2018 at 8:07 AM, Kai-Heng Feng > wrote: >> The i2c touchpad on Dell XPS 9570 and Precision M5530 doesn't work out >> of box. >> >> The touchpad relies on its _INI method to

Re: [PATCH] ACPI: Parse entire table as a term_list for Dell XPS 9570 and Precision M5530

2018-01-30 Thread Kai Heng Feng
> On 31 Jan 2018, at 2:37 AM, Schmauss, Erik wrote: > > Hi, >> -Original Message- >> From: linux-acpi-ow...@vger.kernel.org [mailto:linux-acpi- >> ow...@vger.kernel.org] On Behalf Of Andy Shevchenko >> Sent: Tuesday, January 30, 2018 10:18 AM >

[PATCH v3] ACPI: Parse entire table as a term_list for Dell XPS 9570 and Precision M5530

2018-01-30 Thread Kai-Heng Feng
I2CN can be correctly set up, and _INI can get run. The ACPI table in this machine is designed to get parsed this way. Also, change the quirk table to a more generic name. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198515 Cc: Mario Limonciello Signed-off-by: Kai-Heng Feng --- v3: Pu

Re: [PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-18 Thread Kai Heng Feng
> On 18 Jan 2018, at 10:50 PM, David Miller wrote: > > From: Hayes Wang > Date: Thu, 18 Jan 2018 03:04:08 + > >> [...] r8153 on Dell TB15/16 dock corrupts rx packets. This change is suggested by Realtek. They guess that the XHCI controller doesn't have enough buffer,

[PATCH] ACPI / battery: Add quirk for Asus UX360UA and UX410UAK

2018-01-28 Thread Kai-Heng Feng
Same issue as other Asus laptops, ACPI incorrectly reports discharging when battery is full and AC is plugged. Use the same battery quirk can workaround the issue. BugLink: https://bugs.launchpad.net/bugs/1661876 BugLink: https://bugs.launchpad.net/bugs/1745032 Signed-off-by: Kai-Heng Feng

[PATCH] ACPI: Parse entire table as a term_list for Dell XPS 9570 and Precision M5530

2018-01-28 Thread Kai-Heng Feng
I2CN can be correctly set up, and _INI can get run. The ACPI table in this machine is designed to get parsed this way. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198515 Cc: Mario Limonciello Signed-off-by: Kai-Heng Feng --- drivers/acpi/bus.c | 41 +++

Re: [PATCH] ACPI: Parse entire table as a term_list for Dell XPS 9570 and Precision M5530

2018-01-29 Thread Kai Heng Feng
> On 29 Jan 2018, at 8:56 PM, Andy Shevchenko wrote: > > On Mon, Jan 29, 2018 at 8:10 AM, Kai-Heng Feng > wrote: >> The i2c touchpad on Dell XPS 9570 and Precision M5530 doesn't work out >> of box. >> >> The touchpad relies on its _INI method to

Re: [PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-17 Thread Kai Heng Feng
> On 18 Jan 2018, at 11:04 AM, Hayes Wang wrote: > > [...] >>> r8153 on Dell TB15/16 dock corrupts rx packets. >>> >>> This change is suggested by Realtek. They guess that the XHCI >>> controller doesn't have enough buffer, and their guesswork is correct, >>> once the RX aggregation gets disabl

[PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-16 Thread Kai-Heng Feng
Mario Limonciello Signed-off-by: Kai-Heng Feng --- v2: - Disable RX aggregation instead of disable RX checksum - Use bcdDevice and iSerialNumber to uniquely identify Dell TB16 drivers/net/usb/r8152.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/net/usb/r8152.c b/driver

[PATCH v6] usb: core: Add "quirks" parameter for usbcore

2018-03-13 Thread Kai-Heng Feng
troduce this new "dynamic" function. Now users can use "usbcore.quirks=" as short term workaround before the next kernel release. Also, the quirk parameter can XOR the builtin quirks for debugging purpose. This is inspired by usbhid and usb-storage. Signed-off-by: K

Re: [PATCH v2 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-03-13 Thread Kai Heng Feng
On Mar 12, 2018, at 9:30 AM, mario.limoncie...@dell.com wrote: I think the missing aspect is that this is only used in AIO and laptop form factors where the discrete graphics is in a non-removable form factor. Why we are not checking if kernel is running on AIO or laptop form factor then?

Re: [PATCH v2 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-03-13 Thread Kai Heng Feng
On Mar 10, 2018, at 2:50 PM, Lukas Wunner wrote: On Fri, Mar 09, 2018 at 05:30:15PM +0800, Kai Heng Feng wrote: On Thursday 08 March 2018 17:10:23 Kai-Heng Feng wrote: Some Dell platforms (Preicsion 7510/7710/7520/7720) have a BIOS option "Switchable Graphics" (SG). When SG is e

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

2018-03-06 Thread Kai Heng Feng
Hi Matthias, Do you have any concern about this patch? Hopefully this can get merged for v4.16… Kai-Heng

[PATCH 1/2] usb: core: Copy parameter string correctly and remove superfluous null check

2018-03-23 Thread Kai-Heng Feng
superfluous null check. This is found by Smatch. Fixes: 027bd6cafd9a ("usb: core: Add "quirks" parameter for usbcore") Cc: Dan Carpenter Signed-off-by: Kai-Heng Feng --- drivers/usb/core/quirks.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --gi

[PATCH 2/2] usb: core: Add USB_QUIRK_DELAY_CTRL_MSG to usbcore quirks

2018-03-23 Thread Kai-Heng Feng
There's a new quirk, USB_QUIRK_DELAY_CTRL_MSG. Add it to usbcore quirks for completeness. Signed-off-by: Kai-Heng Feng --- Documentation/admin-guide/kernel-parameters.txt | 4 +++- drivers/usb/core/quirks.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-)

Re: [PATCH v2] PCI / PM: Always check PME wakeup capability for runtime wakeup support

2018-03-25 Thread Kai Heng Feng
Hi Bjorn, Rafael, On Mar 19, 2018, at 10:09 PM, Kai-Heng Feng wrote: USB controller ASM1042 stops working after commit de3ef1eb1cd0 ("PM / core: Drop run_wake flag from struct dev_pm_info"). The device in question is not power managed by platform firmware, furthermore, it only su

[PATCH] media: cx231xx: Add support for AverMedia DVD EZMaker 7

2018-03-25 Thread Kai-Heng Feng
User reports AverMedia DVD EZMaker 7 can be driven by VIDEO_GRABBER. Add the device to the id_table to make it work. BugLink: https://bugs.launchpad.net/bugs/1620762 Signed-off-by: Kai-Heng Feng --- drivers/media/usb/cx231xx/cx231xx-cards.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a

[PATCH] Input: i8042 - Fix KBD port cannot wake up system from suspend-to-idle

2018-04-11 Thread Kai-Heng Feng
et_wakeup_enable(), which gets called by i8042_pnp_kbd_probe(), runs before device_set_wakeup_capable(), which gets called by i8042_register_ports(). So device_set_wakeup_enable() doesn't really enable wakeup for keyboard. We can enable keyboard wakeup in i8042_register_ports() directly. Signed-off-by:

[PATCH v3 1/3] dell-led: Change dell-led.h to dell-common.h

2018-04-12 Thread Kai-Heng Feng
This header will be used for more than just led. Change it to a more generic name. Cc: Mario Limonciello Signed-off-by: Kai-Heng Feng --- v3: Simplify dell_switchable_gfx_is_enabled() by returning bool instead of error code. Use DMI_DEV_TYPE_OEM_STRING to match Dell System. v2: Mario

[PATCH v3 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-04-12 Thread Kai-Heng Feng
the stream, it hangs when runtime suspend kicks in: [ 12.796265] snd_hda_intel :01:00.1: Disabling via vga_switcheroo [ 12.796367] snd_hda_intel :01:00.1: Cannot lock devices! Since the discrete audio controller isn't useful when SG enabled, we should just disable the device. Sig

[PATCH v3 2/3] platform/x86: dell-*: Add interface for switchable graphics status query

2018-04-12 Thread Kai-Heng Feng
On some Dell platforms, there's a BIOS option "Enable Switchable Graphics". This information is useful if we want to do different things based on this value, e.g. disable unused audio controller that comes with the discrete graphics. Cc: Mario Limonciello Signed-off-by: Kai-He

Re: [PATCH v3 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-04-12 Thread Kai-Heng Feng
at 6:50 PM, Takashi Iwai wrote: On Thu, 12 Apr 2018 12:42:39 +0200, Kai-Heng Feng wrote: Some Dell platforms (Preicsion 7510/7710/7520/7720) have a BIOS option "Switchable Graphics" (SG). When SG is enabled, we have: 00:02.0 VGA compatible controller: Intel Corporation Device 59

Re: [PATCH v3 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-04-12 Thread Kai-Heng Feng
at 6:59 PM, Pali Rohár wrote: On Thursday 12 April 2018 12:50:02 Takashi Iwai wrote: +#if IS_ENABLED(CONFIG_DELL_LAPTOP) +static bool check_dell_switchable_gfx(struct pci_dev *pdev) +{ + bool (*dell_switchable_gfx_is_enabled_func)(void); + bool enabled; + + /* Only need to ch

Re: [PATCH v3] PCI / PM: Always check PME wakeup capability for runtime wakeup support

2018-04-12 Thread Kai Heng Feng
Hi Bjorn and Rafael, On Apr 1, 2018, at 12:40 AM, Kai-Heng Feng wrote: USB controller ASM1042 stops working after commit de3ef1eb1cd0 ("PM / core: Drop run_wake flag from struct dev_pm_info"). The device in question is not power managed by platform firmware, furthermore, it onl

Re: [PATCH] media: cx231xx: Add support for AverMedia DVD EZMaker 7

2018-04-13 Thread Kai Heng Feng
Hi, On Mar 26, 2018, at 2:06 PM, Kai-Heng Feng wrote: User reports AverMedia DVD EZMaker 7 can be driven by VIDEO_GRABBER. Add the device to the id_table to make it work. *Gentle ping* I am hoping this patch can get merged in v4.17. Kai-Heng BugLink: https://bugs.launchpad.net/bugs

Re: [PATCH v6] usb: core: Add "quirks" parameter for usbcore

2018-03-19 Thread Kai Heng Feng
Kai Heng Feng wrote: Matthew Wilcox wrote: On Tue, Mar 13, 2018 at 03:26:19PM +0800, Kai-Heng Feng wrote: + usbcore.quirks= + [USB] A list of quirks entries to supplement or + override the built-in usb core quirk list. List

Re: tg3 crashes under high load, when using 100Mbits

2018-03-20 Thread Kai-Heng Feng
Satish Baddipadige wrote: On Thu, Feb 15, 2018 at 7:37 PM, Siva Reddy Kallam wrote: On Mon, Feb 12, 2018 at 10:59 AM, Siva Reddy Kallam wrote: On Fri, Feb 9, 2018 at 10:41 AM, Kai Heng Feng wrote: Hi Broadcom folks, We are now enabling a new platform with tg3 nic, unfortunately we

Re: [PATCH 1/2] r8169: reinstate ALDPS for power saving

2018-03-22 Thread Kai-Heng Feng
Kai Heng Feng wrote: Hopefully Hayes (or Realtek) can shed more lights on the issue. Apparently ALDPS and ASPM for r8169 is enabled in different commercial products, just not in Linux mainline. Hayes and Realtek folks, How do we make this patch going forward? Do you find the root cause that

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

2018-04-09 Thread Kai Heng Feng
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.156340] xhci_hcd :03:00.3: Max

Re: Regression caused by commit bc976233a872, ethernet r8169 stops working after system S3

2018-04-10 Thread Kai Heng Feng
Hi, On Apr 3, 2018, at 4:51 PM, Thomas Gleixner wrote: Bah. The patch is broken. New version written with brain awake below. Actually I can't reproduce this issue anymore on latest Linus' tree. I'll do a bisect and ask linux-stable maintainer to include the commit. Thanks for your help! Ka

[PATCH v5] usb: core: Add "quirks" parameter for usbcore

2018-03-07 Thread Kai-Heng Feng
troduce this new "dynamic" function. Now users can use "usbcore.quirks=" as short term workaround before the next kernel release. Also, the quirk parameter can XOR the builtin quirks for debugging purpose. This is inspired by usbhid and usb-storage. Signed-off-by: Kai-Heng F

[PATCH 1/2] dell-led: Change dell-led.h to dell-common.h

2018-03-07 Thread Kai-Heng Feng
This header will be used for more than just led. Change it to a more generic name. Signed-off-by: Kai-Heng Feng --- drivers/platform/x86/dell-laptop.c | 2 +- include/linux/{dell-led.h => dell-common.h} | 4 ++-- sound/pci/hda/dell_wmi_helper.c | 2 +- 3 files changed

[PATCH 2/2] platform/x86: dell-*: Add interface for switchable graphics status query

2018-03-07 Thread Kai-Heng Feng
On some Dell platforms, there's a BIOS option "Enable Switchable Graphics". This information is useful if we want to do different things based on this value, e.g. disable unused audio controller that comes with the discrete graphics. Signed-off-by: Kai-Heng Feng --- drivers/pl

Re: [PATCH 2/2] platform/x86: dell-*: Add interface for switchable graphics status query

2018-03-08 Thread Kai Heng Feng
On Mar 8, 2018, at 3:34 PM, mario.limoncie...@dell.com wrote: -Original Message- From: Kai-Heng Feng [mailto:kai.heng.f...@canonical.com] Sent: Thursday, March 8, 2018 3:12 PM To: mj...@srcf.ucam.org; pali.ro...@gmail.com; dvh...@infradead.org; a...@infradead.org; Limonciello, Mario

[PATCH v2 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-03-08 Thread Kai-Heng Feng
the stream, it hangs when runtime suspend kicks in: [ 12.796265] snd_hda_intel :01:00.1: Disabling via vga_switcheroo [ 12.796367] snd_hda_intel :01:00.1: Cannot lock devices! Since the discrete audio controller isn't useful when SG enabled, we should just disable the device. Sig

[PATCH v2 2/3] platform/x86: dell-*: Add interface for switchable graphics status query

2018-03-08 Thread Kai-Heng Feng
On some Dell platforms, there's a BIOS option "Enable Switchable Graphics". This information is useful if we want to do different things based on this value, e.g. disable unused audio controller that comes with the discrete graphics. Signed-off-by: Kai-Heng Feng --- v2: Mario sugg

[PATCH v2 1/3] dell-led: Change dell-led.h to dell-common.h

2018-03-08 Thread Kai-Heng Feng
This header will be used for more than just led. Change it to a more generic name. Signed-off-by: Kai-Heng Feng --- v2: Mario suggested to squash the HDA part into the same series. drivers/platform/x86/dell-laptop.c | 2 +- include/linux/{dell-led.h => dell-common.h} | 4 ++-- so

Re: [alsa-devel] [PATCH v2 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-03-08 Thread Kai Heng Feng
On Mar 8, 2018, at 5:38 PM, Lukas Wunner wrote: On Thu, Mar 08, 2018 at 05:10:23PM +0800, Kai-Heng Feng wrote: Some Dell platforms (Preicsion 7510/7710/7520/7720) have a BIOS option "Switchable Graphics" (SG). When SG is enabled, we have: 00:02.0 VGA compatible control

Re: [PATCH v2 2/3] platform/x86: dell-*: Add interface for switchable graphics status query

2018-03-09 Thread Kai Heng Feng
On Mar 9, 2018, at 12:38 AM, Pali Rohár wrote: On Thursday 08 March 2018 17:10:22 Kai-Heng Feng wrote: +int dell_switchable_gfx_enabled(bool *enabled); What about following API? bool dell_switchable_gfx_is_enabled(void); Are you really interested in errors? Then what about? Not really

Re: [alsa-devel] [PATCH v2 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-03-09 Thread Kai Heng Feng
On Mar 8, 2018, at 7:30 PM, Lukas Wunner wrote: On Thu, Mar 08, 2018 at 06:38:45PM +0800, Kai Heng Feng wrote: On Mar 8, 2018, at 5:38 PM, Lukas Wunner wrote: On Thu, Mar 08, 2018 at 05:10:23PM +0800, Kai-Heng Feng wrote: Some Dell platforms (Preicsion 7510/7710/7520/7720) have a BIOS

Re: [PATCH v2 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-03-09 Thread Kai Heng Feng
On Mar 9, 2018, at 5:02 PM, Pali Rohár wrote: On Thursday 08 March 2018 17:10:23 Kai-Heng Feng wrote: Some Dell platforms (Preicsion 7510/7710/7520/7720) have a BIOS option "Switchable Graphics" (SG). When SG is enabled, we have: 00:02.0 VGA compatible controller: Intel Corporat

Re: [PATCH v6] usb: core: Add "quirks" parameter for usbcore

2018-03-13 Thread Kai Heng Feng
Matthew Wilcox wrote: On Tue, Mar 13, 2018 at 03:26:19PM +0800, Kai-Heng Feng wrote: + usbcore.quirks= + [USB] A list of quirks entries to supplement or + override the built-in usb core quirk list. List + entries are

Elantech SMBus support regression

2018-11-21 Thread Kai Heng Feng
Hi Benjamin, It appears the Elantech SMBus support breaks some users’ touchpad. Please have a look at [1] [2], thanks! [1] https://bugs.launchpad.net/bugs/1803600 [2] https://bugs.archlinux.org/task/59714 Kai-Heng

[PATCH] ALSA: hda: Add support for AMD Stoney Ridge

2018-11-29 Thread Kai-Heng Feng
It's similar to other AMD audio devices, it also supports D3, which can save some power drain. Signed-off-by: Kai-Heng Feng --- sound/pci/hda/hda_intel.c | 4 1 file changed, 4 insertions(+) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index d8eb2b5

Re: [PATCH v2 1/2] pci: prevent sk hynix nvme from entering D3

2018-11-14 Thread Kai Heng Feng
Hi, > On Nov 9, 2018, at 08:21, Bjorn Helgaas wrote: > > On Tue, Nov 06, 2018 at 03:12:13PM +0800, AceLan Kao wrote: >> It leads to the power consumption raises to 2.2W during s2idle, while >> it consumes less than 1W during long idle if put SK hynix nvme to D3 >> and then enter s2idle. >> From

[PATCH] HID: multitouch: Add pointstick support for Cirque Touchpad

2018-11-13 Thread Kai-Heng Feng
Cirque Touchpad/Pointstick combo is similar to Alps devices, it requires MT_CLS_WIN_8_DUAL to expose its pointstick as a mouse. Signed-off-by: Kai-Heng Feng --- drivers/hid/hid-ids.h| 3 +++ drivers/hid/hid-multitouch.c | 6 ++ 2 files changed, 9 insertions(+) diff --git a/drivers

[PATCH] HID: i2c-hid: Disable runtime PM for LG touchscreen

2018-11-13 Thread Kai-Heng Feng
resumed and received an ON command. - In the shutdown callback, it receives another SLEEP command. I failed to find a reliable interval between ON/SLEEP commands that can make it work, so let's simply disable runtime PM for the device. Signed-off-by: Kai-Heng Feng --- drivers/hid/hid-

[PATCH] igb: Fix an issue that PME is not enabled during runtime suspend

2018-12-02 Thread Kai-Heng Feng
(), which enables the PCI PME. To fix the issue, let's not to save PCI states when it's runtime suspend, to let the PCI subsytem enables PME. Fixes: 42eca2302146 ("PCI: Don't touch card regs after runtime suspend D3") Signed-off-by: Kai-Heng Feng --- drivers/net/ethernet/in

[PATCH] ALSA: hda: Add AZX_DCAPS_PM_RUNTIME for AMD Raven Ridge

2018-06-28 Thread Kai-Heng Feng
This patch can make audio controller in AMD Raven Ridge gets runtime suspended to D3, to save ~1W power when it's not in use. Cc: Vijendar Mukunda Signed-off-by: Kai-Heng Feng --- sound/pci/hda/hda_intel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pc

[RESEND] [PATCH] platform/x86: dell-wmi: Ignore new rfkill and fn-lock events

2018-05-31 Thread Kai-Heng Feng
with type 0x0010 and code 0xe008 pressed These events are for notification purpose, so we can ignore them. This patch is tested on XPS 9370. Reviewed-by: Pali Rohár Reviewed-by: Mario Limonciello Signed-off-by: Kai-Heng Feng --- drivers/platform/x86/dell-wmi.c | 14 ++ 1 file changed

[PATCH 2/2] r8169: Reinstate ASPM Support

2018-06-12 Thread Kai-Heng Feng
-off-by: Kai-Heng Feng --- v2: - Remove module parameter. - Remove pci_disable_link_state(). drivers/net/ethernet/realtek/r8169.c | 41 +++- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek

Re: Possible regression caused by commit a192aa923b66a

2018-06-12 Thread Kai Heng Feng
1, 2018 at 8:26 AM, Kai-Heng Feng wrote: Hi Rafael, There's a regression report [1] that says commit a192aa923b66a ("ACPI / LPSS: Consolidate runtime PM and system sleep handling") is the first bad commit. From the looks of it, it didn't introduce any behavioral change. So

[PATCH] rtlwifi: Fix non-working BSS STA mode

2018-12-11 Thread Kai-Heng Feng
mode start to work. Signed-off-by: Kai-Heng Feng --- drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c index 4bf7967590ca..11d27a5cc576 100644

[PATCH] platform/x86: dell-wmi: Ignore new keyboard backlight change event

2018-12-11 Thread Kai-Heng Feng
ks without event 0x3f. Signed-off-by: Kai-Heng Feng --- drivers/platform/x86/dell-wmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 16c7f3d9a335..c3166ba73e9a 100644 --- a/drivers/platform/x86/dell-wmi.c +++

Re: [PATCH] rtlwifi: Fix non-working BSS STA mode

2018-12-12 Thread Kai Heng Feng
> On Dec 13, 2018, at 08:35, Pkshih wrote: > > On Wed, 2018-12-12 at 13:13 +0800, Kai-Heng Feng wrote: >> Once BSS STA mode gets started, it can be scanned by other clients but >> cannot entablish a connection. > ^^^ typo: establish >> >>

Re: [PATCH] rtlwifi: Fix non-working BSS STA mode

2018-12-13 Thread Kai Heng Feng
> On Dec 13, 2018, at 15:39, Pkshih wrote: > > On Thu, 2018-12-13 at 13:36 +0800, Kai Heng Feng wrote: >>> On Dec 13, 2018, at 08:35, Pkshih wrote: >>> >>> On Wed, 2018-12-12 at 13:13 +0800, Kai-Heng Feng wrote: >>>> Once BSS STA mode gets

BUG_ON() hit in drivers/md/raid5.c

2018-12-19 Thread Kai Heng Feng
Hi Dan, There are two different BUG_ON() incidents get recently reported on Launchpad [1]. The first one is BUG_ON(dev->written) in ops_run_biodrain(). The second one (comment #23) is BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)) in handle_parity_checks5(). I am not familiar with raid 5 so I am

[PATCH] HID: i2c-hid: Ignore input report if there's no data present on Elan touchpanels

2018-12-14 Thread Kai-Heng Feng
to high after I2C host has done reading its data. Since the host receives all useful data, let's ignore the input report when there's no data. Signed-off-by: Kai-Heng Feng --- drivers/hid/i2c-hid/i2c-hid-core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/hid/i

Re: Elantech SMBus support regression

2018-12-16 Thread Kai Heng Feng
These are feedbacks from the users: L480: cat /sys/bus/serio/devices/serio1/firmware_id PNP: LEN2036 PNP0f13 P52: "cat /sys/bus/serio/devices/serio1/firmware_id": PNP: LEN2132 PNP0f13 So looks like it’s different to LEN2131. Kai-Heng > > Cheers, > Benjamin > > On Th

[PATCH 1/2] e1000e: Exclude device from suspend direct complete optimization

2018-12-11 Thread Kai-Heng Feng
e1000e always use suspend callback to set correct WoL during system suspend. Signed-off-by: Kai-Heng Feng --- drivers/net/ethernet/intel/e1000e/netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c

[PATCH 2/2] igb: Exclude device from suspend direct complete optimization

2018-12-11 Thread Kai-Heng Feng
always use suspend callback to set correct WoL during system suspend. Signed-off-by: Kai-Heng Feng --- drivers/net/ethernet/intel/igb/igb_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index

Re: [PATCH] rtlwifi: Fix non-working BSS STA mode

2018-12-20 Thread Kai Heng Feng
> On Dec 20, 2018, at 14:42, Kalle Valo wrote: > > Kai-Heng Feng wrote: > >> Once BSS STA mode gets started, it can be scanned by other clients but >> cannot entablish a connection. >> >> Turns out the set_bcn_reg() and its *_set_beacon_related_register

Re: [PATCH] Elantech Touchpad: Fix Elantech touchpad and trackpoint for Lenovo ThinkPad notebooks.

2019-01-06 Thread Kai Heng Feng
Hi Benjamin, > On Dec 29, 2018, at 1:53 AM, Philipp Kaelin wrote: > > Initial situation: > - The touchpad of a Lenovo ThinkPad L580 doesn't work with newer kernel > versions eg. 4.20 > - It used to work on earlier versions eg. 4.14 > > Cause: > - The elantech driver was adapted in to support S

Re: r8152: data corruption in various scenarios

2019-01-06 Thread Kai Heng Feng
> On Jan 5, 2019, at 10:14 PM, Mark Lord wrote: > > A couple of years back, I reported data corruption resulting from > a change in kernel 3.16 which enabled hardware checksums in the r8152 driver. > This was happening on an embedded system that was using a r8152 USB dongle. > > At the time,

Re: r8152: data corruption in various scenarios

2019-01-06 Thread Kai Heng Feng
> On Jan 7, 2019, at 05:16, Mark Lord wrote: > > On 2019-01-06 4:13 p.m., Mark Lord wrote: >> On 2019-01-06 2:14 p.m., Kai Heng Feng wrote:>> On Jan 5, 2019, at 10:14 PM, >> Mark Lord >> wrote: >> .. >>>> There is even now a special hack

[PATCH v2] HID: i2c-hid: Ignore input report if there's no data present on Elan touchpanels

2019-01-06 Thread Kai-Heng Feng
to high after I2C host has done reading its data. Since the host receives all useful data, let's ignore the input report when there's no data. Signed-off-by: Kai-Heng Feng --- v2: Use dev_warn_once() to warn the user about the situation. drivers/hid/i2c-hid/i2c-hid-core.c | 9 ++

Re: [PATCH v4] USB: Don't enable LPM if it's already enabled

2019-01-06 Thread Kai Heng Feng
Hi, > On Dec 3, 2018, at 18:26, Kai-Heng Feng wrote: > > USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working > after S3: > [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_0302.bin > [ 168.432065] Bluetooth: hci0: Failed to send body

Re: r8152: data corruption in various scenarios

2019-01-06 Thread Kai Heng Feng
> On Jan 7, 2019, at 12:13, Mark Lord wrote: > > On 2019-01-06 11:09 p.m., Kai Heng Feng wrote: >> >> >>> On Jan 7, 2019, at 05:16, Mark Lord wrote: >>> >>> On 2019-01-06 4:13 p.m., Mark Lord wrote: >>>> On 2019-01-06 2:14 p.

[PATCH v3] HID: i2c-hid: Ignore input report if there's no data present on Elan touchpanels

2019-01-06 Thread Kai-Heng Feng
to high after I2C host has done reading its data. Since the host receives all useful data, let's ignore the input report when there's no data. Signed-off-by: Kai-Heng Feng --- v3: Fix compiler error/warnings. v2: Use dev_warn_once() to warn the user about the situation. drivers/h

Re: [PATCH v4] USB: Don't enable LPM if it's already enabled

2019-01-07 Thread Kai Heng Feng
> On Jan 8, 2019, at 00:16, Greg KH wrote: > > On Mon, Dec 03, 2018 at 06:26:43PM +0800, Kai-Heng Feng wrote: >> USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working >> after S3: >> [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_0

[PATCH] r8169: Add support for new Realtek Ethernet

2019-01-01 Thread Kai-Heng Feng
There are two new Realtek Ethernet devices which are re-branded r8168h. Add the IDs to to support them. Signed-off-by: Kai-Heng Feng --- drivers/net/ethernet/realtek/r8169.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet

Re: [PATCH] HID: i2c-hid: Ignore input report if there's no data present on Elan touchpanels

2018-12-28 Thread Kai Heng Feng
> On Dec 19, 2018, at 21:09, Jiri Kosina wrote: > > On Fri, 14 Dec 2018, Kai-Heng Feng wrote: > >> While using Elan touchpads, the message floods: >> [ 136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report >> (14/65535) >> >>

Re: [PATCH v2] HID: i2c-hid: Add a small delay after sleep command for Raydium touchpanel

2018-10-16 Thread Kai Heng Feng
> On Oct 15, 2018, at 16:04, Benjamin Tissoires > wrote: > > On Fri, Oct 5, 2018 at 6:46 AM Kai-Heng Feng > wrote: >> >> Raydium touchpanel (2386:4B33) sometimes does not work in desktop session >> although it works in display manager. >> >> D

  1   2   3   4   5   6   7   8   9   >