bfa_defs_vf.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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_VF_H__
  18. #define __BFA_DEFS_VF_H__
  19. #include <bfa_os_inc.h>
  20. #include <defs/bfa_defs_port.h>
  21. #include <protocol/types.h>
  22. /**
  23. * VF states
  24. */
  25. enum bfa_vf_state {
  26. BFA_VF_UNINIT = 0, /* fabric is not yet initialized */
  27. BFA_VF_LINK_DOWN = 1, /* link is down */
  28. BFA_VF_FLOGI = 2, /* flogi is in progress */
  29. BFA_VF_AUTH = 3, /* authentication in progress */
  30. BFA_VF_NOFABRIC = 4, /* fabric is not present */
  31. BFA_VF_ONLINE = 5, /* login to fabric is complete */
  32. BFA_VF_EVFP = 6, /* EVFP is in progress */
  33. BFA_VF_ISOLATED = 7, /* port isolated due to vf_id mismatch */
  34. };
  35. /**
  36. * VF statistics
  37. */
  38. struct bfa_vf_stats_s {
  39. u32 flogi_sent; /* Num FLOGIs sent */
  40. u32 flogi_rsp_err; /* FLOGI response errors */
  41. u32 flogi_acc_err; /* FLOGI accept errors */
  42. u32 flogi_accepts; /* FLOGI accepts received */
  43. u32 flogi_rejects; /* FLOGI rejects received */
  44. u32 flogi_unknown_rsp; /* Unknown responses for FLOGI */
  45. u32 flogi_alloc_wait; /* Allocation waits prior to
  46. * sending FLOGI
  47. */
  48. u32 flogi_rcvd; /* FLOGIs received */
  49. u32 flogi_rejected; /* Incoming FLOGIs rejected */
  50. u32 fabric_onlines; /* Internal fabric online
  51. * notification sent to other
  52. * modules
  53. */
  54. u32 fabric_offlines; /* Internal fabric offline
  55. * notification sent to other
  56. * modules
  57. */
  58. u32 resvd;
  59. };
  60. /**
  61. * VF attributes returned in queries
  62. */
  63. struct bfa_vf_attr_s {
  64. enum bfa_vf_state state; /* VF state */
  65. u32 rsvd;
  66. wwn_t fabric_name; /* fabric name */
  67. };
  68. #endif /* __BFA_DEFS_VF_H__ */