public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.14 01/40] spi: rockchip: handle zero length transfers without timing out
@ 2021-09-28  5:54 Sasha Levin
  2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 02/40] afs: Add missing vnode validation checks Sasha Levin
                   ` (38 more replies)
  0 siblings, 39 replies; 40+ messages in thread
From: Sasha Levin @ 2021-09-28  5:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Tobias Schramm, Mark Brown, Sasha Levin, heiko, linux-spi,
	linux-arm-kernel, linux-rockchip

From: Tobias Schramm <t.schramm@manjaro.org>

[ Upstream commit 5457773ef99f25fcc4b238ac76b68e28273250f4 ]

Previously zero length transfers submitted to the Rokchip SPI driver would
time out in the SPI layer. This happens because the SPI peripheral does
not trigger a transfer completion interrupt for zero length transfers.

Fix that by completing zero length transfers immediately at start of
transfer.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
Link: https://lore.kernel.org/r/20210827050357.165409-1-t.schramm@manjaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/spi/spi-rockchip.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
index 540861ca2ba3..553b6b9d0222 100644
--- a/drivers/spi/spi-rockchip.c
+++ b/drivers/spi/spi-rockchip.c
@@ -600,6 +600,12 @@ static int rockchip_spi_transfer_one(
 	int ret;
 	bool use_dma;
 
+	/* Zero length transfers won't trigger an interrupt on completion */
+	if (!xfer->len) {
+		spi_finalize_current_transfer(ctlr);
+		return 1;
+	}
+
 	WARN_ON(readl_relaxed(rs->regs + ROCKCHIP_SPI_SSIENR) &&
 		(readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY));
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2021-09-28  5:58 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-28  5:54 [PATCH AUTOSEL 5.14 01/40] spi: rockchip: handle zero length transfers without timing out Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 02/40] afs: Add missing vnode validation checks Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 03/40] platform/x86: touchscreen_dmi: Add info for the Chuwi HiBook (CWI514) tablet Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 04/40] platform/x86: touchscreen_dmi: Update info for the Chuwi Hi10 Plus (CWI527) tablet Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 05/40] nfsd: back channel stuck in SEQ4_STATUS_CB_PATH_DOWN Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 06/40] btrfs: replace BUG_ON() in btrfs_csum_one_bio() with proper error handling Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 07/40] btrfs: fix mount failure due to past and transient device flush error Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 08/40] net: mdio: introduce a shutdown method to mdio device drivers Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 09/40] xen-netback: correct success/error reporting for the SKB-with-fraglist case Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 10/40] sparc64: fix pci_iounmap() when CONFIG_PCI is not set Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 11/40] platform/x86/intel: hid: Add DMI switches allow list Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 12/40] platform/x86: gigabyte-wmi: add support for B550I Aorus Pro AX Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 13/40] ext2: fix sleeping in atomic bugs on error Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 14/40] drm/amdkfd: handle svm migrate init error Sasha Levin
2021-09-28  5:54 ` [PATCH AUTOSEL 5.14 15/40] drm/amdkfd: fix svm_migrate_fini warning Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 16/40] scsi: sd: Free scsi_disk device via put_device() Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 17/40] scsi: elx: efct: Do not hold lock while calling fc_vport_terminate() Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 18/40] usb: testusb: Fix for showing the connection speed Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 19/40] usb: dwc2: check return value after calling platform_get_resource() Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 20/40] habanalabs/gaudi: use direct MSI in single mode Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 21/40] habanalabs: fail collective wait when not supported Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 22/40] habanalabs/gaudi: fix LBW RR configuration Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 23/40] selftests: be sure to make khdr before other targets Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 24/40] selftests:kvm: fix get_warnings_count() ignoring fscanf() return warn Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 25/40] selftests:kvm: fix get_trans_hugepagesz() " Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 26/40] selftests: kvm: move get_run_delay() into lib/test_util Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 27/40] selftests: kvm: fix get_run_delay() ignoring fscanf() return warn Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 28/40] Xen/gntdev: don't ignore kernel unmapping error Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 29/40] swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 30/40] nvme-fc: update hardware queues before using them Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 31/40] nvme-fc: avoid race between time out and tear down Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 32/40] thermal/drivers/tsens: Fix wrong check for tzd in irq handlers Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 33/40] scsi: ses: Retry failed Send/Receive Diagnostic commands Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 34/40] irqchip/gic: Work around broken Renesas integration Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 35/40] smb3: correct smb3 ACL security descriptor Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 36/40] x86/insn, tools/x86: Fix undefined behavior due to potential unaligned accesses Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 37/40] io_uring: allow conditional reschedule for intensive iterators Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 38/40] block: don't call rq_qos_ops->done_bio if the bio isn't tracked Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 39/40] tools/vm/page-types: remove dependency on opt_file for idle page tracking Sasha Levin
2021-09-28  5:55 ` [PATCH AUTOSEL 5.14 40/40] kasan: always respect CONFIG_KASAN_STACK Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox