summaryrefslogtreecommitdiffstats
path: root/sys/scsi
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1994-10-04 06:39:27 +0000
committerrgrimes <rgrimes@FreeBSD.org>1994-10-04 06:39:27 +0000
commit22ae4f18c6970733c125d40f05d076885e6d182c (patch)
tree9d71c94fef868ba2d47d0e1661fc01235513b9b6 /sys/scsi
parentda97dc92f809db951c305ef4e2c9f273675253c5 (diff)
downloadFreeBSD-src-22ae4f18c6970733c125d40f05d076885e6d182c.zip
FreeBSD-src-22ae4f18c6970733c125d40f05d076885e6d182c.tar.gz
Pull in 1.1.5.1 changes to sd.c from 1.23 to 1.27 (basically the fixes for
drives that return sector counts of 0 and cause division by 0 traps during the probe). Reviewed by: Dave <root@hclb.demon.co.uk> Obtained from: FreeBSD 1.1.5.1
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/sd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 5a4429a..9c26926 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
*
- * $Id: sd.c,v 1.30 1994/09/02 04:12:23 davidg Exp $
+ * $Id: sd.c,v 1.31 1994/09/28 20:16:44 se Exp $
*/
#define SPLSD splbio
@@ -905,10 +905,13 @@ sd_get_parms(unit, flags)
}
else {
/* set it to something reasonable */
- sectors = 32;
disk_parms->heads = 64;
disk_parms->cyls = sectors / (64 * 32);
+ sectors = 32;
}
+ /* keep secsiz sane too - we may divide by it later */
+ if(disk_parms->secsiz == 0)
+ disk_parms->secsiz = SECSIZE;
disk_parms->sectors = sectors; /* dubious on SCSI *//*XXX */
}
sd->sc_link->flags |= SDEV_MEDIA_LOADED;
OpenPOWER on IntegriCloud