Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c37ac3c authored by Finn Thain's avatar Finn Thain Committed by Greg Kroah-Hartman
Browse files

block/swim: Select appropriate drive on device open



commit b3906535ccc6cd04c42f9b1c7e31d1947b3ebc74 upstream.

The driver supports internal and external FDD units so the floppy_open
function must not hard-code the drive location.

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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cdb0d5fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -646,7 +646,7 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)

	swim_write(base, setup, S_IBM_DRIVE  | S_FCLK_DIV2);
	udelay(10);
	swim_drive(base, INTERNAL_DRIVE);
	swim_drive(base, fs->location);
	swim_motor(base, ON);
	swim_action(base, SETMFM);
	if (fs->ejected)