projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added my responsibility for the `cpm' port
[unix-history]
/
sys
/
scsi
/
sd.c
diff --git
a/sys/scsi/sd.c
b/sys/scsi/sd.c
index
7831071
..
22dce9a
100644
(file)
--- 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
*
*
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
*
- * $Id: sd.c,v 1.2
1 1994/03/23 09:15:59 davidg
Exp $
+ * $Id: sd.c,v 1.2
6 1994/05/26 00:23:24 jkh
Exp $
*/
#define SPLSD splbio
*/
#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 */
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;
}
opri = SPLSD();
dp = &sd->buf_queue;
@@
-430,11
+433,7
@@
sdstrategy(bp)
/*
* Place it in the queue of disk activities for this disk
*/
/*
* Place it in the queue of disk activities for this disk
*/
-#if 0
cldisksort(dp, bp, 64*1024);
cldisksort(dp, bp, 64*1024);
-#else
- disksort(dp, bp);
-#endif
/*
* Tell the device to get going on the transfer if it's
/*
* 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 */
}
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;