spi: Fixes for v7.4

Two patches here, one a straightforward device quirk and the other a fix
 for a potentially nasty data corruption bug in the zynq-qspi driver.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQReagvpf3TrrA7BoYYv73Ows9A4iQUCauTKzAAKCRAv73Ows9A4
 ie/lAQDqFs0m9JttprZB+Onbv15pK//mneaSafnXYezRbt163QD/Rr3K/B45SruO
 d8YRcEOGyWCR8MX476E+ABN32Sql6wY=
 =ZF2n
 -----END PGP SIGNATURE-----

Merge tag 'spi-fix-v7.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "Two patches here, one a straightforward device quirk and the other a
  fix for a potentially nasty data corruption bug in the zynq-qspi
  driver"

* tag 'spi-fix-v7.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: cs42l43: Add speaker ID quirk for Dell XPS 13 DX13260 SKU 0E54
  spi: zynq-qspi: fix address buffer corruption and support 4-byte address
This commit is contained in:
Linus Torvalds 2026-10-30 08:27:10 -10:00
commit abf8c33470
2 changed files with 15 additions and 6 deletions

View File

@ -301,6 +301,14 @@ static const struct dmi_system_id cs42l43_spk_id_quirks[] = {
},
.driver_data = cs42l43_get_2bit_speaker_id_from_one_gpioio,
},
{
.ident = "Dell XPS 13 DX13260",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0E54"),
},
.driver_data = cs42l43_get_2bit_speaker_id_from_one_gpioio,
},
{ }
};

View File

@ -229,11 +229,10 @@ static bool zynq_qspi_supports_op(struct spi_mem *mem,
return false;
/*
* The number of address bytes should be equal to or less than 3 bytes.
* The number of address bytes should be equal to or less than 4 bytes.
*/
if (op->addr.nbytes > 3)
if (op->addr.nbytes > 4)
return false;
return true;
}
@ -526,6 +525,7 @@ static int zynq_qspi_exec_mem_op(struct spi_mem *mem,
const struct spi_mem_op *op)
{
struct zynq_qspi *xqspi = spi_controller_get_devdata(mem->spi->controller);
u8 opaddr[4] __aligned(4);
int err = 0, i;
u8 *tmpbuf;
@ -547,12 +547,13 @@ static int zynq_qspi_exec_mem_op(struct spi_mem *mem,
}
if (op->addr.nbytes) {
for (i = 0; i < op->addr.nbytes; i++) {
xqspi->txbuf[i] = op->addr.val >>
for (i = 0; i < op->addr.nbytes; i++)
opaddr[i] = op->addr.val >>
(8 * (op->addr.nbytes - i - 1));
}
reinit_completion(&xqspi->data_completion);
xqspi->txbuf = opaddr;
xqspi->rxbuf = NULL;
xqspi->tx_bytes = op->addr.nbytes;
xqspi->rx_bytes = op->addr.nbytes;