Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'spi-fix-v6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
"A couple more small driver specific fixes for v6.5.

The device mode for Cadence had been broken by some recent updates
done for host mode and large transfers for multi-byte words on stm32
had been broken by an API update in what I think was a rebasing
incident"

* tag 'spi-fix-v6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: spi-cadence: Fix data corruption issues in slave mode
spi: stm32: fix accidential revert to byte-sized transfer splitting

+15 -10
+12 -7
drivers/spi/spi-cadence.c
··· 317 317 xspi->rx_bytes -= nrx; 318 318 319 319 while (ntx || nrx) { 320 - /* When xspi in busy condition, bytes may send failed, 321 - * then spi control did't work thoroughly, add one byte delay 322 - */ 323 - if (cdns_spi_read(xspi, CDNS_SPI_ISR) & CDNS_SPI_IXR_TXFULL) 324 - udelay(10); 325 - 326 320 if (ntx) { 327 321 if (xspi->txbuf) 328 322 cdns_spi_write(xspi, CDNS_SPI_TXD, *xspi->txbuf++); ··· 386 392 if (xspi->tx_bytes) { 387 393 cdns_spi_process_fifo(xspi, trans_cnt, trans_cnt); 388 394 } else { 395 + /* Fixed delay due to controller limitation with 396 + * RX_NEMPTY incorrect status 397 + * Xilinx AR:65885 contains more details 398 + */ 399 + udelay(10); 389 400 cdns_spi_process_fifo(xspi, 0, trans_cnt); 390 401 cdns_spi_write(xspi, CDNS_SPI_IDR, 391 402 CDNS_SPI_IXR_DEFAULT); ··· 438 439 cdns_spi_setup_transfer(spi, transfer); 439 440 } else { 440 441 /* Set TX empty threshold to half of FIFO depth 441 - * only if TX bytes are more than half FIFO depth. 442 + * only if TX bytes are more than FIFO depth. 442 443 */ 443 444 if (xspi->tx_bytes > xspi->tx_fifo_depth) 444 445 cdns_spi_write(xspi, CDNS_SPI_THLD, xspi->tx_fifo_depth >> 1); 445 446 } 447 + 448 + /* When xspi in busy condition, bytes may send failed, 449 + * then spi control didn't work thoroughly, add one byte delay 450 + */ 451 + if (cdns_spi_read(xspi, CDNS_SPI_ISR) & CDNS_SPI_IXR_TXFULL) 452 + udelay(10); 446 453 447 454 cdns_spi_process_fifo(xspi, xspi->tx_fifo_depth, 0); 448 455 spi_transfer_delay_exec(transfer);
+3 -3
drivers/spi/spi-stm32.c
··· 1001 1001 if (spi->cfg->set_number_of_data) { 1002 1002 int ret; 1003 1003 1004 - ret = spi_split_transfers_maxsize(ctrl, msg, 1005 - STM32H7_SPI_TSIZE_MAX, 1006 - GFP_KERNEL | GFP_DMA); 1004 + ret = spi_split_transfers_maxwords(ctrl, msg, 1005 + STM32H7_SPI_TSIZE_MAX, 1006 + GFP_KERNEL | GFP_DMA); 1007 1007 if (ret) 1008 1008 return ret; 1009 1009 }