📄 psi_roy.h
字号:
/**************************************************************************** * Perceptive Solutions, Inc. PCI-2000 device driver for Linux. * * psi_roy.h - Linux Host Driver for PCI-2000 IntelliCache SCSI Adapters * * Copyright (c) 1997-1999 Perceptive Solutions, Inc. * All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that redistributions of source * code retain the above copyright notice and this comment without * modification. * * Technical updates and product information at: * http://www.psidisk.com * * Please send questions, comments, bug reports to: * tech@psidisk.com Technical Support * ****************************************************************************/#ifndef ROY_HOST#define ROY_HOST/************************************************//* PCI setup *//************************************************/#define VENDOR_PSI 0x1256#define DEVICE_ROY_1 0x5201 /* 'R1' *//************************************************//* controller constants *//************************************************/#define MAXADAPTER 4 // Increase this and the sizes of the arrays below, if you need more.#define MAX_BUS 2#define MAX_UNITS 16#define TIMEOUT_COMMAND 400 // number of milliSecondos for command busy timeout/************************************************//* I/O address offsets *//************************************************/#define RTR_MAILBOX 0x040#define RTR_LOCAL_DOORBELL 0x060#define RTR_PCI_DOORBELL 0x064/************************************************//* *//* Host command codes *//* *//************************************************/#define CMD_READ_CHS 0x01 /* read sectors as specified (CHS mode) */#define CMD_READ 0x02 /* read sectors as specified (RBA mode) */#define CMD_READ_SG 0x03 /* read sectors using scatter/gather list */#define CMD_WRITE_CHS 0x04 /* write sectors as specified (CHS mode) */#define CMD_WRITE 0x05 /* write sectors as specified (RBA mode) */#define CMD_WRITE_SG 0x06 /* write sectors using scatter/gather list (LBA mode) */#define CMD_READ_CHS_SG 0x07 /* read sectors using scatter/gather list (CHS mode) */#define CMD_WRITE_CHS_SG 0x08 /* write sectors using scatter/gather list (CHS mode) */#define CMD_VERIFY_CHS 0x09 /* verify data on sectors as specified (CHS mode) */#define CMD_VERIFY 0x0A /* verify data on sectors as specified (RBA mode) */#define CMD_DASD_CDB 0x0B /* process CDB for a DASD device */#define CMD_DASD_CDB_SG 0x0C /* process CDB for a DASD device with scatter/gather */#define CMD_READ_ABS 0x10 /* read absolute disk */#define CMD_WRITE_ABS 0x11 /* write absolute disk */#define CMD_VERIFY_ABS 0x12 /* verify absolute disk */#define CMD_TEST_READY 0x13 /* test unit ready and return status code */#define CMD_LOCK_DOOR 0x14 /* lock device door */#define CMD_UNLOCK_DOOR 0x15 /* unlock device door */#define CMD_EJECT_MEDIA 0x16 /* eject the media */#define CMD_UPDATE_CAP 0x17 /* update capacity information */#define CMD_TEST_PRIV 0x18 /* test and setup private format media */#define CMD_SCSI_THRU 0x30 /* SCSI pass through CDB */#define CMD_SCSI_THRU_SG 0x31 /* SCSI pass through CDB with scatter/gather */#define CMD_SCSI_REQ_SENSE 0x32 /* SCSI pass through request sense after check condition */#define CMD_DASD_RAID_RQ 0x35 /* request DASD RAID drive data */#define CMD_DASD_RAID_RQ0 0x31 /* byte 1 subcommand to query for RAID 0 informatation */#define CMD_DASD_RAID_RQ1 0x32 /* byte 1 subcommand to query for RAID 1 informatation */#define CMD_DASD_RAID_RQ5 0x33 /* byte 1 subcommand to query for RAID 5 informatation */#define CMD_DASD_SCSI_INQ 0x36 /* do DASD inquire and return in SCSI format */#define CMD_DASD_CAP 0x37 /* read DASD capacity */#define CMD_DASD_INQ 0x38 /* do DASD inquire for type data and return SCSI/EIDE inquiry */#define CMD_SCSI_INQ 0x39 /* do SCSI inquire */#define CMD_READ_SETUP 0x3A /* Get setup structures from controller */#define CMD_WRITE_SETUP 0x3B /* Put setup structures in controller and burn in flash */#define CMD_READ_CONFIG 0x3C /* Get the entire configuration and setup structures */#define CMD_WRITE_CONFIG 0x3D /* Put the entire configuration and setup structures in flash */#define CMD_TEXT_DEVICE 0x3E /* obtain device text */#define CMD_TEXT_SIGNON 0x3F /* get sign on banner */#define CMD_QUEUE 0x40 /* any command below this generates a queue tag interrupt to host*/#define CMD_PREFETCH 0x40 /* prefetch sectors as specified */#define CMD_TEST_WRITE 0x41 /* Test a device for write protect */#define CMD_LAST_STATUS 0x42 /* get last command status and error data*/#define CMD_ABORT 0x43 /* abort command as specified */#define CMD_ERROR 0x44 /* fetch error code from a tagged op */#define CMD_DONE 0x45 /* done with operation */#define CMD_DIAGNOSTICS 0x46 /* execute controller diagnostics and wait for results */#define CMD_FEATURE_MODE 0x47 /* feature mode control word */#define CMD_DASD_INQUIRE 0x48 /* inquire as to DASD SCSI device (32 possible) */#define CMD_FEATURE_QUERY 0x49 /* query the feature control word */#define CMD_DASD_EJECT 0x4A /* Eject removable media for DASD type */#define CMD_DASD_LOCK 0x4B /* Lock removable media for DASD type */#define CMD_DASD_TYPE 0x4C /* obtain DASD device type */#define CMD_NUM_DEV 0x4D /* obtain the number of devices connected to the controller */#define CMD_GET_PARMS 0x4E /* obtain device parameters */#define CMD_SPECIFY 0x4F /* specify operating system for scatter/gather operations */#define CMD_RAID_GET_DEV 0x50 /* read RAID device geometry */#define CMD_RAID_READ 0x51 /* read RAID 1 parameter block */#define CMD_RAID_WRITE 0x52 /* write RAID 1 parameter block */#define CMD_RAID_LITEUP 0x53 /* Light up the drive light for identification */#define CMD_RAID_REBUILD 0x54 /* issue a RAID 1 pair rebuild */#define CMD_RAID_MUTE 0x55 /* mute RAID failure alarm */#define CMD_RAID_FAIL 0x56 /* induce a RAID failure */#define CMD_RAID_STATUS 0x57 /* get status of RAID pair */#define CMD_RAID_STOP 0x58 /* stop any reconstruct in progress */#define CMD_RAID_START 0x59 /* start reconstruct */#define CMD_RAID0_READ 0x5A /* read RAID 0 parameter block */#define CMD_RAID0_WRITE 0x5B /* write RAID 0 parameter block */#define CMD_RAID5_READ 0x5C /* read RAID 5 parameter block */#define CMD_RAID5_WRITE 0x5D /* write RAID 5 parameter block */#define CMD_ERASE_TABLES 0x5F /* erase partition table and RAID signatutures */#define CMD_SCSI_GET 0x60 /* get SCSI pass through devices */#define CMD_SCSI_TIMEOUT 0x61 /* set SCSI pass through timeout */#define CMD_SCSI_ERROR 0x62 /* get SCSI pass through request sense length and residual data count */#define CMD_GET_SPARMS 0x63 /* get SCSI bus and user parms */#define CMD_SCSI_ABORT 0x64 /* abort by setting time-out to zero */#define CMD_CHIRP_CHIRP 0x77 /* make a chirp chirp sound */#define CMD_GET_LAST_DONE 0x78 /* get tag of last done in progress */#define CMD_GET_FEATURES 0x79 /* get feature code and ESN */#define CMD_CLEAR_CACHE 0x7A /* Clear cache on specified device */#define CMD_BIOS_TEST 0x7B /* Test whether or not to load BIOS */#define CMD_WAIT_FLUSH 0x7C /* wait for cache flushed and invalidate read cache */#define CMD_RESET_BUS 0x7D /* reset the SCSI bus */#define CMD_STARTUP_QRY 0x7E /* startup in progress query */#define CMD_RESET 0x7F /* reset the controller */#define CMD_RESTART_RESET 0x80 /* reload and restart the controller at any reset issued */#define CMD_SOFT_RESET 0x81 /* do a soft reset NOW! *//************************************************//* *//* Host return errors *//* *//************************************************/#define ERR08_TAGGED 0x80 /* doorbell error ored with tag */#define ERR16_NONE 0x0000 /* no errors */#define ERR16_SC_COND_MET 0x0004 /* SCSI status - Condition Met */#define ERR16_CMD 0x0101 /* command error */#define ERR16_SC_CHECK_COND 0x0002 /* SCSI status - Check Condition */#define ERR16_CMD_NOT 0x0201 /* command not supported */#define ERR16_NO_DEVICE 0x0301 /* invalid device selection */#define ERR16_SECTOR 0x0202 /* bad sector */#define ERR16_PROTECT 0x0303 /* write protected */#define ERR16_NOSECTOR 0x0404 /* sector not found */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -