summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2020-08-31 17:11:03 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2020-08-31 17:20:50 -0400
commita85b1aa5c074bd7c0ce71d05fbec95b6e9030602 (patch)
tree0328c071b8e32d5493ed2a1a1a3467a5d4ff7e22
parentf8fc3c3298e8cf7e6cca022b3de4e4372fcfab44 (diff)
downloadlongterm-queue-5.2-a85b1aa5c074bd7c0ce71d05fbec95b6e9030602.tar.gz
add "Fixes:" from mainline for already chosen commits
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--queue/ALSA-usb-audio-Update-documentation-comment-for-MS21.patch34
-rw-r--r--queue/USB-Ignore-UAS-for-JMicron-JMS567-ATA-ATAPI-Bridge.patch36
-rw-r--r--queue/USB-quirks-Ignore-duplicate-endpoint-on-Sound-Device.patch53
-rw-r--r--queue/USB-rename-USB-quirk-to-USB_QUIRK_ENDPOINT_IGNORE.patch119
-rw-r--r--queue/bfq-fix-blkio-cgroup-leakage-v4.patch147
-rw-r--r--queue/block-blk-mq.c-fix-at_head-kernel-doc-warning.patch37
-rw-r--r--queue/block-loop-set-discard-granularity-and-alignment-for.patch107
-rw-r--r--queue/ext4-fix-checking-of-directory-entry-validity-for-in.patch (renamed from queue-next/ext4-fix-checking-of-directory-entry-validity-for-in.patch)0
-rw-r--r--queue/nvme-multipath-round-robin-fix-single-non-optimized-.patch50
-rw-r--r--queue/recordmcount-Fix-build-failure-on-non-arm64.patch42
-rw-r--r--queue/series10
11 files changed, 635 insertions, 0 deletions
diff --git a/queue/ALSA-usb-audio-Update-documentation-comment-for-MS21.patch b/queue/ALSA-usb-audio-Update-documentation-comment-for-MS21.patch
new file mode 100644
index 00000000..6b8117ec
--- /dev/null
+++ b/queue/ALSA-usb-audio-Update-documentation-comment-for-MS21.patch
@@ -0,0 +1,34 @@
+From 74a2a7de81a2ef20732ec02087314e92692a7a1b Mon Sep 17 00:00:00 2001
+From: Hector Martin <marcan@marcan.st>
+Date: Sun, 16 Aug 2020 17:44:31 +0900
+Subject: [PATCH] ALSA: usb-audio: Update documentation comment for MS2109
+ quirk
+
+commit 74a2a7de81a2ef20732ec02087314e92692a7a1b upstream.
+
+As the recent fix addressed the channel swap problem more properly,
+update the comment as well.
+
+Fixes: 1b7ecc241a67 ("ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109")
+Signed-off-by: Hector Martin <marcan@marcan.st>
+Link: https://lore.kernel.org/r/20200816084431.102151-1-marcan@marcan.st
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
+index e6202608e043..f4fb002e3ef4 100644
+--- a/sound/usb/quirks-table.h
++++ b/sound/usb/quirks-table.h
+@@ -3744,8 +3744,8 @@ ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* Asrock TRX40 Creator */
+ * they pretend to be 96kHz mono as a workaround for stereo being broken
+ * by that...
+ *
+- * They also have swapped L-R channels, but that's for userspace to deal
+- * with.
++ * They also have an issue with initial stream alignment that causes the
++ * channels to be swapped and out of phase, which is dealt with in quirks.c.
+ */
+ {
+ .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
+--
+2.27.0
+
diff --git a/queue/USB-Ignore-UAS-for-JMicron-JMS567-ATA-ATAPI-Bridge.patch b/queue/USB-Ignore-UAS-for-JMicron-JMS567-ATA-ATAPI-Bridge.patch
new file mode 100644
index 00000000..6a93a99b
--- /dev/null
+++ b/queue/USB-Ignore-UAS-for-JMicron-JMS567-ATA-ATAPI-Bridge.patch
@@ -0,0 +1,36 @@
+From 9aa37788e7ebb3f489fb4b71ce07adadd444264a Mon Sep 17 00:00:00 2001
+From: Cyril Roelandt <tipecaml@gmail.com>
+Date: Tue, 25 Aug 2020 23:22:31 +0200
+Subject: [PATCH] USB: Ignore UAS for JMicron JMS567 ATA/ATAPI Bridge
+
+commit 9aa37788e7ebb3f489fb4b71ce07adadd444264a upstream.
+
+This device does not support UAS properly and a similar entry already
+exists in drivers/usb/storage/unusual_uas.h. Without this patch,
+storage_probe() defers the handling of this device to UAS, which cannot
+handle it either.
+
+Tested-by: Brice Goglin <brice.goglin@gmail.com>
+Fixes: bc3bdb12bbb3 ("usb-storage: Disable UAS on JMicron SATA enclosure")
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+CC: <stable@vger.kernel.org>
+Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
+Link: https://lore.kernel.org/r/20200825212231.46309-1-tipecaml@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
+index 220ae2c356ee..5732e9691f08 100644
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -2328,7 +2328,7 @@ UNUSUAL_DEV( 0x357d, 0x7788, 0x0114, 0x0114,
+ "JMicron",
+ "USB to ATA/ATAPI Bridge",
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+- US_FL_BROKEN_FUA ),
++ US_FL_BROKEN_FUA | US_FL_IGNORE_UAS ),
+
+ /* Reported by Andrey Rahmatullin <wrar@altlinux.org> */
+ UNUSUAL_DEV( 0x4102, 0x1020, 0x0100, 0x0100,
+--
+2.27.0
+
diff --git a/queue/USB-quirks-Ignore-duplicate-endpoint-on-Sound-Device.patch b/queue/USB-quirks-Ignore-duplicate-endpoint-on-Sound-Device.patch
new file mode 100644
index 00000000..8be6bb74
--- /dev/null
+++ b/queue/USB-quirks-Ignore-duplicate-endpoint-on-Sound-Device.patch
@@ -0,0 +1,53 @@
+From 068834a2773b6a12805105cfadbb3d4229fc6e0a Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Wed, 26 Aug 2020 15:46:24 -0400
+Subject: [PATCH] USB: quirks: Ignore duplicate endpoint on Sound Devices
+ MixPre-D
+
+commit 068834a2773b6a12805105cfadbb3d4229fc6e0a upstream.
+
+The Sound Devices MixPre-D audio card suffers from the same defect
+as the Sound Devices USBPre2: an endpoint shared between a normal
+audio interface and a vendor-specific interface, in violation of the
+USB spec. Since the USB core now treats duplicated endpoints as bugs
+and ignores them, the audio endpoint isn't available and the card
+can't be used for audio capture.
+
+Along the same lines as commit bdd1b147b802 ("USB: quirks: blacklist
+duplicate ep on Sound Devices USBPre2"), this patch adds a quirks
+entry saying to ignore ep5in for interface 1, leaving it available for
+use with standard audio interface 2.
+
+Reported-and-tested-by: Jean-Christophe Barnoud <jcbarnoud@gmail.com>
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+CC: <stable@vger.kernel.org>
+Fixes: 3e4f8e21c4f2 ("USB: core: fix check for duplicate endpoints")
+Link: https://lore.kernel.org/r/20200826194624.GA412633@rowland.harvard.edu
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
+index d1f38956b210..f232914de5fd 100644
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -370,6 +370,10 @@ static const struct usb_device_id usb_quirk_list[] = {
+ { USB_DEVICE(0x0926, 0x0202), .driver_info =
+ USB_QUIRK_ENDPOINT_IGNORE },
+
++ /* Sound Devices MixPre-D */
++ { USB_DEVICE(0x0926, 0x0208), .driver_info =
++ USB_QUIRK_ENDPOINT_IGNORE },
++
+ /* Keytouch QWERTY Panel keyboard */
+ { USB_DEVICE(0x0926, 0x3333), .driver_info =
+ USB_QUIRK_CONFIG_INTF_STRINGS },
+@@ -511,6 +515,7 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = {
+ */
+ static const struct usb_device_id usb_endpoint_ignore[] = {
+ { USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 },
++ { USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0208, 1), .driver_info = 0x85 },
+ { }
+ };
+
+--
+2.27.0
+
diff --git a/queue/USB-rename-USB-quirk-to-USB_QUIRK_ENDPOINT_IGNORE.patch b/queue/USB-rename-USB-quirk-to-USB_QUIRK_ENDPOINT_IGNORE.patch
new file mode 100644
index 00000000..0d3fa319
--- /dev/null
+++ b/queue/USB-rename-USB-quirk-to-USB_QUIRK_ENDPOINT_IGNORE.patch
@@ -0,0 +1,119 @@
+From 91c7eaa686c3b7ae2d5b2aed22a45a02c8baa30e Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Thu, 18 Jun 2020 11:42:53 +0200
+Subject: [PATCH] USB: rename USB quirk to USB_QUIRK_ENDPOINT_IGNORE
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+commit 91c7eaa686c3b7ae2d5b2aed22a45a02c8baa30e upstream.
+
+The USB core has a quirk flag to ignore specific endpoints, so rename it
+to be more obvious what this quirk does.
+
+Cc: Johan Hovold <johan@kernel.org>
+Cc: Alan Stern <stern@rowland.harvard.edu>
+Cc: Richard Dodd <richard.o.dodd@gmail.com>
+Cc: Hans de Goede <hdegoede@redhat.com>
+Cc: Jonathan Cox <jonathan@jdcox.net>
+Cc: Bastien Nocera <hadess@hadess.net>
+Cc: "Thiébaud Weksteen" <tweek@google.com>
+Cc: Nishad Kamdar <nishadkamdar@gmail.com>
+Link: https://lore.kernel.org/r/20200618094300.1887727-2-gregkh@linuxfoundation.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
+index b7918f695434..37442f423a41 100644
+--- a/drivers/usb/core/config.c
++++ b/drivers/usb/core/config.c
+@@ -298,10 +298,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
+ goto skip_to_next_endpoint_or_interface_descriptor;
+ }
+
+- /* Ignore blacklisted endpoints */
+- if (udev->quirks & USB_QUIRK_ENDPOINT_BLACKLIST) {
+- if (usb_endpoint_is_blacklisted(udev, ifp, d)) {
+- dev_warn(ddev, "config %d interface %d altsetting %d has a blacklisted endpoint with address 0x%X, skipping\n",
++ /* Ignore some endpoints */
++ if (udev->quirks & USB_QUIRK_ENDPOINT_IGNORE) {
++ if (usb_endpoint_is_ignored(udev, ifp, d)) {
++ dev_warn(ddev, "config %d interface %d altsetting %d has an ignored endpoint with address 0x%X, skipping\n",
+ cfgno, inum, asnum,
+ d->bEndpointAddress);
+ goto skip_to_next_endpoint_or_interface_descriptor;
+diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
+index 3e8efe759c3e..20dccf34182d 100644
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -359,7 +359,7 @@ static const struct usb_device_id usb_quirk_list[] = {
+
+ /* Sound Devices USBPre2 */
+ { USB_DEVICE(0x0926, 0x0202), .driver_info =
+- USB_QUIRK_ENDPOINT_BLACKLIST },
++ USB_QUIRK_ENDPOINT_IGNORE },
+
+ /* Keytouch QWERTY Panel keyboard */
+ { USB_DEVICE(0x0926, 0x3333), .driver_info =
+@@ -493,24 +493,24 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = {
+ };
+
+ /*
+- * Entries for blacklisted endpoints that should be ignored when parsing
+- * configuration descriptors.
++ * Entries for endpoints that should be ignored when parsing configuration
++ * descriptors.
+ *
+- * Matched for devices with USB_QUIRK_ENDPOINT_BLACKLIST.
++ * Matched for devices with USB_QUIRK_ENDPOINT_IGNORE.
+ */
+-static const struct usb_device_id usb_endpoint_blacklist[] = {
++static const struct usb_device_id usb_endpoint_ignore[] = {
+ { USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 },
+ { }
+ };
+
+-bool usb_endpoint_is_blacklisted(struct usb_device *udev,
+- struct usb_host_interface *intf,
+- struct usb_endpoint_descriptor *epd)
++bool usb_endpoint_is_ignored(struct usb_device *udev,
++ struct usb_host_interface *intf,
++ struct usb_endpoint_descriptor *epd)
+ {
+ const struct usb_device_id *id;
+ unsigned int address;
+
+- for (id = usb_endpoint_blacklist; id->match_flags; ++id) {
++ for (id = usb_endpoint_ignore; id->match_flags; ++id) {
+ if (!usb_match_device(udev, id))
+ continue;
+
+diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
+index 19e4c550bc73..98e7d1ee63dc 100644
+--- a/drivers/usb/core/usb.h
++++ b/drivers/usb/core/usb.h
+@@ -37,7 +37,7 @@ extern void usb_authorize_interface(struct usb_interface *);
+ extern void usb_detect_quirks(struct usb_device *udev);
+ extern void usb_detect_interface_quirks(struct usb_device *udev);
+ extern void usb_release_quirk_list(void);
+-extern bool usb_endpoint_is_blacklisted(struct usb_device *udev,
++extern bool usb_endpoint_is_ignored(struct usb_device *udev,
+ struct usb_host_interface *intf,
+ struct usb_endpoint_descriptor *epd);
+ extern int usb_remove_device(struct usb_device *udev);
+diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h
+index 22c1f579afe3..5e4c497f54d6 100644
+--- a/include/linux/usb/quirks.h
++++ b/include/linux/usb/quirks.h
+@@ -69,7 +69,7 @@
+ /* Hub needs extra delay after resetting its port. */
+ #define USB_QUIRK_HUB_SLOW_RESET BIT(14)
+
+-/* device has blacklisted endpoints */
+-#define USB_QUIRK_ENDPOINT_BLACKLIST BIT(15)
++/* device has endpoints that should be ignored */
++#define USB_QUIRK_ENDPOINT_IGNORE BIT(15)
+
+ #endif /* __LINUX_USB_QUIRKS_H */
+--
+2.27.0
+
diff --git a/queue/bfq-fix-blkio-cgroup-leakage-v4.patch b/queue/bfq-fix-blkio-cgroup-leakage-v4.patch
new file mode 100644
index 00000000..bf1caaff
--- /dev/null
+++ b/queue/bfq-fix-blkio-cgroup-leakage-v4.patch
@@ -0,0 +1,147 @@
+From 2de791ab4918969d8108f15238a701968375f235 Mon Sep 17 00:00:00 2001
+From: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
+Date: Tue, 11 Aug 2020 06:43:40 +0000
+Subject: [PATCH] bfq: fix blkio cgroup leakage v4
+
+commit 2de791ab4918969d8108f15238a701968375f235 upstream.
+
+Changes from v1:
+ - update commit description with proper ref-accounting justification
+
+commit db37a34c563b ("block, bfq: get a ref to a group when adding it to a service tree")
+introduce leak forbfq_group and blkcg_gq objects because of get/put
+imbalance.
+In fact whole idea of original commit is wrong because bfq_group entity
+can not dissapear under us because it is referenced by child bfq_queue's
+entities from here:
+ -> bfq_init_entity()
+ ->bfqg_and_blkg_get(bfqg);
+ ->entity->parent = bfqg->my_entity
+
+ -> bfq_put_queue(bfqq)
+ FINAL_PUT
+ ->bfqg_and_blkg_put(bfqq_group(bfqq))
+ ->kmem_cache_free(bfq_pool, bfqq);
+
+So parent entity can not disappear while child entity is in tree,
+and child entities already has proper protection.
+This patch revert commit db37a34c563b ("block, bfq: get a ref to a group when adding it to a service tree")
+
+bfq_group leak trace caused by bad commit:
+-> blkg_alloc
+ -> bfq_pq_alloc
+ -> bfqg_get (+1)
+->bfq_activate_bfqq
+ ->bfq_activate_requeue_entity
+ -> __bfq_activate_entity
+ ->bfq_get_entity
+ ->bfqg_and_blkg_get (+1) <==== : Note1
+->bfq_del_bfqq_busy
+ ->bfq_deactivate_entity+0x53/0xc0 [bfq]
+ ->__bfq_deactivate_entity+0x1b8/0x210 [bfq]
+ -> bfq_forget_entity(is_in_service = true)
+ entity->on_st_or_in_serv = false <=== :Note2
+ if (is_in_service)
+ return; ==> do not touch reference
+-> blkcg_css_offline
+ -> blkcg_destroy_blkgs
+ -> blkg_destroy
+ -> bfq_pd_offline
+ -> __bfq_deactivate_entity
+ if (!entity->on_st_or_in_serv) /* true, because (Note2)
+ return false;
+ -> bfq_pd_free
+ -> bfqg_put() (-1, byt bfqg->ref == 2) because of (Note2)
+So bfq_group and blkcg_gq will leak forever, see test-case below.
+
+##TESTCASE_BEGIN:
+#!/bin/bash
+
+max_iters=${1:-100}
+#prep cgroup mounts
+mount -t tmpfs cgroup_root /sys/fs/cgroup
+mkdir /sys/fs/cgroup/blkio
+mount -t cgroup -o blkio none /sys/fs/cgroup/blkio
+
+# Prepare blkdev
+grep blkio /proc/cgroups
+truncate -s 1M img
+losetup /dev/loop0 img
+echo bfq > /sys/block/loop0/queue/scheduler
+
+grep blkio /proc/cgroups
+for ((i=0;i<max_iters;i++))
+do
+ mkdir -p /sys/fs/cgroup/blkio/a
+ echo 0 > /sys/fs/cgroup/blkio/a/cgroup.procs
+ dd if=/dev/loop0 bs=4k count=1 of=/dev/null iflag=direct 2> /dev/null
+ echo 0 > /sys/fs/cgroup/blkio/cgroup.procs
+ rmdir /sys/fs/cgroup/blkio/a
+ grep blkio /proc/cgroups
+done
+##TESTCASE_END:
+
+Fixes: db37a34c563b ("block, bfq: get a ref to a group when adding it to a service tree")
+Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
+Signed-off-by: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+
+diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
+index 68882b9b8f11..b791e2041e49 100644
+--- a/block/bfq-cgroup.c
++++ b/block/bfq-cgroup.c
+@@ -332,7 +332,7 @@ static void bfqg_put(struct bfq_group *bfqg)
+ kfree(bfqg);
+ }
+
+-void bfqg_and_blkg_get(struct bfq_group *bfqg)
++static void bfqg_and_blkg_get(struct bfq_group *bfqg)
+ {
+ /* see comments in bfq_bic_update_cgroup for why refcounting bfqg */
+ bfqg_get(bfqg);
+diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h
+index cd224aaf9f52..703895224562 100644
+--- a/block/bfq-iosched.h
++++ b/block/bfq-iosched.h
+@@ -986,7 +986,6 @@ struct bfq_group *bfq_find_set_group(struct bfq_data *bfqd,
+ struct blkcg_gq *bfqg_to_blkg(struct bfq_group *bfqg);
+ struct bfq_group *bfqq_group(struct bfq_queue *bfqq);
+ struct bfq_group *bfq_create_group_hierarchy(struct bfq_data *bfqd, int node);
+-void bfqg_and_blkg_get(struct bfq_group *bfqg);
+ void bfqg_and_blkg_put(struct bfq_group *bfqg);
+
+ #ifdef CONFIG_BFQ_GROUP_IOSCHED
+diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
+index eb0e2a6daabe..26776bdbdf36 100644
+--- a/block/bfq-wf2q.c
++++ b/block/bfq-wf2q.c
+@@ -533,9 +533,7 @@ static void bfq_get_entity(struct bfq_entity *entity)
+ bfqq->ref++;
+ bfq_log_bfqq(bfqq->bfqd, bfqq, "get_entity: %p %d",
+ bfqq, bfqq->ref);
+- } else
+- bfqg_and_blkg_get(container_of(entity, struct bfq_group,
+- entity));
++ }
+ }
+
+ /**
+@@ -649,14 +647,8 @@ static void bfq_forget_entity(struct bfq_service_tree *st,
+
+ entity->on_st_or_in_serv = false;
+ st->wsum -= entity->weight;
+- if (is_in_service)
+- return;
+-
+- if (bfqq)
++ if (bfqq && !is_in_service)
+ bfq_put_queue(bfqq);
+- else
+- bfqg_and_blkg_put(container_of(entity, struct bfq_group,
+- entity));
+ }
+
+ /**
+--
+2.27.0
+
diff --git a/queue/block-blk-mq.c-fix-at_head-kernel-doc-warning.patch b/queue/block-blk-mq.c-fix-at_head-kernel-doc-warning.patch
new file mode 100644
index 00000000..0397d7c5
--- /dev/null
+++ b/queue/block-blk-mq.c-fix-at_head-kernel-doc-warning.patch
@@ -0,0 +1,37 @@
+From 26bfeb26624071a47acb3a07097efe12044865f2 Mon Sep 17 00:00:00 2001
+From: Randy Dunlap <rdunlap@infradead.org>
+Date: Sun, 16 Aug 2020 16:39:34 -0700
+Subject: [PATCH] block: blk-mq.c: fix @at_head kernel-doc warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+commit 26bfeb26624071a47acb3a07097efe12044865f2 upstream.
+
+Fix a kernel-doc warning in block/blk-mq.c:
+
+../block/blk-mq.c:1844: warning: Function parameter or member 'at_head' not described in 'blk_mq_request_bypass_insert'
+
+Fixes: 01e99aeca397 ("blk-mq: insert passthrough request into hctx->dispatch directly")
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Cc: André Almeida <andrealmeid@collabora.com>
+Cc: Jens Axboe <axboe@kernel.dk>
+Cc: Ming Lei <ming.lei@redhat.com>
+Cc: linux-block@vger.kernel.org
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+
+diff --git a/block/blk-mq.c b/block/blk-mq.c
+index 0015a1892153..35f8d0692442 100644
+--- a/block/blk-mq.c
++++ b/block/blk-mq.c
+@@ -1834,6 +1834,7 @@ void __blk_mq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
+ /**
+ * blk_mq_request_bypass_insert - Insert a request at dispatch list.
+ * @rq: Pointer to request to be inserted.
++ * @at_head: true if the request should be inserted at the head of the list.
+ * @run_queue: If we should run the hardware queue after inserting the request.
+ *
+ * Should only be used carefully, when the caller knows we want to
+--
+2.27.0
+
diff --git a/queue/block-loop-set-discard-granularity-and-alignment-for.patch b/queue/block-loop-set-discard-granularity-and-alignment-for.patch
new file mode 100644
index 00000000..63d2d4b2
--- /dev/null
+++ b/queue/block-loop-set-discard-granularity-and-alignment-for.patch
@@ -0,0 +1,107 @@
+From bcb21c8cc9947286211327d663ace69f07d37a76 Mon Sep 17 00:00:00 2001
+From: Ming Lei <ming.lei@redhat.com>
+Date: Mon, 17 Aug 2020 18:01:30 +0800
+Subject: [PATCH] block: loop: set discard granularity and alignment for block
+ device backed loop
+
+commit bcb21c8cc9947286211327d663ace69f07d37a76 upstream.
+
+In case of block device backend, if the backend supports write zeros, the
+loop device will set queue flag of QUEUE_FLAG_DISCARD. However,
+limits.discard_granularity isn't setup, and this way is wrong,
+see the following description in Documentation/ABI/testing/sysfs-block:
+
+ A discard_granularity of 0 means that the device does not support
+ discard functionality.
+
+Especially 9b15d109a6b2 ("block: improve discard bio alignment in
+__blkdev_issue_discard()") starts to take q->limits.discard_granularity
+for computing max discard sectors. And zero discard granularity may cause
+kernel oops, or fail discard request even though the loop queue claims
+discard support via QUEUE_FLAG_DISCARD.
+
+Fix the issue by setup discard granularity and alignment.
+
+Fixes: c52abf563049 ("loop: Better discard support for block devices")
+Signed-off-by: Ming Lei <ming.lei@redhat.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Acked-by: Coly Li <colyli@suse.de>
+Cc: Hannes Reinecke <hare@suse.com>
+Cc: Xiao Ni <xni@redhat.com>
+Cc: Martin K. Petersen <martin.petersen@oracle.com>
+Cc: Evan Green <evgreen@chromium.org>
+Cc: Gwendal Grignou <gwendal@chromium.org>
+Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
+Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
+Cc: Christoph Hellwig <hch@lst.de>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+
+diff --git a/drivers/block/loop.c b/drivers/block/loop.c
+index 2f137d6ce169..3d7a1901bf28 100644
+--- a/drivers/block/loop.c
++++ b/drivers/block/loop.c
+@@ -878,6 +878,7 @@ static void loop_config_discard(struct loop_device *lo)
+ struct file *file = lo->lo_backing_file;
+ struct inode *inode = file->f_mapping->host;
+ struct request_queue *q = lo->lo_queue;
++ u32 granularity, max_discard_sectors;
+
+ /*
+ * If the backing device is a block device, mirror its zeroing
+@@ -890,11 +891,10 @@ static void loop_config_discard(struct loop_device *lo)
+ struct request_queue *backingq;
+
+ backingq = bdev_get_queue(inode->i_bdev);
+- blk_queue_max_discard_sectors(q,
+- backingq->limits.max_write_zeroes_sectors);
+
+- blk_queue_max_write_zeroes_sectors(q,
+- backingq->limits.max_write_zeroes_sectors);
++ max_discard_sectors = backingq->limits.max_write_zeroes_sectors;
++ granularity = backingq->limits.discard_granularity ?:
++ queue_physical_block_size(backingq);
+
+ /*
+ * We use punch hole to reclaim the free space used by the
+@@ -903,23 +903,26 @@ static void loop_config_discard(struct loop_device *lo)
+ * useful information.
+ */
+ } else if (!file->f_op->fallocate || lo->lo_encrypt_key_size) {
+- q->limits.discard_granularity = 0;
+- q->limits.discard_alignment = 0;
+- blk_queue_max_discard_sectors(q, 0);
+- blk_queue_max_write_zeroes_sectors(q, 0);
++ max_discard_sectors = 0;
++ granularity = 0;
+
+ } else {
+- q->limits.discard_granularity = inode->i_sb->s_blocksize;
+- q->limits.discard_alignment = 0;
+-
+- blk_queue_max_discard_sectors(q, UINT_MAX >> 9);
+- blk_queue_max_write_zeroes_sectors(q, UINT_MAX >> 9);
++ max_discard_sectors = UINT_MAX >> 9;
++ granularity = inode->i_sb->s_blocksize;
+ }
+
+- if (q->limits.max_write_zeroes_sectors)
++ if (max_discard_sectors) {
++ q->limits.discard_granularity = granularity;
++ blk_queue_max_discard_sectors(q, max_discard_sectors);
++ blk_queue_max_write_zeroes_sectors(q, max_discard_sectors);
+ blk_queue_flag_set(QUEUE_FLAG_DISCARD, q);
+- else
++ } else {
++ q->limits.discard_granularity = 0;
++ blk_queue_max_discard_sectors(q, 0);
++ blk_queue_max_write_zeroes_sectors(q, 0);
+ blk_queue_flag_clear(QUEUE_FLAG_DISCARD, q);
++ }
++ q->limits.discard_alignment = 0;
+ }
+
+ static void loop_unprepare_queue(struct loop_device *lo)
+--
+2.27.0
+
diff --git a/queue-next/ext4-fix-checking-of-directory-entry-validity-for-in.patch b/queue/ext4-fix-checking-of-directory-entry-validity-for-in.patch
index 06faa017..06faa017 100644
--- a/queue-next/ext4-fix-checking-of-directory-entry-validity-for-in.patch
+++ b/queue/ext4-fix-checking-of-directory-entry-validity-for-in.patch
diff --git a/queue/nvme-multipath-round-robin-fix-single-non-optimized-.patch b/queue/nvme-multipath-round-robin-fix-single-non-optimized-.patch
new file mode 100644
index 00000000..514a431a
--- /dev/null
+++ b/queue/nvme-multipath-round-robin-fix-single-non-optimized-.patch
@@ -0,0 +1,50 @@
+From 93eb0381e13d249a18ed4aae203291ff977e7ffb Mon Sep 17 00:00:00 2001
+From: Martin Wilck <mwilck@suse.com>
+Date: Thu, 6 Aug 2020 15:19:31 +0200
+Subject: [PATCH] nvme: multipath: round-robin: fix single non-optimized path
+ case
+
+commit 93eb0381e13d249a18ed4aae203291ff977e7ffb upstream.
+
+If there's only one usable, non-optimized path, nvme_round_robin_path()
+returns NULL, which is wrong. Fix it by falling back to "old", like in
+the single optimized path case. Also, if the active path isn't changed,
+there's no need to re-assign the pointer.
+
+Fixes: 3f6e3246db0e ("nvme-multipath: fix logic for non-optimized paths")
+Signed-off-by: Martin Wilck <mwilck@suse.com>
+Signed-off-by: Martin George <marting@netapp.com>
+Reviewed-by: Keith Busch <kbusch@kernel.org>
+Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+
+diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
+index 3ded54d2c9c6..a64dfff0d0ce 100644
+--- a/drivers/nvme/host/multipath.c
++++ b/drivers/nvme/host/multipath.c
+@@ -255,12 +255,17 @@ static struct nvme_ns *nvme_round_robin_path(struct nvme_ns_head *head,
+ fallback = ns;
+ }
+
+- /* No optimized path found, re-check the current path */
++ /*
++ * The loop above skips the current path for round-robin semantics.
++ * Fall back to the current path if either:
++ * - no other optimized path found and current is optimized,
++ * - no other usable path found and current is usable.
++ */
+ if (!nvme_path_is_disabled(old) &&
+- old->ana_state == NVME_ANA_OPTIMIZED) {
+- found = old;
+- goto out;
+- }
++ (old->ana_state == NVME_ANA_OPTIMIZED ||
++ (!fallback && old->ana_state == NVME_ANA_NONOPTIMIZED)))
++ return old;
++
+ if (!fallback)
+ return NULL;
+ found = fallback;
+--
+2.27.0
+
diff --git a/queue/recordmcount-Fix-build-failure-on-non-arm64.patch b/queue/recordmcount-Fix-build-failure-on-non-arm64.patch
new file mode 100644
index 00000000..10490625
--- /dev/null
+++ b/queue/recordmcount-Fix-build-failure-on-non-arm64.patch
@@ -0,0 +1,42 @@
+From 3df14264ad9930733a8166e5bd0eccc1727564bb Mon Sep 17 00:00:00 2001
+From: Christophe Leroy <christophe.leroy@csgroup.eu>
+Date: Mon, 10 Aug 2020 08:48:22 +0000
+Subject: [PATCH] recordmcount: Fix build failure on non arm64
+
+commit 3df14264ad9930733a8166e5bd0eccc1727564bb upstream.
+
+Commit ea0eada45632 leads to the following build failure on powerpc:
+
+ HOSTCC scripts/recordmcount
+scripts/recordmcount.c: In function 'arm64_is_fake_mcount':
+scripts/recordmcount.c:440: error: 'R_AARCH64_CALL26' undeclared (first use in this function)
+scripts/recordmcount.c:440: error: (Each undeclared identifier is reported only once
+scripts/recordmcount.c:440: error: for each function it appears in.)
+make[2]: *** [scripts/recordmcount] Error 1
+
+Make sure R_AARCH64_CALL26 is always defined.
+
+Fixes: ea0eada45632 ("recordmcount: only record relocation of type R_AARCH64_CALL26 on arm64.")
+Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
+Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+Acked-by: Gregory Herrero <gregory.herrero@oracle.com>
+Cc: Gregory Herrero <gregory.herrero@oracle.com>
+Link: https://lore.kernel.org/r/5ca1be21fa6ebf73203b45fd9aadd2bafb5e6b15.1597049145.git.christophe.leroy@csgroup.eu
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+
+diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
+index e59022b3f125..b9c2ee7ab43f 100644
+--- a/scripts/recordmcount.c
++++ b/scripts/recordmcount.c
+@@ -42,6 +42,8 @@
+ #define R_ARM_THM_CALL 10
+ #define R_ARM_CALL 28
+
++#define R_AARCH64_CALL26 283
++
+ static int fd_map; /* File descriptor for file being modified. */
+ static int mmap_failed; /* Boolean flag. */
+ static char gpfx; /* prefix for global symbol name (sometimes '_') */
+--
+2.27.0
+
diff --git a/queue/series b/queue/series
index af7021ea..5eb55765 100644
--- a/queue/series
+++ b/queue/series
@@ -224,3 +224,13 @@ xen-balloon-make-the-balloon-wait-interruptible.patch
xen-gntdev-Fix-dmabuf-import-with-non-zero-sgt-offse.patch
s390-dasd-fix-inability-to-use-DASD-with-DIAG-driver.patch
s390-gmap-improve-THP-splitting.patch
+ALSA-usb-audio-Update-documentation-comment-for-MS21.patch
+USB-Ignore-UAS-for-JMicron-JMS567-ATA-ATAPI-Bridge.patch
+USB-rename-USB-quirk-to-USB_QUIRK_ENDPOINT_IGNORE.patch
+USB-quirks-Ignore-duplicate-endpoint-on-Sound-Device.patch
+bfq-fix-blkio-cgroup-leakage-v4.patch
+block-blk-mq.c-fix-at_head-kernel-doc-warning.patch
+block-loop-set-discard-granularity-and-alignment-for.patch
+ext4-fix-checking-of-directory-entry-validity-for-in.patch
+nvme-multipath-round-robin-fix-single-non-optimized-.patch
+recordmcount-Fix-build-failure-on-non-arm64.patch