X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/cb6a2a1b4e4a0d2fd5d141f8434e4797fffd0da3..795abf1316db53d4abdc5bff180f2b2376c5cfe4:/sys/scsi/sd.c diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 7831071000..22dce9a788 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.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 @@ -415,6 +415,9 @@ sdstrategy(bp) 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; @@ -430,11 +433,7 @@ sdstrategy(bp) /* * 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 @@ -895,10 +894,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;