From 3a6fb16ff1263c333bc40756f08e2fd4aa6c615f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Thu, 1 May 2003 06:17:30 +0000 Subject: [PATCH] Relax the test for when to use LBA instead of CHS size. --- sys/dev/ata/ata-disk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index fc15ae21883..1d622af033f 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -121,8 +121,8 @@ ad_attach(struct ata_device *atadev) !(atadev->param->atavalid & ATA_FLAG_54_58) || !lbasize) adp->flags |= AD_F_CHS_USED; - /* use the 28bit LBA size if valid */ - if (atadev->param->cylinders == 16383 && adp->total_secs < lbasize) + /* use the 28bit LBA size if valid or bigger than the CHS mapping */ + if (atadev->param->cylinders == 16383 || adp->total_secs < lbasize) adp->total_secs = lbasize; lbasize48 = ((u_int64_t)atadev->param->lba_size48_1) |