Commit 8a500df6 authored by Finn Thain's avatar Finn Thain Committed by Jens Axboe

block/swim: Check drive type

The SWIM chip is compatible with GCR-mode Sony 400K/800K drives but
this driver only supports MFM mode. Therefore only Sony FDHD drives
are supported. Skip incompatible drives.

Cc: Laurent Vivier <lvivier@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: stable@vger.kernel.org # v4.14+
Tested-by: default avatarStan Johnson <userm57@yahoo.com>
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Acked-by: default avatarLaurent Vivier <lvivier@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 56a1c5ee
...@@ -829,10 +829,12 @@ static int swim_floppy_init(struct swim_priv *swd) ...@@ -829,10 +829,12 @@ static int swim_floppy_init(struct swim_priv *swd)
/* scan floppy drives */ /* scan floppy drives */
swim_drive(base, INTERNAL_DRIVE); swim_drive(base, INTERNAL_DRIVE);
if (swim_readbit(base, DRIVE_PRESENT)) if (swim_readbit(base, DRIVE_PRESENT) &&
!swim_readbit(base, ONEMEG_DRIVE))
swim_add_floppy(swd, INTERNAL_DRIVE); swim_add_floppy(swd, INTERNAL_DRIVE);
swim_drive(base, EXTERNAL_DRIVE); swim_drive(base, EXTERNAL_DRIVE);
if (swim_readbit(base, DRIVE_PRESENT)) if (swim_readbit(base, DRIVE_PRESENT) &&
!swim_readbit(base, ONEMEG_DRIVE))
swim_add_floppy(swd, EXTERNAL_DRIVE); swim_add_floppy(swd, EXTERNAL_DRIVE);
/* register floppy drives */ /* register floppy drives */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment