📄 stcvar.h
字号:
/* * 7/2/90 (ULTRIX) @(#)stcvar.h 4.1 *//************************************************************************ * * * Copyright (c) 1986 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. * * * ************************************************************************//************************************************************************ * stcvar.h 06-Jun-86 * * Modification History * * 20-Aug-87 darrell * Added the structure definition for the RECEIVE DIAGNOSTIC * RESULT data. * * 03-Mar-87 darrell * Fixed an oversight where the command and data structures where * allocating space. * * 27-Jan-87 darrell * Changed the st_modsel_cm structure to reflect the change in * V32 TZK50 ucode that defines a vendor unique bit that disables * reselect timeouts. * * 15-Jan-87 darrell * Added definitions and structure changes to support the * rewrite of stc.c that is being sbmitted at the same * time. * * 26-Sep-86 darrell * Added more constant definitions and a macro to timeout * spin loops. * * 5-Sep-86 darrell * Added more constant definition. * * 4-Sep-86 darrell * First semi-working driver. * * 6-Aug-86 darrell * Updated for first pass of real driver (compiles but not debugged). * * 06-Jun-86 darrell * creation of this file. * ************************************************************************/struct st_cmdfmt { u_char opcode; /* SCSI comand opcode */ /* * Overlaid portion of commands */ union { /* * TEST UNIT READY Command * READ BLOCK LIMITS Command */ struct st_tur_cm { u_char :5; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char :8; /* Reserved */ u_char :8; /* Reserved */ u_char :8; /* Reserved */ u_char link:1; /* Link */ u_char flag:4; /* Flag */ u_char mbz:2; /* Must be Zero */ u_char pad[16]; /* Pad */ }tur; /* * REWIND Command */ struct st_rewind_cm { u_char immed:1; /* Immediate */ u_char :4; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char :8; /* Reserved */ u_char :8; /* Reserved */ u_char :8; /* Reserved */ u_char link:1; /* Link */ u_char flag:1; /* Flag */ u_char :4; /* Reserved */ u_char mbz:2; /* Must be Zero */ u_char pad[16]; /* Pad */ }rwd; /* * REQUEST SENSE Command * MODE SENSE Command * INQUIRY Command */ struct st_sense_cm { u_char :5; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char :8; /* Reserved */ u_char :8; /* Reserved */ u_char alclen; /* Allocation Length */ u_char link:1; /* Link */ u_char flag:1; /* Flag */ u_char :4; /* Reserved */ u_char mbz:2; /* Must be Zero */ u_char pad[16]; /* Pad */ }sense; /* * READ Command * WRITE Command * RECOVER BUFFERED DATA Command */ struct st_rw_cm { u_char fixed:1; /* Fixed */ u_char :4; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char xferlen2; /* Transfer Length (MSB) */ u_char xferlen1; /* Transfer Length */ u_char xferlen0; /* Transfer Length (LSB) */ u_char link:1; /* Link */ u_char flag:1; /* Flag */ u_char :4; /* Reserved */ u_char mbz:2; /* Must be Zero */ u_char pad[16]; /* Pad */ }rw; /* * WRITE FILEMARKS Command */ struct st_wfm_cm { u_char :5; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char numoffmks2; /* Number of Filemarks (MSB) */ u_char numoffmks1; /* Number of Filemarks */ u_char numoffmks0; /* Number of Filemarks (LSB) */ u_char link:1; /* Link */ u_char flag:1; /* Flag */ u_char :4; /* Reserved */ u_char mbz:2; /* Must be Zero */ u_char pad[16]; /* Pad */ }wfm; /* * SPACE Command */ struct st_space_cm { u_char code:2; /* Fixed */ u_char :3; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char count2; /* Count (MSB) */ u_char count1; /* Count */ u_char count0; /* Count (LSB) */ u_char link:1; /* Link */ u_char flag:1; /* Flag */ u_char :4; /* Reserved */ u_char mbz:2; /* Must be Zero */ u_char pad[16]; /* Pad */ }space; /* * VERIFY Command */ struct st_vfy_cm { u_char fixed:1; /* Fixed */ u_char bytcmp:1; /* Byte Compare */ u_char :3; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char verflen2; /* Verification Length (MSB) */ u_char verflen1; /* Verification Length */ u_char verflen0; /* Verification Length (LSB) */ u_char link:1; /* Link */ u_char flag:1; /* Flag */ u_char :4; /* Reserved */ u_char mbz:2; /* Must be Zero */ u_char pad[16]; /* Pad */ }vfy; /* * ERASE Command */ struct st_era_cm { u_char longbit:1; /* Long */ u_char :4; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char :8; /* Reserved */ u_char :8; /* Reserved */ u_char :8; /* Reserved */ u_char link:1; /* Link */ u_char flag:1; /* Flag */ u_char :4; /* Reserved */ u_char mbz:2; /* Must be Zero */ u_char pad[16]; /* Pad */ }erase; /* * LOAD/UNLOAD Command */ struct st_ld_cm { u_char immed:1; /* Immediate */ u_char :4; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char :8; /* Reserved */ u_char :8; /* Reserved */ u_char load:1; /* Load */ u_char reten:1; /* Retention */ u_char :6; /* Reserved */ u_char link:1; /* Link */ u_char flag:1; /* Flag */ u_char :4; /* Reserved */ u_char mbz:2; /* Must be Zero */ u_char pad[16]; /* Pad */ }ld; /* * SEND DIAGNOSTIC Command */ struct st_snd_diag_cm { u_char unitofl:1; /* Unit Offline */ u_char devofl:1; /* Device Offline */ u_char selftst:1; /* Self Test */ u_char :2; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char :8; /* Reserved */ u_char mbz1[2]; /* Must be Zero */ u_char link:1; /* Link */ u_char flag:1; /* Flag */ u_char :4; /* Reserved */ u_char mbz:2; /* Must be Zero */ u_char pad[16]; /* Pad */ }diag; /* * RECEIVE DIAGNOSTIC RESULT Command */ struct st_recdiag_cm { u_char :5; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char :8; /* Reserved */ u_char aloclen1; /* Allocation Length (MSB) */ u_char aloclen0; /* Allocation Length (LSB)_ */ u_char link:1; /* Link */ u_char flag:1; /* Flag */ u_char :4; /* Reserved */ u_char mbz:2; /* Must be Zero */ u_char pad[16]; /* Pad */ }recdiag; /* * MODE SELECT Command */ struct st_modsel_cm { u_char :5; /* Reserved */ u_char lun:3; /* Logical Unit Number */ u_char :8; /* Reserved */ u_char :8; /* Reserved */ u_char pll; /* Parameter List Length */ u_char link:1; /* Link */ u_char flag:1; /* Flag */ u_char :4; /* Reserved */ u_char mbz:2; /* Must be Zero */ /* Parameter List Header */ u_char :8; /* Reserved */ u_char :8; /* Reserved */ u_char mbz1:4; /* Must be Zero */ u_char bufmode:3; /* Buffered Mode */ u_char :1; /* Reserved */ u_char rdeclen; /* Record Descriptor Length */ /* Parameter List Block Descriptor */ u_char mbz2; /* Must be Zero */ u_char numofrec2; /* Number of Records (MSB) */ u_char numofrec1; /* Number of Records */ u_char numofrec0; /* Number of Records (LSB) */ u_char :8; /* Reserved */ u_char reclen2; /* Record Length (MSB) */ u_char reclen1; /* Record Length */ u_char reclen0; /* Record Length (LSB) */ u_char vulen; /* Vendor Unique Length */ u_char nof:3; /* Enable Fillers */ u_char mbz3:3; /* Must be Zero */ u_char notimo:1; /* Disable Reselect timeouts */ u_char vu7:1; /* Direct Track Access */ u_char pad[2]; /* Pad */ }modsel; /* * Track SELECT Command */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -