summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>1994-08-31 22:50:08 +0000
committerse <se@FreeBSD.org>1994-08-31 22:50:08 +0000
commitbd59f4fdabf700e75fbf405a29d7148224493f1e (patch)
tree0731abeb095fe247c95a8c37ac822754b9fe5231
parent91977ea9d1ed0edebd6a01daf974746d8d1cca17 (diff)
downloadFreeBSD-src-bd59f4fdabf700e75fbf405a29d7148224493f1e.zip
FreeBSD-src-bd59f4fdabf700e75fbf405a29d7148224493f1e.tar.gz
Reviewed by: Stefan Esser <se>
Calculation of 'cd->cmdscount' now as in 'sd.c' (required for ncr scsi). CDOUTSTANDING defined as '1' (as the comment says), was '2' in fact ... Debugger takes an (char*) argument, changed macro definition accordingly.
-rw-r--r--sys/scsi/cd.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index dc03c6b..e66691b 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: cd.c,v 1.21 1994/08/29 21:25:11 ache Exp $
+ * $Id: cd.c,v 1.22 1994/08/31 06:17:43 davidg Exp $
*/
#define SPLCD splbio
@@ -52,12 +52,12 @@ int32 cdstrats, cdqueues;
#ifdef DDB
#else /* DDB */
-#define Debugger()
+#define Debugger(x)
#endif /* DDB */
#define PAGESIZ 4096
#define SECSIZE 2048 /* XXX */ /* default only */
-#define CDOUTSTANDING 2
+#define CDOUTSTANDING 1
#define CDRETRIES 1
#define UNITSHIFT 3
@@ -83,6 +83,7 @@ struct cd_data {
u_int32 flags;
#define CDINIT 0x04 /* device has been init'd */
struct scsi_link *sc_link; /* address of scsi low level switch */
+ u_int32 ad_info; /* info about the adapter */
u_int32 cmdscount; /* cmds allowed outstanding by board */
struct cd_parms {
u_int32 blksize;
@@ -179,9 +180,19 @@ cdattach(sc_link)
* Store information needed to contact our base driver
*/
cd->sc_link = sc_link;
- /* only allow 1 outstanding command on tapes */
- sc_link->opennings = cd->cmdscount = CDOUTSTANDING;
+ sc_link->device = &cd_switch;
+ sc_link->dev_unit = unit;
+ if (cd->sc_link->adapter->adapter_info) {
+ cd->ad_info = ((*(cd->sc_link->adapter->adapter_info)) (sc_link->adapter_unit));
+ cd->cmdscount = cd->ad_info & AD_INF_MAX_CMDS;
+ if (cd->cmdscount > CDOUTSTANDING)
+ cd->cmdscount = CDOUTSTANDING;
+ } else {
+ cd->ad_info = 1;
+ cd->cmdscount = 1;
+ }
+ sc_link->opennings = cd->cmdscount;
/*
* Use the subdriver to request information regarding
* the drive. We cannot use interrupts yet, so the
OpenPOWER on IntegriCloud