Hi Greg,
> On Nov 18, 2019, at 23:55, <gregkh(a)linuxfoundation.org> <gregkh(a)linuxfoundation.org> wrote:
>
>
> This is a note to let you know that I've just added the patch titled
>
> x86/quirks: Disable HPET on Intel Coffe Lake platforms
>
> to the 4.4-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
>
> The filename of the patch is:
> x86-quirks-disable-hpet-on-intel-coffe-lake-platforms.patch
> and it can be found in the queue-4.4 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable(a)vger.kernel.org> know about it.
This patch depends on commit c8c4076723da ("x86/timer: Skip PIT initialization on modern chipsets").
Otherwise the system may freeze at boot. So please also include that commit.
Kai-Heng
>
>
> From fc5db58539b49351e76f19817ed1102bf7c712d0 Mon Sep 17 00:00:00 2001
> From: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
> Date: Wed, 16 Oct 2019 18:38:16 +0800
> Subject: x86/quirks: Disable HPET on Intel Coffe Lake platforms
>
> From: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
>
> commit fc5db58539b49351e76f19817ed1102bf7c712d0 upstream.
>
> Some Coffee Lake platforms have a skewed HPET timer once the SoCs entered
> PC10, which in consequence marks TSC as unstable because HPET is used as
> watchdog clocksource for TSC.
>
> Harry Pan tried to work around it in the clocksource watchdog code [1]
> thereby creating a circular dependency between HPET and TSC. This also
> ignores the fact, that HPET is not only unsuitable as watchdog clocksource
> on these systems, it becomes unusable in general.
>
> Disable HPET on affected platforms.
>
> Suggested-by: Feng Tang <feng.tang(a)intel.com>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
> Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
> Cc: stable(a)vger.kernel.org
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203183
> Link: https://lore.kernel.org/lkml/20190516090651.1396-1-harry.pan@intel.com/ [1]
> Link: https://lkml.kernel.org/r/20191016103816.30650-1-kai.heng.feng@canonical.com
> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
>
> ---
> arch/x86/kernel/early-quirks.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -699,6 +699,8 @@ static struct chipset early_qrk[] __init
> */
> { PCI_VENDOR_ID_INTEL, 0x0f00,
> PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
> + { PCI_VENDOR_ID_INTEL, 0x3ec4,
> + PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
> { PCI_VENDOR_ID_BROADCOM, 0x4331,
> PCI_CLASS_NETWORK_OTHER, PCI_ANY_ID, 0, apple_airport_reset},
> {}
>
>
> Patches currently in stable-queue which might be from kai.heng.feng(a)canonical.com are
>
> queue-4.4/x86-quirks-disable-hpet-on-intel-coffe-lake-platforms.patch
Commit aea447141c7e ("powerpc: Disable -Wbuiltin-requires-header when
setjmp is used") disabled -Wbuiltin-requires-header because of a warning
about the setjmp and longjmp declarations.
r367387 in clang added another diagnostic around this, complaining that
there is no jmp_buf declaration.
In file included from ../arch/powerpc/xmon/xmon.c:47:
../arch/powerpc/include/asm/setjmp.h:10:13: error: declaration of
built-in function 'setjmp' requires the declaration of the 'jmp_buf'
type, commonly provided in the header <setjmp.h>.
[-Werror,-Wincomplete-setjmp-declaration]
extern long setjmp(long *);
^
../arch/powerpc/include/asm/setjmp.h:11:13: error: declaration of
built-in function 'longjmp' requires the declaration of the 'jmp_buf'
type, commonly provided in the header <setjmp.h>.
[-Werror,-Wincomplete-setjmp-declaration]
extern void longjmp(long *, long);
^
2 errors generated.
We are not using the standard library's longjmp/setjmp implementations
for obvious reasons; make this clear to clang by using -ffreestanding
on these files.
Cc: stable(a)vger.kernel.org # 4.14+
Link: https://github.com/ClangBuiltLinux/linux/issues/625
Link: https://github.com/llvm/llvm-project/commit/3be25e79477db2d31ac46493d97eca8…
Link: https://godbolt.org/z/B2oQnl
Suggested-by: Segher Boessenkool <segher(a)kernel.crashing.org>
Reviewed-by: Nick Desaulniers <ndesaulniers(a)google.com>
Signed-off-by: Nathan Chancellor <natechancellor(a)gmail.com>
---
v1 -> v3 (I skipped v2 because the first patch in the series already
had a v2):
* Use -ffreestanding instead of outright disabling the warning because
it is legitimate.
v3 -> v4:
* Rebase on v5.4-rc3
* Add Nick's reviewed-by and Compiler Explorer link.
v4 -> v5:
* Rebase on next-20191118
arch/powerpc/kernel/Makefile | 4 ++--
arch/powerpc/xmon/Makefile | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index bb57d168d6f4..3c113ae0de2b 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -5,8 +5,8 @@
CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
-# Disable clang warning for using setjmp without setjmp.h header
-CFLAGS_crash.o += $(call cc-disable-warning, builtin-requires-header)
+# Avoid clang warnings around longjmp/setjmp declarations
+CFLAGS_crash.o += -ffreestanding
ifdef CONFIG_PPC64
CFLAGS_prom_init.o += $(NO_MINIMAL_TOC)
diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile
index f142570ad860..c3842dbeb1b7 100644
--- a/arch/powerpc/xmon/Makefile
+++ b/arch/powerpc/xmon/Makefile
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
# Makefile for xmon
-# Disable clang warning for using setjmp without setjmp.h header
-subdir-ccflags-y := $(call cc-disable-warning, builtin-requires-header)
+# Avoid clang warnings around longjmp/setjmp declarations
+subdir-ccflags-y := -ffreestanding
GCOV_PROFILE := n
KCOV_INSTRUMENT := n
--
2.24.0
This is the start of the stable review cycle for the 4.9.202 release.
There are 31 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 17 Nov 2019 06:18:35 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.202-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.9.202-rc1
Gomez Iglesias, Antonio <antonio.gomez.iglesias(a)intel.com>
Documentation: Add ITLB_MULTIHIT documentation
Junaid Shahid <junaids(a)google.com>
kvm: x86: mmu: Recovery of shattered NX large pages
Junaid Shahid <junaids(a)google.com>
kvm: Add helper function for creating VM worker threads
Paolo Bonzini <pbonzini(a)redhat.com>
kvm: mmu: ITLB_MULTIHIT mitigation
Tyler Hicks <tyhicks(a)canonical.com>
cpu/speculation: Uninline and export CPU mitigations helpers
Vineela Tummalapalli <vineela.tummalapalli(a)intel.com>
x86/bugs: Add ITLB_MULTIHIT bug infrastructure
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: vmx, svm: always run with EFER.NXE=1 when shadow paging is active
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: x86: add tracepoints around __direct_map and FNAME(fetch)
Ben Hutchings <ben(a)decadent.org.uk>
KVM: x86: Add is_executable_pte()
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: x86: change kvm_mmu_page_get_gfn BUG_ON to WARN_ON
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: x86: remove now unneeded hugepage gfn adjustment
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: x86: make FNAME(fetch) and __direct_map more similar
Junaid Shahid <junaids(a)google.com>
kvm: x86: Do not release the page inside mmu_set_spte()
Junaid Shahid <junaids(a)google.com>
kvm: Convert kvm_lock to a mutex
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: x86: extend usage of RET_MMIO_PF_* constants
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: x86: simplify ept_misconfig
Josh Poimboeuf <jpoimboe(a)redhat.com>
x86/speculation/taa: Fix printing of TAA_MSG_SMT on IBRS_ALL CPUs
Michal Hocko <mhocko(a)suse.com>
x86/tsx: Add config options to set tsx=on|off|auto
Pawan Gupta <pawan.kumar.gupta(a)linux.intel.com>
x86/speculation/taa: Add documentation for TSX Async Abort
Pawan Gupta <pawan.kumar.gupta(a)linux.intel.com>
x86/tsx: Add "auto" option to the tsx= cmdline parameter
Pawan Gupta <pawan.kumar.gupta(a)linux.intel.com>
kvm/x86: Export MDS_NO=0 to guests when TSX is enabled
Pawan Gupta <pawan.kumar.gupta(a)linux.intel.com>
x86/speculation/taa: Add sysfs reporting for TSX Async Abort
Pawan Gupta <pawan.kumar.gupta(a)linux.intel.com>
x86/speculation/taa: Add mitigation for TSX Async Abort
Pawan Gupta <pawan.kumar.gupta(a)linux.intel.com>
x86/cpu: Add a "tsx=" cmdline option with TSX disabled by default
Pawan Gupta <pawan.kumar.gupta(a)linux.intel.com>
x86/cpu: Add a helper function x86_read_arch_cap_msr()
Pawan Gupta <pawan.kumar.gupta(a)linux.intel.com>
x86/msr: Add the IA32_TSX_CTRL MSR
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: x86: use Intel speculation bugs and features as derived in generic x86 code
Jack Pham <jackp(a)codeaurora.org>
usb: gadget: core: unmap request from DMA only if previously mapped
Jonas Gorski <jonas.gorski(a)gmail.com>
MIPS: BCM63XX: fix switch core reset on BCM6368
Kefeng Wang <wangkefeng.wang(a)huawei.com>
Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()
Junaid Shahid <junaids(a)google.com>
kvm: mmu: Don't read PDPTEs when paging is not enabled
-------------
Diffstat:
Documentation/ABI/testing/sysfs-devices-system-cpu | 2 +
Documentation/hw-vuln/index.rst | 2 +
Documentation/hw-vuln/multihit.rst | 163 ++++++++
Documentation/hw-vuln/tsx_async_abort.rst | 276 +++++++++++++
Documentation/kernel-parameters.txt | 92 +++++
Documentation/virtual/kvm/locking.txt | 6 +-
Documentation/x86/index.rst | 1 +
Documentation/x86/tsx_async_abort.rst | 117 ++++++
Makefile | 4 +-
arch/mips/bcm63xx/reset.c | 2 +-
arch/s390/kvm/kvm-s390.c | 4 +-
arch/x86/Kconfig | 45 ++
arch/x86/include/asm/cpufeatures.h | 2 +
arch/x86/include/asm/kvm_host.h | 6 +
arch/x86/include/asm/msr-index.h | 16 +
arch/x86/include/asm/nospec-branch.h | 4 +-
arch/x86/include/asm/processor.h | 7 +
arch/x86/kernel/cpu/Makefile | 2 +-
arch/x86/kernel/cpu/bugs.c | 161 +++++++-
arch/x86/kernel/cpu/common.c | 93 +++--
arch/x86/kernel/cpu/cpu.h | 18 +
arch/x86/kernel/cpu/intel.c | 5 +
arch/x86/kernel/cpu/tsx.c | 140 +++++++
arch/x86/kvm/cpuid.c | 8 +
arch/x86/kvm/mmu.c | 452 +++++++++++++++++----
arch/x86/kvm/mmu.h | 21 +-
arch/x86/kvm/mmutrace.h | 59 +++
arch/x86/kvm/paging_tmpl.h | 79 ++--
arch/x86/kvm/svm.c | 10 +-
arch/x86/kvm/vmx.c | 27 +-
arch/x86/kvm/x86.c | 61 ++-
drivers/base/cpu.c | 17 +
drivers/bluetooth/hci_ldisc.c | 3 +-
drivers/usb/gadget/udc/core.c | 5 +-
include/linux/cpu.h | 30 +-
include/linux/kvm_host.h | 8 +-
include/linux/usb/gadget.h | 2 +
kernel/cpu.c | 27 +-
virt/kvm/kvm_main.c | 132 +++++-
39 files changed, 1855 insertions(+), 254 deletions(-)
Hello,
We ran automated tests on a patchset that was proposed for merging into this
kernel tree. The patches were applied to:
Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Commit: 116a395b7061 - Linux 5.3.11
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
All kernel binaries, config files, and logs are available for download here:
https://artifacts.cki-project.org/pipelines/293753
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Merge testing
-------------
We cloned this repository and checked out the following commit:
Repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Commit: 116a395b7061 - Linux 5.3.11
We grabbed the 58c4f05126ee commit of the stable queue repository.
We then merged the patchset with `git am`:
scsi-core-handle-drivers-which-set-sg_tablesize-to-zero.patch
ax88172a-fix-information-leak-on-short-answers.patch
devlink-disallow-reload-operation-during-device-cleanup.patch
ipmr-fix-skb-headroom-in-ipmr_get_route.patch
mlxsw-core-enable-devlink-reload-only-on-probe.patch
net-gemini-add-missed-free_netdev.patch
net-smc-fix-fastopen-for-non-blocking-connect.patch
net-usb-qmi_wwan-add-support-for-foxconn-t77w968-lte-modules.patch
slip-fix-memory-leak-in-slip_open-error-path.patch
tcp-remove-redundant-new-line-from-tcp_event_sk_skb.patch
dpaa2-eth-free-already-allocated-channels-on-probe-defer.patch
devlink-add-method-for-time-stamp-on-reporter-s-dump.patch
net-smc-fix-refcount-non-blocking-connect-part-2.patch
alsa-usb-audio-fix-missing-error-check-at-mixer-resolution-test.patch
alsa-usb-audio-not-submit-urb-for-stopped-endpoint.patch
alsa-usb-audio-fix-incorrect-null-check-in-create_yamaha_midi_quirk.patch
alsa-usb-audio-fix-incorrect-size-check-for-processing-extension-units.patch
btrfs-fix-log-context-list-corruption-after-rename-exchange-operation.patch
cgroup-freezer-call-cgroup_enter_frozen-with-preemption-disabled-in-ptrace_stop.patch
input-ff-memless-kill-timer-in-destroy.patch
input-synaptics-rmi4-fix-video-buffer-size.patch
input-synaptics-rmi4-disable-the-relative-position-irq-in-the-f12-driver.patch
input-synaptics-rmi4-do-not-consume-more-data-than-we-have-f11-f12.patch
input-synaptics-rmi4-clear-irq-enables-for-f54.patch
input-synaptics-rmi4-destroy-f54-poller-workqueue-when-removing.patch
kvm-mmu-do-not-treat-zone_device-pages-as-being-reserved.patch
ib-hfi1-ensure-r_tid_ack-is-valid-before-building-tid-rdma-ack-packet.patch
ib-hfi1-calculate-flow-weight-based-on-qp-mtu-for-tid-rdma.patch
ib-hfi1-tid-rdma-write-should-not-return-ib_wc_rnr_retry_exc_err.patch
ib-hfi1-ensure-full-gen3-speed-in-a-gen4-system.patch
ib-hfi1-use-a-common-pad-buffer-for-9b-and-16b-packets.patch
i2c-acpi-force-bus-speed-to-400khz-if-a-silead-touchscreen-is-present.patch
x86-quirks-disable-hpet-on-intel-coffe-lake-platforms.patch
ecryptfs_lookup_interpose-lower_dentry-d_inode-is-not-stable.patch
ecryptfs_lookup_interpose-lower_dentry-d_parent-is-not-stable-either.patch
io_uring-ensure-registered-buffer-import-returns-the-io-length.patch
drm-i915-update-rawclk-also-on-resume.patch
revert-drm-i915-ehl-update-mocs-table-for-ehl.patch
ntp-y2038-remove-incorrect-time_t-truncation.patch
net-ethernet-dwmac-sun8i-use-the-correct-function-in-exit-path.patch
iommu-vt-d-fix-qi_dev_iotlb_pfsid-and-qi_dev_eiotlb_pfsid-macros.patch
mm-mempolicy-fix-the-wrong-return-value-and-potential-pages-leak-of-mbind.patch
mm-memcg-switch-to-css_tryget-in-get_mem_cgroup_from_mm.patch
mm-hugetlb-switch-to-css_tryget-in-hugetlb_cgroup_charge_cgroup.patch
mm-slub-really-fix-slab-walking-for-init_on_free.patch
mm-memory_hotplug-fix-try_offline_node.patch
mm-page_io.c-do-not-free-shared-swap-slots.patch
mmc-sdhci-of-at91-fix-quirk2-overwrite.patch
Compile testing
---------------
We compiled the kernel for 3 architectures:
aarch64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: -j30 INSTALL_MOD_STRIP=1 targz-pkg
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
✅ Boot test
✅ xfstests: xfs
🚧 ✅ selinux-policy: serge-testsuite
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
🚧 ✅ POSIX pjd-fstest suites
ppc64le:
Host 1:
✅ Boot test
✅ xfstests: xfs
🚧 ✅ selinux-policy: serge-testsuite
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
🚧 ✅ POSIX pjd-fstest suites
x86_64:
Host 1:
✅ Boot test
✅ xfstests: xfs
🚧 ✅ selinux-policy: serge-testsuite
Host 2:
✅ Boot test
✅ Podman system integration test (as root)
✅ Podman system integration test (as user)
✅ LTP lite
✅ Loopdev Sanity
✅ jvm test suite
✅ AMTU (Abstract Machine Test Utility)
✅ LTP: openposix test suite
✅ Ethernet drivers sanity
✅ Networking socket: fuzz
✅ audit: audit testsuite test
✅ httpd: mod_ssl smoke sanity
✅ iotop: sanity
✅ tuned: tune-processes-through-perf
✅ pciutils: sanity smoke test
✅ ALSA PCM loopback test
✅ ALSA Control (mixer) Userspace Element test
✅ Usex - version 1.9-29
✅ storage: SCSI VPD
✅ stress: stress-ng
🚧 ✅ POSIX pjd-fstest suites
Test sources: https://github.com/CKI-project/tests-beaker
💚 Pull requests are welcome for new tests or improvements to existing tests!
Waived tests
------------
If the test run included waived tests, they are marked with 🚧. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running are marked with ⏱. Reports for non-upstream kernels have
a Beaker recipe linked to next to each host.
Hello everybody,
I pulled the stable-queue tree just now. This was not an inital clone,
but only an update. My previous update was end of last week I was
surprised I had to download 1,19 Gb to download.
Can somebody explain why this was so large ? This is probably the first
time I notice this. Usually, updates are much smaller.
Thanks in advance,
François Valenduc
This is a note to let you know that I've just added the patch titled
USB: documentation: flags on usb-storage versus UAS
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 65cc8bf99349f651a0a2cee69333525fe581f306 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum(a)suse.com>
Date: Thu, 14 Nov 2019 12:27:58 +0100
Subject: USB: documentation: flags on usb-storage versus UAS
Document which flags work storage, UAS or both
Signed-off-by: Oliver Neukum <oneukum(a)suse.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191114112758.32747-4-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
.../admin-guide/kernel-parameters.txt | 22 ++++++++++---------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index a84a83f8881e..a02b1799a756 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4998,13 +4998,13 @@
Flags is a set of characters, each corresponding
to a common usb-storage quirk flag as follows:
a = SANE_SENSE (collect more than 18 bytes
- of sense data);
+ of sense data, not on uas);
b = BAD_SENSE (don't collect more than 18
- bytes of sense data);
+ bytes of sense data, not on uas);
c = FIX_CAPACITY (decrease the reported
device capacity by one sector);
d = NO_READ_DISC_INFO (don't use
- READ_DISC_INFO command);
+ READ_DISC_INFO command, not on uas);
e = NO_READ_CAPACITY_16 (don't use
READ_CAPACITY_16 command);
f = NO_REPORT_OPCODES (don't use report opcodes
@@ -5019,17 +5019,18 @@
j = NO_REPORT_LUNS (don't use report luns
command, uas only);
l = NOT_LOCKABLE (don't try to lock and
- unlock ejectable media);
+ unlock ejectable media, not on uas);
m = MAX_SECTORS_64 (don't transfer more
- than 64 sectors = 32 KB at a time);
+ than 64 sectors = 32 KB at a time,
+ not on uas);
n = INITIAL_READ10 (force a retry of the
- initial READ(10) command);
+ initial READ(10) command, not on uas);
o = CAPACITY_OK (accept the capacity
- reported by the device);
+ reported by the device, not on uas);
p = WRITE_CACHE (the device cache is ON
- by default);
+ by default, not on uas);
r = IGNORE_RESIDUE (the device reports
- bogus residue values);
+ bogus residue values, not on uas);
s = SINGLE_LUN (the device has only one
Logical Unit);
t = NO_ATA_1X (don't allow ATA(12) and ATA(16)
@@ -5038,7 +5039,8 @@
w = NO_WP_DETECT (don't test whether the
medium is write-protected).
y = ALWAYS_SYNC (issue a SYNCHRONIZE_CACHE
- even if the device claims no cache)
+ even if the device claims no cache,
+ not on uas)
Example: quirks=0419:aaf5:rl,0421:0433:rc
user_debug= [KNL,ARM]
--
2.24.0
This is a note to let you know that I've just added the patch titled
USB: uas: heed CAPACITY_HEURISTICS
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 335cbbd5762d5e5c67a8ddd6e6362c2aa42a328f Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum(a)suse.com>
Date: Thu, 14 Nov 2019 12:27:57 +0100
Subject: USB: uas: heed CAPACITY_HEURISTICS
There is no need to ignore this flag. We should be as close
to storage in that regard as makes sense, so honor flags whose
cost is tiny.
Signed-off-by: Oliver Neukum <oneukum(a)suse.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191114112758.32747-3-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/storage/uas.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index def2d4aba549..475b9c692827 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -837,6 +837,12 @@ static int uas_slave_configure(struct scsi_device *sdev)
if (devinfo->flags & US_FL_FIX_CAPACITY)
sdev->fix_capacity = 1;
+ /*
+ * in some cases we have to guess
+ */
+ if (devinfo->flags & US_FL_CAPACITY_HEURISTICS)
+ sdev->guess_capacity = 1;
+
/*
* Some devices don't like MODE SENSE with page=0x3f,
* which is the command used for checking if a device
--
2.24.0
This is a note to let you know that I've just added the patch titled
USB: uas: honor flag to avoid CAPACITY16
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From bff000cae1eec750d62e265c4ba2db9af57b17e1 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum(a)suse.com>
Date: Thu, 14 Nov 2019 12:27:56 +0100
Subject: USB: uas: honor flag to avoid CAPACITY16
Copy the support over from usb-storage to get feature parity
Signed-off-by: Oliver Neukum <oneukum(a)suse.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20191114112758.32747-2-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/storage/uas.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 34538253f12c..def2d4aba549 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -825,6 +825,10 @@ static int uas_slave_configure(struct scsi_device *sdev)
sdev->wce_default_on = 1;
}
+ /* Some disks cannot handle READ_CAPACITY_16 */
+ if (devinfo->flags & US_FL_NO_READ_CAPACITY_16)
+ sdev->no_read_capacity_16 = 1;
+
/*
* Some disks return the total number of blocks in response
* to READ CAPACITY rather than the highest block number.
--
2.24.0