Commit 0758f7e
spi: Add check for 8-bit transfer with 8 IO mode support
commit 7105052 upstream.
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: [email protected]
Signed-off-by: Cheng Ming Lin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 40f79e2 commit 0758f7e
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4141 | 4141 | | |
4142 | 4142 | | |
4143 | 4143 | | |
4144 | | - | |
| 4144 | + | |
4145 | 4145 | | |
4146 | 4146 | | |
4147 | | - | |
| 4147 | + | |
| 4148 | + | |
| 4149 | + | |
| 4150 | + | |
4148 | 4151 | | |
4149 | 4152 | | |
4150 | 4153 | | |
| |||
4157 | 4160 | | |
4158 | 4161 | | |
4159 | 4162 | | |
4160 | | - | |
| 4163 | + | |
4161 | 4164 | | |
4162 | 4165 | | |
4163 | | - | |
| 4166 | + | |
| 4167 | + | |
| 4168 | + | |
| 4169 | + | |
4164 | 4170 | | |
4165 | 4171 | | |
4166 | 4172 | | |
| |||
0 commit comments