diff options
| author | Finn Thain <fthain@telegraphics.com.au> | 2018-04-11 20:50:14 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2018-04-16 23:49:35 -0400 |
| commit | 8a500df63d07d8aee44b7ee2c54e462e47ce93ec (patch) | |
| tree | b2f60b2e70d432e6c2a292a212a6e568f2617400 /drivers/block | |
| parent | 56a1c5ee54f69dd767fb61d301883dc919ddc259 (diff) | |
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: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
| -rw-r--r-- | drivers/block/swim.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/swim.c b/drivers/block/swim.c index d1ee4670666a..c8c8b9da3edd 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c | |||
| @@ -829,10 +829,12 @@ static int swim_floppy_init(struct swim_priv *swd) | |||
| 829 | /* scan floppy drives */ | 829 | /* scan floppy drives */ |
| 830 | 830 | ||
| 831 | swim_drive(base, INTERNAL_DRIVE); | 831 | swim_drive(base, INTERNAL_DRIVE); |
| 832 | if (swim_readbit(base, DRIVE_PRESENT)) | 832 | if (swim_readbit(base, DRIVE_PRESENT) && |
| 833 | !swim_readbit(base, ONEMEG_DRIVE)) | ||
| 833 | swim_add_floppy(swd, INTERNAL_DRIVE); | 834 | swim_add_floppy(swd, INTERNAL_DRIVE); |
| 834 | swim_drive(base, EXTERNAL_DRIVE); | 835 | swim_drive(base, EXTERNAL_DRIVE); |
| 835 | if (swim_readbit(base, DRIVE_PRESENT)) | 836 | if (swim_readbit(base, DRIVE_PRESENT) && |
| 837 | !swim_readbit(base, ONEMEG_DRIVE)) | ||
| 836 | swim_add_floppy(swd, EXTERNAL_DRIVE); | 838 | swim_add_floppy(swd, EXTERNAL_DRIVE); |
| 837 | 839 | ||
| 838 | /* register floppy drives */ | 840 | /* register floppy drives */ |
