Commit 7105052
spi: Add check for 8-bit transfer with 8 IO mode support
The current SPI framework does not verify if the SPI device supports
8 IO mode when doing an 8-bit transfer. This patch adds a check to
ensure that if the transfer tx_nbits or rx_nbits is 8, the SPI mode must
support 8 IO. If not, an error is returned, preventing undefined behavior.
Fixes: d6a711a ("spi: Fix OCTAL mode support")
Cc: stable@vger.kernel.org
Signed-off-by: Cheng Ming Lin <chengminglin@mxic.com.tw>
Link: https://patch.msgid.link/20250714031023.504752-1-linchengming884@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent d7b8f8e commit 7105052
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4138 | 4138 | | |
4139 | 4139 | | |
4140 | 4140 | | |
4141 | | - | |
| 4141 | + | |
4142 | 4142 | | |
4143 | 4143 | | |
4144 | | - | |
| 4144 | + | |
| 4145 | + | |
| 4146 | + | |
| 4147 | + | |
4145 | 4148 | | |
4146 | 4149 | | |
4147 | 4150 | | |
| |||
4154 | 4157 | | |
4155 | 4158 | | |
4156 | 4159 | | |
4157 | | - | |
| 4160 | + | |
4158 | 4161 | | |
4159 | 4162 | | |
4160 | | - | |
| 4163 | + | |
| 4164 | + | |
| 4165 | + | |
| 4166 | + | |
4161 | 4167 | | |
4162 | 4168 | | |
4163 | 4169 | | |
| |||
0 commit comments