mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-01 03:26:51 +00:00
5ecc0cfd6f
Changelog since 5.4.24 mentions CVE-2019-19769, CVE-2020-8648, CVE-2020-8649 and CVE-2020-8647. Removed upstreamed: generic: 507-v5.6-iio-chemical-sps30-fix-missing-triggered-buffer-depe.patch generic: 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch bcm27xx: 950-0435-ASoC-pcm512x-Fix-unbalanced-regulator-enable-call-in.patch ipq806x: 701-stmmac-fix-notifier-registration.patch lantiq: 002-pinctrl-falcon-fix-syntax-error.patch octeontx: 0002-net-thunderx-workaround-BGX-TX-Underflow-issue.patch Run tested: apu2, qemu-x86-64, apalis, a64-olinuxino, nbg6617 Build tested: sunxi/a53, imx6, x86/64, ipq40xx Tested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> [apu2] Signed-off-by: Petr Štetiar <ynezz@true.cz>
46 lines
1.3 KiB
Diff
46 lines
1.3 KiB
Diff
From 6edfb172ff1dd3cfc84c19790c245a4005474bb7 Mon Sep 17 00:00:00 2001
|
|
From: Tim Harvey <tharvey@gateworks.com>
|
|
Date: Tue, 25 Feb 2020 12:01:36 -0800
|
|
Subject: [PATCH 03/12] can: mcp251x: convert to half-duplex SPI
|
|
|
|
Some SPI host controllers such as the Cavium Thunder do not support
|
|
full-duplex SPI. Using half-duplex transfers allows the driver to work
|
|
with those host controllers.
|
|
|
|
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
|
---
|
|
drivers/net/can/spi/mcp251x.c | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/net/can/spi/mcp251x.c
|
|
+++ b/drivers/net/can/spi/mcp251x.c
|
|
@@ -291,23 +291,23 @@ static u8 mcp251x_read_reg(struct spi_de
|
|
priv->spi_tx_buf[0] = INSTRUCTION_READ;
|
|
priv->spi_tx_buf[1] = reg;
|
|
|
|
- mcp251x_spi_trans(spi, 3);
|
|
- val = priv->spi_rx_buf[2];
|
|
+ spi_write_then_read(spi, priv->spi_tx_buf, 2, &val, 1);
|
|
|
|
return val;
|
|
}
|
|
|
|
static void mcp251x_read_2regs(struct spi_device *spi, u8 reg, u8 *v1, u8 *v2)
|
|
{
|
|
+ u8 val[4] = {0};
|
|
struct mcp251x_priv *priv = spi_get_drvdata(spi);
|
|
|
|
priv->spi_tx_buf[0] = INSTRUCTION_READ;
|
|
priv->spi_tx_buf[1] = reg;
|
|
|
|
- mcp251x_spi_trans(spi, 4);
|
|
+ spi_write_then_read(spi, priv->spi_tx_buf, 2, val, 2);
|
|
|
|
- *v1 = priv->spi_rx_buf[2];
|
|
- *v2 = priv->spi_rx_buf[3];
|
|
+ *v1 = val[0];
|
|
+ *v2 = val[1];
|
|
}
|
|
|
|
static void mcp251x_write_reg(struct spi_device *spi, u8 reg, u8 val)
|