⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scsireg.h

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 H
📖 第 1 页 / 共 4 页
字号:
#ifdef KERNEL#include "../h/ansi_compat.h"#else#include <ansi_compat.h>#endif#ifndef	SCSIREG_INCLUDE#define	SCSIREG_INCLUDE	1/* *	1/3/91	(ULTRIX)	@(#)scsireg.h	4.6 *//************************************************************************ *									* *			Copyright (c) 1986, 1988, 1989 by		* *		Digital Equipment Corporation, Maynard, MA		* *			All rights reserved.				* *									* *   This software is furnished under a license and may be used and	* *   copied  only  in accordance with the terms of such license and	* *   with the  inclusion  of  the  above  copyright  notice.   This	* *   software  or  any  other copies thereof may not be provided or	* *   otherwise made available to any other person.  No title to and	* *   ownership of the software is hereby transferred.			* *									* *   This software is  derived  from  software  received  from  the	* *   University    of   California,   Berkeley,   and   from   Bell	* *   Laboratories.  Use, duplication, or disclosure is  subject  to	* *   restrictions  under  license  agreements  with  University  of	* *   California and with AT&T.						* *									* *   The information in this software is subject to change  without	* *   notice  and should not be construed as a commitment by Digital	* *   Equipment Corporation.						* *									* *   Digital assumes no responsibility for the use  or  reliability	* *   of its software on equipment which is not supplied by Digital.	* *									* ************************************************************************/ /***********************************************************************  * scsireg.h	6-Jun-88  *  * Modification History  *  *  11/20/90	Robin Miller  *	Added defines for 10-byte READ/WRITE CDB's.  *  *  09/13/90	Robin Miller  *	Added additional QIC density codes.  *  *  07/31/90	Robin Miller  *	Added defines for RRD42 CDROM, RX26 diskette, & RZ25 disk.  *  * 07/16/90    Janet L. Schank  *     Added a define for RZ23L.  *  * 06/07/90	Bill Dallas  *	Added the generic option tables that are linked to devtab. These  *	allow easy additions of devices.   *   *  23-Jan-90  Janet L. Schank  *     Added define for TLZ04 (RDAT).  *  *  13-Nov-89  Janet L. Schank / Art Zemon  *     Added TZ05, RZ24, and RZ57 support.  *  *  08-Oct-89	Fred Canter  *	Document scsi_devtab flags with comments.  *  *  07-Oct-89	Fred Canter  *	Save removable media bit in sz_softc structure.  *  *  04-Oct-89	Fred Canter  *	Added sector number to error log packet for disk errors.  *	Bump SCSI error log packet version number up to 2.  *  *  18-Aug-89  Janet L. Schank  *     Added a define for the size of sz_timetable, SZ_TIMETBL_SZ  *  *  23-Jul-89	Fred Canter  *	Convert DBBR printfs to error log calls.  *	RX33 support.  *  *  22-Jul-89	Fred Canter  *	Make SCSI error log version number first in error log packet.  *  *  18-Jul-89 	John A. Gallant  *	Added the SZ_NODBBR flag definition for disabling DBBR.  *  *  14-Jul-89	Fred Canter  *	Merged dynamic BBR and error log changes.  *  *  23-Jun-89 	John A. Gallant  *	Added defines for read/write long  *	Added variables for the BBR state machine.  *	Added the function pointer for device driver completion routine.  *  *  22-Jun-89	Fred Canter  *	Save a copy of current CDB for error log.  *	Save a copy of the status byte for the current command for error log.  *  *  20-Jun-89	Fred Canter  *	Added RZ56 support.  *  *  18-Jun-89	Fred Canter  *	Convert to scsi_devtab.  *  *  17-Jun-89	Fred Canter  *	Added data structures and definitions needed for SCSI error logging.  *  * 11-Jun-89	Fred Canter  *	Added media changed counter to sz_softc. Softpc floppy hooks.  *	Added additional sense code (sc_c_asc) to sz_softc.  *  *  24-Apr-89	Fred Canter  *	Defined RX23s SCSI floppy.  *  *  06-Apr-89	Fred Canter  *	Added sc_pxstate[] to sz_softc and #defines to support a  *	target returning busy status (for TZxx).  *  *	Added b_comand to replace b_command for local command buffers.  *	Use b_gid instead of b_resid to store command.  *  *	Added sc_tz_modsel to sz_softc for TZxx extended mode select.  *  *  08-Feb-89	Fred Canter  *	Changed sc_sel_retry to array so select timeout retry count  *	now on a per target basis.  *  *  03-Dec-88	Fred Canter  *	Define number of retries for data xfer and other commands.  *	Part of retry hardware error sense key modification.  *  *  03-Nov-88	Alan Frechette  *	Added in support for disk maintainence. Added defines for   *	the commands FORMAT UNIT, REASSIGN BLOCK, READ DEFECT DATA  *	and VERIFY DATA. Added fields to the "softc" structure for  *	handling these special disk commands.  *  *	Added 5 additional flags to the "sc->sc_szflags" field for  *	the SII.  *  *  16-Oct-88 -- Fred Canter  *	Clean up comments. Moved SZDEBUG define from .c files to scsireg.h.  *	Added RZxx for non-DEC disks. Added #ifdefs around spin stats  *	variables in sz_softc structure.  *  *  28-Sep-88 -- Fred Canter  *	Clean up comments.  *  *  29-Aug-88 -- Alan Frechette  *	Added Asynchronous/Synchronous support to the SII. Added a   *	new field "sc_siireqack" to the softc structure. Also changed  *	the name of some of the SII specific fields.  *  *  21-Aug-88 -- Fred Canter  *	Improved device failed to select error handling.  *	Added sc_rip (reset in progress) to sz_softc structure.  *  *  16-Aug-88 -- Fred Canter  *	Merge 5380 and SII SCSI drivers.  *	Moved 5380 chip specific register definitions to 5380reg.h.  *  *  08-Aug-88 -- Fred Canter  *	Modify sz_softc for changes in scsi.c.  *  *  28-Jul-88 -- Fred Canter  *	Clean up sz_flags definitions. Remove old background timer  *	variables from sz_softc. Remove some debug variables from sz_softc.  *  *  18-Jul-88 -- Fred Canter  *	Added controller alive to sz_softc.  *  *  16-Jul-88 -- Fred Canter  *	Added disconnect timer, phase spin loop debug code,  *	and save default partition table pointer in sz_softc.  *  * 28-Jun-88 -- Fred Canter  *	Modified softc structure for improved ??command() error handling  *	and background timer to catch resleect timeouts.  *  * 18-Jun-88 -- Fred Canter  *	Added RZ55 support and a new flag for bus busy wait.  *  * 06-Jun-88 -- Fred Canter  *	Created this header file for scsi.c from stcreg.h.  *  ***********************************************************************//* * Defining SZDEBUG enables a ton of debug printouts and * a debug variable (szdebug) to control which debug * messages get printed. This code is not of much use * in a running system because it floods the system with * printouts. Defining SZDEBUG also changes the timing * even if szdebug is set to zero. The SCSI bus analyzer * is a much better tool for debugging driver problems. *//* #define	SZDEBUG *//* * DMA Direction Register  (SCD_DIR) */#define SZ_DMA_READ	0x0	/* A DMA read transfer is active */#define SZ_DMA_WRITE	0x1	/* A DMA write transfer is active *//* * The number of entries in sz_timetable. */#define SZ_TIMETBL_SZ   0x40/* * Flags  (sc_szflags) */#define	SZ_NORMAL	0x000	/* Normal (no szflags set)		      */#define SZ_NEED_SENSE	0x001	/* Need to do a Request Sense command	      */#define SZ_REPOSITION	0x002	/* Need to reposition the tape	 (NOT USED)   */#define SZ_ENCR_ERR	0x004	/* Encountered an error			      */#define SZ_DID_DMA	0x008	/* A DMA operation has been done	      */#define SZ_WAS_DISCON	0x010	/* Disconnect occured during this command     */#define SZ_NODEVICE	0x020	/* No SCSI device present		      */#define	SZ_BUSYBUS	0x040	/* Bus is busy, don't start next command      */#define	SZ_RSTIMEOUT	0x080	/* Disconnected command to a disk timed out   */				/* (force retry even if sense data is good).  */#define	SZ_TIMERON	0x100	/* Disconnect being timed by timeout() call   */#define	SZ_DID_STATUS	0x200	/* Status phase occurred (only used for debug)*/#define SZ_DMA_DISCON	0x400	/* DMA was interrupted by a disconnect        */#define	SZ_SELWAIT	0x800	/* Waiting for 250 MS select timeout	      */#define SZ_ASSERT_ATN	0x1000	/* Need to assert the ATN signal 	      */#define SZ_REJECT_MSG	0x2000	/* Need to reject a message 		      */#define SZ_RESET_DEV	0x4000	/* Need to reset a scsi device                */#define SZ_ABORT_CMD	0x8000	/* Need to abort the current command          */#define SZ_RETRY_CMD	0x10000	/* Need to retry the current command          */#define	SZ_BUSYTARG	0x20000	/* Target is busy, retry command later        */#define	SZ_RECOVERED	0x40000	/* A recovered error occured, used w/BBR      *//* * Maximum number of SCSI bus IDs (targets and initiator). * Also defines maximum number of logical units per SCSI controller. * Use to allocate/access all unit and target ID data structures. * MUST BE 8 - DO NOT CHANGE. */#define	NDPS	8/* * SCSI supported device class/type IDs */#define	SZ_TAPE		0x80000000	/* TAPE device */#define	SZ_DISK		0x40000000	/* DISK device */#define	SZ_CDROM	0x20000000	/* CDROM device */#define	SZ_UNKNOWN	0x10000000	/* UNKNOWN/UNSUPPORTED device */#ifdef __mips#define SZ_DEVMASK	0xf0000000	/* See if any of these */#endif /* __mips */#define	TZ30		0x80000001	/* TZ30 cartridge tape */#define	TZK50		0x80000002	/* TZK50 cartridge tape */#define	TZxx		0x80000004	/* TZxx non-DEC tape (may[not] work) */#define TZ05		0x80001000	/* css tz05 */#define TZ07		0x80001001	/* css tz07 */#define	TZ9TRK		0x80001800	/* Generic non-DEC 9trk tape 						(may[not] work) */#define TLZ04           0x80002000      /* TLZ04 (RDAT) tape drive */#define TZRDAT		0x80002800	/* Generic Rdat tape (may[not] work) */#define TZK10		0x80004000	/* TZK10 (Qic) tape drive  */#define	TZQIC		0x80004800	/* Generic non-DEC QIC tape 						(may[not] work)	*/#define TZK08		0x80008000	/* Exabyte TZK08 */	#define TZ8MM		0x80008800	/* Generic non-DEC 8mm tape 						(may[not] work)	*/#define	RZ22		0x40000008	/* RZ22  40 MB winchester disk */#define	RZ23		0x40000010	/* RZ23 100 MB winchester disk */#define	RZ55		0x40000020	/* RZ55 300+ MB winchester disk */#define	RZ56		0x40000040	/* RZ56 600+ MB winchester disk */#define	RX23		0x40000080	/* RX23 3.5" 1.4MB SCSI floppy disk */#define	RX33		0x40000100	/* RX33 5.25" 1.2MB SCSI floppy disk */#define	RZxx		0x40000200	/* RZxx non-DEC disk (may[not] work) */#define RZ24            0x40000400      /* RZ24 winchester disk */#define RZ57            0x40000800      /* RZ57 winchester disk */#define RZ23L           0x40001000      /* RZ23L 116Mb winchester disk */#define RX26		0x40002000	/* RX26 3.5" 2.8MB SCSI floppy disk */#define RZ25		0x40004000	/* RZ25 winchester disk */#define	RRD40		0x20000400	/* RRD40 CDROM (optical disk) */#define	CDxx		0x20000800	/* CDxx non-DEC CDROM (may[not] work)*/#define RRD42		0x20001000	/* RRD42 CDROM (optical disk) *//* * Driver and data specific structure * * The sz_softc structure is mostly longword alligned, * for readability when accessing it with ADB. */#define	SZ_DNSIZE	SZ_VID_LEN+SZ_PID_LEN	/* ascii device name size *//* * Turn on code which measures the amount of time spent * spinning in szintr and scsistart waiting for phase changes. */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -