summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2007-04-14 16:32:30 +0000
committerkrw <krw@openbsd.org>2007-04-14 16:32:30 +0000
commit16d4c68ed6f6c032bf555336c10b2c0de07094e4 (patch)
treee051b4553a003596db55bcb395f8ba9d3bf6a5b2
parentAdd degraded raid 1 io path code (diff)
downloadwireguard-openbsd-16d4c68ed6f6c032bf555336c10b2c0de07094e4.tar.xz
wireguard-openbsd-16d4c68ed6f6c032bf555336c10b2c0de07094e4.zip
For devices unwilling or unable to report geometry, change the 'fake'
geometry used to 255 heads and 63 sectors/track from 64 heads and 32 sectors. 255/63 makes the cylinders as large as PC/BIOS compatibility allows, increasing the size of devices that can be supported. ok pedro@ (long ago) marco@ millert@ weingart@
-rw-r--r--sys/scsi/sd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 733d56b426a..c6eaf23e278 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.124 2007/04/13 18:56:26 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.125 2007/04/14 16:32:30 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -1412,12 +1412,11 @@ validate:
}
/*
- * Use Adaptec standard geometry values for anything we still don't
- * know.
+ * Use standard geometry values for anything we still don't know.
*/
- dp->heads = (heads == 0) ? 64 : heads;
- dp->sectors = (sectors == 0) ? 32 : sectors;
+ dp->heads = (heads == 0) ? 255 : heads;
+ dp->sectors = (sectors == 0) ? 63 : sectors;
dp->rot_rate = (rpm == 0) ? 3600 : rpm;
/*