]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 May 2019 07:47:28 +0000 (09:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 May 2019 07:47:28 +0000 (09:47 +0200)
added patches:
bluetooth-btusb-request-wake-pin-with-noautoen.patch
bluetooth-mediatek-fix-up-an-error-path-to-restore-bdev-tx_state.patch
clk-qcom-add-missing-freq-for-usb30_master_clk-on-8998.patch
scsi-rdma-srpt-fix-a-credit-leak-for-aborted-commands.patch
staging-iio-adt7316-allow-adt751x-to-use-internal-vref-for-all-dacs.patch
staging-iio-adt7316-fix-the-dac-read-calculation.patch
staging-iio-adt7316-fix-the-dac-write-calculation.patch

queue-4.19/bluetooth-btusb-request-wake-pin-with-noautoen.patch [new file with mode: 0644]
queue-4.19/bluetooth-mediatek-fix-up-an-error-path-to-restore-bdev-tx_state.patch [new file with mode: 0644]
queue-4.19/clk-qcom-add-missing-freq-for-usb30_master_clk-on-8998.patch [new file with mode: 0644]
queue-4.19/scsi-rdma-srpt-fix-a-credit-leak-for-aborted-commands.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/staging-iio-adt7316-allow-adt751x-to-use-internal-vref-for-all-dacs.patch [new file with mode: 0644]
queue-4.19/staging-iio-adt7316-fix-the-dac-read-calculation.patch [new file with mode: 0644]
queue-4.19/staging-iio-adt7316-fix-the-dac-write-calculation.patch [new file with mode: 0644]

diff --git a/queue-4.19/bluetooth-btusb-request-wake-pin-with-noautoen.patch b/queue-4.19/bluetooth-btusb-request-wake-pin-with-noautoen.patch
new file mode 100644 (file)
index 0000000..d40ee84
--- /dev/null
@@ -0,0 +1,46 @@
+From 771acc7e4a6e5dba779cb1a7fd851a164bc81033 Mon Sep 17 00:00:00 2001
+From: Brian Norris <briannorris@chromium.org>
+Date: Tue, 9 Apr 2019 11:49:17 -0700
+Subject: Bluetooth: btusb: request wake pin with NOAUTOEN
+
+From: Brian Norris <briannorris@chromium.org>
+
+commit 771acc7e4a6e5dba779cb1a7fd851a164bc81033 upstream.
+
+Badly-designed systems might have (for example) active-high wake pins
+that default to high (e.g., because of external pull ups) until they
+have an active firmware which starts driving it low.  This can cause an
+interrupt storm in the time between request_irq() and disable_irq().
+
+We don't support shared interrupts here, so let's just pre-configure the
+interrupt to avoid auto-enabling it.
+
+Fixes: fd913ef7ce61 ("Bluetooth: btusb: Add out-of-band wakeup support")
+Fixes: 5364a0b4f4be ("arm64: dts: rockchip: move QCA6174A wakeup pin into its USB node")
+Signed-off-by: Brian Norris <briannorris@chromium.org>
+Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bluetooth/btusb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -2888,6 +2888,7 @@ static int btusb_config_oob_wake(struct
+               return 0;
+       }
++      irq_set_status_flags(irq, IRQ_NOAUTOEN);
+       ret = devm_request_irq(&hdev->dev, irq, btusb_oob_wake_handler,
+                              0, "OOB Wake-on-BT", data);
+       if (ret) {
+@@ -2902,7 +2903,6 @@ static int btusb_config_oob_wake(struct
+       }
+       data->oob_wake_irq = irq;
+-      disable_irq(irq);
+       bt_dev_info(hdev, "OOB Wake-on-BT configured at IRQ %u", irq);
+       return 0;
+ }
diff --git a/queue-4.19/bluetooth-mediatek-fix-up-an-error-path-to-restore-bdev-tx_state.patch b/queue-4.19/bluetooth-mediatek-fix-up-an-error-path-to-restore-bdev-tx_state.patch
new file mode 100644 (file)
index 0000000..a38bd81
--- /dev/null
@@ -0,0 +1,37 @@
+From 77f328dbc6cf42f22c691a164958a5452142a542 Mon Sep 17 00:00:00 2001
+From: Sean Wang <sean.wang@mediatek.com>
+Date: Fri, 15 Feb 2019 07:19:35 +0800
+Subject: Bluetooth: mediatek: fix up an error path to restore bdev->tx_state
+
+From: Sean Wang <sean.wang@mediatek.com>
+
+commit 77f328dbc6cf42f22c691a164958a5452142a542 upstream.
+
+Restore bdev->tx_state with clearing bit BTMTKUART_TX_WAIT_VND_EVT
+when there is an error on waiting for the corresponding event.
+
+Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices")
+Signed-off-by: Sean Wang <sean.wang@mediatek.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bluetooth/btmtkuart.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/bluetooth/btmtkuart.c
++++ b/drivers/bluetooth/btmtkuart.c
+@@ -115,11 +115,13 @@ static int mtk_hci_wmt_sync(struct hci_d
+                                 TASK_INTERRUPTIBLE, HCI_INIT_TIMEOUT);
+       if (err == -EINTR) {
+               bt_dev_err(hdev, "Execution of wmt command interrupted");
++              clear_bit(BTMTKUART_TX_WAIT_VND_EVT, &bdev->tx_state);
+               return err;
+       }
+       if (err) {
+               bt_dev_err(hdev, "Execution of wmt command timed out");
++              clear_bit(BTMTKUART_TX_WAIT_VND_EVT, &bdev->tx_state);
+               return -ETIMEDOUT;
+       }
diff --git a/queue-4.19/clk-qcom-add-missing-freq-for-usb30_master_clk-on-8998.patch b/queue-4.19/clk-qcom-add-missing-freq-for-usb30_master_clk-on-8998.patch
new file mode 100644 (file)
index 0000000..8a2993e
--- /dev/null
@@ -0,0 +1,31 @@
+From 0c8ff62504e3a667387e87889a259632c3199a86 Mon Sep 17 00:00:00 2001
+From: Jeffrey Hugo <jhugo@codeaurora.org>
+Date: Fri, 4 Jan 2019 09:49:46 -0700
+Subject: clk: qcom: Add missing freq for usb30_master_clk on 8998
+
+From: Jeffrey Hugo <jhugo@codeaurora.org>
+
+commit 0c8ff62504e3a667387e87889a259632c3199a86 upstream.
+
+The usb30_master_clk supports a 60Mhz frequency, but that is missing from
+the table of supported frequencies.  Add it.
+
+Fixes: b5f5f525c547 (clk: qcom: Add MSM8998 Global Clock Control (GCC) driver)
+Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
+Signed-off-by: Stephen Boyd <sboyd@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/clk/qcom/gcc-msm8998.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/clk/qcom/gcc-msm8998.c
++++ b/drivers/clk/qcom/gcc-msm8998.c
+@@ -1101,6 +1101,7 @@ static struct clk_rcg2 ufs_axi_clk_src =
+ static const struct freq_tbl ftbl_usb30_master_clk_src[] = {
+       F(19200000, P_XO, 1, 0, 0),
++      F(60000000, P_GPLL0_OUT_MAIN, 10, 0, 0),
+       F(120000000, P_GPLL0_OUT_MAIN, 5, 0, 0),
+       F(150000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
+       { }
diff --git a/queue-4.19/scsi-rdma-srpt-fix-a-credit-leak-for-aborted-commands.patch b/queue-4.19/scsi-rdma-srpt-fix-a-credit-leak-for-aborted-commands.patch
new file mode 100644 (file)
index 0000000..4c9835e
--- /dev/null
@@ -0,0 +1,49 @@
+From 40ca8757291ca7a8775498112d320205b2a2e571 Mon Sep 17 00:00:00 2001
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Fri, 25 Jan 2019 10:34:51 -0800
+Subject: scsi: RDMA/srpt: Fix a credit leak for aborted commands
+
+From: Bart Van Assche <bvanassche@acm.org>
+
+commit 40ca8757291ca7a8775498112d320205b2a2e571 upstream.
+
+Make sure that the next time a response is sent to the initiator that the
+credit it had allocated for the aborted request gets freed.
+
+Cc: Doug Ledford <dledford@redhat.com>
+Cc: Jason Gunthorpe <jgg@ziepe.ca>
+Cc: Nicholas Bellinger <nab@linux-iscsi.org>
+Cc: Mike Christie <mchristi@redhat.com>
+Cc: Hannes Reinecke <hare@suse.com>
+Cc: Christoph Hellwig <hch@lst.de>
+Fixes: 131e6abc674e ("target: Add TFO->abort_task for aborted task resources release") # v3.15
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/infiniband/ulp/srpt/ib_srpt.c |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
++++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
+@@ -2793,8 +2793,19 @@ static void srpt_queue_tm_rsp(struct se_
+       srpt_queue_response(cmd);
+ }
++/*
++ * This function is called for aborted commands if no response is sent to the
++ * initiator. Make sure that the credits freed by aborting a command are
++ * returned to the initiator the next time a response is sent by incrementing
++ * ch->req_lim_delta.
++ */
+ static void srpt_aborted_task(struct se_cmd *cmd)
+ {
++      struct srpt_send_ioctx *ioctx = container_of(cmd,
++                              struct srpt_send_ioctx, cmd);
++      struct srpt_rdma_ch *ch = ioctx->ch;
++
++      atomic_inc(&ch->req_lim_delta);
+ }
+ static int srpt_queue_status(struct se_cmd *cmd)
index d019eee36815270510a01bb3598f16face452c90..398cb71ddf1624cccfde6f973136186c8e2c5aef 100644 (file)
@@ -68,3 +68,10 @@ arm-orion-don-t-use-using-64-bit-dma-masks.patch
 arm-iop-don-t-use-using-64-bit-dma-masks.patch
 block-pass-no-op-callback-to-init_work.patch
 perf-x86-amd-update-generic-hardware-cache-events-for-family-17h.patch
+bluetooth-btusb-request-wake-pin-with-noautoen.patch
+bluetooth-mediatek-fix-up-an-error-path-to-restore-bdev-tx_state.patch
+clk-qcom-add-missing-freq-for-usb30_master_clk-on-8998.patch
+staging-iio-adt7316-allow-adt751x-to-use-internal-vref-for-all-dacs.patch
+staging-iio-adt7316-fix-the-dac-read-calculation.patch
+staging-iio-adt7316-fix-the-dac-write-calculation.patch
+scsi-rdma-srpt-fix-a-credit-leak-for-aborted-commands.patch
diff --git a/queue-4.19/staging-iio-adt7316-allow-adt751x-to-use-internal-vref-for-all-dacs.patch b/queue-4.19/staging-iio-adt7316-allow-adt751x-to-use-internal-vref-for-all-dacs.patch
new file mode 100644 (file)
index 0000000..0ae35d5
--- /dev/null
@@ -0,0 +1,34 @@
+From 10bfe7cc1739c22f0aa296b39e53f61e9e3f4d99 Mon Sep 17 00:00:00 2001
+From: Jeremy Fertic <jeremyfertic@gmail.com>
+Date: Tue, 11 Dec 2018 17:55:00 -0700
+Subject: staging: iio: adt7316: allow adt751x to use internal vref for all dacs
+
+From: Jeremy Fertic <jeremyfertic@gmail.com>
+
+commit 10bfe7cc1739c22f0aa296b39e53f61e9e3f4d99 upstream.
+
+With adt7516/7/9, internal vref is available for dacs a and b, dacs c and
+d, or all dacs. The driver doesn't currently support internal vref for all
+dacs. Change the else if to an if so both bits are checked rather than
+just one or the other.
+
+Signed-off-by: Jeremy Fertic <jeremyfertic@gmail.com>
+Fixes: 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver")
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/iio/addac/adt7316.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/iio/addac/adt7316.c
++++ b/drivers/staging/iio/addac/adt7316.c
+@@ -1086,7 +1086,7 @@ static ssize_t adt7316_store_DAC_interna
+               ldac_config = chip->ldac_config & (~ADT7516_DAC_IN_VREF_MASK);
+               if (data & 0x1)
+                       ldac_config |= ADT7516_DAC_AB_IN_VREF;
+-              else if (data & 0x2)
++              if (data & 0x2)
+                       ldac_config |= ADT7516_DAC_CD_IN_VREF;
+       } else {
+               ret = kstrtou8(buf, 16, &data);
diff --git a/queue-4.19/staging-iio-adt7316-fix-the-dac-read-calculation.patch b/queue-4.19/staging-iio-adt7316-fix-the-dac-read-calculation.patch
new file mode 100644 (file)
index 0000000..9297bbb
--- /dev/null
@@ -0,0 +1,57 @@
+From 45130fb030aec26ac28b4bb23344901df3ec3b7f Mon Sep 17 00:00:00 2001
+From: Jeremy Fertic <jeremyfertic@gmail.com>
+Date: Sat, 22 Dec 2018 21:57:42 -0700
+Subject: staging: iio: adt7316: fix the dac read calculation
+
+From: Jeremy Fertic <jeremyfertic@gmail.com>
+
+commit 45130fb030aec26ac28b4bb23344901df3ec3b7f upstream.
+
+The calculation of the current dac value is using the wrong bits of the
+dac lsb register. Create two macros to shift the lsb register value into
+lsb position, depending on whether the dac is 10 or 12 bit. Initialize
+data to 0 so, with an 8 bit dac, the msb register value can be bitwise
+ORed with data.
+
+Fixes: 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver")
+Signed-off-by: Jeremy Fertic <jeremyfertic@gmail.com>
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/iio/addac/adt7316.c |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/drivers/staging/iio/addac/adt7316.c
++++ b/drivers/staging/iio/addac/adt7316.c
+@@ -47,6 +47,8 @@
+ #define ADT7516_MSB_AIN3              0xA
+ #define ADT7516_MSB_AIN4              0xB
+ #define ADT7316_DA_DATA_BASE          0x10
++#define ADT7316_DA_10_BIT_LSB_SHIFT   6
++#define ADT7316_DA_12_BIT_LSB_SHIFT   4
+ #define ADT7316_DA_MSB_DATA_REGS      4
+ #define ADT7316_LSB_DAC_A             0x10
+ #define ADT7316_MSB_DAC_A             0x11
+@@ -1408,7 +1410,7 @@ static IIO_DEVICE_ATTR(ex_analog_temp_of
+ static ssize_t adt7316_show_DAC(struct adt7316_chip_info *chip,
+               int channel, char *buf)
+ {
+-      u16 data;
++      u16 data = 0;
+       u8 msb, lsb, offset;
+       int ret;
+@@ -1433,7 +1435,11 @@ static ssize_t adt7316_show_DAC(struct a
+       if (ret)
+               return -EIO;
+-      data = (msb << offset) + (lsb & ((1 << offset) - 1));
++      if (chip->dac_bits == 12)
++              data = lsb >> ADT7316_DA_12_BIT_LSB_SHIFT;
++      else if (chip->dac_bits == 10)
++              data = lsb >> ADT7316_DA_10_BIT_LSB_SHIFT;
++      data |= msb << offset;
+       return sprintf(buf, "%d\n", data);
+ }
diff --git a/queue-4.19/staging-iio-adt7316-fix-the-dac-write-calculation.patch b/queue-4.19/staging-iio-adt7316-fix-the-dac-write-calculation.patch
new file mode 100644 (file)
index 0000000..4eddf3b
--- /dev/null
@@ -0,0 +1,54 @@
+From 78accaea117c1ae878774974fab91ac4a0b0e2b0 Mon Sep 17 00:00:00 2001
+From: Jeremy Fertic <jeremyfertic@gmail.com>
+Date: Sat, 22 Dec 2018 21:57:43 -0700
+Subject: staging: iio: adt7316: fix the dac write calculation
+
+From: Jeremy Fertic <jeremyfertic@gmail.com>
+
+commit 78accaea117c1ae878774974fab91ac4a0b0e2b0 upstream.
+
+The lsb calculation is not masking the correct bits from the user input.
+Subtract 1 from (1 << offset) to correctly set up the mask to be applied
+to user input.
+
+The lsb register stores its value starting at the bit 7 position.
+adt7316_store_DAC() currently assumes the value is at the other end of the
+register. Shift the lsb value before storing it in a new variable lsb_reg,
+and write this variable to the lsb register.
+
+Fixes: 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver")
+Signed-off-by: Jeremy Fertic <jeremyfertic@gmail.com>
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/iio/addac/adt7316.c |   10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+--- a/drivers/staging/iio/addac/adt7316.c
++++ b/drivers/staging/iio/addac/adt7316.c
+@@ -1447,7 +1447,7 @@ static ssize_t adt7316_show_DAC(struct a
+ static ssize_t adt7316_store_DAC(struct adt7316_chip_info *chip,
+               int channel, const char *buf, size_t len)
+ {
+-      u8 msb, lsb, offset;
++      u8 msb, lsb, lsb_reg, offset;
+       u16 data;
+       int ret;
+@@ -1465,9 +1465,13 @@ static ssize_t adt7316_store_DAC(struct
+               return -EINVAL;
+       if (chip->dac_bits > 8) {
+-              lsb = data & (1 << offset);
++              lsb = data & ((1 << offset) - 1);
++              if (chip->dac_bits == 12)
++                      lsb_reg = lsb << ADT7316_DA_12_BIT_LSB_SHIFT;
++              else
++                      lsb_reg = lsb << ADT7316_DA_10_BIT_LSB_SHIFT;
+               ret = chip->bus.write(chip->bus.client,
+-                      ADT7316_DA_DATA_BASE + channel * 2, lsb);
++                      ADT7316_DA_DATA_BASE + channel * 2, lsb_reg);
+               if (ret)
+                       return -EIO;
+       }