bfa_cee.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Linux network driver for Brocade Converged Network Adapter.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License (GPL) Version 2 as
  6. * published by the Free Software Foundation
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * General Public License for more details.
  12. */
  13. /*
  14. * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
  15. * All rights reserved
  16. * www.brocade.com
  17. */
  18. #ifndef __BFA_CEE_H__
  19. #define __BFA_CEE_H__
  20. #include "bfa_defs_cna.h"
  21. #include "bfa_ioc.h"
  22. typedef void (*bfa_cee_get_attr_cbfn_t) (void *dev, enum bfa_status status);
  23. typedef void (*bfa_cee_get_stats_cbfn_t) (void *dev, enum bfa_status status);
  24. typedef void (*bfa_cee_reset_stats_cbfn_t) (void *dev, enum bfa_status status);
  25. typedef void (*bfa_cee_hbfail_cbfn_t) (void *dev, enum bfa_status status);
  26. struct bfa_cee_cbfn {
  27. bfa_cee_get_attr_cbfn_t get_attr_cbfn;
  28. void *get_attr_cbarg;
  29. bfa_cee_get_stats_cbfn_t get_stats_cbfn;
  30. void *get_stats_cbarg;
  31. bfa_cee_reset_stats_cbfn_t reset_stats_cbfn;
  32. void *reset_stats_cbarg;
  33. };
  34. struct bfa_cee {
  35. void *dev;
  36. bool get_attr_pending;
  37. bool get_stats_pending;
  38. bool reset_stats_pending;
  39. enum bfa_status get_attr_status;
  40. enum bfa_status get_stats_status;
  41. enum bfa_status reset_stats_status;
  42. struct bfa_cee_cbfn cbfn;
  43. struct bfa_ioc_hbfail_notify hbfail;
  44. struct bfa_cee_attr *attr;
  45. struct bfa_cee_stats *stats;
  46. struct bfa_dma attr_dma;
  47. struct bfa_dma stats_dma;
  48. struct bfa_ioc *ioc;
  49. struct bfa_mbox_cmd get_cfg_mb;
  50. struct bfa_mbox_cmd get_stats_mb;
  51. struct bfa_mbox_cmd reset_stats_mb;
  52. };
  53. u32 bfa_nw_cee_meminfo(void);
  54. void bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva,
  55. u64 dma_pa);
  56. void bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, void *dev);
  57. #endif /* __BFA_CEE_H__ */