bfa_uf_priv.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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_UF_PRIV_H__
  18. #define __BFA_UF_PRIV_H__
  19. #include <cs/bfa_sm.h>
  20. #include <bfa_svc.h>
  21. #include <bfi/bfi_uf.h>
  22. #define BFA_UF_MIN (4)
  23. struct bfa_uf_mod_s {
  24. struct bfa_s *bfa; /* back pointer to BFA */
  25. struct bfa_uf_s *uf_list; /* array of UFs */
  26. u16 num_ufs; /* num unsolicited rx frames */
  27. struct list_head uf_free_q; /* free UFs */
  28. struct list_head uf_posted_q; /* UFs posted to IOC */
  29. struct bfa_uf_buf_s *uf_pbs_kva; /* list UF bufs request pld */
  30. u64 uf_pbs_pa; /* phy addr for UF bufs */
  31. struct bfi_uf_buf_post_s *uf_buf_posts;
  32. /* pre-built UF post msgs */
  33. bfa_cb_uf_recv_t ufrecv; /* uf recv handler function */
  34. void *cbarg; /* uf receive handler arg */
  35. };
  36. #define BFA_UF_MOD(__bfa) (&(__bfa)->modules.uf_mod)
  37. #define ufm_pbs_pa(_ufmod, _uftag) \
  38. ((_ufmod)->uf_pbs_pa + sizeof(struct bfa_uf_buf_s) * (_uftag))
  39. void bfa_uf_isr(struct bfa_s *bfa, struct bfi_msg_s *msg);
  40. #endif /* __BFA_UF_PRIV_H__ */