]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Aug 2019 15:56:34 +0000 (17:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Aug 2019 15:56:34 +0000 (17:56 +0200)
added patches:
hid-add-quirk-for-hp-x1200-pixart-oem-mouse.patch
spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch

queue-4.4/hid-add-quirk-for-hp-x1200-pixart-oem-mouse.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch [new file with mode: 0644]

diff --git a/queue-4.4/hid-add-quirk-for-hp-x1200-pixart-oem-mouse.patch b/queue-4.4/hid-add-quirk-for-hp-x1200-pixart-oem-mouse.patch
new file mode 100644 (file)
index 0000000..208de60
--- /dev/null
@@ -0,0 +1,46 @@
+From 49869d2ea9eecc105a10724c1abf035151a3c4e2 Mon Sep 17 00:00:00 2001
+From: Sebastian Parschauer <s.parschauer@gmx.de>
+Date: Wed, 24 Jul 2019 20:40:03 +0200
+Subject: HID: Add quirk for HP X1200 PIXART OEM mouse
+
+From: Sebastian Parschauer <s.parschauer@gmx.de>
+
+commit 49869d2ea9eecc105a10724c1abf035151a3c4e2 upstream.
+
+The PixArt OEM mice are known for disconnecting every minute in
+runlevel 1 or 3 if they are not always polled. So add quirk
+ALWAYS_POLL for this one as well.
+
+Jonathan Teh (@jonathan-teh) reported and tested the quirk.
+Reference: https://github.com/sriemer/fix-linux-mouse/issues/15
+
+Signed-off-by: Sebastian Parschauer <s.parschauer@gmx.de>
+CC: stable@vger.kernel.org
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hid/hid-ids.h           |    1 +
+ drivers/hid/usbhid/hid-quirks.c |    1 +
+ 2 files changed, 2 insertions(+)
+
+--- a/drivers/hid/hid-ids.h
++++ b/drivers/hid/hid-ids.h
+@@ -470,6 +470,7 @@
+ #define USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0A4A 0x0a4a
+ #define USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A 0x0b4a
+ #define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE                0x134a
++#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641   0x0641
+ #define USB_VENDOR_ID_HUION           0x256c
+ #define USB_DEVICE_ID_HUION_TABLET    0x006e
+--- a/drivers/hid/usbhid/hid-quirks.c
++++ b/drivers/hid/usbhid/hid-quirks.c
+@@ -82,6 +82,7 @@ static const struct hid_blacklist {
+       { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0A4A, HID_QUIRK_ALWAYS_POLL },
+       { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A, HID_QUIRK_ALWAYS_POLL },
+       { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL },
++      { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641, HID_QUIRK_ALWAYS_POLL },
+       { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C077, HID_QUIRK_ALWAYS_POLL },
+       { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KEYBOARD_G710_PLUS, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C01A, HID_QUIRK_ALWAYS_POLL },
index ec0aa77cd920119ab403e8164a56409e0b2a9797..badf127fec7a69fd71f0946c44c4b1fb63a14467 100644 (file)
@@ -2,4 +2,6 @@ arm64-cpufeature-fix-ctr_el0-field-definitions.patch
 arm64-cpufeature-fix-feature-comparison-for-ctr_el0..patch
 netfilter-nfnetlink_acct-validate-nfacct_quota-param.patch
 netfilter-nfnetlink_acct-validate-nfacct_quota-param.patch-161
+hid-add-quirk-for-hp-x1200-pixart-oem-mouse.patch
+spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch
 tcp-be-more-careful-in-tcp_fragment.patch
diff --git a/queue-4.4/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch b/queue-4.4/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch
new file mode 100644 (file)
index 0000000..93120c7
--- /dev/null
@@ -0,0 +1,54 @@
+From 8d8bef50365847134b51c1ec46786bc2873e4e47 Mon Sep 17 00:00:00 2001
+From: Lukas Wunner <lukas@wunner.de>
+Date: Wed, 3 Jul 2019 12:29:31 +0200
+Subject: spi: bcm2835: Fix 3-wire mode if DMA is enabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Lukas Wunner <lukas@wunner.de>
+
+commit 8d8bef50365847134b51c1ec46786bc2873e4e47 upstream.
+
+Commit 6935224da248 ("spi: bcm2835: enable support of 3-wire mode")
+added 3-wire support to the BCM2835 SPI driver by setting the REN bit
+(Read Enable) in the CS register when receiving data.  The REN bit puts
+the transmitter in high-impedance state.  The driver recognizes that
+data is to be received by checking whether the rx_buf of a transfer is
+non-NULL.
+
+Commit 3ecd37edaa2a ("spi: bcm2835: enable dma modes for transfers
+meeting certain conditions") subsequently broke 3-wire support because
+it set the SPI_MASTER_MUST_RX flag which causes spi_map_msg() to replace
+rx_buf with a dummy buffer if it is NULL.  As a result, rx_buf is
+*always* non-NULL if DMA is enabled.
+
+Reinstate 3-wire support by not only checking whether rx_buf is non-NULL,
+but also checking that it is not the dummy buffer.
+
+Fixes: 3ecd37edaa2a ("spi: bcm2835: enable dma modes for transfers meeting certain conditions")
+Reported-by: Nuno Sá <nuno.sa@analog.com>
+Signed-off-by: Lukas Wunner <lukas@wunner.de>
+Cc: stable@vger.kernel.org # v4.2+
+Cc: Martin Sperl <kernel@martin.sperl.org>
+Acked-by: Stefan Wahren <wahrenst@gmx.net>
+Link: https://lore.kernel.org/r/328318841455e505370ef8ecad97b646c033dc8a.1562148527.git.lukas@wunner.de
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/spi/spi-bcm2835.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/spi/spi-bcm2835.c
++++ b/drivers/spi/spi-bcm2835.c
+@@ -554,7 +554,8 @@ static int bcm2835_spi_transfer_one(stru
+       bcm2835_wr(bs, BCM2835_SPI_CLK, cdiv);
+       /* handle all the 3-wire mode */
+-      if ((spi->mode & SPI_3WIRE) && (tfr->rx_buf))
++      if (spi->mode & SPI_3WIRE && tfr->rx_buf &&
++          tfr->rx_buf != ctlr->dummy_rx)
+               cs |= BCM2835_SPI_CS_REN;
+       else
+               cs &= ~BCM2835_SPI_CS_REN;