14#define DEV_ARECA_H_CVSID "$Id: dev_areca.h 5198 2021-02-01 20:36:02Z chrfranke $"
30#define ARECA_SIG_STR "ARCMSR"
32#if defined(_WIN32) || defined(__CYGWIN__)
33#define ARCMSR_IOCTL_READ_RQBUFFER 0x90002004
34#define ARCMSR_IOCTL_WRITE_WQBUFFER 0x90002008
35#define ARCMSR_IOCTL_CLEAR_RQBUFFER 0x9000200C
36#define ARCMSR_IOCTL_CLEAR_WQBUFFER 0x90002010
37#define ARCMSR_IOCTL_RETURN_CODE_3F 0x90002018
38#elif defined(__linux__)
40#define ARECA_SATA_RAID 0x90000000
42#define FUNCTION_READ_RQBUFFER 0x0801
43#define FUNCTION_WRITE_WQBUFFER 0x0802
44#define FUNCTION_CLEAR_RQBUFFER 0x0803
45#define FUNCTION_CLEAR_WQBUFFER 0x0804
46#define FUNCTION_RETURN_CODE_3F 0x0806
49#define ARCMSR_IOCTL_READ_RQBUFFER (ARECA_SATA_RAID | FUNCTION_READ_RQBUFFER)
50#define ARCMSR_IOCTL_WRITE_WQBUFFER (ARECA_SATA_RAID | FUNCTION_WRITE_WQBUFFER)
51#define ARCMSR_IOCTL_CLEAR_RQBUFFER (ARECA_SATA_RAID | FUNCTION_CLEAR_RQBUFFER)
52#define ARCMSR_IOCTL_CLEAR_WQBUFFER (ARECA_SATA_RAID | FUNCTION_CLEAR_WQBUFFER)
53#define ARCMSR_IOCTL_RETURN_CODE_3F (ARECA_SATA_RAID | FUNCTION_RETURN_CODE_3F)
54#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
58#define FUNCTION_READ_RQBUFFER 0x0801
59#define FUNCTION_WRITE_WQBUFFER 0x0802
60#define FUNCTION_CLEAR_RQBUFFER 0x0803
61#define FUNCTION_CLEAR_WQBUFFER 0x0804
62#define FUNCTION_RETURN_CODE_3F 0x0806
65#define ARCMSR_IOCTL_READ_RQBUFFER _IOWR('F', FUNCTION_READ_RQBUFFER, sSRB_BUFFER)
66#define ARCMSR_IOCTL_WRITE_WQBUFFER _IOWR('F', FUNCTION_WRITE_WQBUFFER, sSRB_BUFFER)
67#define ARCMSR_IOCTL_CLEAR_RQBUFFER _IOWR('F', FUNCTION_CLEAR_RQBUFFER, sSRB_BUFFER)
68#define ARCMSR_IOCTL_CLEAR_WQBUFFER _IOWR('F', FUNCTION_CLEAR_WQBUFFER, sSRB_BUFFER)
69#define ARCMSR_IOCTL_RETURN_CODE_3F _IOWR('F', FUNCTION_RETURN_CODE_3F, sSRB_BUFFER)
106 virtual int arcmsr_ui_handler(
unsigned char *areca_packet,
int areca_packet_len,
unsigned char *result);
bool arcmsr_unlock() override
bool arcmsr_lock() override
virtual bool ata_pass_through(const ata_cmd_in &in, ata_cmd_out &out) override
ATA pass through.
int arcmsr_do_scsi_io(struct scsi_cmnd_io *) override
bool arcmsr_lock() override
int arcmsr_do_scsi_io(struct scsi_cmnd_io *) override
bool arcmsr_unlock() override
virtual bool scsi_pass_through(scsi_cmnd_io *iop) override
SCSI pass through.
int m_encnum
Enclosure number.
virtual int arcmsr_get_dev_type()
virtual int arcmsr_do_scsi_io(struct scsi_cmnd_io *iop)=0
virtual int arcmsr_get_controller_type()
void set_disknum(int disknum)
virtual bool arcmsr_lock()=0
virtual bool arcmsr_unlock()=0
void set_encnum(int encnum)
virtual bool arcmsr_probe()
int m_disknum
Disk number.
virtual bool arcmsr_ata_pass_through(const ata_cmd_in &in, ata_cmd_out &out)
virtual int arcmsr_ui_handler(unsigned char *areca_packet, int areca_packet_len, unsigned char *result)
virtual int arcmsr_command_handler(unsigned long arcmsr_cmd, unsigned char *data, int data_len)
virtual bool arcmsr_scsi_pass_through(scsi_cmnd_io *iop)
Base class for all devices.
The platform interface abstraction.
struct _ARCMSR_IO_HDR sARCMSR_IO_HDR
_GENERIC_ARCMSR_CMDS
Areca RAID support.
struct _SRB_BUFFER sSRB_BUFFER
unsigned int HeaderLength
unsigned char Signature[8]
unsigned char ioctldatabuffer[1032]
ATA pass through input parameters.
ATA pass through output parameters.