bfi_port.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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_PORT_H__
  18. #define __BFI_PORT_H__
  19. #include <bfi/bfi.h>
  20. #include <defs/bfa_defs_pport.h>
  21. #pragma pack(1)
  22. enum bfi_port_h2i {
  23. BFI_PORT_H2I_ENABLE_REQ = (1),
  24. BFI_PORT_H2I_DISABLE_REQ = (2),
  25. BFI_PORT_H2I_GET_STATS_REQ = (3),
  26. BFI_PORT_H2I_CLEAR_STATS_REQ = (4),
  27. };
  28. enum bfi_port_i2h {
  29. BFI_PORT_I2H_ENABLE_RSP = BFA_I2HM(1),
  30. BFI_PORT_I2H_DISABLE_RSP = BFA_I2HM(2),
  31. BFI_PORT_I2H_GET_STATS_RSP = BFA_I2HM(3),
  32. BFI_PORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4),
  33. };
  34. /**
  35. * Generic REQ type
  36. */
  37. struct bfi_port_generic_req_s {
  38. struct bfi_mhdr_s mh; /* msg header */
  39. u32 msgtag; /* msgtag for reply */
  40. u32 rsvd;
  41. };
  42. /**
  43. * Generic RSP type
  44. */
  45. struct bfi_port_generic_rsp_s {
  46. struct bfi_mhdr_s mh; /* common msg header */
  47. u8 status; /* port enable status */
  48. u8 rsvd[3];
  49. u32 msgtag; /* msgtag for reply */
  50. };
  51. /**
  52. * @todo
  53. * BFI_PORT_H2I_ENABLE_REQ
  54. */
  55. /**
  56. * @todo
  57. * BFI_PORT_I2H_ENABLE_RSP
  58. */
  59. /**
  60. * BFI_PORT_H2I_DISABLE_REQ
  61. */
  62. /**
  63. * BFI_PORT_I2H_DISABLE_RSP
  64. */
  65. /**
  66. * BFI_PORT_H2I_GET_STATS_REQ
  67. */
  68. struct bfi_port_get_stats_req_s {
  69. struct bfi_mhdr_s mh; /* common msg header */
  70. union bfi_addr_u dma_addr;
  71. };
  72. /**
  73. * BFI_PORT_I2H_GET_STATS_RSP
  74. */
  75. /**
  76. * BFI_PORT_H2I_CLEAR_STATS_REQ
  77. */
  78. /**
  79. * BFI_PORT_I2H_CLEAR_STATS_RSP
  80. */
  81. union bfi_port_h2i_msg_u {
  82. struct bfi_mhdr_s mh;
  83. struct bfi_port_generic_req_s enable_req;
  84. struct bfi_port_generic_req_s disable_req;
  85. struct bfi_port_get_stats_req_s getstats_req;
  86. struct bfi_port_generic_req_s clearstats_req;
  87. };
  88. union bfi_port_i2h_msg_u {
  89. struct bfi_mhdr_s mh;
  90. struct bfi_port_generic_rsp_s enable_rsp;
  91. struct bfi_port_generic_rsp_s disable_rsp;
  92. struct bfi_port_generic_rsp_s getstats_rsp;
  93. struct bfi_port_generic_rsp_s clearstats_rsp;
  94. };
  95. #pragma pack()
  96. #endif /* __BFI_PORT_H__ */