lpfc_bsg.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. struct set_ct_event {
  35. uint32_t command;
  36. uint32_t type_mask;
  37. uint32_t ev_req_id;
  38. uint32_t ev_reg_id;
  39. };
  40. struct get_ct_event {
  41. uint32_t command;
  42. uint32_t ev_reg_id;
  43. uint32_t ev_req_id;
  44. };
  45. struct get_ct_event_reply {
  46. uint32_t immed_data;
  47. uint32_t type;
  48. };
  49. struct send_mgmt_resp {
  50. uint32_t command;
  51. uint32_t tag;
  52. };
  53. #define INTERNAL_LOOP_BACK 0x1 /* adapter short cuts the loop internally */
  54. #define EXTERNAL_LOOP_BACK 0x2 /* requires an external loopback plug */
  55. struct diag_mode_set {
  56. uint32_t command;
  57. uint32_t type;
  58. uint32_t timeout;
  59. };
  60. struct diag_mode_test {
  61. uint32_t command;
  62. };
  63. #define LPFC_WWNN_TYPE 0
  64. #define LPFC_WWPN_TYPE 1
  65. struct get_mgmt_rev {
  66. uint32_t command;
  67. };
  68. #define MANAGEMENT_MAJOR_REV 1
  69. #define MANAGEMENT_MINOR_REV 0
  70. /* the MgmtRevInfo structure */
  71. struct MgmtRevInfo {
  72. uint32_t a_Major;
  73. uint32_t a_Minor;
  74. };
  75. struct get_mgmt_rev_reply {
  76. struct MgmtRevInfo info;
  77. };
  78. struct dfc_mbox_req {
  79. uint32_t command;
  80. uint32_t inExtWLen;
  81. uint32_t outExtWLen;
  82. uint8_t mbOffset;
  83. };