/*1* Disk Array driver for Compaq SMART2 Controllers2* Copyright 1998 Compaq Computer Corporation3*4* This program is free software; you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation; either version 2 of the License, or7* (at your option) any later version.8*9* This program is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or12* NON INFRINGEMENT. See the GNU General Public License for more details.13*14* You should have received a copy of the GNU General Public License15* along with this program; if not, write to the Free Software16* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.17*18* Questions/Comments/Bugfixes to [email protected]19*20*/21#ifndef IDA_IOCTL_H22#define IDA_IOCTL_H2324#include "ida_cmd.h"25#include "cpqarray.h"2627#define IDAGETDRVINFO 0x2727282828#define IDAPASSTHRU 0x2828292929#define IDAGETCTLRSIG 0x2929303030#define IDAREVALIDATEVOLS 0x3030313131#define IDADRIVERVERSION 0x3131323232#define IDAGETPCIINFO 0x323233333334typedef struct _ida_pci_info_struct35{36unsigned char bus;37unsigned char dev_fn;38__u32 board_id;39} ida_pci_info_struct;40/*41* Normally, the ioctl determines the logical unit for this command by42* the major,minor number of the fd passed to ioctl. If you need to send43* a command to a different/nonexistant unit (such as during config), you44* can override the normal behavior by setting the unit valid bit. (Normally,45* it should be zero) The controller the command is sent to is still46* determined by the major number of the open device.47*/4849#define UNITVALID 0x8050typedef struct {51__u8 cmd;52__u8 rcode;53__u8 unit;54__u32 blk;55__u16 blk_cnt;5657/* currently, sg_cnt is assumed to be 1: only the 0th element of sg is used */58struct {59void __user *addr;60size_t size;61} sg[SG_MAX];62int sg_cnt;6364union ctlr_cmds {65drv_info_t drv;66unsigned char buf[1024];6768id_ctlr_t id_ctlr;69drv_param_t drv_param;70id_log_drv_t id_log_drv;71id_log_drv_ext_t id_log_drv_ext;72sense_log_drv_stat_t sense_log_drv_stat;73id_phys_drv_t id_phys_drv;74blink_drv_leds_t blink_drv_leds;75sense_blink_leds_t sense_blink_leds;76config_t config;77reorder_log_drv_t reorder_log_drv;78label_log_drv_t label_log_drv;79surf_delay_t surf_delay;80overhead_delay_t overhead_delay;81mp_delay_t mp_delay;82scsi_param_t scsi_param;83} c;84} ida_ioctl_t;8586#endif /* IDA_IOCTL_H */878889