提交 099175c9 编写于 作者: J James Bottomley

[SCSI] remove PCI2000 and PCI2220i drivers

From: Christoph Hellwig <hch@lst.de>

Both drivers are marked broken and haven't compiled since very early
2.5.x.  And they're for IDE hardware so they shouldn't have been
written to the SCSI layer at all.
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 608648cb
......@@ -1192,28 +1192,6 @@ config SCSI_PAS16
To compile this driver as a module, choose M here: the
module will be called pas16.
config SCSI_PCI2000
tristate "PCI2000 support"
depends on PCI && SCSI && BROKEN
help
This is support for the PCI2000I EIDE interface card which acts as a
SCSI host adapter. Please read the SCSI-HOWTO, available from
<http://www.tldp.org/docs.html#howto>.
To compile this driver as a module, choose M here: the
module will be called pci2000.
config SCSI_PCI2220I
tristate "PCI2220i support"
depends on PCI && SCSI && BROKEN
help
This is support for the PCI2220i EIDE interface card which acts as a
SCSI host adapter. Please read the SCSI-HOWTO, available from
<http://www.tldp.org/docs.html#howto>.
To compile this driver as a module, choose M here: the
module will be called pci2220i.
config SCSI_PSI240I
tristate "PSI240i support"
depends on ISA && SCSI
......
......@@ -50,8 +50,6 @@ obj-$(CONFIG_MVME16x_SCSI) += mvme16x.o 53c7xx.o
obj-$(CONFIG_BVME6000_SCSI) += bvme6000.o 53c7xx.o
obj-$(CONFIG_SCSI_SIM710) += 53c700.o sim710.o
obj-$(CONFIG_SCSI_ADVANSYS) += advansys.o
obj-$(CONFIG_SCSI_PCI2000) += pci2000.o
obj-$(CONFIG_SCSI_PCI2220I) += pci2220i.o
obj-$(CONFIG_SCSI_PSI240I) += psi240i.o
obj-$(CONFIG_SCSI_BUSLOGIC) += BusLogic.o
obj-$(CONFIG_SCSI_DPT_I2O) += dpt_i2o.o
......
此差异已折叠。
此差异已折叠。
/****************************************************************************
* Perceptive Solutions, Inc. PCI-2220I device driver for Linux.
*
* pci2220i.h - Linux Host Driver for PCI-2220i EIDE 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 _PCI2220I_H
#define _PCI2220I_H
#ifndef LINUX_VERSION_CODE
#include <linux/version.h>
#endif
#define LINUXVERSION(v,p,s) (((v)<<16) + ((p)<<8) + (s))
// function prototypes
int Pci2220i_Detect (Scsi_Host_Template *tpnt);
int Pci2220i_Command (Scsi_Cmnd *SCpnt);
int Pci2220i_QueueCommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *));
int Pci2220i_Abort (Scsi_Cmnd *SCpnt);
int Pci2220i_Reset (Scsi_Cmnd *SCpnt, unsigned int flags);
int Pci2220i_Release (struct Scsi_Host *pshost);
int Pci2220i_BiosParam (struct scsi_device *sdev,
struct block_device *dev,
sector_t capacity, int geom[]);
#endif
/****************************************************************************
* Perceptive Solutions, Inc. PCI-2220I device driver for Linux.
*
* psi_dalei.h - Linux Host Driver for PCI-2220i EIDE 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
*
****************************************************************************/
/************************************************/
/* Some defines that we like */
/************************************************/
#define CHAR char
#define UCHAR unsigned char
#define SHORT short
#define USHORT unsigned short
#define BOOL unsigned short
#define LONG long
#define ULONG unsigned long
#define VOID void
/************************************************/
/* Dale PCI setup */
/************************************************/
#define VENDOR_PSI 0x1256
#define DEVICE_DALE_1 0x4401 /* 'D1' */
#define DEVICE_BIGD_1 0x4201 /* 'B1' */
#define DEVICE_BIGD_2 0x4202 /* 'B2' */
/************************************************/
/* Misc konstants */
/************************************************/
#define DALE_MAXDRIVES 4
#define BIGD_MAXDRIVES 8
#define SECTORSXFER 8
#define ATAPI_TRANSFER 8192
#define BYTES_PER_SECTOR 512
#define DEFAULT_TIMING_MODE 5
/************************************************/
/* EEPROM locations */
/************************************************/
#define DALE_FLASH_PAGE_SIZE 128 // number of bytes per page
#define DALE_FLASH_SIZE 65536L
#define DALE_FLASH_BIOS 0x00080000L // BIOS base address
#define DALE_FLASH_SETUP 0x00088000L // SETUP PROGRAM base address offset from BIOS
#define DALE_FLASH_RAID 0x00088400L // RAID signature storage
#define DALE_FLASH_FACTORY 0x00089000L // FACTORY data base address offset from BIOS
#define DALE_FLASH_BIOS_SIZE 32768U // size of FLASH BIOS REGION
/************************************************/
/* DALE Register address offsets */
/************************************************/
#define REG_DATA 0x80
#define REG_ERROR 0x84
#define REG_SECTOR_COUNT 0x88
#define REG_LBA_0 0x8C
#define REG_LBA_8 0x90
#define REG_LBA_16 0x94
#define REG_LBA_24 0x98
#define REG_STAT_CMD 0x9C
#define REG_STAT_SEL 0xA0
#define REG_FAIL 0xB0
#define REG_ALT_STAT 0xB8
#define REG_DRIVE_ADRS 0xBC
#define DALE_DATA_SLOW 0x00040000L
#define DALE_DATA_MODE2 0x00040000L
#define DALE_DATA_MODE3 0x00050000L
#define DALE_DATA_MODE4 0x00060000L
#define DALE_DATA_MODE5 0x00070000L
#define BIGD_DATA_SLOW 0x00000000L
#define BIGD_DATA_MODE0 0x00000000L
#define BIGD_DATA_MODE2 0x00000000L
#define BIGD_DATA_MODE3 0x00000008L
#define BIGD_DATA_MODE4 0x00000010L
#define BIGD_DATA_MODE5 0x00000020L
#define RTR_LOCAL_RANGE 0x000
#define RTR_LOCAL_REMAP 0x004
#define RTR_EXP_RANGE 0x010
#define RTR_EXP_REMAP 0x014
#define RTR_REGIONS 0x018
#define RTR_DM_MASK 0x01C
#define RTR_DM_LOCAL_BASE 0x020
#define RTR_DM_IO_BASE 0x024
#define RTR_DM_PCI_REMAP 0x028
#define RTR_DM_IO_CONFIG 0x02C
#define RTR_MAILBOX 0x040
#define RTR_LOCAL_DOORBELL 0x060
#define RTR_PCI_DOORBELL 0x064
#define RTR_INT_CONTROL_STATUS 0x068
#define RTR_EEPROM_CONTROL_STATUS 0x06C
#define RTR_DMA0_MODE 0x0080
#define RTR_DMA0_PCI_ADDR 0x0084
#define RTR_DMA0_LOCAL_ADDR 0x0088
#define RTR_DMA0_COUNT 0x008C
#define RTR_DMA0_DESC_PTR 0x0090
#define RTR_DMA1_MODE 0x0094
#define RTR_DMA1_PCI_ADDR 0x0098
#define RTR_DMA1_LOCAL_ADDR 0x009C
#define RTR_DMA1_COUNT 0x00A0
#define RTR_DMA1_DESC_PTR 0x00A4
#define RTR_DMA_COMMAND_STATUS 0x00A8
#define RTR_DMA_ARB0 0x00AC
#define RTR_DMA_ARB1 0x00B0
#define RTL_DMA0_MODE 0x00
#define RTL_DMA0_PCI_ADDR 0x04
#define RTL_DMA0_LOCAL_ADDR 0x08
#define RTL_DMA0_COUNT 0x0C
#define RTL_DMA0_DESC_PTR 0x10
#define RTL_DMA1_MODE 0x14
#define RTL_DMA1_PCI_ADDR 0x18
#define RTL_DMA1_LOCAL_ADDR 0x1C
#define RTL_DMA1_COUNT 0x20
#define RTL_DMA1_DESC_PTR 0x24
#define RTL_DMA_COMMAND_STATUS 0x28
#define RTL_DMA_ARB0 0x2C
#define RTL_DMA_ARB1 0x30
/************************************************/
/* Dale Scratchpad locations */
/************************************************/
#define DALE_CHANNEL_DEVICE_0 0 // device channel locations
#define DALE_CHANNEL_DEVICE_1 1
#define DALE_CHANNEL_DEVICE_2 2
#define DALE_CHANNEL_DEVICE_3 3
#define DALE_SCRATCH_DEVICE_0 4 // device type codes
#define DALE_SCRATCH_DEVICE_1 5
#define DALE_SCRATCH_DEVICE_2 6
#define DALE_SCRATCH_DEVICE_3 7
#define DALE_RAID_0_STATUS 8
#define DALE_RAID_1_STATUS 9
#define DALE_TIMING_MODE 12 // bus master timing mode (2, 3, 4, 5)
#define DALE_NUM_DRIVES 13 // number of addressable drives on this board
#define DALE_RAID_ON 14 // RAID status On
#define DALE_LAST_ERROR 15 // Last error code from BIOS
/************************************************/
/* BigD Scratchpad locations */
/************************************************/
#define BIGD_DEVICE_0 0 // device channel locations
#define BIGD_DEVICE_1 1
#define BIGD_DEVICE_2 2
#define BIGD_DEVICE_3 3
#define BIGD_DEVICE_4 4 // device type codes
#define BIGD_DEVICE_5 5
#define BIGD_DEVICE_6 6
#define BIGD_DEVICE_7 7
#define BIGD_ALARM_IMAGE 11 // ~image of alarm fail register
#define BIGD_TIMING_MODE 12 // bus master timing mode (2, 3, 4, 5)
#define BIGD_NUM_DRIVES 13 // number of addressable drives on this board
#define BIGD_RAID_ON 14 // RAID status is on for the whole board
#define BIGD_LAST_ERROR 15 // Last error code from BIOS
#define BIGD_RAID_0_STATUS 16
#define BIGD_RAID_1_STATUS 17
#define BIGD_RAID_2_STATUS 18
#define BIGD_RAID_3_STATUS 19
#define BIGD_RAID_4_STATUS 20
#define BIGD_RAID_5_STATUS 21
#define BIGD_RAID_6_STATUS 22
#define BIGD_RAID_7_STATUS 23
/************************************************/
/* Dale cable select bits */
/************************************************/
#define SEL_NONE 0x00
#define SEL_1 0x01
#define SEL_2 0x02
#define SEL_3 0x04
#define SEL_4 0x08
#define SEL_NEW_SPEED_1 0x20
#define SEL_COPY 0x40
#define SEL_IRQ_OFF 0x80
/************************************************/
/* Device/Geometry controls */
/************************************************/
#define GEOMETRY_NONE 0x0 // No device
#define GEOMETRY_SET 0x1 // Geometry set
#define GEOMETRY_LBA 0x2 // Geometry set in default LBA mode
#define GEOMETRY_PHOENIX 0x3 // Geometry set in Pheonix BIOS compatibility mode
#define DEVICE_NONE 0x0 // No device present
#define DEVICE_INACTIVE 0x1 // device present but not registered active
#define DEVICE_ATAPI 0x2 // ATAPI device (CD_ROM, Tape, Etc...)
#define DEVICE_DASD_NONLBA 0x3 // Non LBA incompatible device
#define DEVICE_DASD_LBA 0x4 // LBA compatible device
/************************************************/
/* BigD fail register bits */
/************************************************/
#define FAIL_NONE 0x00
#define FAIL_0 0x01
#define FAIL_1 0x02
#define FAIL_2 0x04
#define FAIL_MULTIPLE 0x08
#define FAIL_GOOD 0x20
#define FAIL_AUDIBLE 0x40
#define FAIL_ANY 0x80
/************************************************/
/* Setup Structure Definitions */
/************************************************/
typedef struct // device setup parameters
{
UCHAR geometryControl; // geometry control flags
UCHAR device; // device code
USHORT sectors; // number of sectors per track
USHORT heads; // number of heads
USHORT cylinders; // number of cylinders for this device
ULONG blocks; // number of blocks on device
ULONG realCapacity; // number of real blocks on this device for drive changed testing
} SETUP_DEVICE, *PSETUP_DEVICE;
typedef struct // master setup structure
{
USHORT startupDelay;
BOOL promptBIOS;
BOOL fastFormat;
BOOL shareInterrupt;
BOOL rebootRebuild;
USHORT timingMode;
USHORT spare5;
USHORT spare6;
SETUP_DEVICE setupDevice[BIGD_MAXDRIVES];
} SETUP, *PSETUP;
/************************************************/
/* RAID Structure Definitions */
/************************************************/
typedef struct
{
UCHAR signature; // 0x55 our mirror signature
UCHAR status; // current status bits
UCHAR pairIdentifier; // unique identifier for pair
ULONG reconstructPoint; // recontruction point for hot reconstruct
} DISK_MIRROR;
typedef struct DEVICE_RAID1
{
long TotalSectors;
DISK_MIRROR DiskRaid1;
} DEVICE_RAID1, *PDEVICE_RAID1;
#define DISK_MIRROR_POSITION 0x01A8
#define SIGNATURE 0x55
#define MASK_SERIAL_NUMBER 0x0FFE // mask for serial number matching
#define MASK_SERIAL_UNIT 0x0001 // mask for unit portion of serial number
// Status bits
#define UCBF_MIRRORED 0x0010 // drive has a pair
#define UCBF_MATCHED 0x0020 // drive pair is matched
#define UCBF_SURVIVOR 0x0040 // this unit is a survivor of a pair
#define UCBF_REBUILD 0x0080 // rebuild in progress on this device
// SCSI controls for RAID
#define SC_MY_RAID 0xBF // our special CDB command byte for Win95... interface
#define MY_SCSI_QUERY1 0x32 // byte 1 subcommand to query driver for RAID 1 informatation
#define MY_SCSI_REBUILD 0x40 // byte 1 subcommand to reconstruct a mirrored pair
#define MY_SCSI_DEMOFAIL 0x54 // byte 1 subcommand for RAID failure demonstration
#define MY_SCSI_ALARMMUTE 0x60 // byte 1 subcommand to mute any alarm currently on
/************************************************/
/* Timeout konstants */
/************************************************/
#define TIMEOUT_READY 100 // 100 mSec
#define TIMEOUT_DRQ 300 // 300 mSec
#define TIMEOUT_DATA (3 * HZ) // 3 seconds
/************************************************/
/* Misc. macros */
/************************************************/
#define ANY2SCSI(up, p) \
((UCHAR *)up)[0] = (((ULONG)(p)) >> 8); \
((UCHAR *)up)[1] = ((ULONG)(p));
#define SCSI2LONG(up) \
( (((long)*(((UCHAR *)up))) << 16) \
+ (((long)(((UCHAR *)up)[1])) << 8) \
+ ((long)(((UCHAR *)up)[2])) )
#define XANY2SCSI(up, p) \
((UCHAR *)up)[0] = ((long)(p)) >> 24; \
((UCHAR *)up)[1] = ((long)(p)) >> 16; \
((UCHAR *)up)[2] = ((long)(p)) >> 8; \
((UCHAR *)up)[3] = ((long)(p));
#define XSCSI2LONG(up) \
( (((long)(((UCHAR *)up)[0])) << 24) \
+ (((long)(((UCHAR *)up)[1])) << 16) \
+ (((long)(((UCHAR *)up)[2])) << 8) \
+ ((long)(((UCHAR *)up)[3])) )
#define SelectSpigot(padapter,spigot) outb_p (spigot, padapter->regStatSel)
#define WriteCommand(padapter,cmd) outb_p (cmd, padapter->regStatCmd)
#define AtapiDevice(padapter,b) outb_p (b, padapter->regLba24);
#define AtapiCountLo(padapter,b) outb_p (b, padapter->regLba8)
#define AtapiCountHi(padapter,b) outb_p (b, padapter->regLba16)
/************************************************/
/* SCSI CDB operation codes */
/************************************************/
#define SCSIOP_TEST_UNIT_READY 0x00
#define SCSIOP_REZERO_UNIT 0x01
#define SCSIOP_REWIND 0x01
#define SCSIOP_REQUEST_BLOCK_ADDR 0x02
#define SCSIOP_REQUEST_SENSE 0x03
#define SCSIOP_FORMAT_UNIT 0x04
#define SCSIOP_READ_BLOCK_LIMITS 0x05
#define SCSIOP_REASSIGN_BLOCKS 0x07
#define SCSIOP_READ6 0x08
#define SCSIOP_RECEIVE 0x08
#define SCSIOP_WRITE6 0x0A
#define SCSIOP_PRINT 0x0A
#define SCSIOP_SEND 0x0A
#define SCSIOP_SEEK6 0x0B
#define SCSIOP_TRACK_SELECT 0x0B
#define SCSIOP_SLEW_PRINT 0x0B
#define SCSIOP_SEEK_BLOCK 0x0C
#define SCSIOP_PARTITION 0x0D
#define SCSIOP_READ_REVERSE 0x0F
#define SCSIOP_WRITE_FILEMARKS 0x10
#define SCSIOP_FLUSH_BUFFER 0x10
#define SCSIOP_SPACE 0x11
#define SCSIOP_INQUIRY 0x12
#define SCSIOP_VERIFY6 0x13
#define SCSIOP_RECOVER_BUF_DATA 0x14
#define SCSIOP_MODE_SELECT 0x15
#define SCSIOP_RESERVE_UNIT 0x16
#define SCSIOP_RELEASE_UNIT 0x17
#define SCSIOP_COPY 0x18
#define SCSIOP_ERASE 0x19
#define SCSIOP_MODE_SENSE 0x1A
#define SCSIOP_START_STOP_UNIT 0x1B
#define SCSIOP_STOP_PRINT 0x1B
#define SCSIOP_LOAD_UNLOAD 0x1B
#define SCSIOP_RECEIVE_DIAGNOSTIC 0x1C
#define SCSIOP_SEND_DIAGNOSTIC 0x1D
#define SCSIOP_MEDIUM_REMOVAL 0x1E
#define SCSIOP_READ_CAPACITY 0x25
#define SCSIOP_READ 0x28
#define SCSIOP_WRITE 0x2A
#define SCSIOP_SEEK 0x2B
#define SCSIOP_LOCATE 0x2B
#define SCSIOP_WRITE_VERIFY 0x2E
#define SCSIOP_VERIFY 0x2F
#define SCSIOP_SEARCH_DATA_HIGH 0x30
#define SCSIOP_SEARCH_DATA_EQUAL 0x31
#define SCSIOP_SEARCH_DATA_LOW 0x32
#define SCSIOP_SET_LIMITS 0x33
#define SCSIOP_READ_POSITION 0x34
#define SCSIOP_SYNCHRONIZE_CACHE 0x35
#define SCSIOP_COMPARE 0x39
#define SCSIOP_COPY_COMPARE 0x3A
#define SCSIOP_WRITE_DATA_BUFF 0x3B
#define SCSIOP_READ_DATA_BUFF 0x3C
#define SCSIOP_CHANGE_DEFINITION 0x40
#define SCSIOP_READ_SUB_CHANNEL 0x42
#define SCSIOP_READ_TOC 0x43
#define SCSIOP_READ_HEADER 0x44
#define SCSIOP_PLAY_AUDIO 0x45
#define SCSIOP_PLAY_AUDIO_MSF 0x47
#define SCSIOP_PLAY_TRACK_INDEX 0x48
#define SCSIOP_PLAY_TRACK_RELATIVE 0x49
#define SCSIOP_PAUSE_RESUME 0x4B
#define SCSIOP_LOG_SELECT 0x4C
#define SCSIOP_LOG_SENSE 0x4D
#define SCSIOP_MODE_SELECT10 0x55
#define SCSIOP_MODE_SENSE10 0x5A
#define SCSIOP_LOAD_UNLOAD_SLOT 0xA6
#define SCSIOP_MECHANISM_STATUS 0xBD
#define SCSIOP_READ_CD 0xBE
// IDE command definitions
#define IDE_COMMAND_ATAPI_RESET 0x08
#define IDE_COMMAND_READ 0x20
#define IDE_COMMAND_WRITE 0x30
#define IDE_COMMAND_RECALIBRATE 0x10
#define IDE_COMMAND_SEEK 0x70
#define IDE_COMMAND_SET_PARAMETERS 0x91
#define IDE_COMMAND_VERIFY 0x40
#define IDE_COMMAND_ATAPI_PACKET 0xA0
#define IDE_COMMAND_ATAPI_IDENTIFY 0xA1
#define IDE_CMD_READ_MULTIPLE 0xC4
#define IDE_CMD_WRITE_MULTIPLE 0xC5
#define IDE_CMD_SET_MULTIPLE 0xC6
#define IDE_COMMAND_IDENTIFY 0xEC
// IDE status definitions
#define IDE_STATUS_ERROR 0x01
#define IDE_STATUS_INDEX 0x02
#define IDE_STATUS_CORRECTED_ERROR 0x04
#define IDE_STATUS_DRQ 0x08
#define IDE_STATUS_DSC 0x10
#define IDE_STATUS_WRITE_FAULT 0x20
#define IDE_STATUS_DRDY 0x40
#define IDE_STATUS_BUSY 0x80
typedef struct _ATAPI_STATUS
{
CHAR check :1;
CHAR reserved1 :1;
CHAR corr :1;
CHAR drq :1;
CHAR dsc :1;
CHAR reserved2 :1;
CHAR drdy :1;
CHAR bsy :1;
} ATAPI_STATUS;
typedef struct _ATAPI_REASON
{
CHAR cod :1;
CHAR io :1;
CHAR reserved1 :6;
} ATAPI_REASON;
typedef struct _ATAPI_ERROR
{
CHAR ili :1;
CHAR eom :1;
CHAR abort :1;
CHAR mcr :1;
CHAR senseKey :4;
} ATAPI_ERROR;
// IDE error definitions
#define IDE_ERROR_AMNF 0x01
#define IDE_ERROR_TKONF 0x02
#define IDE_ERROR_ABRT 0x04
#define IDE_ERROR_MCR 0x08
#define IDE_ERROR_IDFN 0x10
#define IDE_ERROR_MC 0x20
#define IDE_ERROR_UNC 0x40
#define IDE_ERROR_BBK 0x80
// SCSI read capacity structure
typedef struct _READ_CAPACITY_DATA
{
ULONG blks; /* total blocks (converted to little endian) */
ULONG blksiz; /* size of each (converted to little endian) */
} READ_CAPACITY_DATA, *PREAD_CAPACITY_DATA;
// SCSI inquiry data
typedef struct _INQUIRYDATA
{
UCHAR DeviceType :5;
UCHAR DeviceTypeQualifier :3;
UCHAR DeviceTypeModifier :7;
UCHAR RemovableMedia :1;
UCHAR Versions;
UCHAR ResponseDataFormat;
UCHAR AdditionalLength;
UCHAR Reserved[2];
UCHAR SoftReset :1;
UCHAR CommandQueue :1;
UCHAR Reserved2 :1;
UCHAR LinkedCommands :1;
UCHAR Synchronous :1;
UCHAR Wide16Bit :1;
UCHAR Wide32Bit :1;
UCHAR RelativeAddressing :1;
UCHAR VendorId[8];
UCHAR ProductId[16];
UCHAR ProductRevisionLevel[4];
UCHAR VendorSpecific[20];
UCHAR Reserved3[40];
} INQUIRYDATA, *PINQUIRYDATA;
// IDE IDENTIFY data
#pragma pack (1)
typedef struct _IDENTIFY_DATA
{
USHORT GeneralConfiguration; // 0
USHORT NumberOfCylinders; // 1
USHORT Reserved1; // 2
USHORT NumberOfHeads; // 3
USHORT UnformattedBytesPerTrack; // 4
USHORT UnformattedBytesPerSector; // 5
USHORT SectorsPerTrack; // 6
USHORT NumBytesISG; // 7 Byte Len - inter-sector gap
USHORT NumBytesSync; // 8 - sync field
USHORT NumWordsVUS; // 9 Len - Vendor Unique Info
USHORT SerialNumber[10]; // 10
USHORT BufferType; // 20
USHORT BufferSectorSize; // 21
USHORT NumberOfEccBytes; // 22
USHORT FirmwareRevision[4]; // 23
USHORT ModelNumber[20]; // 27
USHORT NumSectorsPerInt :8; // 47 Multiple Mode - Sec/Blk
USHORT Reserved2 :8; // 47
USHORT DoubleWordMode; // 48 flag for double word mode capable
USHORT VendorUnique1 :8; // 49
USHORT SupportDMA :1; // 49 DMA supported
USHORT SupportLBA :1; // 49 LBA supported
USHORT SupportIORDYDisable :1; // 49 IORDY can be disabled
USHORT SupportIORDY :1; // 49 IORDY supported
USHORT ReservedPsuedoDMA :1; // 49 reserved for pseudo DMA mode support
USHORT Reserved3 :3; // 49
USHORT Reserved4; // 50
USHORT Reserved5 :8; // 51 Transfer Cycle Timing - PIO
USHORT PIOCycleTime :8; // 51 Transfer Cycle Timing - PIO
USHORT Reserved6 :8; // 52 - DMA
USHORT DMACycleTime :8; // 52 - DMA
USHORT Valid_54_58 :1; // 53 words 54 - 58 are valid
USHORT Valid_64_70 :1; // 53 words 64 - 70 are valid
USHORT Reserved7 :14; // 53
USHORT LogNumCyl; // 54 Current Translation - Num Cyl
USHORT LogNumHeads; // 55 Num Heads
USHORT LogSectorsPerTrack; // 56 Sec/Trk
ULONG LogTotalSectors; // 57 Total Sec
USHORT CurrentNumSecPerInt :8; // 59 current setting for number of sectors per interrupt
USHORT ValidNumSecPerInt :1; // 59 Current setting is valid for number of sectors per interrupt
USHORT Reserved8 :7; // 59
ULONG LBATotalSectors; // 60 LBA Mode - Sectors
USHORT DMASWordFlags; // 62
USHORT DMAMWordFlags; // 63
USHORT AdvancedPIOSupport :8; // 64 Flow control PIO transfer modes supported
USHORT Reserved9 :8; // 64
USHORT MinMultiDMACycle; // 65 minimum multiword DMA transfer cycle time per word
USHORT RecomendDMACycle; // 66 Manufacturer's recommende multiword DMA transfer cycle time
USHORT MinPIOCycleWithoutFlow; // 67 Minimum PIO transfer cycle time without flow control
USHORT MinPIOCylceWithFlow; // 68 Minimum PIO transfer cycle time with IORDY flow control
USHORT ReservedSpace[256-69]; // 69
} IDENTIFY_DATA, *PIDENTIFY_DATA;
// ATAPI configuration bits
typedef struct _ATAPI_GENERAL_0
{
USHORT CmdPacketSize :2; // Command packet size
USHORT Reserved1 :3;
USHORT CmdDrqType :2;
USHORT Removable :1;
USHORT DeviceType :5;
USHORT Reserved2 :1;
USHORT ProtocolType :2;
} ATAPI_GENERAL_0;
#pragma pack ()
/****************************************************************************
* 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 */
#define ERR16_MEDIA 0x0C0C /* invalid media */
#define ERR16_CONTROL 0x2020 /* controller error */
#define ERR16_CONTROL_DMA 0x2120 /* controller DMA engine error */
#define ERR16_NO_ALARM 0x2220 /* alarm is not active */
#define ERR16_OP_BUSY 0x2320 /* operation busy */
#define ERR16_SEEK 0x4040 /* seek failure */
#define ERR16_DEVICE_FAIL 0x4140 /* device has failed */
#define ERR16_TIMEOUT 0x8080 /* timeout error */
#define ERR16_DEV_NOT_READY 0xAAAA /* drive not ready */
#define ERR16_UNDEFINED 0xBBBB /* undefined error */
#define ERR16_WRITE_FAULT 0xCCCC /* write fault */
#define ERR16_INVALID_DEV 0x4001 /* invalid device access */
#define ERR16_DEVICE_BUSY 0x4002 /* device is busy */
#define ERR16_MEMORY 0x4003 /* device pass thru requires too much memory */
#define ERR16_NO_FEATURE 0x40FA /* feature no implemented */
#define ERR16_NOTAG 0x40FD /* no tag space available */
#define ERR16_NOT_READY 0x40FE /* controller not ready error */
#define ERR16_SETUP_FLASH 0x5050 /* error when writing setup to flash memory */
#define ERR16_SETUP_SIZE 0x5051 /* setup block size error */
#define ERR16_SENSE 0xFFFF /* sense opereration failed */
#define ERR16_SC_BUSY 0x0008 /* SCSI status - Busy */
#define ERR16_SC_RES_CONFL 0x0018 /* SCSI status - Reservation Conflict */
#define ERR16_SC_CMD_TERM 0x0022 /* SCSI status - Command Terminated */
#define ERR16_SC_OTHER 0x00FF /* SCSI status - not recognized (any value masked) */
#define ERR16_MEDIA_CHANGED 0x8001 /* devices media has been changed */
#define ERR32_NONE 0x00000000 /* no errors */
#define ERR32_SC_COND_MET 0x00000004 /* SCSI status - Condition Met */
#define ERR32_CMD 0x00010101 /* command error */
#define ERR32_SC_CHECK_COND 0x00020002 /* SCSI status - Check Condition */
#define ERR32_CMD_NOT 0x00030201 /* command not supported */
#define ERR32_NO_DEVICE 0x00040301 /* invalid device selection */
#define ERR32_SECTOR 0x00050202 /* bad sector */
#define ERR32_PROTECT 0x00060303 /* write protected */
#define ERR32_NOSECTOR 0x00070404 /* sector not found */
#define ERR32_MEDIA 0x00080C0C /* invalid media */
#define ERR32_CONTROL 0x00092020 /* controller error */
#define ERR32_CONTROL_DMA 0x000A2120 /* Controller DMA error */
#define ERR32_NO_ALARM 0x000B2220 /* alarm is not active */
#define ERR32_OP_BUSY 0x000C2320 /* operation busy */
#define ERR32_SEEK 0x000D4040 /* seek failure */
#define ERR32_DEVICE_FAIL 0x000E4140 /* device has failed */
#define ERR32_TIMEOUT 0x000F8080 /* timeout error */
#define ERR32_DEV_NOT_READY 0x0010AAAA /* drive not ready */
#define ERR32_UNDEFINED 0x0011BBBB /* undefined error */
#define ERR32_WRITE_FAULT 0x0012CCCC /* write fault */
#define ERR32_INVALID_DEV 0x00134001 /* invalid device access */
#define ERR32_DEVICE_BUSY 0x00144002 /* device is busy */
#define ERR32_MEMORY 0x00154003 /* device pass thru requires too much memory */
#define ERR32_NO_FEATURE 0x001640FA /* feature no implemented */
#define ERR32_NOTAG 0x001740FD /* no tag space available */
#define ERR32_NOT_READY 0x001840FE /* controller not ready error */
#define ERR32_SETUP_FLASH 0x00195050 /* error when writing setup to flash memory */
#define ERR32_SETUP_SIZE 0x001A5051 /* setup block size error */
#define ERR32_SENSE 0x001BFFFF /* sense opereration failed */
#define ERR32_SC_BUSY 0x001C0008 /* SCSI status - Busy */
#define ERR32_SC_RES_CONFL 0x001D0018 /* SCSI status - Reservation Conflict */
#define ERR32_SC_CMD_TERM 0x001E0022 /* SCSI status - Command Terminated */
#define ERR32_SC_OTHER 0x001F00FF /* SCSI status - not recognized (any value masked) */
#define ERR32_MEDIA_CHANGED 0x00208001 /* devices media has been changed */
/************************************************/
/* */
/* Host Operating System specification codes */
/* */
/************************************************/
#define SPEC_INTERRUPT 0x80 /* specification requires host interrupt */
#define SPEC_BACKWARD_SG 0x40 /* specification requires scatter/gather items reversed */
#define SPEC_DOS_BLOCK 0x01 /* DOS DASD blocking on pass through */
#define SPEC_OS2_V3 0x02 /* OS/2 Warp */
#define SPCE_SCO_3242 0x04 /* SCO 3.4.2.2 */
#define SPEC_QNX_4X 0x05 /* QNX 4.XX */
#define SPEC_NOVELL_NWPA 0x08 /* Novell NWPA scatter/gather support */
/************************************************/
/* */
/* Inquire structures */
/* */
/************************************************/
typedef struct _CNT_SCSI_INQ
{
UCHAR devt; /* 00: device type */
UCHAR devtm; /* 01: device type modifier */
UCHAR svers; /* 02: SCSI version */
UCHAR rfmt; /* 03: response data format */
UCHAR adlen; /* 04: additional length of data */
UCHAR res1; /* 05: */
UCHAR res2; /* 06: */
UCHAR fncs; /* 07: functional capabilities */
UCHAR vid[8]; /* 08: vendor ID */
UCHAR pid[16]; /* 10: product ID */
UCHAR rev[4]; /* 20: product revision */
} CNT_SCSI_INQ;
typedef struct _CNT_IDE_INQ
{
USHORT GeneralConfiguration; /* 00 */
USHORT NumberOfCylinders; /* 02 */
USHORT Reserved1; /* 04 */
USHORT NumberOfHeads; /* 06 */
USHORT UnformattedBytesPerTrack; /* 08 */
USHORT UnformattedBytesPerSector; /* 0A */
USHORT SectorsPerTrack; /* 0C */
USHORT VendorUnique1[3]; /* 0E */
USHORT SerialNumber[10]; /* 14 */
USHORT BufferType; /* 28 */
USHORT BufferSectorSize; /* 2A */
USHORT NumberOfEccBytes; /* 2C */
USHORT FirmwareRevision[4]; /* 2E */
USHORT ModelNumber[20]; /* 36 */
UCHAR MaximumBlockTransfer; /* 5E */
UCHAR VendorUnique2; /* 5F */
USHORT DoubleWordIo; /* 60 */
USHORT Capabilities; /* 62 */
USHORT Reserved2; /* 64 */
UCHAR VendorUnique3; /* 66 */
UCHAR PioCycleTimingMode; /* 67 */
UCHAR VendorUnique4; /* 68 */
UCHAR DmaCycleTimingMode; /* 69 */
USHORT TranslationFieldsValid; /* 6A */
USHORT NumberOfCurrentCylinders; /* 6C */
USHORT NumberOfCurrentHeads; /* 6E */
USHORT CurrentSectorsPerTrack; /* 70 */
ULONG CurrentSectorCapacity; /* 72 */
} CNT_IDE_INQ;
typedef struct _DASD_INQUIRE
{
ULONG type; /* 0 = SCSI, 1 = IDE */
union
{
CNT_SCSI_INQ scsi; /* SCSI inquire data */
CNT_IDE_INQ ide; /* IDE inquire data */
} inq;
} DASD_INQUIRE;
/************************************************/
/* */
/* Device Codes */
/* */
/************************************************/
#define DEVC_DASD 0x00 /* Direct-access Storage Device */
#define DEVC_SEQACESS 0x01 /* Sequential-access device */
#define DEVC_PRINTER 0x02 /* Printer device */
#define DEVC_PROCESSOR 0x03 /* Processor device */
#define DEVC_WRITEONCE 0x04 /* Write-once device */
#define DEVC_CDROM 0x05 /* CD-ROM device */
#define DEVC_SCANNER 0x06 /* Scanner device */
#define DEVC_OPTICAL 0x07 /* Optical memory device */
#define DEVC_MEDCHGR 0x08 /* Medium changer device */
#define DEVC_DASD_REMOVABLE 0x80 /* Direct-access storage device, Removable */
#define DEVC_NONE 0xFF /* no device */
// SCSI controls for RAID
#define SC_MY_RAID 0xBF // our special CDB command byte for Win95... interface
#define MY_SCSI_QUERY0 0x31 // byte 1 subcommand to query driver for RAID 0 informatation
#define MY_SCSI_QUERY1 0x32 // byte 1 subcommand to query driver for RAID 1 informatation
#define MY_SCSI_QUERY5 0x33 // byte 1 subcommand to query driver for RAID 5 informatation
#define MY_SCSI_REBUILD 0x40 // byte 1 subcommand to reconstruct a mirrored pair
#define MY_SCSI_DEMOFAIL 0x54 // byte 1 subcommand for RAID failure demonstration
#define MY_SCSI_ALARMMUTE 0x60 // byte 1 subcommand to mute any alarm currently on
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册