bfi_lport.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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_LPORT_H__
  18. #define __BFI_LPORT_H__
  19. #include <bfi/bfi.h>
  20. #pragma pack(1)
  21. enum bfi_lport_h2i_msgs {
  22. BFI_LPORT_H2I_CREATE_REQ = 1,
  23. BFI_LPORT_H2I_DELETE_REQ = 2,
  24. };
  25. enum bfi_lport_i2h_msgs {
  26. BFI_LPORT_I2H_CREATE_RSP = BFA_I2HM(1),
  27. BFI_LPORT_I2H_DELETE_RSP = BFA_I2HM(2),
  28. BFI_LPORT_I2H_ONLINE = BFA_I2HM(3),
  29. BFI_LPORT_I2H_OFFLINE = BFA_I2HM(4),
  30. };
  31. #define BFI_LPORT_MAX_SYNNAME 64
  32. enum bfi_lport_role_e {
  33. BFI_LPORT_ROLE_FCPIM = 1,
  34. BFI_LPORT_ROLE_FCPTM = 2,
  35. BFI_LPORT_ROLE_IPFC = 4,
  36. };
  37. struct bfi_lport_create_req_s {
  38. bfi_mhdr_t mh; /* common msg header */
  39. u16 fabric_fwhdl; /* parent fabric instance */
  40. u8 roles; /* lport FC-4 roles */
  41. u8 rsvd;
  42. wwn_t pwwn; /* port name */
  43. wwn_t nwwn; /* node name */
  44. u8 symname[BFI_LPORT_MAX_SYNNAME];
  45. };
  46. struct bfi_lport_create_rsp_s {
  47. bfi_mhdr_t mh; /* common msg header */
  48. u8 status; /* lport creation status */
  49. u8 rsvd[3];
  50. };
  51. struct bfi_lport_delete_req_s {
  52. bfi_mhdr_t mh; /* common msg header */
  53. u16 fw_handle; /* firmware lport handle */
  54. u16 rsvd;
  55. };
  56. struct bfi_lport_delete_rsp_s {
  57. bfi_mhdr_t mh; /* common msg header */
  58. u16 bfa_handle; /* host lport handle */
  59. u8 status; /* lport deletion status */
  60. u8 rsvd;
  61. };
  62. union bfi_lport_h2i_msg_u {
  63. bfi_msg_t *msg;
  64. struct bfi_lport_create_req_s *create_req;
  65. struct bfi_lport_delete_req_s *delete_req;
  66. };
  67. union bfi_lport_i2h_msg_u {
  68. bfi_msg_t *msg;
  69. struct bfi_lport_create_rsp_s *create_rsp;
  70. struct bfi_lport_delete_rsp_s *delete_rsp;
  71. };
  72. #pragma pack()
  73. #endif /* __BFI_LPORT_H__ */