dpti_ioctl.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /***************************************************************************
  2. dpti_ioctl.h - description
  3. -------------------
  4. begin : Thu Sep 7 2000
  5. copyright : (C) 2001 by Adaptec
  6. See Documentation/scsi/dpti.txt for history, notes, license info
  7. and credits
  8. ***************************************************************************/
  9. /***************************************************************************
  10. * *
  11. * This program is free software; you can redistribute it and/or modify *
  12. * it under the terms of the GNU General Public License as published by *
  13. * the Free Software Foundation; either version 2 of the License, or *
  14. * (at your option) any later version. *
  15. * *
  16. ***************************************************************************/
  17. /***************************************************************************
  18. * This file is generated from osd_unix.h *
  19. * *************************************************************************/
  20. #ifndef _dpti_ioctl_h
  21. #define _dpti_ioctl_h
  22. // IOCTL interface commands
  23. #ifndef _IOWR
  24. # define _IOWR(x,y,z) (((x)<<8)|y)
  25. #endif
  26. #ifndef _IOW
  27. # define _IOW(x,y,z) (((x)<<8)|y)
  28. #endif
  29. #ifndef _IOR
  30. # define _IOR(x,y,z) (((x)<<8)|y)
  31. #endif
  32. #ifndef _IO
  33. # define _IO(x,y) (((x)<<8)|y)
  34. #endif
  35. /* EATA PassThrough Command */
  36. #define EATAUSRCMD _IOWR('D',65,EATA_CP)
  37. /* Set Debug Level If Enabled */
  38. #define DPT_DEBUG _IOW('D',66,int)
  39. /* Get Signature Structure */
  40. #define DPT_SIGNATURE _IOR('D',67,dpt_sig_S)
  41. #if defined __bsdi__
  42. #define DPT_SIGNATURE_PACKED _IOR('D',67,dpt_sig_S_Packed)
  43. #endif
  44. /* Get Number Of DPT Adapters */
  45. #define DPT_NUMCTRLS _IOR('D',68,int)
  46. /* Get Adapter Info Structure */
  47. #define DPT_CTRLINFO _IOR('D',69,CtrlInfo)
  48. /* Get Statistics If Enabled */
  49. #define DPT_STATINFO _IO('D',70)
  50. /* Clear Stats If Enabled */
  51. #define DPT_CLRSTAT _IO('D',71)
  52. /* Get System Info Structure */
  53. #define DPT_SYSINFO _IOR('D',72,sysInfo_S)
  54. /* Set Timeout Value */
  55. #define DPT_TIMEOUT _IO('D',73)
  56. /* Get config Data */
  57. #define DPT_CONFIG _IO('D',74)
  58. /* Get Blink LED Code */
  59. #define DPT_BLINKLED _IOR('D',75,int)
  60. /* Get Statistical information (if available) */
  61. #define DPT_STATS_INFO _IOR('D',80,STATS_DATA)
  62. /* Clear the statistical information */
  63. #define DPT_STATS_CLEAR _IO('D',81)
  64. /* Get Performance metrics */
  65. #define DPT_PERF_INFO _IOR('D',82,dpt_perf_t)
  66. /* Send an I2O command */
  67. #define I2OUSRCMD _IO('D',76)
  68. /* Inform driver to re-acquire LCT information */
  69. #define I2ORESCANCMD _IO('D',77)
  70. /* Inform driver to reset adapter */
  71. #define I2ORESETCMD _IO('D',78)
  72. /* See if the target is mounted */
  73. #define DPT_TARGET_BUSY _IOR('D',79, TARGET_BUSY_T)
  74. /* Structure Returned From Get Controller Info */
  75. typedef struct {
  76. uCHAR state; /* Operational state */
  77. uCHAR id; /* Host adapter SCSI id */
  78. int vect; /* Interrupt vector number */
  79. int base; /* Base I/O address */
  80. int njobs; /* # of jobs sent to HA */
  81. int qdepth; /* Controller queue depth. */
  82. int wakebase; /* mpx wakeup base index. */
  83. uINT SGsize; /* Scatter/Gather list size. */
  84. unsigned heads; /* heads for drives on cntlr. */
  85. unsigned sectors; /* sectors for drives on cntlr. */
  86. uCHAR do_drive32; /* Flag for Above 16 MB Ability */
  87. uCHAR BusQuiet; /* SCSI Bus Quiet Flag */
  88. char idPAL[4]; /* 4 Bytes Of The ID Pal */
  89. uCHAR primary; /* 1 For Primary, 0 For Secondary */
  90. uCHAR eataVersion; /* EATA Version */
  91. uINT cpLength; /* EATA Command Packet Length */
  92. uINT spLength; /* EATA Status Packet Length */
  93. uCHAR drqNum; /* DRQ Index (0,5,6,7) */
  94. uCHAR flag1; /* EATA Flags 1 (Byte 9) */
  95. uCHAR flag2; /* EATA Flags 2 (Byte 30) */
  96. } CtrlInfo;
  97. typedef struct {
  98. uSHORT length; // Remaining length of this
  99. uSHORT drvrHBAnum; // Relative HBA # used by the driver
  100. uINT baseAddr; // Base I/O address
  101. uSHORT blinkState; // Blink LED state (0=Not in blink LED)
  102. uCHAR pciBusNum; // PCI Bus # (Optional)
  103. uCHAR pciDeviceNum; // PCI Device # (Optional)
  104. uSHORT hbaFlags; // Miscellaneous HBA flags
  105. uSHORT Interrupt; // Interrupt set for this device.
  106. # if (defined(_DPT_ARC))
  107. uINT baseLength;
  108. ADAPTER_OBJECT *AdapterObject;
  109. LARGE_INTEGER DmaLogicalAddress;
  110. PVOID DmaVirtualAddress;
  111. LARGE_INTEGER ReplyLogicalAddress;
  112. PVOID ReplyVirtualAddress;
  113. # else
  114. uINT reserved1; // Reserved for future expansion
  115. uINT reserved2; // Reserved for future expansion
  116. uINT reserved3; // Reserved for future expansion
  117. # endif
  118. } drvrHBAinfo_S;
  119. typedef struct TARGET_BUSY
  120. {
  121. uLONG channel;
  122. uLONG id;
  123. uLONG lun;
  124. uLONG isBusy;
  125. } TARGET_BUSY_T;
  126. #endif