bfa_fcb_rport.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. /**
  18. * bfa_fcb_rport.h BFA FCS rport driver interfaces
  19. */
  20. #ifndef __BFA_FCB_RPORT_H__
  21. #define __BFA_FCB_RPORT_H__
  22. /**
  23. * fcs_rport_fcb Remote port driver interfaces
  24. */
  25. struct bfad_rport_s;
  26. /*
  27. * Callback functions from BFA FCS to driver
  28. */
  29. /**
  30. * Completion callback for bfa_fcs_rport_add().
  31. *
  32. * @param[in] rport_drv - driver instance of rport
  33. *
  34. * @return None
  35. */
  36. void bfa_fcb_rport_add(struct bfad_rport_s *rport_drv);
  37. /**
  38. * Completion callback for bfa_fcs_rport_remove().
  39. *
  40. * @param[in] rport_drv - driver instance of rport
  41. *
  42. * @return None
  43. */
  44. void bfa_fcb_rport_remove(struct bfad_rport_s *rport_drv);
  45. /**
  46. * Call to allocate a rport instance.
  47. *
  48. * @param[in] bfad - driver instance
  49. * @param[out] rport - BFA FCS instance of rport
  50. * @param[out] rport_drv - driver instance of rport
  51. *
  52. * @retval BFA_STATUS_OK - successfully allocated
  53. * @retval BFA_STATUS_ENOMEM - cannot allocate
  54. */
  55. bfa_status_t bfa_fcb_rport_alloc(struct bfad_s *bfad,
  56. struct bfa_fcs_rport_s **rport,
  57. struct bfad_rport_s **rport_drv);
  58. /**
  59. * Call to free rport memory resources.
  60. *
  61. * @param[in] bfad - driver instance
  62. * @param[in] rport_drv - driver instance of rport
  63. *
  64. * @return None
  65. */
  66. void bfa_fcb_rport_free(struct bfad_s *bfad, struct bfad_rport_s **rport_drv);
  67. #endif /* __BFA_FCB_RPORT_H__ */