Re: [PATCH 02/31] swim: Select appropriate drive once only
Laurent Vivier <[email protected]> Mon, 20 Jul 2026 15:27:20 +0200
| Newsgroups | org.kernel.vger.linux-m68k,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Le 16/07/2026 =C3=A0 12:02, Finn Thain a =C3=A9crit=C2=A0:
> Before turning off the spindle motor, call swim_drive() to select the
> appropriate drive. Remove the swim_drive() call from swim_add_floppy()
> because it was already called by swim_floppy_init().
>=20
> Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
> Signed-off-by: Finn Thain <[email protected]>
> ---
> drivers/block/swim.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Laurent Vivier <[email protected]>
>=20
> diff --git a/drivers/block/swim.c b/drivers/block/swim.c
> index b61e92d0e3e9..2c52a210f4a6 100644
> --- a/drivers/block/swim.c
> +++ b/drivers/block/swim.c
> @@ -679,8 +679,10 @@ static void floppy_release(struct gendisk *disk)
> else if (fs->ref_count > 0)
> --fs->ref_count;
> =20
> - if (fs->ref_count =3D=3D 0)
> + if (fs->ref_count =3D=3D 0) {
> + swim_drive(base, fs->location);
> swim_motor(base, OFF);
> + }
> mutex_unlock(&swim_mutex);
> }
> =20
> @@ -752,8 +754,6 @@ static int swim_add_floppy(struct swim_priv *swd, en=
um drive_location location)
> =20
> fs->location =3D location;
> =20
> - swim_drive(base, location);
> -
> swim_motor(base, OFF);
> =20
> fs->type =3D HD_MEDIA;