megaraid_mm.h 2.1 KB

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