bfa_defs_vport.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 __BFA_DEFS_VPORT_H__
  18. #define __BFA_DEFS_VPORT_H__
  19. #include <bfa_os_inc.h>
  20. #include <defs/bfa_defs_port.h>
  21. #include <protocol/types.h>
  22. /**
  23. * VPORT states
  24. */
  25. enum bfa_vport_state {
  26. BFA_FCS_VPORT_UNINIT = 0,
  27. BFA_FCS_VPORT_CREATED = 1,
  28. BFA_FCS_VPORT_OFFLINE = 1,
  29. BFA_FCS_VPORT_FDISC_SEND = 2,
  30. BFA_FCS_VPORT_FDISC = 3,
  31. BFA_FCS_VPORT_FDISC_RETRY = 4,
  32. BFA_FCS_VPORT_ONLINE = 5,
  33. BFA_FCS_VPORT_DELETING = 6,
  34. BFA_FCS_VPORT_CLEANUP = 6,
  35. BFA_FCS_VPORT_LOGO_SEND = 7,
  36. BFA_FCS_VPORT_LOGO = 8,
  37. BFA_FCS_VPORT_ERROR = 9,
  38. BFA_FCS_VPORT_MAX_STATE,
  39. };
  40. /**
  41. * vport statistics
  42. */
  43. struct bfa_vport_stats_s {
  44. struct bfa_port_stats_s port_stats; /* base class (port) stats */
  45. /*
  46. * TODO - remove
  47. */
  48. u32 fdisc_sent; /* num fdisc sent */
  49. u32 fdisc_accepts; /* fdisc accepts */
  50. u32 fdisc_retries; /* fdisc retries */
  51. u32 fdisc_timeouts; /* fdisc timeouts */
  52. u32 fdisc_rsp_err; /* fdisc response error */
  53. u32 fdisc_acc_bad; /* bad fdisc accepts */
  54. u32 fdisc_rejects; /* fdisc rejects */
  55. u32 fdisc_unknown_rsp;
  56. /*
  57. *!< fdisc rsp unknown error
  58. */
  59. u32 fdisc_alloc_wait;/* fdisc req (fcxp)alloc wait */
  60. u32 logo_alloc_wait;/* logo req (fcxp) alloc wait */
  61. u32 logo_sent; /* logo sent */
  62. u32 logo_accepts; /* logo accepts */
  63. u32 logo_rejects; /* logo rejects */
  64. u32 logo_rsp_err; /* logo rsp errors */
  65. u32 logo_unknown_rsp;
  66. /* logo rsp unknown errors */
  67. u32 fab_no_npiv; /* fabric does not support npiv */
  68. u32 fab_offline; /* offline events from fab SM */
  69. u32 fab_online; /* online events from fab SM */
  70. u32 fab_cleanup; /* cleanup request from fab SM */
  71. u32 rsvd;
  72. };
  73. /**
  74. * BFA vport attribute returned in queries
  75. */
  76. struct bfa_vport_attr_s {
  77. struct bfa_port_attr_s port_attr; /* base class (port) attributes */
  78. enum bfa_vport_state vport_state; /* vport state */
  79. u32 rsvd;
  80. };
  81. #endif /* __BFA_DEFS_VPORT_H__ */