[PATCH 11/31] swim: Handle FIFO timeout error

From: Finn Thain

Date: Thu Jul 16 2026 - 06:20:01 EST


When polling the FIFO for a mark byte in the sector header, don't
return zero if the timeout counter has expired, return an error code.

Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxx>
---
drivers/block/swim_asm.S | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/block/swim_asm.S b/drivers/block/swim_asm.S
index 3d7a2d87595a..208622ac4aeb 100644
--- a/drivers/block/swim_asm.S
+++ b/drivers/block/swim_asm.S
@@ -79,7 +79,7 @@ wait_addr_mark_byte:

tstb %a2@
dbmi %d2, wait_addr_mark_byte
- bpl header_exit
+ bpl signal_nonyb

moveb %a3@, %d3
cmpb %a0@+, %d3
@@ -136,7 +136,6 @@ crc1: tstb %a2@

tstb %a3@(read_error - read_mark)

-header_exit:
moveq #0, %d0
moveb #0x18, %a3@(write_mode0 - read_mark)
rts
--
2.52.0