Re: [PATCH 10/31] swim: Add track zero recalibration delay

Laurent Vivier <[email protected]>
Newsgroups org.kernel.vger.linux-block,org.kernel.vger.linux-kernel,org.kernel.vger.linux-m68k
Message-ID <[email protected]>
Le 16/07/2026 à 12:02, Finn Thain a écrit :
> The UPD72070 spec indicates that the track zero sensor can take 3 ms
> to stabilize following a STEP command so add a call to msleep().
> Remove the duplicate swim_readbit() call as there's no need for that
> once the sensor signal has stabilized.
> 
> Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
> Signed-off-by: Finn Thain <[email protected]>
> ---
>   drivers/block/swim.c | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 

Reviewed-by: Laurent Vivier <[email protected]>

> diff --git a/drivers/block/swim.c b/drivers/block/swim.c
> index 76f6cfa68432..9755b86d4dd4 100644
> --- a/drivers/block/swim.c
> +++ b/drivers/block/swim.c
> @@ -402,16 +402,15 @@ static inline int swim_track00(struct swim __iomem *base)
>   	for (try = 0; try < 100; try++) {
>   
>   		swim_select(base, RELAX);
> +		msleep(3);
> +
>   		if (swim_readbit(base, TRACK_ZERO))
> -			break;
> +			return 0;
>   
>   		if (swim_step(base))
> -			return -1;
> +			break;
>   	}
>   
> -	if (swim_readbit(base, TRACK_ZERO))
> -		return 0;
> -
>   	pr_err("swim: track zero recalibration failed\n");
>   	return -1;
>   }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.