From d78c6e89ae794183ce53e577d41e574c82a970d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Tue, 17 May 2005 12:31:54 +0000 Subject: [PATCH] Make certain the the 48bit flag is reset if we dont translate LBA. --- sys/dev/ata/ata-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 6b70448bf827..1e74e0117346 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -705,6 +705,8 @@ ata_modify_if_48bit(struct ata_request *request) struct ata_device *atadev = device_get_softc(request->dev); u_int8_t command = request->u.ata.command; + atadev->flags &= ~ATA_D_48BIT_ACTIVE; + if ((request->u.ata.lba >= ATA_MAX_28BIT_LBA || request->u.ata.count > 256) && atadev->param.support.command2 & ATA_SUPPORT_ADDRESS48) { @@ -734,8 +736,6 @@ ata_modify_if_48bit(struct ata_request *request) } atadev->flags |= ATA_D_48BIT_ACTIVE; } - else - atadev->flags &= ~ATA_D_48BIT_ACTIVE; return command; }