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

📄 scsireg.h

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 H
📖 第 1 页 / 共 4 页
字号:
 * example of the rmt0 device in the /dev directory. Bits 5 and 4 * of minor number are used for density selection. * *			Bit 5 | Bit 4 *                     |-------------| *		rmt0l  |   0  |  0   | low density device *		rmt0h  |   0  |  1   | high density device *		rmt0m  |   1  |  0   | medium density device *		rmt0a  |   1  |  1   | auxilary density device *		       |-------------| *  * Structure flags and members explainations * 	 *	opt_flags *	    MSEL_PLL_VAL *		This flag is used in conjuction with the struct member *		msel_pll. The flag tells the driver if the field msel_pll *		is valid and available for use. The msel_pll member is *		the mode select parameter list length. This field is *		used for the mode select command to specify the length *		of the parameter list. If this field is not valid a paramter * 		list length of 0 is used. This can cause problems with density *		selection and other options.  Please refer to your SCSI devices *		technical manual for the length of your devices parameter *		list. *	    MSEL_BLKDL_VAL *		This flag is used in conjuction with the struct member *		msel_blkdl. The flag tells the driver if the field msel_blkdl *		is valid and available for use. The msel_blkdl member is *		the mode select block descriptor list length. This field is *		used for the mode select command to specify the length *		of the block descriptor list.  If this field is not valid a  *		block descriptor list length of zero is used. This can cause  *		problems with density selection and other options.   *		Please refer to your SCSI devices technical manual for the  *		length of your devices block descriptor	list. *	    MSEL_VUL_VAL *		This flag is used in conjuction with the struct member *		msel_vul. The flag tells the driver if the field msel_vul *		is valid and available for use. The msel_vul member is *		the mode select vendor unique list length. This field is *		used for the mode select command to specify the length *		of the vendor unique list.  If this field is not valid   *		the vendor portion of the mode select commond is not *		described. Devices that implement SCSI 2 do not use  *		the vendor unique field of the mode select command, *		and some SCSI 1 implementations do not use the field also. *		Please refer to your SCSI devices technical manual to see *		if your device uses the vendor unique field in the mode select *		select command and for the length of your devices vendor  *		unique list. *	    MSNS_ALLOCL_VAL *		This flag is used in conjuction with the struct member *		msns_allocl. The flag tells the driver if the field msns_allocl *		is valid and available for use. The msns_allocl member is *		the mode sense allocation length. This field is *		used for the mode sense command to specify the length *		of the space allocated for data coming in from the device and  *		how much data the the device should transfer. If this field is  *		not valid a allocation length of zero is used. This can cause  *		problems with detecting density of the tape and other options.   *		Please refer to your SCSI devices technical manual for the  *		length of your devices mode sense allocation length. *	    RSNS_ALLOCL_VAL *		This flag is used in conjuction with the struct member *		rsns_allocl. The flag tells the driver if the field rsns_allocl *		is valid and available for use. The rsns_allocl member is *		the request sense allocation length. This field is *		used for the request sense command to specify the length *		of the space allocated for data coming in from the device and  *		how much data the the device should transfer. If this field is  *		not valid a allocation length of zero is used. This can cause  *		problems with detecting error conditions. If the field is valid *		and the size specified is greater then the size of the drivers *		storage area then the size will be trimmed to the storage size *		and a message will appear in the error log file.   *		Please refer to your SCSI devices technical manual for the  *		length of your devices mode sense allocation length. *	    PAGE_VAL *		This flag is used in conjuction with the struct member *		page_size. The flag tells the driver if the field page_size *		is valid and available for use. The page_size member is *		used in only SCSI 2 type devices. The page_size member is *		used in the driver for the transfer of device pages. The  *		value of this field can not excede 32 bytes. This field *		is the largest size of any page for the device. An exmaple *		of this is a SCSI 2 device which has 3 selectable pages. *		page 0 has a size of 11 bytes, page 1 has a size of 14 *		bytes and page 2 has a size of 16 bytes. The flag PAGE_VAL *		should be set and the page_size member should be 16, which *		is the largest of the 3 pages. *		PLEASE note that currently the SCSI device driver for tapes *		has no need to manipulate any of the pages.  *	    BUF_MOD *		This flag is used to direct the driver to set the buffered *		mode bit in the modes select command packet. In buffered *		mode, write operations send a command complete message as  *		soon as the host (cpu) transfers the data specified in the *		command to the units buffer. Please refer to your units *		technical manual to see if the unit supports buffered mode. *		If the unit does support buffered mode it is strongly suggested *		that the flag is set. Failure to set the flag if buffered *		mode is supported will prevent the unit from streaming. *	    SCSI_QIC *		This flag tells the driver that the scsi unit is a QIC format *		tape drive. *	    SCSI_9TRK *		This flag tells the driver that the scsi unit is a 9 track *		format tape drive. * *	msel_pll *		Mode select parameter list length. Please refer to MSEL_PLL_VAL *		above. *	msel_blkdl *		Mode select block descriptor list length. Please refor to *		MSEL_BLKDL_VAL above. *	msel_vul *		Mode select vendor unique list length. Please refer to  *		MSEL_VUL_VAL above. *	msns_allocl *		Mode sense allocation length. Please refer to MSNS_ALLOCL_VAL *		above. *	rsns_allocl *		Request sense allocation length. Please refer to RSNS_ALLOCL_val *		above. *	page_size *		SCSI 2 device largest page size. Please refer to PAGE_VAL above. *	rserv1 *	rserv2 *		Reserved for future expansion and for longword boundaries. *	 *	struct tape_info[NUM_DENS]   NUM_DENS = 4 *		Each struct represents 1 of the possible densities selections. *		You should validate and define each density struct because each *		of the defaults taken are 0. Which can cause problems. 	    *	tape_flags *	    DENS_VAL *		This flag is used in conjuction with struct members dens, *		and blk_size. The flag tells the driver that these members  *		are valid. *		Please refer to the members decriptions below for usage.   *	    ONE_FM *		This flag is used to direct the driver to write only one file *		mark on close instead of the normal two. Used with mostly QIC *		format style tape drives. Due to the method of recording and *		and tape erase most QIC tape drives can not overwrite the  *		the second file mark when appending to a tape.  *	    SPEED_VAL *		This flag is used in conjuction with the struct member  *		tape_speed. The flag is used to tell the driver that  *		the struct member tape_speed is valid and available for *		use. The member contains the value used to specify the  *		units tape speed for this density. The value is obtained *		from the scsi units technical manual. An example of this *		is the TZ07 which has two tape speeds, 25 inches per second *		and 100 inches per second. A value of 0x2 specifies 100 *		inches per second or 0x1 for 25 inches per second. The value of  *		member tape_speed should be 0x2 for 100 ips or 0x1 for 25 ips. * *	dens *		This is the actual density value that the mode select command *		uses to select the density for reading/writing of tapes. *		An example is a QIC unit having 4 density selections. If *		you want QIC 120 format for the rmt0m device then the *		member dens value would be 0xf. Further information can *		be obtained from your units technical manual for the possible *		density values that your unit supports. *	blk_size *		This is the actual block size supported for this density code. *		Since there are various blocking method with various style tape *		units, this field directs the drive to use a variable block *		or a fixed block. QIC style formats are a good example of this. *		QIC 150 formats deal with blocks of 512 bytes, QIC 320 format *		can be a fixed block of 1024 bytes or have a variable block . *		A zero in this field tells the driver that the block formatis *		variable. So if the density you want for this rmt device is  *		QIC 320 variable block then blk_size should be 0 and the dens *		member should be 0x11. If you want QIC 320 fixed then blk_size  *		should be 1024 and then dens member should be 0x11. If you want  *		QIC 150 then then blk_size should be 512 and the dens member *		0x10. Refer to your units technical manual for the correct *		values. *		*//* Instructions for setting up a disk_opt_tab structure. * * The disk option table structure allows for easy addition of a  * a SCSI bus disk drive. The table directs the SCSI driver to * format scsi command packets with certain lengths. The disk option table is * and array of structures each having the type of struct disk_opt_tab. * The struct devtab entry for the device has a pointer declared called * opt_tab. This pointer can either be null for no option table or can  * contain the address of the disk option table entry for this device. * There are some pre-defined tape option table entries for units already * known. If there is not an entry that describes your tape device you * can add an entry to the end of the table.  *  *  * Structure flags and members explainations * 	 *	opt_flags *	    MSEL_PLL_VAL *		This flag is used in conjuction with the struct member *		msel_pll. The flag tells the driver if the field msel_pll *		is valid and available for use. The msel_pll member is *		the mode select parameter list length. This field is *		used for the mode select command to specify the length *		of the parameter list. If this field is not valid a paramter * 		list length of zero is used. This can cause problems with option *		selection. Please refer to your SCSI device technical manual for *		the length of your devices parameter list. *	    MSEL_BLKDL_VAL *		This flag is used in conjuction with the struct member *		msel_blkdl. The flag tells the driver if the field msel_blkdl *		is valid and available for use. The msel_blkdl member is *		the mode select block descriptor list length. This field is *		used for the mode select command to specify the length *		of the block descriptor list.  If this field is not valid a  *		block descriptor list length of zero is used. This can cause  *		problems with option selection. Refer to your SCSI devices  *		technical manual for the length of your devices descriptor list. *	    MSEL_VUL_VAL *		This flag is used in conjuction with the struct member *		msel_vul. The flag tells the driver if the field msel_vul *		is valid and available for use. The msel_vul member is *		the mode select vendor unique list length. This field is *		used for the mode select command to specify the length *		of the vendor unique list.  If this field is not valid   *		the vendor portion of the mode select commond is not *		described. Devices that implement SCSI 2 do not use  *		the vendor unique field of the mode select command, *		and some SCSI 1 implementations do not use the field also. *		Please refer to your SCSI devices technical manual to see *		if your device uses the vendor unique field in the mode select *		select command and for the length of your devices vendor unique *		list. *	    MSNS_ALLOCL_VAL *		This flag is used in conjuction with the struct member *		msns_allocl. The flag tells the driver if the field msns_allocl *		is valid and available for use. The msns_allocl member is *		the mode sense allocation length. This field is *		used for the mode sense command to specify the length *		of the space allocated for data coming in from the device and  *		how much data the the device should transfer. If this field is  *		not valid a allocation length of zero is used. This can cause  *		problems with detecting the current settings of the drive.   *		Please refer to your SCSI devices technical manual for the  *		length of your devices mode sense allocation length. *	    RSNS_ALLOCL_VAL *		This flag is used in conjuction with the struct member *		rsns_allocl. The flag tells the driver if the field rsns_allocl *		is valid and available for use. The rsns_allocl member is *		the request sense allocation length. This field is *		used for the request sense command to specify the length *		of the space allocated for data coming in from the device and  *		how much data the the device should transfer. If this field is  *		not valid a allocation length of zero is used. This can cause  *		problems with detecting error conditions. If the field is valid *		and the size specified is greater then the size of the drivers *		storage area then the size will be trimmed to the storage size *		and a message will appear in the error log file.   *		Please refer to your SCSI devices technical manual for the  *		length of your devices mode sense allocation length. *	    PAGE_VAL *		This flag is used in conjuction with the struct member *		page_size. The flag tells the driver if the field page_size *		is valid and available for use. The page_size member is *		used in only SCSI 2 type devices. The page_size member is *		used in the driver for the transfer of device pages. The  *		value of this field can not excede 32 bytes. This field *		is the largest size of any page for the device. An exmaple *		of this is a SCSI 2 device which has 3 selectable pages. *		page 0 has a size of 11 bytes, page 1 has a size of 14 *		bytes and page 2 has a size of 16 bytes. The flag PAGE_VAL *		should be set and the page_size member should be 16, which *		is the largest of the 3 pages. *	    BUF_MOD *		This flag is used to direct the driver to set the buffered *		mode bit in the modes select command packet. In buffered *		mode, write operations send a command complete message as  *		soon as the host (cpu) transfers the data specified in the *		command to the units buffer. Please refer to your units *		technical manual to see if the unit supports buffered mode. *		If the unit does support buffered mode it is strongly suggested *		that the flag is set. Failure to set the flag if buffered *		mode is supported will hinder performance. *	    SCSI_REMOVAL *		This flag signifies to the driver that this unit is a  *		removable media type disk. This has NOT been implemented  *		in the driver as of yet. * *	msel_pll *		Mode select parameter list length. Please refer to MSEL_PLL_VAL *		above. *	msel_blkdl *		Mode select block descriptor list length. Please refor to *		MSEL_BLKDL_VAL above. *	msel_vul *		Mode select vendor unique list length. Please refer to  *		MSEL_VUL_VAL above. *	msns_allocl *		Mode sense allocation length. Please refer to MSNS_ALLOCL_VAL *		above. *	rsns_allocl *		Request sense allocation length. Please refer to RSNS_ALLOCL_val *		above. *	page_size *		SCSI 2 device largest page size. Please refer to PAGE_VAL above. *	rserv1 *	rserv2 *		Reserved for future expansion and for longword boundaries. *	*//*  * SCSI device option table for tapes - defines and structure declarations*//* * Flags for tape_info.tape_flags*/#define	DENS_VAL	0x00000001	/* This density code and blk size are valid */#define ONE_FM		0x00000002	/* Write only 1 fm on close - FOR QIC	*/

⌨️ 快捷键说明

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