added my responsibility for the `cpm' port
[unix-history] / sys / scsi / sd.c
index 783de99..22dce9a 100644 (file)
@@ -14,7 +14,7 @@
  *
  * Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
  *
  *
  * Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
  *
- *      $Id: sd.c,v 1.22 1994/04/05 03:23:32 davidg Exp $
+ *      $Id: sd.c,v 1.26 1994/05/26 00:23:24 jkh Exp $
  */
 
 #define SPLSD splbio
  */
 
 #define SPLSD splbio
@@ -894,10 +894,13 @@ sd_get_parms(unit, flags)
                }
                else {
                        /* set it to something reasonable */
                }
                else {
                        /* set it to something reasonable */
-                       sectors = 32;
                        disk_parms->heads = 64;
                        disk_parms->cyls = sectors / (64 * 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;
                disk_parms->sectors = sectors;  /* dubious on SCSI *//*XXX */
        }
        sd->sc_link->flags |= SDEV_MEDIA_LOADED;