* [PATCH] spi: bcm63xx: fix max prepend length
@ 2023-06-29 7:14 Jonas Gorski
2023-07-12 10:36 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Jonas Gorski @ 2023-06-29 7:14 UTC (permalink / raw)
To: Mark Brown, Grant Likely; +Cc: linux-spi, linux-kernel
The command word is defined as following:
/* Command */
#define SPI_CMD_COMMAND_SHIFT 0
#define SPI_CMD_DEVICE_ID_SHIFT 4
#define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8
#define SPI_CMD_ONE_BYTE_SHIFT 11
#define SPI_CMD_ONE_WIRE_SHIFT 12
If the prepend byte count field starts at bit 8, and the next defined
bit is SPI_CMD_ONE_BYTE at bit 11, it can be at most 3 bits wide, and
thus the max value is 7, not 15.
Fixes: b17de076062a ("spi/bcm63xx: work around inability to keep CS up")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
drivers/spi/spi-bcm63xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 9aecb77c3d89..07b5b71b2352 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -126,7 +126,7 @@ enum bcm63xx_regs_spi {
SPI_MSG_DATA_SIZE,
};
-#define BCM63XX_SPI_MAX_PREPEND 15
+#define BCM63XX_SPI_MAX_PREPEND 7
#define BCM63XX_SPI_MAX_CS 8
#define BCM63XX_SPI_BUS_NUM 0
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: bcm63xx: fix max prepend length
2023-06-29 7:14 [PATCH] spi: bcm63xx: fix max prepend length Jonas Gorski
@ 2023-07-12 10:36 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-07-12 10:36 UTC (permalink / raw)
To: Grant Likely, Jonas Gorski; +Cc: linux-spi, linux-kernel
On Thu, 29 Jun 2023 09:14:52 +0200, Jonas Gorski wrote:
> The command word is defined as following:
>
> /* Command */
> #define SPI_CMD_COMMAND_SHIFT 0
> #define SPI_CMD_DEVICE_ID_SHIFT 4
> #define SPI_CMD_PREPEND_BYTE_CNT_SHIFT 8
> #define SPI_CMD_ONE_BYTE_SHIFT 11
> #define SPI_CMD_ONE_WIRE_SHIFT 12
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: bcm63xx: fix max prepend length
commit: 5158814cbb37bbb38344b3ecddc24ba2ed0365f2
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-12 10:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-29 7:14 [PATCH] spi: bcm63xx: fix max prepend length Jonas Gorski
2023-07-12 10:36 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).