bfi_lps.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
  3. * All rights reserved
  4. * www.brocade.com
  5. *
  6. * Linux driver for Brocade Fibre Channel Host Bus Adapter.
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License (GPL) Version 2 as
  10. * published by the Free Software Foundation
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. */
  17. #ifndef __BFI_LPS_H__
  18. #define __BFI_LPS_H__
  19. #include <bfi/bfi.h>
  20. #pragma pack(1)
  21. enum bfi_lps_h2i_msgs {
  22. BFI_LPS_H2I_LOGIN_REQ = 1,
  23. BFI_LPS_H2I_LOGOUT_REQ = 2,
  24. };
  25. enum bfi_lps_i2h_msgs {
  26. BFI_LPS_H2I_LOGIN_RSP = BFA_I2HM(1),
  27. BFI_LPS_H2I_LOGOUT_RSP = BFA_I2HM(2),
  28. BFI_LPS_H2I_CVL_EVENT = BFA_I2HM(3),
  29. };
  30. struct bfi_lps_login_req_s {
  31. struct bfi_mhdr_s mh; /* common msg header */
  32. u8 lp_tag;
  33. u8 alpa;
  34. u16 pdu_size;
  35. wwn_t pwwn;
  36. wwn_t nwwn;
  37. u8 fdisc;
  38. u8 auth_en;
  39. u8 rsvd[2];
  40. };
  41. struct bfi_lps_login_rsp_s {
  42. struct bfi_mhdr_s mh; /* common msg header */
  43. u8 lp_tag;
  44. u8 status;
  45. u8 lsrjt_rsn;
  46. u8 lsrjt_expl;
  47. wwn_t port_name;
  48. wwn_t node_name;
  49. u16 bb_credit;
  50. u8 f_port;
  51. u8 npiv_en;
  52. u32 lp_pid:24;
  53. u32 auth_req:8;
  54. mac_t lp_mac;
  55. mac_t fcf_mac;
  56. u8 ext_status;
  57. u8 brcd_switch;/* attached peer is brcd switch */
  58. };
  59. struct bfi_lps_logout_req_s {
  60. struct bfi_mhdr_s mh; /* common msg header */
  61. u8 lp_tag;
  62. u8 rsvd[3];
  63. wwn_t port_name;
  64. };
  65. struct bfi_lps_logout_rsp_s {
  66. struct bfi_mhdr_s mh; /* common msg header */
  67. u8 lp_tag;
  68. u8 status;
  69. u8 rsvd[2];
  70. };
  71. struct bfi_lps_cvl_event_s {
  72. struct bfi_mhdr_s mh; /* common msg header */
  73. u8 lp_tag;
  74. u8 rsvd[3];
  75. };
  76. union bfi_lps_h2i_msg_u {
  77. struct bfi_mhdr_s *msg;
  78. struct bfi_lps_login_req_s *login_req;
  79. struct bfi_lps_logout_req_s *logout_req;
  80. };
  81. union bfi_lps_i2h_msg_u {
  82. struct bfi_msg_s *msg;
  83. struct bfi_lps_login_rsp_s *login_rsp;
  84. struct bfi_lps_logout_rsp_s *logout_rsp;
  85. struct bfi_lps_cvl_event_s *cvl_event;
  86. };
  87. #pragma pack()
  88. #endif /* __BFI_LPS_H__ */