From: Greg Kroah-Hartman Date: Tue, 11 Jul 2023 20:14:26 +0000 (+0200) Subject: 6.4-stable patches X-Git-Tag: v6.1.39~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=749ab4d2598f229a1bf77b555b3b9c7f436bf792;p=thirdparty%2Fkernel%2Fstable-queue.git 6.4-stable patches added patches: dt-bindings-iio-ad7192-add-mandatory-reference-voltage-source.patch extcon-usbc-tusb320-unregister-typec-port-on-driver-removal.patch iio-accel-fxls8962af-errata-bug-only-applicable-for-fxls8962af.patch iio-accel-fxls8962af-fixup-buffer-scan-element-type.patch iio-adc-ad7192-fix-internal-external-clock-selection.patch iio-adc-ad7192-fix-null-ad7192_state-pointer-access.patch iio-addac-ad74413-don-t-set-din_sink-for-functions-other-than-digital-input.patch phy-tegra-xusb-clear-the-driver-reference-in-usb-phy-dev.patch revert-drm-amd-display-edp-do-not-add-non-edid-timings.patch start_kernel-add-__no_stack_protector-function-attribute.patch usb-dwc3-gadget-propagate-core-init-errors-to-udc-during-pullup.patch usb-serial-option-add-lara-r6-01b-pids.patch --- diff --git a/queue-6.4/dt-bindings-iio-ad7192-add-mandatory-reference-voltage-source.patch b/queue-6.4/dt-bindings-iio-ad7192-add-mandatory-reference-voltage-source.patch new file mode 100644 index 00000000000..36a7ba3dc3d --- /dev/null +++ b/queue-6.4/dt-bindings-iio-ad7192-add-mandatory-reference-voltage-source.patch @@ -0,0 +1,53 @@ +From c6dab7245604862d86f0b6d764919f470584d24f Mon Sep 17 00:00:00 2001 +From: Fabrizio Lamarque +Date: Tue, 30 May 2023 09:53:10 +0200 +Subject: dt-bindings: iio: ad7192: Add mandatory reference voltage source + +From: Fabrizio Lamarque + +commit c6dab7245604862d86f0b6d764919f470584d24f upstream. + +Add required reference voltage (VRef) supply regulator. + +AD7192 requires three independent voltage sources: DVdd, AVdd and VRef +(on REFINx pin pairs). + +Fixes: b581f748cce0 ("staging: iio: adc: ad7192: move out of staging") +Signed-off-by: Fabrizio Lamarque +Acked-by: Conor Dooley +Cc: +Link: https://lore.kernel.org/r/20230530075311.400686-5-fl.scratchpad@gmail.com +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml ++++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml +@@ -47,6 +47,9 @@ properties: + avdd-supply: + description: AVdd voltage supply + ++ vref-supply: ++ description: VRef voltage supply ++ + adi,rejection-60-Hz-enable: + description: | + This bit enables a notch at 60 Hz when the first notch of the sinc +@@ -89,6 +92,7 @@ required: + - interrupts + - dvdd-supply + - avdd-supply ++ - vref-supply + - spi-cpol + - spi-cpha + +@@ -115,6 +119,7 @@ examples: + interrupt-parent = <&gpio>; + dvdd-supply = <&dvdd>; + avdd-supply = <&avdd>; ++ vref-supply = <&vref>; + + adi,refin2-pins-enable; + adi,rejection-60-Hz-enable; diff --git a/queue-6.4/extcon-usbc-tusb320-unregister-typec-port-on-driver-removal.patch b/queue-6.4/extcon-usbc-tusb320-unregister-typec-port-on-driver-removal.patch new file mode 100644 index 00000000000..a57e7d5d7a8 --- /dev/null +++ b/queue-6.4/extcon-usbc-tusb320-unregister-typec-port-on-driver-removal.patch @@ -0,0 +1,149 @@ +From 3adbaa30d973093a4f37927baf9596cca51b593d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alvin=20=C5=A0ipraga?= +Date: Wed, 15 Mar 2023 15:15:47 +0100 +Subject: extcon: usbc-tusb320: Unregister typec port on driver removal +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alvin Å ipraga + +commit 3adbaa30d973093a4f37927baf9596cca51b593d upstream. + +The driver can register a typec port if suitable firmware properties are +present. But if the driver is removed through sysfs unbind, rmmod or +similar, then it does not clean up after itself and the typec port +device remains registered. This can be seen in sysfs, where stale typec +ports get left over in /sys/class/typec. + +In order to fix this we have to add an i2c_driver remove function and +call typec_unregister_port(), which is a no-op in the case where no +typec port is created and the pointer remains NULL. + +In the process we should also put the fwnode_handle when the typec port +isn't registered anymore, including if an error occurs during probe. The +typec subsystem does not increase or decrease the reference counter for +us, so we track it in the driver's private data. + +Note that the conditional check on TYPEC_PWR_MODE_PD was removed in the +probe path because a call to tusb320_set_adv_pwr_mode() will perform an +even more robust validation immediately after, hence there is no +functional change here. + +Fixes: bf7571c00dca ("extcon: usbc-tusb320: Add USB TYPE-C support") +Cc: stable@vger.kernel.org +Signed-off-by: Alvin Å ipraga +Signed-off-by: Chanwoo Choi +Signed-off-by: Greg Kroah-Hartman +--- + drivers/extcon/extcon-usbc-tusb320.c | 42 ++++++++++++++++++++++++++++------- + 1 file changed, 34 insertions(+), 8 deletions(-) + +--- a/drivers/extcon/extcon-usbc-tusb320.c ++++ b/drivers/extcon/extcon-usbc-tusb320.c +@@ -78,6 +78,7 @@ struct tusb320_priv { + struct typec_capability cap; + enum typec_port_type port_type; + enum typec_pwr_opmode pwr_opmode; ++ struct fwnode_handle *connector_fwnode; + }; + + static const char * const tusb_attached_states[] = { +@@ -391,27 +392,25 @@ static int tusb320_typec_probe(struct i2 + /* Type-C connector found. */ + ret = typec_get_fw_cap(&priv->cap, connector); + if (ret) +- return ret; ++ goto err_put; + + priv->port_type = priv->cap.type; + + /* This goes into register 0x8 field CURRENT_MODE_ADVERTISE */ + ret = fwnode_property_read_string(connector, "typec-power-opmode", &cap_str); + if (ret) +- return ret; ++ goto err_put; + + ret = typec_find_pwr_opmode(cap_str); + if (ret < 0) +- return ret; +- if (ret == TYPEC_PWR_MODE_PD) +- return -EINVAL; ++ goto err_put; + + priv->pwr_opmode = ret; + + /* Initialize the hardware with the devicetree settings. */ + ret = tusb320_set_adv_pwr_mode(priv); + if (ret) +- return ret; ++ goto err_put; + + priv->cap.revision = USB_TYPEC_REV_1_1; + priv->cap.accessory[0] = TYPEC_ACCESSORY_AUDIO; +@@ -422,10 +421,25 @@ static int tusb320_typec_probe(struct i2 + priv->cap.fwnode = connector; + + priv->port = typec_register_port(&client->dev, &priv->cap); +- if (IS_ERR(priv->port)) +- return PTR_ERR(priv->port); ++ if (IS_ERR(priv->port)) { ++ ret = PTR_ERR(priv->port); ++ goto err_put; ++ } ++ ++ priv->connector_fwnode = connector; + + return 0; ++ ++err_put: ++ fwnode_handle_put(connector); ++ ++ return ret; ++} ++ ++static void tusb320_typec_remove(struct tusb320_priv *priv) ++{ ++ typec_unregister_port(priv->port); ++ fwnode_handle_put(priv->connector_fwnode); + } + + static int tusb320_probe(struct i2c_client *client) +@@ -438,7 +452,9 @@ static int tusb320_probe(struct i2c_clie + priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; ++ + priv->dev = &client->dev; ++ i2c_set_clientdata(client, priv); + + priv->regmap = devm_regmap_init_i2c(client, &tusb320_regmap_config); + if (IS_ERR(priv->regmap)) +@@ -489,10 +505,19 @@ static int tusb320_probe(struct i2c_clie + tusb320_irq_handler, + IRQF_TRIGGER_FALLING | IRQF_ONESHOT, + client->name, priv); ++ if (ret) ++ tusb320_typec_remove(priv); + + return ret; + } + ++static void tusb320_remove(struct i2c_client *client) ++{ ++ struct tusb320_priv *priv = i2c_get_clientdata(client); ++ ++ tusb320_typec_remove(priv); ++} ++ + static const struct of_device_id tusb320_extcon_dt_match[] = { + { .compatible = "ti,tusb320", .data = &tusb320_ops, }, + { .compatible = "ti,tusb320l", .data = &tusb320l_ops, }, +@@ -502,6 +527,7 @@ MODULE_DEVICE_TABLE(of, tusb320_extcon_d + + static struct i2c_driver tusb320_extcon_driver = { + .probe_new = tusb320_probe, ++ .remove = tusb320_remove, + .driver = { + .name = "extcon-tusb320", + .of_match_table = tusb320_extcon_dt_match, diff --git a/queue-6.4/iio-accel-fxls8962af-errata-bug-only-applicable-for-fxls8962af.patch b/queue-6.4/iio-accel-fxls8962af-errata-bug-only-applicable-for-fxls8962af.patch new file mode 100644 index 00000000000..7b5b76b91a9 --- /dev/null +++ b/queue-6.4/iio-accel-fxls8962af-errata-bug-only-applicable-for-fxls8962af.patch @@ -0,0 +1,36 @@ +From b410a9307bc3a7cdee3c930c98f6fc9cf1d2c484 Mon Sep 17 00:00:00 2001 +From: Sean Nyekjaer +Date: Mon, 5 Jun 2023 12:32:22 +0200 +Subject: iio: accel: fxls8962af: errata bug only applicable for FXLS8962AF + +From: Sean Nyekjaer + +commit b410a9307bc3a7cdee3c930c98f6fc9cf1d2c484 upstream. + +Remove special errata handling if FXLS8964AF is used. + +Fixes: af959b7b96b8 ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads") +Signed-off-by: Sean Nyekjaer +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20230605103223.1400980-2-sean@geanix.com +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/accel/fxls8962af-core.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/iio/accel/fxls8962af-core.c ++++ b/drivers/iio/accel/fxls8962af-core.c +@@ -904,9 +904,10 @@ static int fxls8962af_fifo_transfer(stru + int total_length = samples * sample_length; + int ret; + +- if (i2c_verify_client(dev)) ++ if (i2c_verify_client(dev) && ++ data->chip_info->chip_id == FXLS8962AF_DEVICE_ID) + /* +- * Due to errata bug: ++ * Due to errata bug (only applicable on fxls8962af): + * E3: FIFO burst read operation error using I2C interface + * We have to avoid burst reads on I2C.. + */ diff --git a/queue-6.4/iio-accel-fxls8962af-fixup-buffer-scan-element-type.patch b/queue-6.4/iio-accel-fxls8962af-fixup-buffer-scan-element-type.patch new file mode 100644 index 00000000000..ea01b478964 --- /dev/null +++ b/queue-6.4/iio-accel-fxls8962af-fixup-buffer-scan-element-type.patch @@ -0,0 +1,35 @@ +From d1cfbd52ede5e5fabc09992894c5733b4057f159 Mon Sep 17 00:00:00 2001 +From: Sean Nyekjaer +Date: Mon, 5 Jun 2023 12:32:21 +0200 +Subject: iio: accel: fxls8962af: fixup buffer scan element type + +From: Sean Nyekjaer + +commit d1cfbd52ede5e5fabc09992894c5733b4057f159 upstream. + +Scan elements for x,y,z channels is little endian and requires no bit shifts. +LE vs. BE is controlled in register SENS_CONFIG2 and bit LE_BE, default +value is LE. + +Fixes: a3e0b51884ee ("iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers") +Signed-off-by: Sean Nyekjaer +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20230605103223.1400980-1-sean@geanix.com +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/accel/fxls8962af-core.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/iio/accel/fxls8962af-core.c ++++ b/drivers/iio/accel/fxls8962af-core.c +@@ -724,8 +724,7 @@ static const struct iio_event_spec fxls8 + .sign = 's', \ + .realbits = 12, \ + .storagebits = 16, \ +- .shift = 4, \ +- .endianness = IIO_BE, \ ++ .endianness = IIO_LE, \ + }, \ + .event_spec = fxls8962af_event, \ + .num_event_specs = ARRAY_SIZE(fxls8962af_event), \ diff --git a/queue-6.4/iio-adc-ad7192-fix-internal-external-clock-selection.patch b/queue-6.4/iio-adc-ad7192-fix-internal-external-clock-selection.patch new file mode 100644 index 00000000000..8e7916cc775 --- /dev/null +++ b/queue-6.4/iio-adc-ad7192-fix-internal-external-clock-selection.patch @@ -0,0 +1,35 @@ +From f7d9e21dd274b97dc0a8dbc136a2ea8506063a96 Mon Sep 17 00:00:00 2001 +From: Fabrizio Lamarque +Date: Tue, 30 May 2023 09:53:08 +0200 +Subject: iio: adc: ad7192: Fix internal/external clock selection + +From: Fabrizio Lamarque + +commit f7d9e21dd274b97dc0a8dbc136a2ea8506063a96 upstream. + +Fix wrong selection of internal clock when mclk is defined. + +Resolve a logical inversion introduced in c9ec2cb328e3. + +Fixes: c9ec2cb328e3 ("iio: adc: ad7192: use devm_clk_get_optional() for mclk") +Signed-off-by: Fabrizio Lamarque +Reviewed-by: Nuno Sa +Cc: +Link: https://lore.kernel.org/r/20230530075311.400686-3-fl.scratchpad@gmail.com +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/adc/ad7192.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/adc/ad7192.c ++++ b/drivers/iio/adc/ad7192.c +@@ -367,7 +367,7 @@ static int ad7192_of_clock_select(struct + clock_sel = AD7192_CLK_INT; + + /* use internal clock */ +- if (st->mclk) { ++ if (!st->mclk) { + if (of_property_read_bool(np, "adi,int-clock-output-enable")) + clock_sel = AD7192_CLK_INT_CO; + } else { diff --git a/queue-6.4/iio-adc-ad7192-fix-null-ad7192_state-pointer-access.patch b/queue-6.4/iio-adc-ad7192-fix-null-ad7192_state-pointer-access.patch new file mode 100644 index 00000000000..b3d70408aee --- /dev/null +++ b/queue-6.4/iio-adc-ad7192-fix-null-ad7192_state-pointer-access.patch @@ -0,0 +1,50 @@ +From 9e58e3a6f8e1c483c86a04903b7b7aa0923e4426 Mon Sep 17 00:00:00 2001 +From: Fabrizio Lamarque +Date: Tue, 30 May 2023 09:53:07 +0200 +Subject: iio: adc: ad7192: Fix null ad7192_state pointer access + +From: Fabrizio Lamarque + +commit 9e58e3a6f8e1c483c86a04903b7b7aa0923e4426 upstream. + +Pointer to indio_dev structure is obtained via spi_get_drvdata() at +the beginning of function ad7192_setup(), but the spi->dev->driver_data +member is not initialized, hence a NULL pointer is returned. + +Fix by changing ad7192_setup() signature to take pointer to struct +iio_dev, and get ad7192_state pointer via st = iio_priv(indio_dev); + +Fixes: bd5dcdeb3fd0 ("iio: adc: ad7192: convert to device-managed functions") +Signed-off-by: Fabrizio Lamarque +Reviewed-by: Nuno Sa +Cc: +Link: https://lore.kernel.org/r/20230530075311.400686-2-fl.scratchpad@gmail.com +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/adc/ad7192.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/iio/adc/ad7192.c ++++ b/drivers/iio/adc/ad7192.c +@@ -380,9 +380,9 @@ static int ad7192_of_clock_select(struct + return clock_sel; + } + +-static int ad7192_setup(struct ad7192_state *st, struct device_node *np) ++static int ad7192_setup(struct iio_dev *indio_dev, struct device_node *np) + { +- struct iio_dev *indio_dev = spi_get_drvdata(st->sd.spi); ++ struct ad7192_state *st = iio_priv(indio_dev); + bool rej60_en, refin2_en; + bool buf_en, bipolar, burnout_curr_en; + unsigned long long scale_uv; +@@ -1069,7 +1069,7 @@ static int ad7192_probe(struct spi_devic + } + } + +- ret = ad7192_setup(st, spi->dev.of_node); ++ ret = ad7192_setup(indio_dev, spi->dev.of_node); + if (ret) + return ret; + diff --git a/queue-6.4/iio-addac-ad74413-don-t-set-din_sink-for-functions-other-than-digital-input.patch b/queue-6.4/iio-addac-ad74413-don-t-set-din_sink-for-functions-other-than-digital-input.patch new file mode 100644 index 00000000000..abc4af42115 --- /dev/null +++ b/queue-6.4/iio-addac-ad74413-don-t-set-din_sink-for-functions-other-than-digital-input.patch @@ -0,0 +1,61 @@ +From a4cba07e64e6ec22d9504a1a45d29afa863dc19c Mon Sep 17 00:00:00 2001 +From: Rasmus Villemoes +Date: Wed, 3 May 2023 12:50:41 +0200 +Subject: iio: addac: ad74413: don't set DIN_SINK for functions other than digital input + +From: Rasmus Villemoes + +commit a4cba07e64e6ec22d9504a1a45d29afa863dc19c upstream. + +Apparently, despite the name Digital Input Configuration Register, the +settings in the DIN_CONFIGx registers also affect other channel +functions. In particular, setting a non-zero value in the DIN_SINK +field breaks the resistance measurement function. + +Now, one can of course argue that specifying a drive-strength-microamp +property along with a adi,ch-func which is not one of the digital +input functions is a bug in the device tree. However, we have a rather +complicated setup with instances of ad74412r on external hardware +modules, and have set a default drive-strength-microamp in our DT +fragments describing those, merely modifying the adi,ch-func settings +to reflect however the modules have been wired up. And restricting +this setting to just being done for digital input doesn't make the +driver any more complex. + +Fixes: 504eb485589d1 (iio: ad74413r: wire up support for drive-strength-microamp property) +Signed-off-by: Rasmus Villemoes +Link: https://lore.kernel.org/r/20230503105042.453755-1-linux@rasmusvillemoes.dk +Cc: +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/addac/ad74413r.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/drivers/iio/addac/ad74413r.c b/drivers/iio/addac/ad74413r.c +index e3366cf5eb31..6b0e8218f150 100644 +--- a/drivers/iio/addac/ad74413r.c ++++ b/drivers/iio/addac/ad74413r.c +@@ -1317,13 +1317,14 @@ static int ad74413r_setup_gpios(struct ad74413r_state *st) + } + + if (config->func == CH_FUNC_DIGITAL_INPUT_LOGIC || +- config->func == CH_FUNC_DIGITAL_INPUT_LOOP_POWER) ++ config->func == CH_FUNC_DIGITAL_INPUT_LOOP_POWER) { + st->comp_gpio_offsets[comp_gpio_i++] = i; + +- strength = config->drive_strength; +- ret = ad74413r_set_comp_drive_strength(st, i, strength); +- if (ret) +- return ret; ++ strength = config->drive_strength; ++ ret = ad74413r_set_comp_drive_strength(st, i, strength); ++ if (ret) ++ return ret; ++ } + + ret = ad74413r_set_gpo_config(st, i, gpo_config); + if (ret) +-- +2.41.0 + diff --git a/queue-6.4/phy-tegra-xusb-clear-the-driver-reference-in-usb-phy-dev.patch b/queue-6.4/phy-tegra-xusb-clear-the-driver-reference-in-usb-phy-dev.patch new file mode 100644 index 00000000000..c3ebab561b2 --- /dev/null +++ b/queue-6.4/phy-tegra-xusb-clear-the-driver-reference-in-usb-phy-dev.patch @@ -0,0 +1,40 @@ +From c0c2fcb1325d0d4f3b322b5ee49385f8eca2560d Mon Sep 17 00:00:00 2001 +From: EJ Hsu +Date: Fri, 9 Jun 2023 14:29:32 +0800 +Subject: phy: tegra: xusb: Clear the driver reference in usb-phy dev + +From: EJ Hsu + +commit c0c2fcb1325d0d4f3b322b5ee49385f8eca2560d upstream. + +For the dual-role port, it will assign the phy dev to usb-phy dev and +use the port dev driver as the dev driver of usb-phy. + +When we try to destroy the port dev, it will destroy its dev driver +as well. But we did not remove the reference from usb-phy dev. This +might cause the use-after-free issue in KASAN. + +Fixes: e8f7d2f409a1 ("phy: tegra: xusb: Add usb-phy support") +Cc: stable@vger.kernel.org + +Signed-off-by: EJ Hsu +Signed-off-by: Haotien Hsu +Acked-by: Thierry Reding +Acked-by: Jon Hunter +Link: https://lore.kernel.org/r/20230609062932.3276509-1-haotienh@nvidia.com +Signed-off-by: Vinod Koul +Signed-off-by: Greg Kroah-Hartman +--- + drivers/phy/tegra/xusb.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/phy/tegra/xusb.c ++++ b/drivers/phy/tegra/xusb.c +@@ -568,6 +568,7 @@ static void tegra_xusb_port_unregister(s + usb_role_switch_unregister(port->usb_role_sw); + cancel_work_sync(&port->usb_phy_work); + usb_remove_phy(&port->usb_phy); ++ port->usb_phy.dev->driver = NULL; + } + + if (port->ops->remove) diff --git a/queue-6.4/revert-drm-amd-display-edp-do-not-add-non-edid-timings.patch b/queue-6.4/revert-drm-amd-display-edp-do-not-add-non-edid-timings.patch new file mode 100644 index 00000000000..721bcbb46c7 --- /dev/null +++ b/queue-6.4/revert-drm-amd-display-edp-do-not-add-non-edid-timings.patch @@ -0,0 +1,43 @@ +From d6149086b45e150c170beaa4546495fd1880724c Mon Sep 17 00:00:00 2001 +From: Hersen Wu +Date: Mon, 26 Jun 2023 13:40:58 -0400 +Subject: Revert "drm/amd/display: edp do not add non-edid timings" + +From: Hersen Wu + +commit d6149086b45e150c170beaa4546495fd1880724c upstream. + +This change causes regression when eDP and external display in mirror +mode. When external display supports low resolution than eDP, use eDP +timing to driver external display may cause corruption on external +display. + +This reverts commit e749dd10e5f292061ad63d2b030194bf7d7d452c. + +Cc: stable@vger.kernel.org +Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2655 +Signed-off-by: Hersen Wu +Reviewed-by: Mario Limonciello +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -7196,13 +7196,7 @@ static int amdgpu_dm_connector_get_modes + drm_add_modes_noedid(connector, 1920, 1080); + } else { + amdgpu_dm_connector_ddc_get_modes(connector, edid); +- /* most eDP supports only timings from its edid, +- * usually only detailed timings are available +- * from eDP edid. timings which are not from edid +- * may damage eDP +- */ +- if (connector->connector_type != DRM_MODE_CONNECTOR_eDP) +- amdgpu_dm_connector_add_common_modes(encoder, connector); ++ amdgpu_dm_connector_add_common_modes(encoder, connector); + amdgpu_dm_connector_add_freesync_modes(connector, edid); + } + amdgpu_dm_fbc_init(connector); diff --git a/queue-6.4/series b/queue-6.4/series index d06298f3d0a..f39ebd1493e 100644 --- a/queue-6.4/series +++ b/queue-6.4/series @@ -1,3 +1,15 @@ +start_kernel-add-__no_stack_protector-function-attribute.patch +usb-serial-option-add-lara-r6-01b-pids.patch +usb-dwc3-gadget-propagate-core-init-errors-to-udc-during-pullup.patch +phy-tegra-xusb-clear-the-driver-reference-in-usb-phy-dev.patch +extcon-usbc-tusb320-unregister-typec-port-on-driver-removal.patch +dt-bindings-iio-ad7192-add-mandatory-reference-voltage-source.patch +iio-addac-ad74413-don-t-set-din_sink-for-functions-other-than-digital-input.patch +iio-adc-ad7192-fix-null-ad7192_state-pointer-access.patch +iio-adc-ad7192-fix-internal-external-clock-selection.patch +iio-accel-fxls8962af-errata-bug-only-applicable-for-fxls8962af.patch +iio-accel-fxls8962af-fixup-buffer-scan-element-type.patch +revert-drm-amd-display-edp-do-not-add-non-edid-timings.patch fs-pipe-reveal-missing-function-protoypes.patch s390-kasan-fix-insecure-w-x-mapping-warning.patch blk-mq-don-t-queue-plugged-passthrough-requests-into.patch diff --git a/queue-6.4/start_kernel-add-__no_stack_protector-function-attribute.patch b/queue-6.4/start_kernel-add-__no_stack_protector-function-attribute.patch new file mode 100644 index 00000000000..12a51fdb0b7 --- /dev/null +++ b/queue-6.4/start_kernel-add-__no_stack_protector-function-attribute.patch @@ -0,0 +1,84 @@ +From 514ca14ed5444b911de59ed3381dfd195d99fe4b Mon Sep 17 00:00:00 2001 +From: "ndesaulniers@google.com" +Date: Mon, 17 Apr 2023 15:00:05 -0700 +Subject: start_kernel: Add __no_stack_protector function attribute + +From: ndesaulniers@google.com + +commit 514ca14ed5444b911de59ed3381dfd195d99fe4b upstream. + +Back during the discussion of +commit a9a3ed1eff36 ("x86: Fix early boot crash on gcc-10, third try") +we discussed the need for a function attribute to control the omission +of stack protectors on a per-function basis; at the time Clang had +support for no_stack_protector but GCC did not. This was fixed in +gcc-11. Now that the function attribute is available, let's start using +it. + +Callers of boot_init_stack_canary need to use this function attribute +unless they're compiled with -fno-stack-protector, otherwise the canary +stored in the stack slot of the caller will differ upon the call to +boot_init_stack_canary. This will lead to a call to __stack_chk_fail() +then panic. + +Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94722 +Link: https://lore.kernel.org/all/20200316130414.GC12561@hirez.programming.kicks-ass.net/ +Tested-by: Nathan Chancellor +Acked-by: Michael Ellerman (powerpc) +Acked-by: Miguel Ojeda +Acked-by: Peter Zijlstra (Intel) +Signed-off-by: Nick Desaulniers +Link: https://lore.kernel.org/r/20230412-no_stackp-v2-1-116f9fe4bbe7@google.com +Signed-off-by: Josh Poimboeuf +Signed-off-by: Greg Kroah-Hartman + +Signed-off-by: ndesaulniers@google.com +--- + arch/powerpc/kernel/smp.c | 1 + + include/linux/compiler_attributes.h | 12 ++++++++++++ + init/main.c | 3 ++- + 3 files changed, 15 insertions(+), 1 deletion(-) + +--- a/arch/powerpc/kernel/smp.c ++++ b/arch/powerpc/kernel/smp.c +@@ -1605,6 +1605,7 @@ static void add_cpu_to_masks(int cpu) + } + + /* Activate a secondary processor. */ ++__no_stack_protector + void start_secondary(void *unused) + { + unsigned int cpu = raw_smp_processor_id(); +--- a/include/linux/compiler_attributes.h ++++ b/include/linux/compiler_attributes.h +@@ -256,6 +256,18 @@ + #define __noreturn __attribute__((__noreturn__)) + + /* ++ * Optional: only supported since GCC >= 11.1, clang >= 7.0. ++ * ++ * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-no_005fstack_005fprotector-function-attribute ++ * clang: https://clang.llvm.org/docs/AttributeReference.html#no-stack-protector-safebuffers ++ */ ++#if __has_attribute(__no_stack_protector__) ++# define __no_stack_protector __attribute__((__no_stack_protector__)) ++#else ++# define __no_stack_protector ++#endif ++ ++/* + * Optional: not supported by gcc. + * + * clang: https://clang.llvm.org/docs/AttributeReference.html#overloadable +--- a/init/main.c ++++ b/init/main.c +@@ -877,7 +877,8 @@ static void __init print_unknown_bootopt + memblock_free(unknown_options, len); + } + +-asmlinkage __visible void __init __no_sanitize_address __noreturn start_kernel(void) ++asmlinkage __visible __init __no_sanitize_address __noreturn __no_stack_protector ++void start_kernel(void) + { + char *command_line; + char *after_dashes; diff --git a/queue-6.4/usb-dwc3-gadget-propagate-core-init-errors-to-udc-during-pullup.patch b/queue-6.4/usb-dwc3-gadget-propagate-core-init-errors-to-udc-during-pullup.patch new file mode 100644 index 00000000000..788d3faa615 --- /dev/null +++ b/queue-6.4/usb-dwc3-gadget-propagate-core-init-errors-to-udc-during-pullup.patch @@ -0,0 +1,52 @@ +From c0aabed9cabe057309779a9e26fe86a113d24dad Mon Sep 17 00:00:00 2001 +From: Krishna Kurapati +Date: Sun, 18 Jun 2023 17:39:49 +0530 +Subject: usb: dwc3: gadget: Propagate core init errors to UDC during pullup + +From: Krishna Kurapati + +commit c0aabed9cabe057309779a9e26fe86a113d24dad upstream. + +In scenarios where pullup relies on resume (get sync) to initialize +the controller and set the run stop bit, then core_init is followed by +gadget_resume which will eventually set run stop bit. + +But in cases where the core_init fails, the return value is not sent +back to udc appropriately. So according to UDC the controller has +started but in reality we never set the run stop bit. + +On systems like Android, there are uevents sent to HAL depending on +whether the configfs_bind / configfs_disconnect were invoked. In the +above mentioned scnenario, if the core init fails, the run stop won't +be set and the cable plug-out won't result in generation of any +disconnect event and userspace would never get any uevent regarding +cable plug out and we never call pullup(0) again. Furthermore none of +the next Plug-In/Plug-Out's would be known to configfs. + +Return back the appropriate result to UDC to let the userspace/ +configfs know that the pullup failed so they can take appropriate +action. + +Fixes: 77adb8bdf422 ("usb: dwc3: gadget: Allow runtime suspend if UDC unbinded") +Cc: stable +Signed-off-by: Krishna Kurapati +Acked-by: Thinh Nguyen +Message-ID: <20230618120949.14868-1-quic_kriskura@quicinc.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 +@@ -2744,7 +2744,9 @@ static int dwc3_gadget_pullup(struct usb + ret = pm_runtime_get_sync(dwc->dev); + if (!ret || ret < 0) { + pm_runtime_put(dwc->dev); +- return 0; ++ if (ret < 0) ++ pm_runtime_set_suspended(dwc->dev); ++ return ret; + } + + if (dwc->pullups_connected == is_on) { diff --git a/queue-6.4/usb-serial-option-add-lara-r6-01b-pids.patch b/queue-6.4/usb-serial-option-add-lara-r6-01b-pids.patch new file mode 100644 index 00000000000..2e014e97597 --- /dev/null +++ b/queue-6.4/usb-serial-option-add-lara-r6-01b-pids.patch @@ -0,0 +1,65 @@ +From ffa5f7a3bf28c1306eef85d4056539c2d4b8eb09 Mon Sep 17 00:00:00 2001 +From: Davide Tronchin +Date: Thu, 22 Jun 2023 11:29:21 +0200 +Subject: USB: serial: option: add LARA-R6 01B PIDs + +From: Davide Tronchin + +commit ffa5f7a3bf28c1306eef85d4056539c2d4b8eb09 upstream. + +The new LARA-R6 product variant identified by the "01B" string can be +configured (by AT interface) in three different USB modes: + +* Default mode (Vendor ID: 0x1546 Product ID: 0x1311) with 4 serial +interfaces + +* RmNet mode (Vendor ID: 0x1546 Product ID: 0x1312) with 4 serial +interfaces and 1 RmNet virtual network interface + +* CDC-ECM mode (Vendor ID: 0x1546 Product ID: 0x1313) with 4 serial +interface and 1 CDC-ECM virtual network interface +The first 4 interfaces of all the 3 USB configurations (default, RmNet, +CDC-ECM) are the same. + +In default mode LARA-R6 01B exposes the following interfaces: +If 0: Diagnostic +If 1: AT parser +If 2: AT parser +If 3: AT parser/alternative functions + +In RmNet mode LARA-R6 01B exposes the following interfaces: +If 0: Diagnostic +If 1: AT parser +If 2: AT parser +If 3: AT parser/alternative functions +If 4: RMNET interface + +In CDC-ECM mode LARA-R6 01B exposes the following interfaces: +If 0: Diagnostic +If 1: AT parser +If 2: AT parser +If 3: AT parser/alternative functions +If 4: CDC-ECM interface + +Signed-off-by: Davide Tronchin +Link: https://lore.kernel.org/r/20230622092921.12651-1-davide.tronchin.94@gmail.com +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -1151,6 +1151,10 @@ static const struct usb_device_id option + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x90fa), + .driver_info = RSVD(3) }, + /* u-blox products */ ++ { USB_DEVICE(UBLOX_VENDOR_ID, 0x1311) }, /* u-blox LARA-R6 01B */ ++ { USB_DEVICE(UBLOX_VENDOR_ID, 0x1312), /* u-blox LARA-R6 01B (RMNET) */ ++ .driver_info = RSVD(4) }, ++ { USB_DEVICE_INTERFACE_CLASS(UBLOX_VENDOR_ID, 0x1313, 0xff) }, /* u-blox LARA-R6 01B (ECM) */ + { USB_DEVICE(UBLOX_VENDOR_ID, 0x1341) }, /* u-blox LARA-L6 */ + { USB_DEVICE(UBLOX_VENDOR_ID, 0x1342), /* u-blox LARA-L6 (RMNET) */ + .driver_info = RSVD(4) },