[PATCH] nvme-core: add apst_override param to force APST if controller does not report APSTA=1

2017-05-03 Thread Alexander Kappner
it. This patch successfully enables APST on both Samsung disks. This patch also introduces an additional sanity check on the NPSS to mitigate the risk of force-enabling APST on disks that genuinely do not support it. Signed-off-by: Alexander Kappner <a...@godking.net> --- drivers/nvme/host/

Re: [PATCH] usb-core: Fix potential null pointer dereference in xhci-debugfs.c

2017-12-08 Thread Alexander Kappner
y subject, please remember to send mail with proper subject) My apologies, thanks for fixing. On 12/07/2017 04:47 AM, Mathias Nyman wrote: On 07.12.2017 11:26, Alexander Kappner wrote: Date: Wed, 6 Dec 2017 15:28:37 -0800 Subject: [PATCH] usb-core: Fix potential null pointer dereference in xhci-

[no subject]

2017-12-07 Thread Alexander Kappner
ee <49> 83 7d 28 00 74 0b 5b 5d 41 5c 41 5d 41 5e 41 5f c3 48 8b 3d [63953.758202] RIP: xhci_debugfs_create_endpoint+0x1d/0xa0 RSP: c9000a8efc80 [63953.758203] CR2: 0040 [63953.758204] ---[ end trace 1f7ea9a959f02054 ]--- Signed-off-by: Alexander Kappner <a...@godking.ne

[PATCH] xhci: Fix use-after-free in xhci debugfs

2017-12-10 Thread Alexander Kappner
xes this issue by storing a pointer to the xhci_ring field in the xhci device structure in debugfs rather than directly storing a pointer to the xhci_ring. Signed-off-by: Alexander Kappner <a...@godking.net> --- drivers/usb/host/xhci-debugfs.c | 16 1 file changed, 8 insertions(+),

Re: [PATCH] usb-core: Fix potential null pointer dereference in xhci-debugfs.c

2017-12-09 Thread Alexander Kappner
Hi Mathias, thanks for the patch! The system now resumes cleanly from hibernate even with usbmuxd doing its thing. Tested-by: Alexander Kappner <a...@godking.net> While testing this I hit some other issues with xhci-debugfs.c but I'll write these up in a separate bug. On 12/08/2017

Re: [PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-17 Thread Alexander Kappner
sdev->skip_ms_page_3f = 1; --agk On 05/16/2018 01:55 PM, Alan Stern wrote: > On Wed, 16 May 2018, Alexander Kappner wrote: > >> The "G-Drive" (sold by G-Technology) external USB 3.0 drive >> hangs on write access under UAS: >> >> [ 1

[PATCH v2 1/2] [usb-storage] Add support for FL_ALWAYS_SYNC flag in the UAS driver

2018-05-18 Thread Alexander Kappner
The ALWAYS_SYNC flag is currently honored by the usb-storage driver but not UAS and is required to work around devices that become unstable upon being queried for cache. This code is taken straight from: drivers/usb/storage/scsiglue.c:284 Signed-off-by: Alexander Kappner <a...@godking.

[PATCH v2 2/2] [usb-storage] Add compatibility quirk flags for G-Technologies G-Drive

2018-05-18 Thread Alexander Kappner
s compiled without UAS receive the quirk. With the patch, the drive works reliably on UAS and usb- storage. (tested on NEC Corporation uPD720200 USB 3.0 host controller). Signed-off-by: Alexander Kappner <a...@godking.net> --- drivers/usb/storage/unusual_devs.h | 9 + dri

[PATCH v2 0/2] Re: usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-18 Thread Alexander Kappner
v2 of this patch implements the FL_ALWAYS_SYNC flag in the UAS driver, and then adds the flag as quirks for the device at issue. This allows the G-Drive to work under both UAS and usb-storage. Alexander Kappner (2): [usb-storage] Add support for FL_ALWAYS_SYNC flag in the UAS driver [usb

Re: [PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-18 Thread Alexander Kappner
n unusual_uas.h that currently have all UAS support disabled. I'd be happy to write the patch, but I'm not sure we want to reserve a quirk bit for what's currently only a single device known to have this issue. Please advise. On 05/17/2018 12:13 PM, Alan Stern wrote: > On Thu, 17 May 2018, Alexa

Re: [PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-17 Thread Alexander Kappner
n 17.05.2018, 01:15 -0700 schrieb Alexander Kappner: >> Yes. Without this flag, the device keeps throwing similar errors on >> usb-storage. That's the same result I get on a host that doesn't have UAS >> compiled in. Here's a dmesg: > > Hi, > > this is suspicious. You

[PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-16 Thread Alexander Kappner
AS receive the quirk. With the patch, the drive works reliably (tested on NEC Corporation uPD720200 USB 3.0 host controller). Signed-off-by: Alexander Kappner <a...@godking.net> --- drivers/usb/storage/unusual_devs.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/storag

uaccess.h: implement unsafe_copy_{to,from}_user()?

2017-12-30 Thread Alexander Kappner
Commit 5b24a7a2aa2040c8c50c3b71122901d01661ff78 introduced the unsafe_get_user and unsafe_put_user replacement functions for batched calls to put_user and get_user. I'm trying to make the kernel smaller and reduce stac/clac overhead on x86 by substituting the new functions for such batched

Re: [PATCH] Add Second Fan Support for Thinkpad P50

2018-04-04 Thread Alexander Kappner
Andy: Thanks for pushing, and for the pointers regarding formalities; I'll keep those in mind. Also, it would be great if someone could test the fan reporting on a P70 Thinkpad (which has the same fan configuration as my P50 and thus likely needs the same quirk). Best Alexander Kappner

[PATCH] [mmc_block] Prevent bus reference leak in mmc_blk_init

2018-03-28 Thread Alexander Kappner
s type Steps to reproduce: Build with CONFIG_MMC_BLOCK=m modprobe mmc_block rmmod mmc_block modprobe mmc_block The proposed patch deallocates the reference in mmc_blk_exit. Signed-off-by: Alexander Kappner <a...@godking.net> --- drivers/mmc/core/block.c | 1 + 1 file changed, 1 insertion(+)

[PATCH] Add Second Fan Support for Thinkpad P50

2018-04-02 Thread Alexander Kappner
The Thinkpad P50 has 2 fans. Add the 2FAN quirk so the tpacpi driver properly reports both fan speeds. Because the P50 doesn't report the version of its EC controller, we need to identify it by BIOS version (N1). Signed-off-by: Alexander Kappner <a...@godking.net> --- drivers/platfo

Re: [ibm-acpi-devel] [PATCH] Add Second Fan Support for Thinkpad P50

2018-04-02 Thread Alexander Kappner
t; Better of course to use three letters, though let's leave this when we > really have a need. Agreed; ideally we'd use a bitmask. On 04/02/2018 12:08 PM, Henrique de Moraes Holschuh wrote: > On Mon, 02 Apr 2018, Alexander Kappner wrote: >> The Thinkpad P50 has 2 fans. Add the 2FAN quirk

[snd_hda_intel] snd_hda_intel causes high CPU lockup and system instability if mic disabled in BIOS on Lenovo P50

2018-11-25 Thread Alexander Kappner
My Lenovo P50 laptop has a BIOS option to disable the microphone. When this option gets chosen, the snd_hda_intel driver causes high CPU load on a single kworker thread, spinning on "process_unsol_events", and system instability. This behavior occurs from the time that the snd_hda_intel module

Re: [snd_hda_intel] snd_hda_intel causes high CPU lockup and system instability if mic disabled in BIOS on Lenovo P50

2018-11-26 Thread Alexander Kappner
On Mon, 26 Nov 2018, Takashi Iwai wrote: On Mon, 26 Nov 2018 00:17:15 +0100, Alexander Kappner wrote: My Lenovo P50 laptop has a BIOS option to disable the microphone. When this option gets chosen, the snd_hda_intel driver causes high CPU load on a single kworker thread, spinning

[PATCH] [mmc_block] Prevent bus reference leak in mmc_blk_init

2018-03-28 Thread Alexander Kappner
s type Steps to reproduce: Build with CONFIG_MMC_BLOCK=m modprobe mmc_block rmmod mmc_block modprobe mmc_block The proposed patch deallocates the reference in mmc_blk_exit. Signed-off-by: Alexander Kappner --- drivers/mmc/core/block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mm

[PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-16 Thread Alexander Kappner
AS receive the quirk. With the patch, the drive works reliably (tested on NEC Corporation uPD720200 USB 3.0 host controller). Signed-off-by: Alexander Kappner --- drivers/usb/storage/unusual_devs.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/storage/unusual_devs.h b/d

Re: [PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-17 Thread Alexander Kappner
sdev->skip_ms_page_3f = 1; --agk On 05/16/2018 01:55 PM, Alan Stern wrote: > On Wed, 16 May 2018, Alexander Kappner wrote: > >> The "G-Drive" (sold by G-Technology) external USB 3.0 drive >> hangs on write access under UAS: >> >> [ 1

Re: [PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-17 Thread Alexander Kappner
n 17.05.2018, 01:15 -0700 schrieb Alexander Kappner: >> Yes. Without this flag, the device keeps throwing similar errors on >> usb-storage. That's the same result I get on a host that doesn't have UAS >> compiled in. Here's a dmesg: > > Hi, > > this is suspicious. You

Re: [PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-18 Thread Alexander Kappner
n unusual_uas.h that currently have all UAS support disabled. I'd be happy to write the patch, but I'm not sure we want to reserve a quirk bit for what's currently only a single device known to have this issue. Please advise. On 05/17/2018 12:13 PM, Alan Stern wrote: > On Thu, 17 May 2018, Alexa

[PATCH v2 1/2] [usb-storage] Add support for FL_ALWAYS_SYNC flag in the UAS driver

2018-05-18 Thread Alexander Kappner
The ALWAYS_SYNC flag is currently honored by the usb-storage driver but not UAS and is required to work around devices that become unstable upon being queried for cache. This code is taken straight from: drivers/usb/storage/scsiglue.c:284 Signed-off-by: Alexander Kappner --- drivers/usb/storage

[PATCH v2 2/2] [usb-storage] Add compatibility quirk flags for G-Technologies G-Drive

2018-05-18 Thread Alexander Kappner
s compiled without UAS receive the quirk. With the patch, the drive works reliably on UAS and usb- storage. (tested on NEC Corporation uPD720200 USB 3.0 host controller). Signed-off-by: Alexander Kappner --- drivers/usb/storage/unusual_devs.h | 9 + drivers/usb/storage/unusual_

[PATCH v2 0/2] Re: usb-storage: Add quirks to make G-Technology "G-Drive" work

2018-05-18 Thread Alexander Kappner
v2 of this patch implements the FL_ALWAYS_SYNC flag in the UAS driver, and then adds the flag as quirks for the device at issue. This allows the G-Drive to work under both UAS and usb-storage. Alexander Kappner (2): [usb-storage] Add support for FL_ALWAYS_SYNC flag in the UAS driver [usb

Re: [PATCH] Add Second Fan Support for Thinkpad P50

2018-04-04 Thread Alexander Kappner
Andy: Thanks for pushing, and for the pointers regarding formalities; I'll keep those in mind. Also, it would be great if someone could test the fan reporting on a P70 Thinkpad (which has the same fan configuration as my P50 and thus likely needs the same quirk). Best Alexander Kappner

[PATCH] Add Second Fan Support for Thinkpad P50

2018-04-02 Thread Alexander Kappner
The Thinkpad P50 has 2 fans. Add the 2FAN quirk so the tpacpi driver properly reports both fan speeds. Because the P50 doesn't report the version of its EC controller, we need to identify it by BIOS version (N1). Signed-off-by: Alexander Kappner --- drivers/platform/x86/thinkpad_acpi.c | 8

Re: [ibm-acpi-devel] [PATCH] Add Second Fan Support for Thinkpad P50

2018-04-02 Thread Alexander Kappner
t; Better of course to use three letters, though let's leave this when we > really have a need. Agreed; ideally we'd use a bitmask. On 04/02/2018 12:08 PM, Henrique de Moraes Holschuh wrote: > On Mon, 02 Apr 2018, Alexander Kappner wrote: >> The Thinkpad P50 has 2 fans. Add the 2FAN quirk

uaccess.h: implement unsafe_copy_{to,from}_user()?

2017-12-30 Thread Alexander Kappner
Commit 5b24a7a2aa2040c8c50c3b71122901d01661ff78 introduced the unsafe_get_user and unsafe_put_user replacement functions for batched calls to put_user and get_user. I'm trying to make the kernel smaller and reduce stac/clac overhead on x86 by substituting the new functions for such batched

[no subject]

2017-12-07 Thread Alexander Kappner
ee <49> 83 7d 28 00 74 0b 5b 5d 41 5c 41 5d 41 5e 41 5f c3 48 8b 3d [63953.758202] RIP: xhci_debugfs_create_endpoint+0x1d/0xa0 RSP: c9000a8efc80 [63953.758203] CR2: 0040 [63953.758204] ---[ end trace 1f7ea9a959f02054 ]--- Signed-off-by: Alexander Kappner --- drivers/u

Re: [PATCH] usb-core: Fix potential null pointer dereference in xhci-debugfs.c

2017-12-08 Thread Alexander Kappner
y subject, please remember to send mail with proper subject) My apologies, thanks for fixing. On 12/07/2017 04:47 AM, Mathias Nyman wrote: On 07.12.2017 11:26, Alexander Kappner wrote: Date: Wed, 6 Dec 2017 15:28:37 -0800 Subject: [PATCH] usb-core: Fix potential null pointer dereference in xhci-

Re: [PATCH] usb-core: Fix potential null pointer dereference in xhci-debugfs.c

2017-12-09 Thread Alexander Kappner
Hi Mathias, thanks for the patch! The system now resumes cleanly from hibernate even with usbmuxd doing its thing. Tested-by: Alexander Kappner While testing this I hit some other issues with xhci-debugfs.c but I'll write these up in a separate bug. On 12/08/2017 09:01 AM, Mathias Nyman

[PATCH] xhci: Fix use-after-free in xhci debugfs

2017-12-10 Thread Alexander Kappner
xes this issue by storing a pointer to the xhci_ring field in the xhci device structure in debugfs rather than directly storing a pointer to the xhci_ring. Signed-off-by: Alexander Kappner --- drivers/usb/host/xhci-debugfs.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --gi

[snd_hda_intel] snd_hda_intel causes high CPU lockup and system instability if mic disabled in BIOS on Lenovo P50

2018-11-25 Thread Alexander Kappner
My Lenovo P50 laptop has a BIOS option to disable the microphone. When this option gets chosen, the snd_hda_intel driver causes high CPU load on a single kworker thread, spinning on "process_unsol_events", and system instability. This behavior occurs from the time that the snd_hda_intel module

Re: [snd_hda_intel] snd_hda_intel causes high CPU lockup and system instability if mic disabled in BIOS on Lenovo P50

2018-11-26 Thread Alexander Kappner
On Mon, 26 Nov 2018, Takashi Iwai wrote: On Mon, 26 Nov 2018 00:17:15 +0100, Alexander Kappner wrote: My Lenovo P50 laptop has a BIOS option to disable the microphone. When this option gets chosen, the snd_hda_intel driver causes high CPU load on a single kworker thread, spinning

Re: [snd_hda_intel] snd_hda_intel causes high CPU lockup and system instability if mic disabled in BIOS on Lenovo P50

2019-01-06 Thread Alexander Kappner
On Wed, 5 Dec 2018, Takashi Iwai wrote: On Sat, 01 Dec 2018 20:33:16 +0100, Alexander Kappner wrote: On Tue, 27 Nov 2018, Takashi Iwai wrote: On Tue, 27 Nov 2018 06:34:02 +0100, Alexander Kappner wrote: On Mon, 26 Nov 2018, Takashi Iwai wrote: On Mon, 26 Nov 2018 00:17:15 +0100

[PATCH] nvme-core: add apst_override param to force APST if controller does not report APSTA=1

2017-05-03 Thread Alexander Kappner
it. This patch successfully enables APST on both Samsung disks. This patch also introduces an additional sanity check on the NPSS to mitigate the risk of force-enabling APST on disks that genuinely do not support it. Signed-off-by: Alexander Kappner --- drivers/nvme/host/core.c | 25