From: Greg Kroah-Hartman Date: Wed, 7 Aug 2019 16:49:47 +0000 (+0200) Subject: drop broken spi patch X-Git-Tag: v5.2.8~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e984b4a9fa7b61e6ca75248d1205a547a085157;p=thirdparty%2Fkernel%2Fstable-queue.git drop broken spi patch --- diff --git a/queue-4.14/series b/queue-4.14/series index 20e81da2a02..f7e9a7a244a 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -5,4 +5,3 @@ tcp-be-more-careful-in-tcp_fragment.patch arm64-cpufeature-fix-feature-comparison-for-ctr_el0.-cwg-erg.patch hid-wacom-fix-bit-shift-for-cintiq-companion-2.patch hid-add-quirk-for-hp-x1200-pixart-oem-mouse.patch -spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch diff --git a/queue-4.14/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch b/queue-4.14/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch deleted file mode 100644 index 93120c7a6b2..00000000000 --- a/queue-4.14/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 8d8bef50365847134b51c1ec46786bc2873e4e47 Mon Sep 17 00:00:00 2001 -From: Lukas Wunner -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 - -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á -Signed-off-by: Lukas Wunner -Cc: stable@vger.kernel.org # v4.2+ -Cc: Martin Sperl -Acked-by: Stefan Wahren -Link: https://lore.kernel.org/r/328318841455e505370ef8ecad97b646c033dc8a.1562148527.git.lukas@wunner.de -Signed-off-by: Mark Brown -Signed-off-by: Greg Kroah-Hartman - ---- - 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; diff --git a/queue-4.19/series b/queue-4.19/series index 5638e8de4bd..c11910f113a 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -8,5 +8,4 @@ libnvdimm-bus-prepare-the-nd_ioctl-path-to-be-re-ent.patch libnvdimm-bus-fix-wait_nvdimm_bus_probe_idle-abba-de.patch hid-wacom-fix-bit-shift-for-cintiq-companion-2.patch hid-add-quirk-for-hp-x1200-pixart-oem-mouse.patch -spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch ib-directly-cast-the-sockaddr-union-to-aockaddr.patch diff --git a/queue-4.19/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch b/queue-4.19/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch deleted file mode 100644 index 93120c7a6b2..00000000000 --- a/queue-4.19/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 8d8bef50365847134b51c1ec46786bc2873e4e47 Mon Sep 17 00:00:00 2001 -From: Lukas Wunner -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 - -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á -Signed-off-by: Lukas Wunner -Cc: stable@vger.kernel.org # v4.2+ -Cc: Martin Sperl -Acked-by: Stefan Wahren -Link: https://lore.kernel.org/r/328318841455e505370ef8ecad97b646c033dc8a.1562148527.git.lukas@wunner.de -Signed-off-by: Mark Brown -Signed-off-by: Greg Kroah-Hartman - ---- - 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; diff --git a/queue-4.4/series b/queue-4.4/series index badf127fec7..f45323247ce 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -3,5 +3,4 @@ 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 deleted file mode 100644 index 93120c7a6b2..00000000000 --- a/queue-4.4/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 8d8bef50365847134b51c1ec46786bc2873e4e47 Mon Sep 17 00:00:00 2001 -From: Lukas Wunner -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 - -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á -Signed-off-by: Lukas Wunner -Cc: stable@vger.kernel.org # v4.2+ -Cc: Martin Sperl -Acked-by: Stefan Wahren -Link: https://lore.kernel.org/r/328318841455e505370ef8ecad97b646c033dc8a.1562148527.git.lukas@wunner.de -Signed-off-by: Mark Brown -Signed-off-by: Greg Kroah-Hartman - ---- - 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; diff --git a/queue-4.9/series b/queue-4.9/series index c13aecfa0b1..bf3ff0948bb 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -7,4 +7,3 @@ arm64-cpufeature-fix-feature-comparison-for-ctr_el0..patch tcp-be-more-careful-in-tcp_fragment.patch hid-wacom-fix-bit-shift-for-cintiq-companion-2.patch hid-add-quirk-for-hp-x1200-pixart-oem-mouse.patch -spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch diff --git a/queue-4.9/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch b/queue-4.9/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch deleted file mode 100644 index 93120c7a6b2..00000000000 --- a/queue-4.9/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 8d8bef50365847134b51c1ec46786bc2873e4e47 Mon Sep 17 00:00:00 2001 -From: Lukas Wunner -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 - -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á -Signed-off-by: Lukas Wunner -Cc: stable@vger.kernel.org # v4.2+ -Cc: Martin Sperl -Acked-by: Stefan Wahren -Link: https://lore.kernel.org/r/328318841455e505370ef8ecad97b646c033dc8a.1562148527.git.lukas@wunner.de -Signed-off-by: Mark Brown -Signed-off-by: Greg Kroah-Hartman - ---- - 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; diff --git a/queue-5.2/series b/queue-5.2/series index ae7c5073037..20148a1b49c 100644 --- a/queue-5.2/series +++ b/queue-5.2/series @@ -5,4 +5,3 @@ alsa-usb-audio-sanity-checks-for-each-pipe-and-ep-ty.patch alsa-usb-audio-fix-gpf-in-snd_usb_pipe_sanity_check.patch hid-wacom-fix-bit-shift-for-cintiq-companion-2.patch hid-add-quirk-for-hp-x1200-pixart-oem-mouse.patch -spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch diff --git a/queue-5.2/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch b/queue-5.2/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch deleted file mode 100644 index 3542e75ece8..00000000000 --- a/queue-5.2/spi-bcm2835-fix-3-wire-mode-if-dma-is-enabled.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 8d8bef50365847134b51c1ec46786bc2873e4e47 Mon Sep 17 00:00:00 2001 -From: Lukas Wunner -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 - -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á -Signed-off-by: Lukas Wunner -Cc: stable@vger.kernel.org # v4.2+ -Cc: Martin Sperl -Acked-by: Stefan Wahren -Link: https://lore.kernel.org/r/328318841455e505370ef8ecad97b646c033dc8a.1562148527.git.lukas@wunner.de -Signed-off-by: Mark Brown -Signed-off-by: Greg Kroah-Hartman - ---- - 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 -@@ -764,7 +764,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;