]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Dec 2019 18:48:35 +0000 (19:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Dec 2019 18:48:35 +0000 (19:48 +0100)
added patches:
ath10k-restore-qca9880-ar1a-v1-detection.patch
media-v4l2-ctrl-fix-flags-for-do_white_balance.patch
net-macb-fix-error-format-in-dev_err.patch
pwm-clear-chip_data-in-pwm_put.patch

queue-4.4/ath10k-restore-qca9880-ar1a-v1-detection.patch [new file with mode: 0644]
queue-4.4/media-v4l2-ctrl-fix-flags-for-do_white_balance.patch [new file with mode: 0644]
queue-4.4/net-macb-fix-error-format-in-dev_err.patch [new file with mode: 0644]
queue-4.4/pwm-clear-chip_data-in-pwm_put.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/ath10k-restore-qca9880-ar1a-v1-detection.patch b/queue-4.4/ath10k-restore-qca9880-ar1a-v1-detection.patch
new file mode 100644 (file)
index 0000000..252a2f9
--- /dev/null
@@ -0,0 +1,88 @@
+From f8914a14623a79b73f72b2b1ee4cd9b2cb91b735 Mon Sep 17 00:00:00 2001
+From: Christian Lamparter <chunkeey@gmail.com>
+Date: Fri, 6 Sep 2019 23:54:23 +0200
+Subject: ath10k: restore QCA9880-AR1A (v1) detection
+
+From: Christian Lamparter <chunkeey@gmail.com>
+
+commit f8914a14623a79b73f72b2b1ee4cd9b2cb91b735 upstream.
+
+This patch restores the old behavior that read
+the chip_id on the QCA988x before resetting the
+chip. This needs to be done in this order since
+the unsupported QCA988x AR1A chips fall off the
+bus when resetted. Otherwise the next MMIO Op
+after the reset causes a BUS ERROR and panic.
+
+Cc: stable@vger.kernel.org
+Fixes: 1a7fecb766c8 ("ath10k: reset chip before reading chip_id in probe")
+Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/ath/ath10k/pci.c |   27 +++++++++++++++++++++------
+ 1 file changed, 21 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath10k/pci.c
++++ b/drivers/net/wireless/ath/ath10k/pci.c
+@@ -2988,12 +2988,13 @@ static int ath10k_pci_probe(struct pci_d
+       struct ath10k_pci *ar_pci;
+       enum ath10k_hw_rev hw_rev;
+       u32 chip_id;
+-      bool pci_ps;
++      bool pci_ps, is_qca988x = false;
+       switch (pci_dev->device) {
+       case QCA988X_2_0_DEVICE_ID:
+               hw_rev = ATH10K_HW_QCA988X;
+               pci_ps = false;
++              is_qca988x = true;
+               break;
+       case QCA6164_2_1_DEVICE_ID:
+       case QCA6174_2_1_DEVICE_ID:
+@@ -3087,6 +3088,19 @@ static int ath10k_pci_probe(struct pci_d
+               goto err_deinit_irq;
+       }
++      /* Read CHIP_ID before reset to catch QCA9880-AR1A v1 devices that
++       * fall off the bus during chip_reset. These chips have the same pci
++       * device id as the QCA9880 BR4A or 2R4E. So that's why the check.
++       */
++      if (is_qca988x) {
++              chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
++              if (chip_id != 0xffffffff) {
++                      if (!ath10k_pci_chip_is_supported(pdev->device,
++                                                        chip_id))
++                              goto err_unsupported;
++              }
++      }
++
+       ret = ath10k_pci_chip_reset(ar);
+       if (ret) {
+               ath10k_err(ar, "failed to reset chip: %d\n", ret);
+@@ -3099,11 +3113,8 @@ static int ath10k_pci_probe(struct pci_d
+               goto err_free_irq;
+       }
+-      if (!ath10k_pci_chip_is_supported(pdev->device, chip_id)) {
+-              ath10k_err(ar, "device %04x with chip_id %08x isn't supported\n",
+-                         pdev->device, chip_id);
+-              goto err_free_irq;
+-      }
++      if (!ath10k_pci_chip_is_supported(pdev->device, chip_id))
++              goto err_unsupported;
+       ret = ath10k_core_register(ar, chip_id);
+       if (ret) {
+@@ -3113,6 +3124,10 @@ static int ath10k_pci_probe(struct pci_d
+       return 0;
++err_unsupported:
++      ath10k_err(ar, "device %04x with chip_id %08x isn't supported\n",
++                 pdev->device, bus_params.chip_id);
++
+ err_free_irq:
+       ath10k_pci_free_irq(ar);
+       ath10k_pci_kill_tasklet(ar);
diff --git a/queue-4.4/media-v4l2-ctrl-fix-flags-for-do_white_balance.patch b/queue-4.4/media-v4l2-ctrl-fix-flags-for-do_white_balance.patch
new file mode 100644 (file)
index 0000000..abc8557
--- /dev/null
@@ -0,0 +1,35 @@
+From a0816e5088baab82aa738d61a55513114a673c8e Mon Sep 17 00:00:00 2001
+From: Eugen Hristev <eugen.hristev@microchip.com>
+Date: Mon, 15 Apr 2019 10:13:51 -0400
+Subject: media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE
+
+From: Eugen Hristev <eugen.hristev@microchip.com>
+
+commit a0816e5088baab82aa738d61a55513114a673c8e upstream.
+
+Control DO_WHITE_BALANCE is a button, with read only and execute-on-write flags.
+Adding this control in the proper list in the fill function.
+
+After adding it here, we can see output of v4l2-ctl -L
+do_white_balance 0x0098090d (button) : flags=write-only, execute-on-write
+
+Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/v4l2-core/v4l2-ctrls.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/media/v4l2-core/v4l2-ctrls.c
++++ b/drivers/media/v4l2-core/v4l2-ctrls.c
+@@ -991,6 +991,7 @@ void v4l2_ctrl_fill(u32 id, const char *
+       case V4L2_CID_FLASH_STROBE_STOP:
+       case V4L2_CID_AUTO_FOCUS_START:
+       case V4L2_CID_AUTO_FOCUS_STOP:
++      case V4L2_CID_DO_WHITE_BALANCE:
+               *type = V4L2_CTRL_TYPE_BUTTON;
+               *flags |= V4L2_CTRL_FLAG_WRITE_ONLY |
+                         V4L2_CTRL_FLAG_EXECUTE_ON_WRITE;
diff --git a/queue-4.4/net-macb-fix-error-format-in-dev_err.patch b/queue-4.4/net-macb-fix-error-format-in-dev_err.patch
new file mode 100644 (file)
index 0000000..6d87000
--- /dev/null
@@ -0,0 +1,80 @@
+From f413cbb332a0b5251a790f396d0eb4ebcade5dec Mon Sep 17 00:00:00 2001
+From: Luca Ceresoli <luca@lucaceresoli.net>
+Date: Tue, 14 May 2019 15:23:07 +0200
+Subject: net: macb: fix error format in dev_err()
+
+From: Luca Ceresoli <luca@lucaceresoli.net>
+
+commit f413cbb332a0b5251a790f396d0eb4ebcade5dec upstream.
+
+Errors are negative numbers. Using %u shows them as very large positive
+numbers such as 4294967277 that don't make sense. Use the %d format
+instead, and get a much nicer -19.
+
+Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
+Fixes: b48e0bab142f ("net: macb: Migrate to devm clock interface")
+Fixes: 93b31f48b3ba ("net/macb: unify clock management")
+Fixes: 421d9df0628b ("net/macb: merge at91_ether driver into macb driver")
+Fixes: aead88bd0e99 ("net: ethernet: macb: Add support for rx_clk")
+Fixes: f5473d1d44e4 ("net: macb: Support clock management for tsu_clk")
+Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/cadence/macb.c |   12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/ethernet/cadence/macb.c
++++ b/drivers/net/ethernet/cadence/macb.c
+@@ -2275,14 +2275,14 @@ static int macb_clk_init(struct platform
+       *pclk = devm_clk_get(&pdev->dev, "pclk");
+       if (IS_ERR(*pclk)) {
+               err = PTR_ERR(*pclk);
+-              dev_err(&pdev->dev, "failed to get macb_clk (%u)\n", err);
++              dev_err(&pdev->dev, "failed to get macb_clk (%d)\n", err);
+               return err;
+       }
+       *hclk = devm_clk_get(&pdev->dev, "hclk");
+       if (IS_ERR(*hclk)) {
+               err = PTR_ERR(*hclk);
+-              dev_err(&pdev->dev, "failed to get hclk (%u)\n", err);
++              dev_err(&pdev->dev, "failed to get hclk (%d)\n", err);
+               return err;
+       }
+@@ -2292,19 +2292,19 @@ static int macb_clk_init(struct platform
+       err = clk_prepare_enable(*pclk);
+       if (err) {
+-              dev_err(&pdev->dev, "failed to enable pclk (%u)\n", err);
++              dev_err(&pdev->dev, "failed to enable pclk (%d)\n", err);
+               return err;
+       }
+       err = clk_prepare_enable(*hclk);
+       if (err) {
+-              dev_err(&pdev->dev, "failed to enable hclk (%u)\n", err);
++              dev_err(&pdev->dev, "failed to enable hclk (%d)\n", err);
+               goto err_disable_pclk;
+       }
+       err = clk_prepare_enable(*tx_clk);
+       if (err) {
+-              dev_err(&pdev->dev, "failed to enable tx_clk (%u)\n", err);
++              dev_err(&pdev->dev, "failed to enable tx_clk (%d)\n", err);
+               goto err_disable_hclk;
+       }
+@@ -2704,7 +2704,7 @@ static int at91ether_clk_init(struct pla
+       err = clk_prepare_enable(*pclk);
+       if (err) {
+-              dev_err(&pdev->dev, "failed to enable pclk (%u)\n", err);
++              dev_err(&pdev->dev, "failed to enable pclk (%d)\n", err);
+               return err;
+       }
diff --git a/queue-4.4/pwm-clear-chip_data-in-pwm_put.patch b/queue-4.4/pwm-clear-chip_data-in-pwm_put.patch
new file mode 100644 (file)
index 0000000..aec3bb9
--- /dev/null
@@ -0,0 +1,47 @@
+From e926b12c611c2095c7976e2ed31753ad6eb5ff1a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Mon, 25 Mar 2019 10:49:33 +0100
+Subject: pwm: Clear chip_data in pwm_put()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+
+commit e926b12c611c2095c7976e2ed31753ad6eb5ff1a upstream.
+
+After a PWM is disposed by its user the per chip data becomes invalid.
+Clear the data in common code instead of the device drivers to get
+consistent behaviour. Before this patch only three of nine drivers
+cleaned up here.
+
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/pwm/core.c        |    1 +
+ drivers/pwm/pwm-samsung.c |    1 -
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/pwm/core.c
++++ b/drivers/pwm/core.c
+@@ -781,6 +781,7 @@ void pwm_put(struct pwm_device *pwm)
+       if (pwm->chip->ops->free)
+               pwm->chip->ops->free(pwm->chip, pwm);
++      pwm_set_chip_data(pwm, NULL);
+       pwm->label = NULL;
+       module_put(pwm->chip->ops->owner);
+--- a/drivers/pwm/pwm-samsung.c
++++ b/drivers/pwm/pwm-samsung.c
+@@ -226,7 +226,6 @@ static int pwm_samsung_request(struct pw
+ static void pwm_samsung_free(struct pwm_chip *chip, struct pwm_device *pwm)
+ {
+       devm_kfree(chip->dev, pwm_get_chip_data(pwm));
+-      pwm_set_chip_data(pwm, NULL);
+ }
+ static int pwm_samsung_enable(struct pwm_chip *chip, struct pwm_device *pwm)
index 3437b7116c00f706c6a01b15a0c2a3c6abf2e4ab..ea29be8297bb241ed50fd244b0c7d2f3494c9b1d 100644 (file)
@@ -77,3 +77,7 @@ mtd-remove-a-debug-trace-in-mtdpart.c.patch
 staging-rtl8192e-fix-potential-use-after-free.patch
 usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch
 mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch
+media-v4l2-ctrl-fix-flags-for-do_white_balance.patch
+net-macb-fix-error-format-in-dev_err.patch
+pwm-clear-chip_data-in-pwm_put.patch
+ath10k-restore-qca9880-ar1a-v1-detection.patch