From 8fac250d9e9c8069d5a03c51e6ddecf852b03081 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sun, 28 Nov 1999 01:35:29 +0000 Subject: [PATCH] Update to the 0.12.0-19991127 patch + my header path & doc changes. --- sys/dev/sym/README.sym | 88 ++++++++++++++++++++++++++++++++++-------- sys/dev/sym/sym_hipd.c | 39 +++++++++++++------ 2 files changed, 98 insertions(+), 29 deletions(-) diff --git a/sys/dev/sym/README.sym b/sys/dev/sym/README.sym index 94794855359b..7cf6fa3ea7d2 100644 --- a/sys/dev/sym/README.sym +++ b/sys/dev/sym/README.sym @@ -68,22 +68,23 @@ Status: FreeBSD 3.3 RELEASE Latest revision: - sym-0.11.0-19991120 + sym-0.12.0-19991127 Files to download: SYM-0.9.0-19991024.tar.gz PATCH-SYM-0.10.0-19991111.gz PATCH-SYM-0.11.0-19991120.gz + PATCH-SYM-0.12.0-19991127.gz Supported SCSI features: - Initiator mode - Wide 16 SCSI BUS - - FAST10 up to FAST80-DT synchronous data transfers (1) + - FAST10 up to FAST80-DT synchronous data transfers (depends on controller capabilities) - 64 luns per target - 256 tags per lun - - MDP (2) + - MDP (1) - BUS DEVICE RESET message - - ABORT, ABORT TAG message (2) + - ABORT, ABORT TAG message Supported generic chip features: - On chip RAM @@ -102,9 +103,7 @@ Others: 100% scalability. Notes: -(1) FAST80-DT only supported by the LSI53C1010 - but not yet tested. -(2) Not yet reported. May not work as expected. +(1) Not yet reported. May not work as expected. Files: README.sym this file @@ -121,20 +120,21 @@ be attached by the sym_hipd.c driver. Installation: 1) Untar SYM-0.9.0-19991024.tar.gz 2) Create the /usr/src/sys/dev/sym directory - 2) Copy README.sym, sym_conf.h, sym_defs.h and sym_hipd.c to + 3) Copy README.sym, sym_conf.h, sym_defs.h and sym_hipd.c to /usr/src/sys/dev/sym/ - 3) Change to /usr/src/sys/ directory - 4) If FreeBSD-4, apply the unified patch sym_sys.patch + 4) Change to /usr/src/sys/ directory + 5) If FreeBSD-4, apply the unified patch sym_sys.patch (patch -p0 +* SYM-0.12.0-19991127 (diff file PATCH-SYM-0.12.0-19991127) + Some testing in Ultra3 FAST-80 DT mode using a SYM53C1010 connected + to an ATLAS 4 Ultra3 disk. Required some tiny fix in the ppr nego code. + Some cosmetic changes in messages displayed under DEBUG. + Fix the chip table (and code) that made the driver wrongly attach + 810 and 825 devices. + +November 27 1999. "Gerard Roudier" diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index 66776e9d6dc3..83aada75a0d3 100644 --- a/sys/dev/sym/sym_hipd.c +++ b/sys/dev/sym/sym_hipd.c @@ -56,7 +56,7 @@ * SUCH DAMAGE. */ -#define SYM_DRIVER_NAME "sym-0.11.0-19991120" +#define SYM_DRIVER_NAME "sym-0.12.0-19991127" #include #include /* For offsetof */ @@ -356,7 +356,7 @@ static int sym_debug = 0; #define DEBUG_FLAGS sym_debug #else /* #define DEBUG_FLAGS (0x0631) */ - #define DEBUG_FLAGS (0x0) + #define DEBUG_FLAGS (0x00) #endif #define sym_verbose (np->verbose) @@ -4281,8 +4281,12 @@ static int sym_prepare_nego(hcb_p np, ccb_p cp, int nego, u_char *msgptr) /* * For now, only use PPR with DT option if period factor = 9. */ - if (tp->tinfo.goal.period == 9) - tp->tinfo.goal.options = PPR_OPT_DT; + if (tp->tinfo.goal.period == 9) { + tp->tinfo.goal.width = BUS_16_BIT; + tp->tinfo.goal.options |= PPR_OPT_DT; + } + else + tp->tinfo.goal.options &= ~PPR_OPT_DT; #endif /* * Early C1010 chips need a work-around for DT @@ -4340,7 +4344,9 @@ static int sym_prepare_nego(hcb_p np, ccb_p cp, int nego, u_char *msgptr) if (nego) { tp->nego_cp = cp; /* Keep track a nego will be performed */ if (DEBUG_FLAGS & DEBUG_NEGO) { - sym_print_msg(cp, "nego msgout:", msgptr); + sym_print_msg(cp, nego == NS_SYNC ? "sync msgout" : + nego == NS_WIDE ? "wide msgout" : + "ppr msgout", msgptr); }; }; @@ -4878,6 +4884,7 @@ static void sym_setwide(hcb_p np, ccb_p cp, u_char wide) tp->tinfo.goal.width = tp->tinfo.current.width = wide; tp->tinfo.current.offset = 0; tp->tinfo.current.period = 0; + tp->tinfo.current.options = 0; neg.bus_width = wide ? BUS_16_BIT : BUS_8_BIT; neg.sync_period = tp->tinfo.current.period; neg.sync_offset = tp->tinfo.current.offset; @@ -4935,8 +4942,7 @@ static void sym_setpprot(hcb_p np, ccb_p cp, u_char dt, u_char ofs, tp->tinfo.goal.width = tp->tinfo.current.width = wide; tp->tinfo.goal.period = tp->tinfo.current.period = per; tp->tinfo.goal.offset = tp->tinfo.current.offset = ofs; - tp->tinfo.current.offset= dt ? PPR_OPT_DT : 0; - tp->tinfo.goal.offset = tp->tinfo.current.offset = ofs; + tp->tinfo.goal.options = tp->tinfo.current.options = dt; neg.sync_period = tp->tinfo.current.period; neg.sync_offset = tp->tinfo.current.offset; neg.bus_width = wide ? BUS_16_BIT : BUS_8_BIT; @@ -7111,7 +7117,7 @@ static void sym_sync_nego(hcb_p np, tcb_p tp, ccb_p cp) * Synchronous request message received. */ if (DEBUG_FLAGS & DEBUG_NEGO) { - sym_print_msg(cp, "sync msg in", np->msgin); + sym_print_msg(cp, "sync msgin", np->msgin); }; /* @@ -7212,7 +7218,7 @@ static void sym_ppr_nego(hcb_p np, tcb_p tp, ccb_p cp) * Synchronous request message received. */ if (DEBUG_FLAGS & DEBUG_NEGO) { - sym_print_msg(cp, "sync msg in", np->msgin); + sym_print_msg(cp, "ppr msgin", np->msgin); }; /* @@ -7261,8 +7267,10 @@ static void sym_ppr_nego(hcb_p np, tcb_p tp, ccb_p cp) } if (ofs) { - if (dt && per < np->minsync_dt) - {chg = 1; per = np->minsync_dt;} + if (dt) { + if (per < np->minsync_dt) + {chg = 1; per = np->minsync_dt;} + } else if (per < np->minsync) {chg = 1; per = np->minsync;} if (req) { @@ -7311,7 +7319,7 @@ static void sym_ppr_nego(hcb_p np, tcb_p tp, ccb_p cp) cp->nego_status = NS_PPR; if (DEBUG_FLAGS & DEBUG_NEGO) { - sym_print_msg(cp, "sync msgout", np->msgout); + sym_print_msg(cp, "ppr msgout", np->msgout); } np->msgin [0] = M_NOOP; @@ -9507,9 +9515,15 @@ DATA_SET (pcidevice_set, sym_pci_driver); #endif /* FreeBSD_4_Bus */ static struct sym_pci_chip sym_pci_dev_table[] = { + {PCI_ID_SYM53C810, 0x0f, "810", 4, 8, 4, + FE_ERL} + , {PCI_ID_SYM53C810, 0xff, "810a", 4, 8, 4, FE_CACHE_SET|FE_LDSTR|FE_PFEN|FE_BOF} , + {PCI_ID_SYM53C825, 0x0f, "825", 6, 8, 4, + FE_WIDE|FE_BOF|FE_ERL|FE_DIFF} + , {PCI_ID_SYM53C825, 0xff, "825a", 6, 8, 4, FE_WIDE|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|FE_RAM|FE_DIFF} , @@ -9602,6 +9616,7 @@ sym_find_pci_chip(pcici_t pci_tag) continue; if (FE_LDSTR & chip->features) return chip; + break; } return 0;