megaraid_mm.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. *
  4. * Linux MegaRAID device driver
  5. *
  6. * Copyright (c) 2003-2004 LSI Logic Corporation.
  7. *
  8. * FILE : megaraid_mm.h
  9. */
  10. #ifndef MEGARAID_MM_H
  11. #define MEGARAID_MM_H
  12. #include <linux/spinlock.h>
  13. #include <linux/fs.h>
  14. #include <linux/uaccess.h>
  15. #include <linux/module.h>
  16. #include <linux/moduleparam.h>
  17. #include <linux/pci.h>
  18. #include <linux/list.h>
  19. #include <linux/miscdevice.h>
  20. #include "mbox_defs.h"
  21. #include "megaraid_ioctl.h"
  22. #define LSI_COMMON_MOD_VERSION "2.20.2.7"
  23. #define LSI_COMMON_MOD_EXT_VERSION \
  24. "(Release Date: Sun Jul 16 00:01:03 EST 2006)"
  25. #define LSI_DBGLVL dbglevel
  26. // The smallest dma pool
  27. #define MRAID_MM_INIT_BUFF_SIZE 4096
  28. /**
  29. * mimd_t : Old style ioctl packet structure (deprecated)
  30. *
  31. * @inlen :
  32. * @outlen :
  33. * @fca :
  34. * @opcode :
  35. * @subopcode :
  36. * @adapno :
  37. * @buffer :
  38. * @pad :
  39. * @length :
  40. * @mbox :
  41. * @pthru :
  42. * @data :
  43. * @pad :
  44. *
  45. * Note : This structure is DEPRECATED. New applications must use
  46. * : uioc_t structure instead. All new hba drivers use the new
  47. * : format. If we get this mimd packet, we will convert it into
  48. * : new uioc_t format and send it to the hba drivers.
  49. */
  50. typedef struct mimd {
  51. uint32_t inlen;
  52. uint32_t outlen;
  53. union {
  54. uint8_t fca[16];
  55. struct {
  56. uint8_t opcode;
  57. uint8_t subopcode;
  58. uint16_t adapno;
  59. #if BITS_PER_LONG == 32
  60. uint8_t __user *buffer;
  61. uint8_t pad[4];
  62. #endif
  63. #if BITS_PER_LONG == 64
  64. uint8_t __user *buffer;
  65. #endif
  66. uint32_t length;
  67. } __attribute__ ((packed)) fcs;
  68. } __attribute__ ((packed)) ui;
  69. uint8_t mbox[18]; /* 16 bytes + 2 status bytes */
  70. mraid_passthru_t pthru;
  71. #if BITS_PER_LONG == 32
  72. char __user *data; /* buffer <= 4096 for 0x80 commands */
  73. char pad[4];
  74. #endif
  75. #if BITS_PER_LONG == 64
  76. char __user *data;
  77. #endif
  78. } __attribute__ ((packed))mimd_t;
  79. #endif // MEGARAID_MM_H
  80. // vi: set ts=8 sw=8 tw=78: