ida_ioctl.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * Disk Array driver for Compaq SMART2 Controllers
  3. * Copyright 1998 Compaq Computer Corporation
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  13. * NON INFRINGEMENT. See the GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. *
  19. * Questions/Comments/Bugfixes to iss_storagedev@hp.com
  20. *
  21. */
  22. #ifndef IDA_IOCTL_H
  23. #define IDA_IOCTL_H
  24. #include "ida_cmd.h"
  25. #include "cpqarray.h"
  26. #define IDAGETDRVINFO 0x27272828
  27. #define IDAPASSTHRU 0x28282929
  28. #define IDAGETCTLRSIG 0x29293030
  29. #define IDAREVALIDATEVOLS 0x30303131
  30. #define IDADRIVERVERSION 0x31313232
  31. #define IDAGETPCIINFO 0x32323333
  32. typedef struct _ida_pci_info_struct
  33. {
  34. unsigned char bus;
  35. unsigned char dev_fn;
  36. __u32 board_id;
  37. } ida_pci_info_struct;
  38. /*
  39. * Normally, the ioctl determines the logical unit for this command by
  40. * the major,minor number of the fd passed to ioctl. If you need to send
  41. * a command to a different/nonexistant unit (such as during config), you
  42. * can override the normal behavior by setting the unit valid bit. (Normally,
  43. * it should be zero) The controller the command is sent to is still
  44. * determined by the major number of the open device.
  45. */
  46. #define UNITVALID 0x80
  47. typedef struct {
  48. __u8 cmd;
  49. __u8 rcode;
  50. __u8 unit;
  51. __u32 blk;
  52. __u16 blk_cnt;
  53. /* currently, sg_cnt is assumed to be 1: only the 0th element of sg is used */
  54. struct {
  55. void __user *addr;
  56. size_t size;
  57. } sg[SG_MAX];
  58. int sg_cnt;
  59. union ctlr_cmds {
  60. drv_info_t drv;
  61. unsigned char buf[1024];
  62. id_ctlr_t id_ctlr;
  63. drv_param_t drv_param;
  64. id_log_drv_t id_log_drv;
  65. id_log_drv_ext_t id_log_drv_ext;
  66. sense_log_drv_stat_t sense_log_drv_stat;
  67. id_phys_drv_t id_phys_drv;
  68. blink_drv_leds_t blink_drv_leds;
  69. sense_blink_leds_t sense_blink_leds;
  70. config_t config;
  71. reorder_log_drv_t reorder_log_drv;
  72. label_log_drv_t label_log_drv;
  73. surf_delay_t surf_delay;
  74. overhead_delay_t overhead_delay;
  75. mp_delay_t mp_delay;
  76. scsi_param_t scsi_param;
  77. } c;
  78. } ida_ioctl_t;
  79. #endif /* IDA_IOCTL_H */