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

📄 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/* * @(#)scsireg.h	4.7	(ULTRIX)	2/14/91 *//************************************************************************ *									* *			Copyright (c) 1988 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.			* *									* *   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	04/13/89  *  * Modification History  *  *  01/29/91	Robin Miller  *	Added defines for CDROM audio commands.  *  *  11/20/90	Robin Miller  *	Added defines for 10-byte READ/WRITE CDB's.  *  *  09/13/90	Robin Miller  *	Added additional QIC density codes.  *  *  09/07/90	Maria Vella  *    	Added PDMA functions to softc structure.  *  *  07/31/90	Robin Miller  *	Added defines for RRD42 CDROM, RX26 diskette, & RZ25 disk.  *  *  07/18/90	Mitchell McConnell  *	Added new Events: SZ_SELRETRY_CMD and SZ_SELRETRY_SNS for select   *	failures due to reselection.  *  *  07/18/90	Mitchell McConnell  *	Added new structure (in softc) to save/restore data pointers for   *	RQSNS.   Routines are located in scsi.c.  *	  * 01/23/90    Janet L. Schank  *     Added a define for TLZ04 (RDAT).  *  * 07/16/90    Janet L. Schank  *     Added a define for RZ23L.  *  * 05/08/90	Bill Dallas  *	Added the generic option tables that are linked to devtab. These  *	allow easy additions of devices.    *  * Janet L. Schank  *     Added wmbzero, wmbcopy, and rmbcopy routine pointers to the softc  *     structure.  *  * 01/23/90    Janet L. Schank  *     Added a define for TLZ04 (RDAT).  *  * 11/01/89	Mitchell McConnell  *	Added flag SZ_EXTMESSG for processing extended messages.  Added  *	field sc_ascsyncper to softc for Synchronous Transfer Period  *	register.  Added asccmd field to softc for help in interpreting  *	interrupts.  *  *	Added sc_asc_sr/isr/ssr for ASC status, interrupt status, and  *	sequence step registers.  *  *     Added SZ_DMA_INTR for sz_flags.  *     Added SZ_NCRASC for ASC error logging.  *     Removed "asc_" prefix from asc_dump struct because of conflict  *     with #defines in ascreg.h.  *  * 17-Oct-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.  *  * 06-Oct-89	Mitchell McConnell  * 	Added ASC error logging info.  *  * 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.  *  * 28-Sep-89	Mitchell McConnell  *	Added field sc_messptr for handling extended messages.  *  * 13-Sep-89   Janet L. Schank  *     Modified the scsi_devtab struct to match that of the vax's.  *  * 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.  *  * 15-Jul-89	Fred Canter  *	Merged Dynamic BBR and error log changes.  *  * 13-Jul-89	Fred Canter  *	EXABYTE tape mode select handling.  *  * 10-Jul-89	Fred Canter  *	Added data structures and definitions for SCSI error logging.  *  * 06/27/89  John A. Gallant  *     Added the function pointer for device driver completion routine.  *	Added defines for read/write long  *	Added variables for the BBR state machine.  *  * 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.  *  * 04/13/89	John A. Gallant  *     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.  *  *	Reorginized the device defines, just to keep the same types together.    *  * 03/22/89	John A. Gallant  *	Added specific device types for exsiting devices from the firefox/pvax  *	code.  Added TZxx to the list.  *  * 03/15/89	John A. Gallant  *	Updated all the sz_flags defines from firefox/pvax. Added BUSYTARG and  *	BUSY_WAIT.  *  * 12/13/88	John A. Gallant  *	Added SZ_SELBUSY and SZ_RET_RESET, and SCSI_NODIAG  *  * 11/09/88	John A. Gallant  *	Started the merge with the V3.0 source level.  Due to time constraints  *	only the changes for the new IOCTL support will be merged.  Others  *	changes will hopefully occur as time permits.  *   COMMENTS from V3.0:  *   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.  *  *  25-Aug-88 -- Ricky Palmer  *     Ifdef'ed again for vax and mips. This time it is based on  *     my August 1, 1988 ifdef's of the original scsi.c "glob" driver.  *  *  16-Aug-88 -- Fred Canter  *	Merge PVAX and FIREFOX 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.  *  ***********************************************************************/#include "pdma.h"/* * DMA Direction Register  (SCD_DIR) */#define SZ_DMA_READ	0x1	/* A DMA read transfer is active */#define SZ_DMA_WRITE	0x2	/* A DMA write transfer is active *//* * 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	/* TODO: debug - command did a status phase   */#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 /* Need to retry the command target is busy   */#define	SZ_RECOVERED	0x40000	/* A recovered error occured, used w/BBR      */#define SZ_EXTMESSG	0x80000 /* Extended message processing in progress    */#define SZ_SELTIMEOUT	0x100000 /* Timeout during selection has occured      */#define SZ_DMA_INTR	0x200000 /* DMA interrupted (ASC)		      */#define SZ_NO_RSEL	0x400000 /* Don't allow targets to reselect 	      */#define	SZ_PIO_INTR	0x800000  /* Programmed I/O in a PDMA module was intr *//* * 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 TLZ04           0x80002000      /* TLZ04 (RDAT) tape drive */#define TZK10		0x80004000	/* TZK10 (Qic) tape drive  */#define TZK08		0x80008000	/* Exabyte TZK08 */	#define	TZ9TRK		0x80001800	/* Generic non-DEC 9trk tape 					              (may[not] work) */#define TZRDAT		0x80002800	/* Generic Rdat tape (may[not] work) */#define	TZQIC		0x80004800	/* Generic non-DEC QIC tape 							(may[not] work) */#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) *//* Used to save state during Request Sense */struct sz_rqsns_save {    int	        valid;			/* BOOL - 1 = valid, 0 = !valid */    int		szflags;    int		xfercnt;    int		bpcount;    int		b_bcount;    int		resid;    char	*bufp;};/* * Driver and data specific structure */#define	SZ_DNSIZE	SZ_VID_LEN+SZ_PID_LEN	/* ascii device name size *//* TODO1: temp - changed all char to int to simplify adb access *//* TODO1: not too clever for 16 bit counts -- SFB! *//* TODO1: fall back is ../scsi.works1/scsireg.h */struct	sz_softc {	int	sc_sysid;		/* SCSI bus ID of system (initiator)  */	int	sc_cntlr_alive;		/* Status of this cntlr (alive or not)*/	int	sc_aipfts;		/* scsistart: # of AIP failed to set  */	int	sc_lostarb;		/* # of times CPU lost arbitration    */	int	sc_lastid;		/* ID of last target I/O started on   */	int	sc_siinum;		/* Holds which sii this is attach to  */	int	sc_active;		/* Current selected target ID (0=none)*/

⌨️ 快捷键说明

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