lpfc_bsg.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*******************************************************************
  2. * This file is part of the Emulex Linux Device Driver for *
  3. * Fibre Channel Host Bus Adapters. *
  4. * Copyright (C) 2010 Emulex. All rights reserved. *
  5. * EMULEX and SLI are trademarks of Emulex. *
  6. * www.emulex.com *
  7. * *
  8. * This program is free software; you can redistribute it and/or *
  9. * modify it under the terms of version 2 of the GNU General *
  10. * Public License as published by the Free Software Foundation. *
  11. * This program is distributed in the hope that it will be useful. *
  12. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND *
  13. * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, *
  14. * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
  15. * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
  16. * TO BE LEGALLY INVALID. See the GNU General Public License for *
  17. * more details, a copy of which can be found in the file COPYING *
  18. * included with this package. *
  19. *******************************************************************/
  20. /* bsg definitions
  21. * No pointers to user data are allowed, all application buffers and sizes will
  22. * derived through the bsg interface.
  23. *
  24. * These are the vendor unique structures passed in using the bsg
  25. * FC_BSG_HST_VENDOR message code type.
  26. */
  27. #define LPFC_BSG_VENDOR_SET_CT_EVENT 1
  28. #define LPFC_BSG_VENDOR_GET_CT_EVENT 2
  29. #define LPFC_BSG_VENDOR_SEND_MGMT_RESP 3
  30. #define LPFC_BSG_VENDOR_DIAG_MODE 4
  31. #define LPFC_BSG_VENDOR_DIAG_TEST 5
  32. #define LPFC_BSG_VENDOR_GET_MGMT_REV 6
  33. #define LPFC_BSG_VENDOR_MBOX 7
  34. #define LPFC_BSG_VENDOR_MENLO_CMD 8
  35. #define LPFC_BSG_VENDOR_MENLO_DATA 9
  36. struct set_ct_event {
  37. uint32_t command;
  38. uint32_t type_mask;
  39. uint32_t ev_req_id;
  40. uint32_t ev_reg_id;
  41. };
  42. struct get_ct_event {
  43. uint32_t command;
  44. uint32_t ev_reg_id;
  45. uint32_t ev_req_id;
  46. };
  47. struct get_ct_event_reply {
  48. uint32_t immed_data;
  49. uint32_t type;
  50. };
  51. struct send_mgmt_resp {
  52. uint32_t command;
  53. uint32_t tag;
  54. };
  55. #define INTERNAL_LOOP_BACK 0x1 /* adapter short cuts the loop internally */
  56. #define EXTERNAL_LOOP_BACK 0x2 /* requires an external loopback plug */
  57. struct diag_mode_set {
  58. uint32_t command;
  59. uint32_t type;
  60. uint32_t timeout;
  61. };
  62. struct diag_mode_test {
  63. uint32_t command;
  64. };
  65. #define LPFC_WWNN_TYPE 0
  66. #define LPFC_WWPN_TYPE 1
  67. struct get_mgmt_rev {
  68. uint32_t command;
  69. };
  70. #define MANAGEMENT_MAJOR_REV 1
  71. #define MANAGEMENT_MINOR_REV 0
  72. /* the MgmtRevInfo structure */
  73. struct MgmtRevInfo {
  74. uint32_t a_Major;
  75. uint32_t a_Minor;
  76. };
  77. struct get_mgmt_rev_reply {
  78. struct MgmtRevInfo info;
  79. };
  80. #define BSG_MBOX_SIZE 4096 /* mailbox command plus extended data */
  81. struct dfc_mbox_req {
  82. uint32_t command;
  83. uint32_t mbOffset;
  84. uint32_t inExtWLen;
  85. uint32_t outExtWLen;
  86. };
  87. /* Used for menlo command or menlo data. The xri is only used for menlo data */
  88. struct menlo_command {
  89. uint32_t cmd;
  90. uint32_t xri;
  91. };
  92. struct menlo_response {
  93. uint32_t xri; /* return the xri of the iocb exchange */
  94. };