summaryrefslogtreecommitdiffstats
path: root/sys/scsi/sd.c
diff options
context:
space:
mode:
authordufault <dufault@FreeBSD.org>1995-03-21 11:21:08 +0000
committerdufault <dufault@FreeBSD.org>1995-03-21 11:21:08 +0000
commit274a8d5ee2f5e2f80b359cbb60feedce7879b4fe (patch)
treec976e70835fd9cfefdf009bac7ee768f44b8b8b0 /sys/scsi/sd.c
parent0d274572e35245942a094cbb30772453c9a4c109 (diff)
downloadFreeBSD-src-274a8d5ee2f5e2f80b359cbb60feedce7879b4fe.zip
FreeBSD-src-274a8d5ee2f5e2f80b359cbb60feedce7879b4fe.tar.gz
cd.c: Julian's CD audio cleanup
sd.c: Julian's removal of subdriver requests st.c, scsi_tape.h: Julian's suport of compressed tape drives Note: compressed tape drives are still not working fully. scsiconf.h, scsi_base.c, scsi_driver.c: address problems in probes and error console logs
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r--sys/scsi/sd.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 62d05d2..bad3c72 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.54 1995/03/15 14:22:10 dufault Exp $
+ * $Id: sd.c,v 1.55 1995/03/16 18:15:52 bde Exp $
*/
#define SPLSD splbio
@@ -46,7 +46,7 @@
u_int32 sdstrats, sdqueues;
#define SECSIZE 512
-#define SDOUTSTANDING 2
+#define SDOUTSTANDING 4
#define SD_RETRIES 4
#define MAXTRANSFER 8 /* 1 page at a time */
@@ -70,8 +70,6 @@ struct scsi_data {
#define SDHAVELABEL 0x10 /* have read the label */
#define SDDOSPART 0x20 /* Have read the DOS partition table */
#define SDWRITEPROT 0x40 /* Device in readonly mode (S/W) */
- u_int32 ad_info; /* info about the adapter */
- u_int32 cmdscount; /* cmds allowed outstanding by board */
boolean wlabel; /* label is writable */
struct disk_parms {
u_char heads; /* Number of heads */
@@ -187,20 +185,8 @@ sdattach(struct scsi_link *sc_link)
dp = &(sd->params);
- printf("\n");
- sc_print_addr(sc_link);
-
- if (sc_link->adapter->adapter_info) {
- sd->ad_info = ((*(sc_link->adapter->adapter_info)) (sc_link->adapter_unit));
- sd->cmdscount = sd->ad_info & AD_INF_MAX_CMDS;
- if (sd->cmdscount > SDOUTSTANDING) {
- sd->cmdscount = SDOUTSTANDING;
- }
- } else {
- sd->ad_info = 1;
- sd->cmdscount = 1;
- }
- sc_link->opennings = sd->cmdscount;
+ if (sc_link->opennings > SDOUTSTANDING)
+ sc_link->opennings = SDOUTSTANDING;
/*
* Use the subdriver to request information regarding
* the drive. We cannot use interrupts yet, so the
@@ -213,13 +199,19 @@ sdattach(struct scsi_link *sc_link)
* -- this avoids the division below from falling over
*/
if(dp->secsiz == 0) dp->secsiz = 512;
- printf("%ldMB (%ld sectors), %d C %d H %d S/T %d B/S",
+ printf("%ldMB (%ld %d byte sectors)",
dp->disksize / ((1024L * 1024L) / dp->secsiz),
dp->disksize,
- dp->cyls,
- dp->heads,
- dp->sectors,
dp->secsiz);
+
+ if ( (sc_link->flags & SDEV_BOOTVERBOSE) )
+ {
+ printf("\n");
+ sc_print_addr(sc_link);
+ printf("with %d cyls, %d heads, and an average %d sectors/track",
+ dp->cyls, dp->heads, dp->sectors);
+ }
+
sd->flags |= SDINIT;
sd_registerdev(unit);
OpenPOWER on IntegriCloud