]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop some usb patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Dec 2022 18:25:32 +0000 (19:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Dec 2022 18:25:32 +0000 (19:25 +0100)
queue-4.19/driver-core-add-device-probe-log-helper.patch [deleted file]
queue-4.19/revert-usb-bcma-add-a-check-for-devm_gpiod_get.patch [deleted file]
queue-4.19/series
queue-4.19/usb-bcma-add-a-check-for-devm_gpiod_get.patch [deleted file]
queue-4.19/usb-bcma-make-gpio-explicitly-optional.patch [deleted file]
queue-5.4/series
queue-5.4/usb-bcma-make-gpio-explicitly-optional.patch [deleted file]

diff --git a/queue-4.19/driver-core-add-device-probe-log-helper.patch b/queue-4.19/driver-core-add-device-probe-log-helper.patch
deleted file mode 100644 (file)
index 8789f66..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-From 92d6c1e7725ebaa575fa109605c8379256a7c12c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 13 Jul 2020 16:43:21 +0200
-Subject: driver core: add device probe log helper
-
-From: Andrzej Hajda <a.hajda@samsung.com>
-
-[ Upstream commit a787e5400a1ceeb0ef92d71ec43aeb35b1fa1334 ]
-
-During probe every time driver gets resource it should usually check for
-error printk some message if it is not -EPROBE_DEFER and return the error.
-This pattern is simple but requires adding few lines after any resource
-acquisition code, as a result it is often omitted or implemented only
-partially.
-dev_err_probe helps to replace such code sequences with simple call,
-so code:
-       if (err != -EPROBE_DEFER)
-               dev_err(dev, ...);
-       return err;
-becomes:
-       return dev_err_probe(dev, err, ...);
-
-Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
-Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
-Reviewed-by: Mark Brown <broonie@kernel.org>
-Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
-Link: https://lore.kernel.org/r/20200713144324.23654-2-a.hajda@samsung.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Stable-dep-of: cd136706b4f9 ("USB: bcma: Make GPIO explicitly optional")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/base/core.c    | 42 ++++++++++++++++++++++++++++++++++++++++++
- include/linux/device.h |  3 +++
- 2 files changed, 45 insertions(+)
-
-diff --git a/drivers/base/core.c b/drivers/base/core.c
-index 6e380ad9d08a..b66647277d52 100644
---- a/drivers/base/core.c
-+++ b/drivers/base/core.c
-@@ -3334,6 +3334,48 @@ define_dev_printk_level(_dev_info, KERN_INFO);
- #endif
-+/**
-+ * dev_err_probe - probe error check and log helper
-+ * @dev: the pointer to the struct device
-+ * @err: error value to test
-+ * @fmt: printf-style format string
-+ * @...: arguments as specified in the format string
-+ *
-+ * This helper implements common pattern present in probe functions for error
-+ * checking: print debug or error message depending if the error value is
-+ * -EPROBE_DEFER and propagate error upwards.
-+ * It replaces code sequence:
-+ *    if (err != -EPROBE_DEFER)
-+ *            dev_err(dev, ...);
-+ *    else
-+ *            dev_dbg(dev, ...);
-+ *    return err;
-+ * with
-+ *    return dev_err_probe(dev, err, ...);
-+ *
-+ * Returns @err.
-+ *
-+ */
-+int dev_err_probe(const struct device *dev, int err, const char *fmt, ...)
-+{
-+      struct va_format vaf;
-+      va_list args;
-+
-+      va_start(args, fmt);
-+      vaf.fmt = fmt;
-+      vaf.va = &args;
-+
-+      if (err != -EPROBE_DEFER)
-+              dev_err(dev, "error %d: %pV", err, &vaf);
-+      else
-+              dev_dbg(dev, "error %d: %pV", err, &vaf);
-+
-+      va_end(args);
-+
-+      return err;
-+}
-+EXPORT_SYMBOL_GPL(dev_err_probe);
-+
- static inline bool fwnode_is_primary(struct fwnode_handle *fwnode)
- {
-       return fwnode && !IS_ERR(fwnode->secondary);
-diff --git a/include/linux/device.h b/include/linux/device.h
-index 37e359d81a86..0e38740fc53b 100644
---- a/include/linux/device.h
-+++ b/include/linux/device.h
-@@ -1579,6 +1579,9 @@ do {                                                                     \
-       WARN_ONCE(condition, "%s %s: " format, \
-                       dev_driver_string(dev), dev_name(dev), ## arg)
-+extern __printf(3, 4)
-+int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
-+
- /* Create alias, so I can be autoloaded. */
- #define MODULE_ALIAS_CHARDEV(major,minor) \
-       MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor))
--- 
-2.35.1
-
diff --git a/queue-4.19/revert-usb-bcma-add-a-check-for-devm_gpiod_get.patch b/queue-4.19/revert-usb-bcma-add-a-check-for-devm_gpiod_get.patch
deleted file mode 100644 (file)
index e545fdc..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-From 7881f0f70cc03028e6764bc1a63824c0e4825fbf Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 31 Aug 2021 08:54:19 +0200
-Subject: Revert "USB: bcma: Add a check for devm_gpiod_get"
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Rafał Miłecki <rafal@milecki.pl>
-
-[ Upstream commit d91adc5322ab53df4b6d1989242bfb6c63163eb2 ]
-
-This reverts commit f3de5d857bb2362b00e2a8d4bc886cd49dcb66db.
-
-That commit broke USB on all routers that have USB always powered on and
-don't require toggling any GPIO. It's a majority of devices actually.
-
-The original code worked and seemed safe: vcc GPIO is optional and
-bcma_hci_platform_power_gpio() takes care of checking the pointer before
-using it.
-
-This revert fixes:
-[   10.801127] bcma_hcd: probe of bcma0:11 failed with error -2
-
-Fixes: f3de5d857bb2 ("USB: bcma: Add a check for devm_gpiod_get")
-Cc: stable <stable@vger.kernel.org>
-Cc: Chuhong Yuan <hslester96@gmail.com>
-Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
-Link: https://lore.kernel.org/r/20210831065419.18371-1-zajec5@gmail.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Stable-dep-of: cd136706b4f9 ("USB: bcma: Make GPIO explicitly optional")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/usb/host/bcma-hcd.c | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/drivers/usb/host/bcma-hcd.c b/drivers/usb/host/bcma-hcd.c
-index 652fa29beb27..2400a826397a 100644
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -406,12 +406,9 @@ static int bcma_hcd_probe(struct bcma_device *core)
-               return -ENOMEM;
-       usb_dev->core = core;
--      if (core->dev.of_node) {
-+      if (core->dev.of_node)
-               usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
-                                                   GPIOD_OUT_HIGH);
--              if (IS_ERR(usb_dev->gpio_desc))
--                      return PTR_ERR(usb_dev->gpio_desc);
--      }
-       switch (core->id.id) {
-       case BCMA_CORE_USB20_HOST:
--- 
-2.35.1
-
index 1ea3f8910b2870c28818d0a4f039e1000803a244..34e7f454c26696658f290da8d39ad7f304702c88 100644 (file)
@@ -40,10 +40,6 @@ iio-ms5611-simplify-io-callback-parameters.patch
 iio-pressure-ms5611-fixed-value-compensation-bug.patch
 ceph-do-not-update-snapshot-context-when-there-is-no.patch
 ceph-avoid-putting-the-realm-twice-when-decoding-sna.patch
-usb-bcma-add-a-check-for-devm_gpiod_get.patch
-driver-core-add-device-probe-log-helper.patch
-revert-usb-bcma-add-a-check-for-devm_gpiod_get.patch
-usb-bcma-make-gpio-explicitly-optional.patch
 nilfs2-fix-nilfs_sufile_mark_dirty-not-set-segment-usage-as-dirty.patch
 input-synaptics-switch-touchpad-on-hp-laptop-15-da30.patch
 serial-8250-8250_omap-avoid-rs485-rts-glitch-on-set_.patch
diff --git a/queue-4.19/usb-bcma-add-a-check-for-devm_gpiod_get.patch b/queue-4.19/usb-bcma-add-a-check-for-devm_gpiod_get.patch
deleted file mode 100644 (file)
index f44c97b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From d66cf0f9f69975c272707f73673ed9141267839a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 16 Oct 2019 16:35:32 +0800
-Subject: USB: bcma: Add a check for devm_gpiod_get
-
-From: Chuhong Yuan <hslester96@gmail.com>
-
-[ Upstream commit f3de5d857bb2362b00e2a8d4bc886cd49dcb66db ]
-
-bcma_hcd_probe misses a check for devm_gpiod_get and may miss
-the error.
-Add a check for it and return the error if a failure occurs.
-
-Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
-Link: https://lore.kernel.org/r/20191016083531.5734-1-hslester96@gmail.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Stable-dep-of: cd136706b4f9 ("USB: bcma: Make GPIO explicitly optional")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/usb/host/bcma-hcd.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/usb/host/bcma-hcd.c b/drivers/usb/host/bcma-hcd.c
-index 2400a826397a..652fa29beb27 100644
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -406,9 +406,12 @@ static int bcma_hcd_probe(struct bcma_device *core)
-               return -ENOMEM;
-       usb_dev->core = core;
--      if (core->dev.of_node)
-+      if (core->dev.of_node) {
-               usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
-                                                   GPIOD_OUT_HIGH);
-+              if (IS_ERR(usb_dev->gpio_desc))
-+                      return PTR_ERR(usb_dev->gpio_desc);
-+      }
-       switch (core->id.id) {
-       case BCMA_CORE_USB20_HOST:
--- 
-2.35.1
-
diff --git a/queue-4.19/usb-bcma-make-gpio-explicitly-optional.patch b/queue-4.19/usb-bcma-make-gpio-explicitly-optional.patch
deleted file mode 100644 (file)
index 18be8a0..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From ac44493f24a7b75ab8b62b826875b87ca28d51bf Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 7 Nov 2022 10:07:53 +0100
-Subject: USB: bcma: Make GPIO explicitly optional
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Linus Walleij <linus.walleij@linaro.org>
-
-[ Upstream commit cd136706b4f925aa5d316642543babac90d45910 ]
-
-What the code does is to not check the return value from
-devm_gpiod_get() and then avoid using an erroneous GPIO descriptor
-with IS_ERR_OR_NULL().
-
-This will miss real errors from the GPIO core that should not be
-ignored, such as probe deferral.
-
-Instead request the GPIO as explicitly optional, which means that
-if it doesn't exist, the descriptor returned will be NULL.
-
-Then we can add error handling and also avoid just doing this on
-the device tree path, and simplify the site where the optional
-GPIO descriptor is used.
-
-There were some problems with cleaning up this GPIO descriptor
-use in the past, but this is the proper way to deal with it.
-
-Cc: Rafał Miłecki <rafal@milecki.pl>
-Cc: Chuhong Yuan <hslester96@gmail.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-Cc: stable <stable@kernel.org>
-Link: https://lore.kernel.org/r/20221107090753.1404679-1-linus.walleij@linaro.org
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/usb/host/bcma-hcd.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/usb/host/bcma-hcd.c b/drivers/usb/host/bcma-hcd.c
-index 2400a826397a..d8f2af8fb89d 100644
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -285,7 +285,7 @@ static void bcma_hci_platform_power_gpio(struct bcma_device *dev, bool val)
- {
-       struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
--      if (IS_ERR_OR_NULL(usb_dev->gpio_desc))
-+      if (!usb_dev->gpio_desc)
-               return;
-       gpiod_set_value(usb_dev->gpio_desc, val);
-@@ -406,9 +406,11 @@ static int bcma_hcd_probe(struct bcma_device *core)
-               return -ENOMEM;
-       usb_dev->core = core;
--      if (core->dev.of_node)
--              usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
--                                                  GPIOD_OUT_HIGH);
-+      usb_dev->gpio_desc = devm_gpiod_get_optional(&core->dev, "vcc",
-+                                                   GPIOD_OUT_HIGH);
-+      if (IS_ERR(usb_dev->gpio_desc))
-+              return dev_err_probe(&core->dev, PTR_ERR(usb_dev->gpio_desc),
-+                                   "error obtaining VCC GPIO");
-       switch (core->id.id) {
-       case BCMA_CORE_USB20_HOST:
--- 
-2.35.1
-
index bdccceddfc3d062de66d26fe3583d504822b50d7..51f97013992042e2f699cedbbd014d37d8d5da56 100644 (file)
@@ -52,7 +52,6 @@ iio-ms5611-simplify-io-callback-parameters.patch
 iio-pressure-ms5611-fixed-value-compensation-bug.patch
 ceph-do-not-update-snapshot-context-when-there-is-no.patch
 ceph-avoid-putting-the-realm-twice-when-decoding-sna.patch
-usb-bcma-make-gpio-explicitly-optional.patch
 firmware-google-release-devices-before-unregistering.patch
 firmware-coreboot-register-bus-in-module-init.patch
 nilfs2-fix-nilfs_sufile_mark_dirty-not-set-segment-usage-as-dirty.patch
diff --git a/queue-5.4/usb-bcma-make-gpio-explicitly-optional.patch b/queue-5.4/usb-bcma-make-gpio-explicitly-optional.patch
deleted file mode 100644 (file)
index 413af99..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From fc6503b10494eb9d7c522ee466f06a34e9868e76 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 7 Nov 2022 10:07:53 +0100
-Subject: USB: bcma: Make GPIO explicitly optional
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Linus Walleij <linus.walleij@linaro.org>
-
-[ Upstream commit cd136706b4f925aa5d316642543babac90d45910 ]
-
-What the code does is to not check the return value from
-devm_gpiod_get() and then avoid using an erroneous GPIO descriptor
-with IS_ERR_OR_NULL().
-
-This will miss real errors from the GPIO core that should not be
-ignored, such as probe deferral.
-
-Instead request the GPIO as explicitly optional, which means that
-if it doesn't exist, the descriptor returned will be NULL.
-
-Then we can add error handling and also avoid just doing this on
-the device tree path, and simplify the site where the optional
-GPIO descriptor is used.
-
-There were some problems with cleaning up this GPIO descriptor
-use in the past, but this is the proper way to deal with it.
-
-Cc: Rafał Miłecki <rafal@milecki.pl>
-Cc: Chuhong Yuan <hslester96@gmail.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-Cc: stable <stable@kernel.org>
-Link: https://lore.kernel.org/r/20221107090753.1404679-1-linus.walleij@linaro.org
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/usb/host/bcma-hcd.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/usb/host/bcma-hcd.c b/drivers/usb/host/bcma-hcd.c
-index 2400a826397a..d8f2af8fb89d 100644
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -285,7 +285,7 @@ static void bcma_hci_platform_power_gpio(struct bcma_device *dev, bool val)
- {
-       struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
--      if (IS_ERR_OR_NULL(usb_dev->gpio_desc))
-+      if (!usb_dev->gpio_desc)
-               return;
-       gpiod_set_value(usb_dev->gpio_desc, val);
-@@ -406,9 +406,11 @@ static int bcma_hcd_probe(struct bcma_device *core)
-               return -ENOMEM;
-       usb_dev->core = core;
--      if (core->dev.of_node)
--              usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
--                                                  GPIOD_OUT_HIGH);
-+      usb_dev->gpio_desc = devm_gpiod_get_optional(&core->dev, "vcc",
-+                                                   GPIOD_OUT_HIGH);
-+      if (IS_ERR(usb_dev->gpio_desc))
-+              return dev_err_probe(&core->dev, PTR_ERR(usb_dev->gpio_desc),
-+                                   "error obtaining VCC GPIO");
-       switch (core->id.id) {
-       case BCMA_CORE_USB20_HOST:
--- 
-2.35.1
-