From: Greg Kroah-Hartman Date: Mon, 18 Jul 2022 15:30:45 +0000 (+0200) Subject: 5.18-stable patches X-Git-Tag: v4.9.324~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ddf3c342bebb2ef1107fe447d8c180b8501c7308;p=thirdparty%2Fkernel%2Fstable-queue.git 5.18-stable patches added patches: gpio-sim-fix-the-chip_name-configfs-item.patch tty-serial-samsung_tty-set-dma-burst_size-to-1.patch usb-dwc3-gadget-fix-event-pending-check.patch usb-serial-ftdi_sio-add-belimo-device-ids.patch usb-typec-add-missing-uevent-when-partner-support-pd.patch --- diff --git a/queue-5.18/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch b/queue-5.18/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch index c5def8dd146..9e727616ef5 100644 --- a/queue-5.18/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch +++ b/queue-5.18/alsa-hda-realtek-enable-the-headset-mic-on-a-xiaomi-s-laptop.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c -@@ -9424,6 +9424,7 @@ static const struct snd_pci_quirk alc269 +@@ -9425,6 +9425,7 @@ static const struct snd_pci_quirk alc269 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC), diff --git a/queue-5.18/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc671.patch b/queue-5.18/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc671.patch index 4c4159b17f5..ad06d24b81b 100644 --- a/queue-5.18/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc671.patch +++ b/queue-5.18/alsa-hda-realtek-fix-headset-mic-problem-for-a-hp-machine-with-alc671.patch @@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c -@@ -11270,6 +11270,7 @@ static const struct snd_pci_quirk alc662 +@@ -11271,6 +11271,7 @@ static const struct snd_pci_quirk alc662 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB), SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2), diff --git a/queue-5.18/alsa-usb-audio-add-quirk-for-fiero-sc-01-fw-v1.0.0.patch b/queue-5.18/alsa-usb-audio-add-quirk-for-fiero-sc-01-fw-v1.0.0.patch index ef7a01bce54..9a1d250e943 100644 --- a/queue-5.18/alsa-usb-audio-add-quirk-for-fiero-sc-01-fw-v1.0.0.patch +++ b/queue-5.18/alsa-usb-audio-add-quirk-for-fiero-sc-01-fw-v1.0.0.patch @@ -167,7 +167,7 @@ Signed-off-by: Sasha Levin USB_DEVICE(0x2b53, 0x0031), --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c -@@ -1911,6 +1911,10 @@ static const struct usb_audio_quirk_flag +@@ -1915,6 +1915,10 @@ static const struct usb_audio_quirk_flag QUIRK_FLAG_ALIGN_TRANSFER), DEVICE_FLG(0x1224, 0x2a25, /* Jieli Technology USB PHY 2.0 */ QUIRK_FLAG_GET_SAMPLE_RATE), diff --git a/queue-5.18/alsa-usb-audio-add-quirk-for-fiero-sc-01.patch b/queue-5.18/alsa-usb-audio-add-quirk-for-fiero-sc-01.patch index 609a9eb14f5..d2d51761bfc 100644 --- a/queue-5.18/alsa-usb-audio-add-quirk-for-fiero-sc-01.patch +++ b/queue-5.18/alsa-usb-audio-add-quirk-for-fiero-sc-01.patch @@ -124,7 +124,7 @@ Signed-off-by: Sasha Levin #undef USB_AUDIO_DEVICE --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c -@@ -1911,6 +1911,8 @@ static const struct usb_audio_quirk_flag +@@ -1915,6 +1915,8 @@ static const struct usb_audio_quirk_flag QUIRK_FLAG_ALIGN_TRANSFER), DEVICE_FLG(0x1224, 0x2a25, /* Jieli Technology USB PHY 2.0 */ QUIRK_FLAG_GET_SAMPLE_RATE), diff --git a/queue-5.18/alsa-usb-audio-add-quirks-for-macrosilicon-ms2100-ms.patch b/queue-5.18/alsa-usb-audio-add-quirks-for-macrosilicon-ms2100-ms.patch index f7e0403ab61..436c5833fec 100644 --- a/queue-5.18/alsa-usb-audio-add-quirks-for-macrosilicon-ms2100-ms.patch +++ b/queue-5.18/alsa-usb-audio-add-quirks-for-macrosilicon-ms2100-ms.patch @@ -87,7 +87,7 @@ Signed-off-by: Sasha Levin case USB_ID(0x534d, 0x2109): /* MacroSilicon MS2109 */ subs->stream_offset_adj = 2; break; -@@ -1904,6 +1905,8 @@ static const struct usb_audio_quirk_flag +@@ -1908,6 +1909,8 @@ static const struct usb_audio_quirk_flag QUIRK_FLAG_IGNORE_CTL_ERROR), DEVICE_FLG(0x413c, 0xa506, /* Dell AE515 sound bar */ QUIRK_FLAG_GET_SAMPLE_RATE), diff --git a/queue-5.18/asoc-codecs-rt700-rt711-rt711-sdca-initialize-workqu.patch b/queue-5.18/asoc-codecs-rt700-rt711-rt711-sdca-initialize-workqu.patch index 364476721dd..0b6bdc6d95c 100644 --- a/queue-5.18/asoc-codecs-rt700-rt711-rt711-sdca-initialize-workqu.patch +++ b/queue-5.18/asoc-codecs-rt700-rt711-rt711-sdca-initialize-workqu.patch @@ -29,7 +29,7 @@ Signed-off-by: Sasha Levin --- a/sound/soc/codecs/rt700.c +++ b/sound/soc/codecs/rt700.c -@@ -1114,6 +1114,11 @@ int rt700_init(struct device *dev, struc +@@ -1124,6 +1124,11 @@ int rt700_init(struct device *dev, struc mutex_init(&rt700->disable_irq_lock); @@ -41,7 +41,7 @@ Signed-off-by: Sasha Levin /* * Mark hw_init to false * HW init will be performed when device reports present -@@ -1208,13 +1213,6 @@ int rt700_io_init(struct device *dev, st +@@ -1218,13 +1223,6 @@ int rt700_io_init(struct device *dev, st /* Finish Initial Settings, set power to D3 */ regmap_write(rt700->regmap, RT700_SET_AUDIO_POWER_STATE, AC_PWRST_D3); @@ -57,7 +57,7 @@ Signed-off-by: Sasha Levin * we set up the jack detection function now --- a/sound/soc/codecs/rt711-sdca.c +++ b/sound/soc/codecs/rt711-sdca.c -@@ -1414,6 +1414,9 @@ int rt711_sdca_init(struct device *dev, +@@ -1417,6 +1417,9 @@ int rt711_sdca_init(struct device *dev, mutex_init(&rt711->calibrate_mutex); mutex_init(&rt711->disable_irq_lock); @@ -67,7 +67,7 @@ Signed-off-by: Sasha Levin /* * Mark hw_init to false * HW init will be performed when device reports present -@@ -1545,13 +1548,6 @@ int rt711_sdca_io_init(struct device *de +@@ -1548,13 +1551,6 @@ int rt711_sdca_io_init(struct device *de rt711_sdca_index_update_bits(rt711, RT711_VENDOR_HDA_CTL, RT711_PUSH_BTN_INT_CTL0, 0x20, 0x00); @@ -83,7 +83,7 @@ Signed-off-by: Sasha Levin if (ret < 0) --- a/sound/soc/codecs/rt711.c +++ b/sound/soc/codecs/rt711.c -@@ -1206,6 +1206,10 @@ int rt711_init(struct device *dev, struc +@@ -1209,6 +1209,10 @@ int rt711_init(struct device *dev, struc mutex_init(&rt711->calibrate_mutex); mutex_init(&rt711->disable_irq_lock); @@ -94,7 +94,7 @@ Signed-off-by: Sasha Levin /* * Mark hw_init to false * HW init will be performed when device reports present -@@ -1313,14 +1317,8 @@ int rt711_io_init(struct device *dev, st +@@ -1316,14 +1320,8 @@ int rt711_io_init(struct device *dev, st if (rt711->first_hw_init) rt711_calibration(rt711); diff --git a/queue-5.18/asoc-rt711-fix-calibrate-mutex-initialization.patch b/queue-5.18/asoc-rt711-fix-calibrate-mutex-initialization.patch index 42a7eeeda2c..527364789a3 100644 --- a/queue-5.18/asoc-rt711-fix-calibrate-mutex-initialization.patch +++ b/queue-5.18/asoc-rt711-fix-calibrate-mutex-initialization.patch @@ -35,7 +35,7 @@ Signed-off-by: Sasha Levin --- a/sound/soc/codecs/rt711.c +++ b/sound/soc/codecs/rt711.c -@@ -1203,6 +1203,7 @@ int rt711_init(struct device *dev, struc +@@ -1206,6 +1206,7 @@ int rt711_init(struct device *dev, struc rt711->sdw_regmap = sdw_regmap; rt711->regmap = regmap; @@ -43,7 +43,7 @@ Signed-off-by: Sasha Levin mutex_init(&rt711->disable_irq_lock); /* -@@ -1317,7 +1318,6 @@ int rt711_io_init(struct device *dev, st +@@ -1320,7 +1321,6 @@ int rt711_io_init(struct device *dev, st rt711_jack_detect_handler); INIT_DELAYED_WORK(&rt711->jack_btn_check_work, rt711_btn_check_handler); diff --git a/queue-5.18/asoc-rt711-sdca-sdw-fix-calibrate-mutex-initializati.patch b/queue-5.18/asoc-rt711-sdca-sdw-fix-calibrate-mutex-initializati.patch index 9408a32cf28..a190b4872be 100644 --- a/queue-5.18/asoc-rt711-sdca-sdw-fix-calibrate-mutex-initializati.patch +++ b/queue-5.18/asoc-rt711-sdca-sdw-fix-calibrate-mutex-initializati.patch @@ -45,7 +45,7 @@ Signed-off-by: Sasha Levin --- a/sound/soc/codecs/rt711-sdca.c +++ b/sound/soc/codecs/rt711-sdca.c -@@ -1411,6 +1411,7 @@ int rt711_sdca_init(struct device *dev, +@@ -1414,6 +1414,7 @@ int rt711_sdca_init(struct device *dev, rt711->regmap = regmap; rt711->mbq_regmap = mbq_regmap; @@ -53,7 +53,7 @@ Signed-off-by: Sasha Levin mutex_init(&rt711->disable_irq_lock); /* -@@ -1549,7 +1550,6 @@ int rt711_sdca_io_init(struct device *de +@@ -1552,7 +1553,6 @@ int rt711_sdca_io_init(struct device *de rt711_sdca_jack_detect_handler); INIT_DELAYED_WORK(&rt711->jack_btn_check_work, rt711_sdca_btn_check_handler); diff --git a/queue-5.18/drm-amd-display-ensure-valid-event-timestamp-for-cur.patch b/queue-5.18/drm-amd-display-ensure-valid-event-timestamp-for-cur.patch index 99c1893faa6..49ad24dd1f6 100644 --- a/queue-5.18/drm-amd-display-ensure-valid-event-timestamp-for-cur.patch +++ b/queue-5.18/drm-amd-display-ensure-valid-event-timestamp-for-cur.patch @@ -68,7 +68,7 @@ Signed-off-by: Sasha Levin /** * Following stuff must happen at start of vblank, for crc -@@ -9202,6 +9222,7 @@ static void amdgpu_dm_commit_planes(stru +@@ -9199,6 +9219,7 @@ static void amdgpu_dm_commit_planes(stru struct amdgpu_bo *abo; uint32_t target_vblank, last_flip_vblank; bool vrr_active = amdgpu_dm_vrr_active(acrtc_state); @@ -76,7 +76,7 @@ Signed-off-by: Sasha Levin bool pflip_present = false; struct { struct dc_surface_update surface_updates[MAX_SURFACES]; -@@ -9237,8 +9258,13 @@ static void amdgpu_dm_commit_planes(stru +@@ -9234,8 +9255,13 @@ static void amdgpu_dm_commit_planes(stru struct dm_plane_state *dm_new_plane_state = to_dm_plane_state(new_plane_state); /* Cursor plane is handled after stream updates */ @@ -91,7 +91,7 @@ Signed-off-by: Sasha Levin if (!fb || !crtc || pcrtc != crtc) continue; -@@ -9400,6 +9426,17 @@ static void amdgpu_dm_commit_planes(stru +@@ -9397,6 +9423,17 @@ static void amdgpu_dm_commit_planes(stru bundle->stream_update.vrr_infopacket = &acrtc_state->stream->vrr_infopacket; } diff --git a/queue-5.18/fbdev-disable-sysfb-device-registration-when-removin.patch b/queue-5.18/fbdev-disable-sysfb-device-registration-when-removin.patch index c69e0b7ffad..d69a56f503d 100644 --- a/queue-5.18/fbdev-disable-sysfb-device-registration-when-removin.patch +++ b/queue-5.18/fbdev-disable-sysfb-device-registration-when-removin.patch @@ -42,7 +42,7 @@ Signed-off-by: Sasha Levin #include #include #include -@@ -1775,6 +1776,17 @@ int remove_conflicting_framebuffers(stru +@@ -1787,6 +1788,17 @@ int remove_conflicting_framebuffers(stru do_free = true; } diff --git a/queue-5.18/gpio-sim-fix-the-chip_name-configfs-item.patch b/queue-5.18/gpio-sim-fix-the-chip_name-configfs-item.patch new file mode 100644 index 00000000000..65ad733c35a --- /dev/null +++ b/queue-5.18/gpio-sim-fix-the-chip_name-configfs-item.patch @@ -0,0 +1,77 @@ +From 7329b071729645e243b6207e76bca2f4951c991b Mon Sep 17 00:00:00 2001 +From: Bartosz Golaszewski +Date: Tue, 12 Jul 2022 09:40:55 +0200 +Subject: gpio: sim: fix the chip_name configfs item + +From: Bartosz Golaszewski + +commit 7329b071729645e243b6207e76bca2f4951c991b upstream. + +The chip_name configs attribute always displays the device name of the +first GPIO bank because the logic of the relevant function is simply +wrong. + +Fix it by correctly comparing the bank's swnode against the GPIO +device's children. + +Fixes: cb8c474e79be ("gpio: sim: new testing module") +Cc: stable@vger.kernel.org +Reported-by: Kent Gibson +Signed-off-by: Bartosz Golaszewski +Reviewed-by: Andy Shevchenko +Reviewed-by: Kent Gibson +Tested-by: Kent Gibson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpio/gpio-sim.c | 16 +++++----------- + 1 file changed, 5 insertions(+), 11 deletions(-) + +diff --git a/drivers/gpio/gpio-sim.c b/drivers/gpio/gpio-sim.c +index 98109839102f..1020c2feb249 100644 +--- a/drivers/gpio/gpio-sim.c ++++ b/drivers/gpio/gpio-sim.c +@@ -991,28 +991,22 @@ static struct configfs_attribute *gpio_sim_device_config_attrs[] = { + }; + + struct gpio_sim_chip_name_ctx { +- struct gpio_sim_device *dev; ++ struct fwnode_handle *swnode; + char *page; + }; + + static int gpio_sim_emit_chip_name(struct device *dev, void *data) + { + struct gpio_sim_chip_name_ctx *ctx = data; +- struct fwnode_handle *swnode; +- struct gpio_sim_bank *bank; + + /* This would be the sysfs device exported in /sys/class/gpio. */ + if (dev->class) + return 0; + +- swnode = dev_fwnode(dev); ++ if (device_match_fwnode(dev, ctx->swnode)) ++ return sprintf(ctx->page, "%s\n", dev_name(dev)); + +- list_for_each_entry(bank, &ctx->dev->bank_list, siblings) { +- if (bank->swnode == swnode) +- return sprintf(ctx->page, "%s\n", dev_name(dev)); +- } +- +- return -ENODATA; ++ return 0; + } + + static ssize_t gpio_sim_bank_config_chip_name_show(struct config_item *item, +@@ -1020,7 +1014,7 @@ static ssize_t gpio_sim_bank_config_chip_name_show(struct config_item *item, + { + struct gpio_sim_bank *bank = to_gpio_sim_bank(item); + struct gpio_sim_device *dev = gpio_sim_bank_get_device(bank); +- struct gpio_sim_chip_name_ctx ctx = { dev, page }; ++ struct gpio_sim_chip_name_ctx ctx = { bank->swnode, page }; + int ret; + + mutex_lock(&dev->lock); +-- +2.37.1 + diff --git a/queue-5.18/mptcp-fix-subflow-traversal-at-disconnect-time.patch b/queue-5.18/mptcp-fix-subflow-traversal-at-disconnect-time.patch index bf30b7e15de..c4a7868d1ad 100644 --- a/queue-5.18/mptcp-fix-subflow-traversal-at-disconnect-time.patch +++ b/queue-5.18/mptcp-fix-subflow-traversal-at-disconnect-time.patch @@ -29,7 +29,7 @@ Signed-off-by: Sasha Levin --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c -@@ -2830,12 +2830,12 @@ static void mptcp_copy_inaddrs(struct so +@@ -2840,12 +2840,12 @@ static void mptcp_copy_inaddrs(struct so static int mptcp_disconnect(struct sock *sk, int flags) { diff --git a/queue-5.18/netfilter-nf_tables-replace-bug_on-by-element-length.patch b/queue-5.18/netfilter-nf_tables-replace-bug_on-by-element-length.patch index 10ff4abb9b4..2a9f2561b54 100644 --- a/queue-5.18/netfilter-nf_tables-replace-bug_on-by-element-length.patch +++ b/queue-5.18/netfilter-nf_tables-replace-bug_on-by-element-length.patch @@ -53,7 +53,7 @@ Signed-off-by: Sasha Levin static inline void nft_set_ext_init(struct nft_set_ext *ext, --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -5824,8 +5824,11 @@ static int nft_add_set_elem(struct nft_c +@@ -5831,8 +5831,11 @@ static int nft_add_set_elem(struct nft_c if (!nla[NFTA_SET_ELEM_KEY] && !(flags & NFT_SET_ELEM_CATCHALL)) return -EINVAL; @@ -67,7 +67,7 @@ Signed-off-by: Sasha Levin if (set->flags & NFT_SET_MAP) { if (nla[NFTA_SET_ELEM_DATA] == NULL && -@@ -5934,7 +5937,9 @@ static int nft_add_set_elem(struct nft_c +@@ -5941,7 +5944,9 @@ static int nft_add_set_elem(struct nft_c if (err < 0) goto err_set_elem_expr; @@ -78,7 +78,7 @@ Signed-off-by: Sasha Levin } if (nla[NFTA_SET_ELEM_KEY_END]) { -@@ -5943,22 +5948,31 @@ static int nft_add_set_elem(struct nft_c +@@ -5950,22 +5955,31 @@ static int nft_add_set_elem(struct nft_c if (err < 0) goto err_parse_key; @@ -117,7 +117,7 @@ Signed-off-by: Sasha Levin } if (nla[NFTA_SET_ELEM_OBJREF] != NULL) { -@@ -5973,7 +5987,9 @@ static int nft_add_set_elem(struct nft_c +@@ -5980,7 +5994,9 @@ static int nft_add_set_elem(struct nft_c err = PTR_ERR(obj); goto err_parse_key_end; } @@ -128,7 +128,7 @@ Signed-off-by: Sasha Levin } if (nla[NFTA_SET_ELEM_DATA] != NULL) { -@@ -6007,7 +6023,9 @@ static int nft_add_set_elem(struct nft_c +@@ -6014,7 +6030,9 @@ static int nft_add_set_elem(struct nft_c NFT_VALIDATE_NEED); } @@ -139,7 +139,7 @@ Signed-off-by: Sasha Levin } /* The full maximum length of userdata can exceed the maximum -@@ -6017,9 +6035,12 @@ static int nft_add_set_elem(struct nft_c +@@ -6024,9 +6042,12 @@ static int nft_add_set_elem(struct nft_c ulen = 0; if (nla[NFTA_SET_ELEM_USERDATA] != NULL) { ulen = nla_len(nla[NFTA_SET_ELEM_USERDATA]); @@ -155,7 +155,7 @@ Signed-off-by: Sasha Levin } err = -ENOMEM; -@@ -6245,8 +6266,11 @@ static int nft_del_setelem(struct nft_ct +@@ -6252,8 +6273,11 @@ static int nft_del_setelem(struct nft_ct nft_set_ext_prepare(&tmpl); @@ -169,7 +169,7 @@ Signed-off-by: Sasha Levin if (nla[NFTA_SET_ELEM_KEY]) { err = nft_setelem_parse_key(ctx, set, &elem.key.val, -@@ -6254,16 +6278,20 @@ static int nft_del_setelem(struct nft_ct +@@ -6261,16 +6285,20 @@ static int nft_del_setelem(struct nft_ct if (err < 0) return err; @@ -193,7 +193,7 @@ Signed-off-by: Sasha Levin } err = -ENOMEM; -@@ -6271,7 +6299,7 @@ static int nft_del_setelem(struct nft_ct +@@ -6278,7 +6306,7 @@ static int nft_del_setelem(struct nft_ct elem.key_end.val.data, NULL, 0, 0, GFP_KERNEL_ACCOUNT); if (elem.priv == NULL) @@ -202,7 +202,7 @@ Signed-off-by: Sasha Levin ext = nft_set_elem_ext(set, elem.priv); if (flags) -@@ -6295,6 +6323,8 @@ fail_ops: +@@ -6302,6 +6330,8 @@ fail_ops: kfree(trans); fail_trans: kfree(elem.priv); diff --git a/queue-5.18/nexthop-fix-data-races-around-nexthop_compat_mode.patch b/queue-5.18/nexthop-fix-data-races-around-nexthop_compat_mode.patch index aec2c27c043..541a4e45f73 100644 --- a/queue-5.18/nexthop-fix-data-races-around-nexthop_compat_mode.patch +++ b/queue-5.18/nexthop-fix-data-races-around-nexthop_compat_mode.patch @@ -54,7 +54,7 @@ Signed-off-by: Sasha Levin --- a/net/ipv6/route.c +++ b/net/ipv6/route.c -@@ -5730,7 +5730,7 @@ static int rt6_fill_node(struct net *net +@@ -5737,7 +5737,7 @@ static int rt6_fill_node(struct net *net if (nexthop_is_blackhole(rt->nh)) rtm->rtm_type = RTN_BLACKHOLE; diff --git a/queue-5.18/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch b/queue-5.18/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch index 9d132516b8c..687961e9a64 100644 --- a/queue-5.18/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch +++ b/queue-5.18/nfc-nxp-nci-don-t-print-header-length-mismatch-on-i2.patch @@ -32,8 +32,8 @@ Signed-off-by: Sasha Levin nfc_err(&client->dev, "Invalid frame length: %u (expected %zu)\n", r, frame_len); -@@ -163,7 +165,9 @@ static int nxp_nci_i2c_nci_read(struct n - skb_put_data(*skb, (void *)&header, NCI_CTRL_HDR_SIZE); +@@ -166,7 +168,9 @@ static int nxp_nci_i2c_nci_read(struct n + return 0; r = i2c_master_recv(client, skb_put(*skb, header.plen), header.plen); - if (r != header.plen) { diff --git a/queue-5.18/platform-x86-thinkpad-acpi-profile-capabilities-as-i.patch b/queue-5.18/platform-x86-thinkpad-acpi-profile-capabilities-as-i.patch index 970918fc20e..c296cce812a 100644 --- a/queue-5.18/platform-x86-thinkpad-acpi-profile-capabilities-as-i.patch +++ b/queue-5.18/platform-x86-thinkpad-acpi-profile-capabilities-as-i.patch @@ -26,7 +26,7 @@ Signed-off-by: Sasha Levin --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c -@@ -10299,21 +10299,15 @@ static struct ibm_struct proxsensor_driv +@@ -10300,21 +10300,15 @@ static struct ibm_struct proxsensor_driv #define DYTC_DISABLE_CQL DYTC_SET_COMMAND(DYTC_FUNCTION_CQL, DYTC_MODE_MMC_BALANCE, 0) #define DYTC_ENABLE_CQL DYTC_SET_COMMAND(DYTC_FUNCTION_CQL, DYTC_MODE_MMC_BALANCE, 1) @@ -50,7 +50,7 @@ Signed-off-by: Sasha Levin switch (dytcmode) { case DYTC_MODE_MMC_LOWPOWER: *profile = PLATFORM_PROFILE_LOW_POWER; -@@ -10330,7 +10324,7 @@ static int convert_dytc_to_profile(int d +@@ -10331,7 +10325,7 @@ static int convert_dytc_to_profile(int d } return 0; } @@ -59,7 +59,7 @@ Signed-off-by: Sasha Levin switch (dytcmode) { case DYTC_MODE_PSC_LOWPOWER: *profile = PLATFORM_PROFILE_LOW_POWER; -@@ -10352,21 +10346,21 @@ static int convert_profile_to_dytc(enum +@@ -10353,21 +10347,21 @@ static int convert_profile_to_dytc(enum { switch (profile) { case PLATFORM_PROFILE_LOW_POWER: @@ -87,7 +87,7 @@ Signed-off-by: Sasha Levin *perfmode = DYTC_MODE_PSC_PERFORM; break; default: /* Unknown profile */ -@@ -10445,7 +10439,7 @@ static int dytc_profile_set(struct platf +@@ -10446,7 +10440,7 @@ static int dytc_profile_set(struct platf if (err) goto unlock; @@ -96,7 +96,7 @@ Signed-off-by: Sasha Levin if (profile == PLATFORM_PROFILE_BALANCED) { /* * To get back to balanced mode we need to issue a reset command. -@@ -10464,7 +10458,7 @@ static int dytc_profile_set(struct platf +@@ -10465,7 +10459,7 @@ static int dytc_profile_set(struct platf goto unlock; } } @@ -105,7 +105,7 @@ Signed-off-by: Sasha Levin err = dytc_command(DYTC_SET_COMMAND(DYTC_FUNCTION_PSC, perfmode, 1), &output); if (err) goto unlock; -@@ -10483,12 +10477,12 @@ static void dytc_profile_refresh(void) +@@ -10484,12 +10478,12 @@ static void dytc_profile_refresh(void) int perfmode; mutex_lock(&dytc_mutex); @@ -120,7 +120,7 @@ Signed-off-by: Sasha Levin err = dytc_command(DYTC_CMD_GET, &output); mutex_unlock(&dytc_mutex); -@@ -10517,7 +10511,6 @@ static int tpacpi_dytc_profile_init(stru +@@ -10518,7 +10512,6 @@ static int tpacpi_dytc_profile_init(stru set_bit(PLATFORM_PROFILE_BALANCED, dytc_profile.choices); set_bit(PLATFORM_PROFILE_PERFORMANCE, dytc_profile.choices); @@ -128,7 +128,7 @@ Signed-off-by: Sasha Levin err = dytc_command(DYTC_CMD_QUERY, &output); if (err) return err; -@@ -10530,13 +10523,12 @@ static int tpacpi_dytc_profile_init(stru +@@ -10531,13 +10524,12 @@ static int tpacpi_dytc_profile_init(stru return -ENODEV; /* Check what capabilities are supported */ @@ -145,7 +145,7 @@ Signed-off-by: Sasha Levin /* * Check if MMC_GET functionality available * Version > 6 and return success from MMC_GET command -@@ -10547,8 +10539,8 @@ static int tpacpi_dytc_profile_init(stru +@@ -10548,8 +10540,8 @@ static int tpacpi_dytc_profile_init(stru if (!err && ((output & DYTC_ERR_MASK) == DYTC_ERR_SUCCESS)) dytc_mmc_get_available = true; } @@ -156,7 +156,7 @@ Signed-off-by: Sasha Levin } else { dbg_printk(TPACPI_DBG_INIT, "No DYTC support available\n"); return -ENODEV; -@@ -10574,7 +10566,6 @@ static int tpacpi_dytc_profile_init(stru +@@ -10575,7 +10567,6 @@ static int tpacpi_dytc_profile_init(stru static void dytc_profile_exit(void) { diff --git a/queue-5.18/platform-x86-thinkpad_acpi-do-not-use-psc-mode-on-in.patch b/queue-5.18/platform-x86-thinkpad_acpi-do-not-use-psc-mode-on-in.patch index ccd72b1c39a..65bd61146f2 100644 --- a/queue-5.18/platform-x86-thinkpad_acpi-do-not-use-psc-mode-on-in.patch +++ b/queue-5.18/platform-x86-thinkpad_acpi-do-not-use-psc-mode-on-in.patch @@ -26,7 +26,7 @@ Signed-off-by: Sasha Levin --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c -@@ -10540,6 +10540,11 @@ static int tpacpi_dytc_profile_init(stru +@@ -10541,6 +10541,11 @@ static int tpacpi_dytc_profile_init(stru dytc_mmc_get_available = true; } } else if (dytc_capabilities & BIT(DYTC_FC_PSC)) { /* PSC MODE */ diff --git a/queue-5.18/series b/queue-5.18/series index bd3f96a2ab8..1e39445c259 100644 --- a/queue-5.18/series +++ b/queue-5.18/series @@ -1,3 +1,8 @@ +usb-serial-ftdi_sio-add-belimo-device-ids.patch +usb-typec-add-missing-uevent-when-partner-support-pd.patch +usb-dwc3-gadget-fix-event-pending-check.patch +gpio-sim-fix-the-chip_name-configfs-item.patch +tty-serial-samsung_tty-set-dma-burst_size-to-1.patch x86-xen-use-clear_bss-for-xen-pv-guests.patch alsa-hda-add-fixup-for-dell-latitidue-e5430.patch alsa-hda-conexant-apply-quirk-for-another-hp-prodesk-600-g3-model.patch diff --git a/queue-5.18/signal-handling-don-t-use-bug_on-for-debugging.patch b/queue-5.18/signal-handling-don-t-use-bug_on-for-debugging.patch index 47c36d81a82..e6200e5dca6 100644 --- a/queue-5.18/signal-handling-don-t-use-bug_on-for-debugging.patch +++ b/queue-5.18/signal-handling-don-t-use-bug_on-for-debugging.patch @@ -25,14 +25,12 @@ for writing). Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- - kernel/signal.c | 8 ++++---- + kernel/signal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff --git a/kernel/signal.c b/kernel/signal.c -index e43bc2a692f5..75cc2339d83e 100644 --- a/kernel/signal.c +++ b/kernel/signal.c -@@ -2031,12 +2031,12 @@ bool do_notify_parent(struct task_struct *tsk, int sig) +@@ -2031,12 +2031,12 @@ bool do_notify_parent(struct task_struct bool autoreap = false; u64 utime, stime; @@ -49,6 +47,3 @@ index e43bc2a692f5..75cc2339d83e 100644 (tsk->group_leader != tsk || !thread_group_empty(tsk))); /* Wake up all pidfd waiters */ --- -2.35.1 - diff --git a/queue-5.18/tty-serial-samsung_tty-set-dma-burst_size-to-1.patch b/queue-5.18/tty-serial-samsung_tty-set-dma-burst_size-to-1.patch new file mode 100644 index 00000000000..2df56f8531a --- /dev/null +++ b/queue-5.18/tty-serial-samsung_tty-set-dma-burst_size-to-1.patch @@ -0,0 +1,45 @@ +From f7e35e4bf1e8dc2c8cbd5e0955dc1bd58558dae0 Mon Sep 17 00:00:00 2001 +From: Chanho Park +Date: Mon, 27 Jun 2022 15:51:13 +0900 +Subject: tty: serial: samsung_tty: set dma burst_size to 1 + +From: Chanho Park + +commit f7e35e4bf1e8dc2c8cbd5e0955dc1bd58558dae0 upstream. + +The src_maxburst and dst_maxburst have been changed to 1 but the settings +of the UCON register aren't changed yet. They should be changed as well +according to the dmaengine slave config. + +Fixes: aa2f80e752c7 ("serial: samsung: fix maxburst parameter for DMA transactions") +Cc: stable +Cc: Marek Szyprowski +Reviewed-by: Krzysztof Kozlowski +Signed-off-by: Chanho Park +Link: https://lore.kernel.org/r/20220627065113.139520-1-chanho61.park@samsung.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/samsung_tty.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/tty/serial/samsung_tty.c ++++ b/drivers/tty/serial/samsung_tty.c +@@ -377,8 +377,7 @@ static void enable_tx_dma(struct s3c24xx + /* Enable tx dma mode */ + ucon = rd_regl(port, S3C2410_UCON); + ucon &= ~(S3C64XX_UCON_TXBURST_MASK | S3C64XX_UCON_TXMODE_MASK); +- ucon |= (dma_get_cache_alignment() >= 16) ? +- S3C64XX_UCON_TXBURST_16 : S3C64XX_UCON_TXBURST_1; ++ ucon |= S3C64XX_UCON_TXBURST_1; + ucon |= S3C64XX_UCON_TXMODE_DMA; + wr_regl(port, S3C2410_UCON, ucon); + +@@ -674,7 +673,7 @@ static void enable_rx_dma(struct s3c24xx + S3C64XX_UCON_DMASUS_EN | + S3C64XX_UCON_TIMEOUT_EN | + S3C64XX_UCON_RXMODE_MASK); +- ucon |= S3C64XX_UCON_RXBURST_16 | ++ ucon |= S3C64XX_UCON_RXBURST_1 | + 0xf << S3C64XX_UCON_TIMEOUT_SHIFT | + S3C64XX_UCON_EMPTYINT_EN | + S3C64XX_UCON_TIMEOUT_EN | diff --git a/queue-5.18/usb-dwc3-gadget-fix-event-pending-check.patch b/queue-5.18/usb-dwc3-gadget-fix-event-pending-check.patch new file mode 100644 index 00000000000..e979f0fd388 --- /dev/null +++ b/queue-5.18/usb-dwc3-gadget-fix-event-pending-check.patch @@ -0,0 +1,51 @@ +From 7441b273388b9a59d8387a03ffbbca9d5af6348c Mon Sep 17 00:00:00 2001 +From: Thinh Nguyen +Date: Mon, 27 Jun 2022 18:41:19 -0700 +Subject: usb: dwc3: gadget: Fix event pending check + +From: Thinh Nguyen + +commit 7441b273388b9a59d8387a03ffbbca9d5af6348c upstream. + +The DWC3_EVENT_PENDING flag is used to protect against invalid call to +top-half interrupt handler, which can occur when there's a delay in +software detection of the interrupt line deassertion. + +However, the clearing of this flag was done prior to unmasking the +interrupt line, creating opportunity where the top-half handler can +come. This breaks the serialization and creates a race between the +top-half and bottom-half handler, resulting in losing synchronization +between the controller and the driver when processing events. + +To fix this, make sure the clearing of the DWC3_EVENT_PENDING is done at +the end of the bottom-half handler. + +Fixes: d325a1de49d6 ("usb: dwc3: gadget: Prevent losing events in event cache") +Cc: stable@vger.kernel.org +Signed-off-by: Thinh Nguyen +Link: https://lore.kernel.org/r/8670aaf1cf52e7d1e6df2a827af2d77263b93b75.1656380429.git.Thinh.Nguyen@synopsys.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/dwc3/gadget.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/usb/dwc3/gadget.c ++++ b/drivers/usb/dwc3/gadget.c +@@ -4224,7 +4224,6 @@ static irqreturn_t dwc3_process_event_bu + } + + evt->count = 0; +- evt->flags &= ~DWC3_EVENT_PENDING; + ret = IRQ_HANDLED; + + /* Unmask interrupt */ +@@ -4236,6 +4235,9 @@ static irqreturn_t dwc3_process_event_bu + dwc3_writel(dwc->regs, DWC3_DEV_IMOD(0), dwc->imod_interval); + } + ++ /* Keep the clearing of DWC3_EVENT_PENDING at the end */ ++ evt->flags &= ~DWC3_EVENT_PENDING; ++ + return ret; + } + diff --git a/queue-5.18/usb-serial-ftdi_sio-add-belimo-device-ids.patch b/queue-5.18/usb-serial-ftdi_sio-add-belimo-device-ids.patch new file mode 100644 index 00000000000..ea5f0bd7a8a --- /dev/null +++ b/queue-5.18/usb-serial-ftdi_sio-add-belimo-device-ids.patch @@ -0,0 +1,47 @@ +From 7c239a071d1f04b7137789810807b4108d475c72 Mon Sep 17 00:00:00 2001 +From: Lucien Buchmann +Date: Sat, 25 Jun 2022 02:17:44 +0200 +Subject: USB: serial: ftdi_sio: add Belimo device ids + +From: Lucien Buchmann + +commit 7c239a071d1f04b7137789810807b4108d475c72 upstream. + +Those two product ids are known. + +Signed-off-by: Lucien Buchmann +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/ftdi_sio.c | 3 +++ + drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++ + 2 files changed, 9 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -1023,6 +1023,9 @@ static const struct usb_device_id id_tab + { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_DISPLAY_PID) }, + { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_LITE_PID) }, + { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_ANALOG_PID) }, ++ /* Belimo Automation devices */ ++ { USB_DEVICE(FTDI_VID, BELIMO_ZTH_PID) }, ++ { USB_DEVICE(FTDI_VID, BELIMO_ZIP_PID) }, + /* ICP DAS I-756xU devices */ + { USB_DEVICE(ICPDAS_VID, ICPDAS_I7560U_PID) }, + { USB_DEVICE(ICPDAS_VID, ICPDAS_I7561U_PID) }, +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -1569,6 +1569,12 @@ + #define CHETCO_SEASMART_ANALOG_PID 0xA5AF /* SeaSmart Analog Adapter */ + + /* ++ * Belimo Automation ++ */ ++#define BELIMO_ZTH_PID 0x8050 ++#define BELIMO_ZIP_PID 0xC811 ++ ++/* + * Unjo AB + */ + #define UNJO_VID 0x22B7 diff --git a/queue-5.18/usb-typec-add-missing-uevent-when-partner-support-pd.patch b/queue-5.18/usb-typec-add-missing-uevent-when-partner-support-pd.patch new file mode 100644 index 00000000000..545fd93bbab --- /dev/null +++ b/queue-5.18/usb-typec-add-missing-uevent-when-partner-support-pd.patch @@ -0,0 +1,37 @@ +From 6fb9e1d94789e8ee5a258a23bc588693f743fd6c Mon Sep 17 00:00:00 2001 +From: Linyu Yuan +Date: Fri, 1 Jul 2022 16:08:54 +0800 +Subject: usb: typec: add missing uevent when partner support PD + +From: Linyu Yuan + +commit 6fb9e1d94789e8ee5a258a23bc588693f743fd6c upstream. + +System like Android allow user control power role from UI, it is possible +to implement application base on typec uevent to refresh UI, but found +there is chance that UI show different state from typec attribute file. + +In typec_set_pwr_opmode(), when partner support PD, there is no uevent +send to user space which cause the problem. + +Fix it by sending uevent notification when change power mode to PD. + +Fixes: bdecb33af34f ("usb: typec: API for controlling USB Type-C Multiplexers") +Cc: stable@vger.kernel.org +Signed-off-by: Linyu Yuan +Link: https://lore.kernel.org/r/1656662934-10226-1-git-send-email-quic_linyyuan@quicinc.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/typec/class.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/typec/class.c ++++ b/drivers/usb/typec/class.c +@@ -1718,6 +1718,7 @@ void typec_set_pwr_opmode(struct typec_p + partner->usb_pd = 1; + sysfs_notify(&partner_dev->kobj, NULL, + "supports_usb_power_delivery"); ++ kobject_uevent(&partner_dev->kobj, KOBJ_CHANGE); + } + put_device(partner_dev); + } diff --git a/queue-5.18/vdpa-mlx5-initialize-cvq-vringh-only-once.patch b/queue-5.18/vdpa-mlx5-initialize-cvq-vringh-only-once.patch index eab91760437..07fb826e841 100644 --- a/queue-5.18/vdpa-mlx5-initialize-cvq-vringh-only-once.patch +++ b/queue-5.18/vdpa-mlx5-initialize-cvq-vringh-only-once.patch @@ -30,7 +30,7 @@ Signed-off-by: Sasha Levin --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c -@@ -1963,7 +1963,6 @@ static int verify_driver_features(struct +@@ -1965,7 +1965,6 @@ static int verify_driver_features(struct static int setup_virtqueues(struct mlx5_vdpa_dev *mvdev) { struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); @@ -38,7 +38,7 @@ Signed-off-by: Sasha Levin int err; int i; -@@ -1973,16 +1972,6 @@ static int setup_virtqueues(struct mlx5_ +@@ -1975,16 +1974,6 @@ static int setup_virtqueues(struct mlx5_ goto err_vq; } @@ -55,7 +55,7 @@ Signed-off-by: Sasha Levin return 0; err_vq: -@@ -2255,6 +2244,21 @@ static void clear_vqs_ready(struct mlx5_ +@@ -2257,6 +2246,21 @@ static void clear_vqs_ready(struct mlx5_ ndev->mvdev.cvq.ready = false; } @@ -77,7 +77,7 @@ Signed-off-by: Sasha Levin static void mlx5_vdpa_set_status(struct vdpa_device *vdev, u8 status) { struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); -@@ -2267,6 +2271,11 @@ static void mlx5_vdpa_set_status(struct +@@ -2269,6 +2273,11 @@ static void mlx5_vdpa_set_status(struct if ((status ^ ndev->mvdev.status) & VIRTIO_CONFIG_S_DRIVER_OK) { if (status & VIRTIO_CONFIG_S_DRIVER_OK) {