megaraid_mm.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 "mbox_defs.h"
  24. #include "megaraid_ioctl.h"
  25. #define LSI_COMMON_MOD_VERSION "2.20.2.7"
  26. #define LSI_COMMON_MOD_EXT_VERSION \
  27. "(Release Date: Sun Jul 16 00:01:03 EST 2006)"
  28. #define LSI_DBGLVL dbglevel
  29. // The smallest dma pool
  30. #define MRAID_MM_INIT_BUFF_SIZE 4096
  31. /**
  32. * mimd_t : Old style ioctl packet structure (deprecated)
  33. *
  34. * @inlen :
  35. * @outlen :
  36. * @fca :
  37. * @opcode :
  38. * @subopcode :
  39. * @adapno :
  40. * @buffer :
  41. * @pad :
  42. * @length :
  43. * @mbox :
  44. * @pthru :
  45. * @data :
  46. * @pad :
  47. *
  48. * Note : This structure is DEPRECATED. New applications must use
  49. * : uioc_t structure instead. All new hba drivers use the new
  50. * : format. If we get this mimd packet, we will convert it into
  51. * : new uioc_t format and send it to the hba drivers.
  52. */
  53. typedef struct mimd {
  54. uint32_t inlen;
  55. uint32_t outlen;
  56. union {
  57. uint8_t fca[16];
  58. struct {
  59. uint8_t opcode;
  60. uint8_t subopcode;
  61. uint16_t adapno;
  62. #if BITS_PER_LONG == 32
  63. uint8_t __user *buffer;
  64. uint8_t pad[4];
  65. #endif
  66. #if BITS_PER_LONG == 64
  67. uint8_t __user *buffer;
  68. #endif
  69. uint32_t length;
  70. } __attribute__ ((packed)) fcs;
  71. } __attribute__ ((packed)) ui;
  72. uint8_t mbox[18]; /* 16 bytes + 2 status bytes */
  73. mraid_passthru_t pthru;
  74. #if BITS_PER_LONG == 32
  75. char __user *data; /* buffer <= 4096 for 0x80 commands */
  76. char pad[4];
  77. #endif
  78. #if BITS_PER_LONG == 64
  79. char __user *data;
  80. #endif
  81. } __attribute__ ((packed))mimd_t;
  82. #endif // MEGARAID_MM_H
  83. // vi: set ts=8 sw=8 tw=78: