*
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
*
- * $Id: sd.c,v 1.21 1994/03/23 09:15:59 davidg Exp $
+ * $Id: sd.c,v 1.26 1994/05/26 00:23:24 jkh Exp $
*/
#define SPLSD splbio
if (bounds_check_with_label(bp, &sd->disklabel, sd->wlabel) <= 0)
goto done;
/* otherwise, process transfer request */
+ } else {
+ bp->b_pblkno = bp->b_blkno;
+ bp->b_resid = 0;
}
opri = SPLSD();
dp = &sd->buf_queue;
/*
* Place it in the queue of disk activities for this disk
*/
-#if 0
cldisksort(dp, bp, 64*1024);
-#else
- disksort(dp, bp);
-#endif
/*
* Tell the device to get going on the transfer if it's
}
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;