From: Sasha Levin Date: Sun, 4 Oct 2020 22:23:51 +0000 (-0400) Subject: Fixes for 4.14 X-Git-Tag: v4.19.150~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb1ee8ba351f05281870c73d8c8fe84dc1610c0e;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.14 Signed-off-by: Sasha Levin --- diff --git a/queue-4.14/drivers-net-wan-hdlc-set-skb-protocol-before-transmi.patch b/queue-4.14/drivers-net-wan-hdlc-set-skb-protocol-before-transmi.patch new file mode 100644 index 00000000000..c713b22cfa7 --- /dev/null +++ b/queue-4.14/drivers-net-wan-hdlc-set-skb-protocol-before-transmi.patch @@ -0,0 +1,106 @@ +From 5329c7eebe2c332720e1861199319aa96de12824 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 16 Sep 2020 14:25:07 -0700 +Subject: drivers/net/wan/hdlc: Set skb->protocol before transmitting + +From: Xie He + +[ Upstream commit 9fb030a70431a2a2a1b292dbf0b2f399cc072c16 ] + +This patch sets skb->protocol before transmitting frames on the HDLC +device, so that a user listening on the HDLC device with an AF_PACKET +socket will see outgoing frames' sll_protocol field correctly set and +consistent with that of incoming frames. + +1. Control frames in hdlc_cisco and hdlc_ppp + +When these drivers send control frames, skb->protocol is not set. + +This value should be set to htons(ETH_P_HDLC), because when receiving +control frames, their skb->protocol is set to htons(ETH_P_HDLC). + +When receiving, hdlc_type_trans in hdlc.h is called, which then calls +cisco_type_trans or ppp_type_trans. The skb->protocol of control frames +is set to htons(ETH_P_HDLC) so that the control frames can be received +by hdlc_rcv in hdlc.c, which calls cisco_rx or ppp_rx to process the +control frames. + +2. hdlc_fr + +When this driver sends control frames, skb->protocol is set to internal +values used in this driver. + +When this driver sends data frames (from upper stacked PVC devices), +skb->protocol is the same as that of the user data packet being sent on +the upper PVC device (for normal PVC devices), or is htons(ETH_P_802_3) +(for Ethernet-emulating PVC devices). + +However, skb->protocol for both control frames and data frames should be +set to htons(ETH_P_HDLC), because when receiving, all frames received on +the HDLC device will have their skb->protocol set to htons(ETH_P_HDLC). + +When receiving, hdlc_type_trans in hdlc.h is called, and because this +driver doesn't provide a type_trans function in struct hdlc_proto, +all frames will have their skb->protocol set to htons(ETH_P_HDLC). +The frames are then received by hdlc_rcv in hdlc.c, which calls fr_rx +to process the frames (control frames are consumed and data frames +are re-received on upper PVC devices). + +Cc: Krzysztof Halasa +Signed-off-by: Xie He +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/wan/hdlc_cisco.c | 1 + + drivers/net/wan/hdlc_fr.c | 3 +++ + drivers/net/wan/hdlc_ppp.c | 1 + + 3 files changed, 5 insertions(+) + +diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c +index 7f99fb666f196..1587789ba9343 100644 +--- a/drivers/net/wan/hdlc_cisco.c ++++ b/drivers/net/wan/hdlc_cisco.c +@@ -120,6 +120,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type, + skb_put(skb, sizeof(struct cisco_packet)); + skb->priority = TC_PRIO_CONTROL; + skb->dev = dev; ++ skb->protocol = htons(ETH_P_HDLC); + skb_reset_network_header(skb); + + dev_queue_xmit(skb); +diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c +index a09af49cd08b9..5a8dbeaf1a427 100644 +--- a/drivers/net/wan/hdlc_fr.c ++++ b/drivers/net/wan/hdlc_fr.c +@@ -435,6 +435,8 @@ static netdev_tx_t pvc_xmit(struct sk_buff *skb, struct net_device *dev) + if (pvc->state.fecn) /* TX Congestion counter */ + dev->stats.tx_compressed++; + skb->dev = pvc->frad; ++ skb->protocol = htons(ETH_P_HDLC); ++ skb_reset_network_header(skb); + dev_queue_xmit(skb); + return NETDEV_TX_OK; + } +@@ -557,6 +559,7 @@ static void fr_lmi_send(struct net_device *dev, int fullrep) + skb_put(skb, i); + skb->priority = TC_PRIO_CONTROL; + skb->dev = dev; ++ skb->protocol = htons(ETH_P_HDLC); + skb_reset_network_header(skb); + + dev_queue_xmit(skb); +diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c +index d42b861cc8965..4381e7310be02 100644 +--- a/drivers/net/wan/hdlc_ppp.c ++++ b/drivers/net/wan/hdlc_ppp.c +@@ -254,6 +254,7 @@ static void ppp_tx_cp(struct net_device *dev, u16 pid, u8 code, + + skb->priority = TC_PRIO_CONTROL; + skb->dev = dev; ++ skb->protocol = htons(ETH_P_HDLC); + skb_reset_network_header(skb); + skb_queue_tail(&tx_queue, skb); + } +-- +2.25.1 + diff --git a/queue-4.14/drivers-net-wan-hdlc_fr-add-needed_headroom-for-pvc-.patch b/queue-4.14/drivers-net-wan-hdlc_fr-add-needed_headroom-for-pvc-.patch new file mode 100644 index 00000000000..9a06c126e8a --- /dev/null +++ b/queue-4.14/drivers-net-wan-hdlc_fr-add-needed_headroom-for-pvc-.patch @@ -0,0 +1,59 @@ +From b0527c13d2b6067c49af52d1e705f4e913e95796 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 2 Sep 2020 17:06:58 -0700 +Subject: drivers/net/wan/hdlc_fr: Add needed_headroom for PVC devices + +From: Xie He + +[ Upstream commit 44a049c42681de71c783d75cd6e56b4e339488b0 ] + +PVC devices are virtual devices in this driver stacked on top of the +actual HDLC device. They are the devices normal users would use. +PVC devices have two types: normal PVC devices and Ethernet-emulating +PVC devices. + +When transmitting data with PVC devices, the ndo_start_xmit function +will prepend a header of 4 or 10 bytes. Currently this driver requests +this headroom to be reserved for normal PVC devices by setting their +hard_header_len to 10. However, this does not work when these devices +are used with AF_PACKET/RAW sockets. Also, this driver does not request +this headroom for Ethernet-emulating PVC devices (but deals with this +problem by reallocating the skb when needed, which is not optimal). + +This patch replaces hard_header_len with needed_headroom, and set +needed_headroom for Ethernet-emulating PVC devices, too. This makes +the driver to request headroom for all PVC devices in all cases. + +Cc: Krzysztof Halasa +Cc: Martin Schiller +Signed-off-by: Xie He +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/wan/hdlc_fr.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c +index 78596e42a3f3f..a09af49cd08b9 100644 +--- a/drivers/net/wan/hdlc_fr.c ++++ b/drivers/net/wan/hdlc_fr.c +@@ -1045,7 +1045,7 @@ static void pvc_setup(struct net_device *dev) + { + dev->type = ARPHRD_DLCI; + dev->flags = IFF_POINTOPOINT; +- dev->hard_header_len = 10; ++ dev->hard_header_len = 0; + dev->addr_len = 2; + netif_keep_dst(dev); + } +@@ -1097,6 +1097,7 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type) + dev->mtu = HDLC_MAX_MTU; + dev->min_mtu = 68; + dev->max_mtu = HDLC_MAX_MTU; ++ dev->needed_headroom = 10; + dev->priv_flags |= IFF_NO_QUEUE; + dev->ml_priv = pvc; + +-- +2.25.1 + diff --git a/queue-4.14/drivers-net-wan-lapbether-make-skb-protocol-consiste.patch b/queue-4.14/drivers-net-wan-lapbether-make-skb-protocol-consiste.patch new file mode 100644 index 00000000000..97d372500bc --- /dev/null +++ b/queue-4.14/drivers-net-wan-lapbether-make-skb-protocol-consiste.patch @@ -0,0 +1,58 @@ +From 698f7ab2fdba603f87ec0ed48b1f9aa8d3ce68c7 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 16 Sep 2020 09:49:18 -0700 +Subject: drivers/net/wan/lapbether: Make skb->protocol consistent with the + header + +From: Xie He + +[ Upstream commit 83f9a9c8c1edc222846dc1bde6e3479703e8e5a3 ] + +This driver is a virtual driver stacked on top of Ethernet interfaces. + +When this driver transmits data on the Ethernet device, the skb->protocol +setting is inconsistent with the Ethernet header prepended to the skb. + +This causes a user listening on the Ethernet interface with an AF_PACKET +socket, to see different sll_protocol values for incoming and outgoing +frames, because incoming frames would have this value set by parsing the +Ethernet header. + +This patch changes the skb->protocol value for outgoing Ethernet frames, +making it consistent with the Ethernet header prepended. This makes a +user listening on the Ethernet device with an AF_PACKET socket, to see +the same sll_protocol value for incoming and outgoing frames. + +Cc: Martin Schiller +Signed-off-by: Xie He +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/wan/lapbether.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c +index 15177a54b17d7..e5fc1b95cea6a 100644 +--- a/drivers/net/wan/lapbether.c ++++ b/drivers/net/wan/lapbether.c +@@ -201,8 +201,6 @@ static void lapbeth_data_transmit(struct net_device *ndev, struct sk_buff *skb) + struct net_device *dev; + int size = skb->len; + +- skb->protocol = htons(ETH_P_X25); +- + ptr = skb_push(skb, 2); + + *ptr++ = size % 256; +@@ -213,6 +211,8 @@ static void lapbeth_data_transmit(struct net_device *ndev, struct sk_buff *skb) + + skb->dev = dev = lapbeth->ethdev; + ++ skb->protocol = htons(ETH_P_DEC); ++ + skb_reset_network_header(skb); + + dev_hard_header(skb, dev, ETH_P_DEC, bcast_addr, NULL, 0); +-- +2.25.1 + diff --git a/queue-4.14/drm-sun4i-mixer-extend-regmap-max_register.patch b/queue-4.14/drm-sun4i-mixer-extend-regmap-max_register.patch new file mode 100644 index 00000000000..c76a7e8b67b --- /dev/null +++ b/queue-4.14/drm-sun4i-mixer-extend-regmap-max_register.patch @@ -0,0 +1,36 @@ +From 228dcef23aeab03c73d8e6eaaa3be2aaee5de4bd Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 6 Sep 2020 18:21:40 +0200 +Subject: drm/sun4i: mixer: Extend regmap max_register + +From: Martin Cerveny + +[ Upstream commit 74ea06164cda81dc80e97790164ca533fd7e3087 ] + +Better guess. Secondary CSC registers are from 0xF0000. + +Signed-off-by: Martin Cerveny +Reviewed-by: Jernej Skrabec +Signed-off-by: Maxime Ripard +Link: https://patchwork.freedesktop.org/patch/msgid/20200906162140.5584-3-m.cerveny@computer.org +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/sun4i/sun8i_mixer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c +index cb193c5f16862..519610e0bf660 100644 +--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c ++++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c +@@ -235,7 +235,7 @@ static struct regmap_config sun8i_mixer_regmap_config = { + .reg_bits = 32, + .val_bits = 32, + .reg_stride = 4, +- .max_register = 0xbfffc, /* guessed */ ++ .max_register = 0xffffc, /* guessed */ + }; + + static int sun8i_mixer_bind(struct device *dev, struct device *master, +-- +2.25.1 + diff --git a/queue-4.14/mac80211-do-not-allow-bigger-vht-mpdus-than-the-hard.patch b/queue-4.14/mac80211-do-not-allow-bigger-vht-mpdus-than-the-hard.patch new file mode 100644 index 00000000000..43742de1252 --- /dev/null +++ b/queue-4.14/mac80211-do-not-allow-bigger-vht-mpdus-than-the-hard.patch @@ -0,0 +1,48 @@ +From e92142386bb8316ced57c1aeae1305aeae4cf67f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 17 Sep 2020 14:50:31 +0200 +Subject: mac80211: do not allow bigger VHT MPDUs than the hardware supports + +From: Felix Fietkau + +[ Upstream commit 3bd5c7a28a7c3aba07a2d300d43f8e988809e147 ] + +Limit maximum VHT MPDU size by local capability. + +Signed-off-by: Felix Fietkau +Link: https://lore.kernel.org/r/20200917125031.45009-1-nbd@nbd.name +Signed-off-by: Johannes Berg +Signed-off-by: Sasha Levin +--- + net/mac80211/vht.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c +index 19ec2189d3acb..502b3fbb3b0f4 100644 +--- a/net/mac80211/vht.c ++++ b/net/mac80211/vht.c +@@ -170,10 +170,7 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, + /* take some capabilities as-is */ + cap_info = le32_to_cpu(vht_cap_ie->vht_cap_info); + vht_cap->cap = cap_info; +- vht_cap->cap &= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 | +- IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 | +- IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 | +- IEEE80211_VHT_CAP_RXLDPC | ++ vht_cap->cap &= IEEE80211_VHT_CAP_RXLDPC | + IEEE80211_VHT_CAP_VHT_TXOP_PS | + IEEE80211_VHT_CAP_HTC_VHT | + IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK | +@@ -182,6 +179,9 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, + IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN | + IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN; + ++ vht_cap->cap |= min_t(u32, cap_info & IEEE80211_VHT_CAP_MAX_MPDU_MASK, ++ own_cap.cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK); ++ + /* and some based on our own capabilities */ + switch (own_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) { + case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ: +-- +2.25.1 + diff --git a/queue-4.14/net-dec-de2104x-increase-receive-ring-size-for-tulip.patch b/queue-4.14/net-dec-de2104x-increase-receive-ring-size-for-tulip.patch new file mode 100644 index 00000000000..0274ea32f47 --- /dev/null +++ b/queue-4.14/net-dec-de2104x-increase-receive-ring-size-for-tulip.patch @@ -0,0 +1,43 @@ +From 2f0340a20b5cf7c7b81ff80475ab4925a836a638 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 10 Sep 2020 12:05:09 -0700 +Subject: net: dec: de2104x: Increase receive ring size for Tulip + +From: Lucy Yan + +[ Upstream commit ee460417d254d941dfea5fb7cff841f589643992 ] + +Increase Rx ring size to address issue where hardware is reaching +the receive work limit. + +Before: + +[ 102.223342] de2104x 0000:17:00.0 eth0: rx work limit reached +[ 102.245695] de2104x 0000:17:00.0 eth0: rx work limit reached +[ 102.251387] de2104x 0000:17:00.0 eth0: rx work limit reached +[ 102.267444] de2104x 0000:17:00.0 eth0: rx work limit reached + +Signed-off-by: Lucy Yan +Reviewed-by: Moritz Fischer +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/dec/tulip/de2104x.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c +index c87b8cc429638..6ca15c595f543 100644 +--- a/drivers/net/ethernet/dec/tulip/de2104x.c ++++ b/drivers/net/ethernet/dec/tulip/de2104x.c +@@ -91,7 +91,7 @@ MODULE_PARM_DESC (rx_copybreak, "de2104x Breakpoint at which Rx packets are copi + #define DSL CONFIG_DE2104X_DSL + #endif + +-#define DE_RX_RING_SIZE 64 ++#define DE_RX_RING_SIZE 128 + #define DE_TX_RING_SIZE 64 + #define DE_RING_BYTES \ + ((sizeof(struct de_desc) * DE_RX_RING_SIZE) + \ +-- +2.25.1 + diff --git a/queue-4.14/nvme-fc-fail-new-connections-to-a-deleted-host-or-re.patch b/queue-4.14/nvme-fc-fail-new-connections-to-a-deleted-host-or-re.patch new file mode 100644 index 00000000000..2a8a8eb7e84 --- /dev/null +++ b/queue-4.14/nvme-fc-fail-new-connections-to-a-deleted-host-or-re.patch @@ -0,0 +1,49 @@ +From 1b2c861fd5b5b627ef562232d6ac8a9fe0e8fd54 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 17 Sep 2020 13:33:22 -0700 +Subject: nvme-fc: fail new connections to a deleted host or remote port + +From: James Smart + +[ Upstream commit 9e0e8dac985d4bd07d9e62922b9d189d3ca2fccf ] + +The lldd may have made calls to delete a remote port or local port and +the delete is in progress when the cli then attempts to create a new +controller. Currently, this proceeds without error although it can't be +very successful. + +Fix this by validating that both the host port and remote port are +present when a new controller is to be created. + +Signed-off-by: James Smart +Reviewed-by: Himanshu Madhani +Signed-off-by: Christoph Hellwig +Signed-off-by: Sasha Levin +--- + drivers/nvme/host/fc.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c +index e95d2f75713e1..7e3f3055a6777 100644 +--- a/drivers/nvme/host/fc.c ++++ b/drivers/nvme/host/fc.c +@@ -3012,12 +3012,14 @@ nvme_fc_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts) + spin_lock_irqsave(&nvme_fc_lock, flags); + list_for_each_entry(lport, &nvme_fc_lport_list, port_list) { + if (lport->localport.node_name != laddr.nn || +- lport->localport.port_name != laddr.pn) ++ lport->localport.port_name != laddr.pn || ++ lport->localport.port_state != FC_OBJSTATE_ONLINE) + continue; + + list_for_each_entry(rport, &lport->endp_list, endp_list) { + if (rport->remoteport.node_name != raddr.nn || +- rport->remoteport.port_name != raddr.pn) ++ rport->remoteport.port_name != raddr.pn || ++ rport->remoteport.port_state != FC_OBJSTATE_ONLINE) + continue; + + /* if fail to get reference fall through. Will error */ +-- +2.25.1 + diff --git a/queue-4.14/rndis_host-increase-sleep-time-in-the-query-response.patch b/queue-4.14/rndis_host-increase-sleep-time-in-the-query-response.patch new file mode 100644 index 00000000000..2aee3fb37ba --- /dev/null +++ b/queue-4.14/rndis_host-increase-sleep-time-in-the-query-response.patch @@ -0,0 +1,49 @@ +From 052017acefe44e782658b79a29b066bee253fb85 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 11 Sep 2020 14:17:24 +0000 +Subject: rndis_host: increase sleep time in the query-response loop + +From: Olympia Giannou + +[ Upstream commit 4202c9fdf03d79dedaa94b2c4cf574f25793d669 ] + +Some WinCE devices face connectivity issues via the NDIS interface. They +fail to register, resulting in -110 timeout errors and failures during the +probe procedure. + +In this kind of WinCE devices, the Windows-side ndis driver needs quite +more time to be loaded and configured, so that the linux rndis host queries +to them fail to be responded correctly on time. + +More specifically, when INIT is called on the WinCE side - no other +requests can be served by the Client and this results in a failed QUERY +afterwards. + +The increase of the waiting time on the side of the linux rndis host in +the command-response loop leaves the INIT process to complete and respond +to a QUERY, which comes afterwards. The WinCE devices with this special +"feature" in their ndis driver are satisfied by this fix. + +Signed-off-by: Olympia Giannou +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/usb/rndis_host.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c +index b807c91abe1da..a22ae3137a3f8 100644 +--- a/drivers/net/usb/rndis_host.c ++++ b/drivers/net/usb/rndis_host.c +@@ -213,7 +213,7 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen) + dev_dbg(&info->control->dev, + "rndis response error, code %d\n", retval); + } +- msleep(20); ++ msleep(40); + } + dev_dbg(&info->control->dev, "rndis response timeout\n"); + return -ETIMEDOUT; +-- +2.25.1 + diff --git a/queue-4.14/series b/queue-4.14/series index 7b3e3ddae59..4394e236e6d 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -6,3 +6,12 @@ usb-gadget-f_ncm-fix-ndp16-datagram-validation.patch gpio-tc35894-fix-up-tc35894-interrupt-configuration.patch input-i8042-add-nopnp-quirk-for-acer-aspire-5-a515.patch drm-amdgpu-restore-proper-ref-count-in-amdgpu_display_crtc_set_config.patch +drivers-net-wan-hdlc_fr-add-needed_headroom-for-pvc-.patch +drm-sun4i-mixer-extend-regmap-max_register.patch +net-dec-de2104x-increase-receive-ring-size-for-tulip.patch +rndis_host-increase-sleep-time-in-the-query-response.patch +drivers-net-wan-lapbether-make-skb-protocol-consiste.patch +drivers-net-wan-hdlc-set-skb-protocol-before-transmi.patch +mac80211-do-not-allow-bigger-vht-mpdus-than-the-hard.patch +spi-fsl-espi-only-process-interrupts-for-expected-ev.patch +nvme-fc-fail-new-connections-to-a-deleted-host-or-re.patch diff --git a/queue-4.14/spi-fsl-espi-only-process-interrupts-for-expected-ev.patch b/queue-4.14/spi-fsl-espi-only-process-interrupts-for-expected-ev.patch new file mode 100644 index 00000000000..93bfbb56f40 --- /dev/null +++ b/queue-4.14/spi-fsl-espi-only-process-interrupts-for-expected-ev.patch @@ -0,0 +1,49 @@ +From d7aa701d93f6907bca5339d8857464e8dba871a1 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 4 Sep 2020 12:28:12 +1200 +Subject: spi: fsl-espi: Only process interrupts for expected events + +From: Chris Packham + +[ Upstream commit b867eef4cf548cd9541225aadcdcee644669b9e1 ] + +The SPIE register contains counts for the TX FIFO so any time the irq +handler was invoked we would attempt to process the RX/TX fifos. Use the +SPIM value to mask the events so that we only process interrupts that +were expected. + +This was a latent issue exposed by commit 3282a3da25bd ("powerpc/64: +Implement soft interrupt replay in C"). + +Signed-off-by: Chris Packham +Link: https://lore.kernel.org/r/20200904002812.7300-1-chris.packham@alliedtelesis.co.nz +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + drivers/spi/spi-fsl-espi.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c +index 1d332e23f6ede..6a39ba5840c2e 100644 +--- a/drivers/spi/spi-fsl-espi.c ++++ b/drivers/spi/spi-fsl-espi.c +@@ -556,13 +556,14 @@ static void fsl_espi_cpu_irq(struct fsl_espi *espi, u32 events) + static irqreturn_t fsl_espi_irq(s32 irq, void *context_data) + { + struct fsl_espi *espi = context_data; +- u32 events; ++ u32 events, mask; + + spin_lock(&espi->lock); + + /* Get interrupt events(tx/rx) */ + events = fsl_espi_read_reg(espi, ESPI_SPIE); +- if (!events) { ++ mask = fsl_espi_read_reg(espi, ESPI_SPIM); ++ if (!(events & mask)) { + spin_unlock(&espi->lock); + return IRQ_NONE; + } +-- +2.25.1 +