bfi_fabric.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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_FABRIC_H__
  18. #define __BFI_FABRIC_H__
  19. #include <bfi/bfi.h>
  20. #pragma pack(1)
  21. enum bfi_fabric_h2i_msgs {
  22. BFI_FABRIC_H2I_CREATE_REQ = 1,
  23. BFI_FABRIC_H2I_DELETE_REQ = 2,
  24. BFI_FABRIC_H2I_SETAUTH = 3,
  25. };
  26. enum bfi_fabric_i2h_msgs {
  27. BFI_FABRIC_I2H_CREATE_RSP = BFA_I2HM(1),
  28. BFI_FABRIC_I2H_DELETE_RSP = BFA_I2HM(2),
  29. BFI_FABRIC_I2H_SETAUTH_RSP = BFA_I2HM(3),
  30. BFI_FABRIC_I2H_ONLINE = BFA_I2HM(4),
  31. BFI_FABRIC_I2H_OFFLINE = BFA_I2HM(5),
  32. };
  33. struct bfi_fabric_create_req_s {
  34. bfi_mhdr_t mh; /* common msg header */
  35. u8 vf_en; /* virtual fabric enable */
  36. u8 rsvd;
  37. u16 vf_id; /* virtual fabric ID */
  38. wwn_t pwwn; /* port name */
  39. wwn_t nwwn; /* node name */
  40. };
  41. struct bfi_fabric_create_rsp_s {
  42. bfi_mhdr_t mh; /* common msg header */
  43. u16 bfa_handle; /* host fabric handle */
  44. u8 status; /* fabric create status */
  45. u8 rsvd;
  46. };
  47. struct bfi_fabric_delete_req_s {
  48. bfi_mhdr_t mh; /* common msg header */
  49. u16 fw_handle; /* firmware fabric handle */
  50. u16 rsvd;
  51. };
  52. struct bfi_fabric_delete_rsp_s {
  53. bfi_mhdr_t mh; /* common msg header */
  54. u16 bfa_handle; /* host fabric handle */
  55. u8 status; /* fabric deletion status */
  56. u8 rsvd;
  57. };
  58. #define BFI_FABRIC_AUTHSECRET_LEN 64
  59. struct bfi_fabric_setauth_req_s {
  60. bfi_mhdr_t mh; /* common msg header */
  61. u16 fw_handle; /* f/w handle of fabric */
  62. u8 algorithm;
  63. u8 group;
  64. u8 secret[BFI_FABRIC_AUTHSECRET_LEN];
  65. };
  66. union bfi_fabric_h2i_msg_u {
  67. bfi_msg_t *msg;
  68. struct bfi_fabric_create_req_s *create_req;
  69. struct bfi_fabric_delete_req_s *delete_req;
  70. };
  71. union bfi_fabric_i2h_msg_u {
  72. bfi_msg_t *msg;
  73. struct bfi_fabric_create_rsp_s *create_rsp;
  74. struct bfi_fabric_delete_rsp_s *delete_rsp;
  75. };
  76. #pragma pack()
  77. #endif /* __BFI_FABRIC_H__ */