summaryrefslogtreecommitdiff
path: root/sys/dev/isa
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1998-07-23 05:27:38 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1998-07-23 05:27:38 +0000
commit3f6e3fe831237b0a4085966d31ddefaa2b46bd35 (patch)
tree68189c4c2c1ebf3f3591627e21215a928efd7c2b /sys/dev/isa
parent2effdec8ef5258fb4e749beaf5f08c8c30099d2a (diff)
Support drives > 8.4GB
For LBA-capable drives, return the number of LBA sectors as secperunit, not the number you get from CHS. Note, DOS partition tables are limited to 8.4GB. The interactive disklabel editor will notice that the OpenBSD partition ends at 8.4GB and limit the user to that size unless the user explicitly specifies the bounds. This should probably be changed.
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/wd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/isa/wd.c b/sys/dev/isa/wd.c
index f8c407ae7b1..e0b2c8c1868 100644
--- a/sys/dev/isa/wd.c
+++ b/sys/dev/isa/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.33 1998/07/23 04:40:11 csapuntz Exp $ */
+/* $OpenBSD: wd.c,v 1.34 1998/07/23 05:27:37 csapuntz Exp $ */
/* $NetBSD: wd.c,v 1.150 1996/05/12 23:54:03 mycroft Exp $ */
/*
@@ -551,7 +551,11 @@ wdgetdisklabel(dev, wd)
lp->d_type = DTYPE_ST506;
#endif
strncpy(lp->d_packname, d_link->sc_params.wdp_model, 16);
- lp->d_secperunit = lp->d_secpercyl * lp->d_ncylinders;
+ if ((d_link->sc_params.wdp_capabilities & WD_CAP_LBA)) {
+ lp->d_secperunit = d_link->sc_params.wdp_lbacapacity;
+ } else
+ lp->d_secperunit = lp->d_secpercyl * lp->d_ncylinders;
+
lp->d_rpm = 3600;
lp->d_interleave = 1;
lp->d_flags = 0;