/drivers/net/ethernet/brocade/bna/bfa_cee.h

http://github.com/mirrors/linux · C Header · 58 lines · 42 code · 6 blank · 10 comment · 0 complexity · a91073ec0d88b261d2bc4c06099521ad MD5 · raw file

  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Linux network driver for QLogic BR-series Converged Network Adapter.
  4. */
  5. /*
  6. * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
  7. * Copyright (c) 2014-2015 QLogic Corporation
  8. * All rights reserved
  9. * www.qlogic.com
  10. */
  11. #ifndef __BFA_CEE_H__
  12. #define __BFA_CEE_H__
  13. #include "bfa_defs_cna.h"
  14. #include "bfa_ioc.h"
  15. typedef void (*bfa_cee_get_attr_cbfn_t) (void *dev, enum bfa_status status);
  16. typedef void (*bfa_cee_get_stats_cbfn_t) (void *dev, enum bfa_status status);
  17. typedef void (*bfa_cee_reset_stats_cbfn_t) (void *dev, enum bfa_status status);
  18. struct bfa_cee_cbfn {
  19. bfa_cee_get_attr_cbfn_t get_attr_cbfn;
  20. void *get_attr_cbarg;
  21. bfa_cee_get_stats_cbfn_t get_stats_cbfn;
  22. void *get_stats_cbarg;
  23. bfa_cee_reset_stats_cbfn_t reset_stats_cbfn;
  24. void *reset_stats_cbarg;
  25. };
  26. struct bfa_cee {
  27. void *dev;
  28. bool get_attr_pending;
  29. bool get_stats_pending;
  30. bool reset_stats_pending;
  31. enum bfa_status get_attr_status;
  32. enum bfa_status get_stats_status;
  33. enum bfa_status reset_stats_status;
  34. struct bfa_cee_cbfn cbfn;
  35. struct bfa_ioc_notify ioc_notify;
  36. struct bfa_cee_attr *attr;
  37. struct bfa_cee_stats *stats;
  38. struct bfa_dma attr_dma;
  39. struct bfa_dma stats_dma;
  40. struct bfa_ioc *ioc;
  41. struct bfa_mbox_cmd get_cfg_mb;
  42. struct bfa_mbox_cmd get_stats_mb;
  43. struct bfa_mbox_cmd reset_stats_mb;
  44. };
  45. u32 bfa_nw_cee_meminfo(void);
  46. void bfa_nw_cee_mem_claim(struct bfa_cee *cee, u8 *dma_kva,
  47. u64 dma_pa);
  48. void bfa_nw_cee_attach(struct bfa_cee *cee, struct bfa_ioc *ioc, void *dev);
  49. enum bfa_status bfa_nw_cee_get_attr(struct bfa_cee *cee,
  50. struct bfa_cee_attr *attr,
  51. bfa_cee_get_attr_cbfn_t cbfn, void *cbarg);
  52. #endif /* __BFA_CEE_H__ */