bfa_iocfc_q.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #include <bfa.h>
  18. #include "bfa_intr_priv.h"
  19. BFA_TRC_FILE(HAL, IOCFC_Q);
  20. void
  21. bfa_iocfc_updateq(struct bfa_s *bfa, u32 reqq_ba, u32 rspq_ba,
  22. u32 reqq_sci, u32 rspq_spi, bfa_cb_iocfc_t cbfn,
  23. void *cbarg)
  24. {
  25. struct bfa_iocfc_s *iocfc = &bfa->iocfc;
  26. struct bfi_iocfc_updateq_req_s updateq_req;
  27. iocfc->updateq_cbfn = cbfn;
  28. iocfc->updateq_cbarg = cbarg;
  29. bfi_h2i_set(updateq_req.mh, BFI_MC_IOCFC, BFI_IOCFC_H2I_UPDATEQ_REQ,
  30. bfa_lpuid(bfa));
  31. updateq_req.reqq_ba = bfa_os_htonl(reqq_ba);
  32. updateq_req.rspq_ba = bfa_os_htonl(rspq_ba);
  33. updateq_req.reqq_sci = bfa_os_htonl(reqq_sci);
  34. updateq_req.rspq_spi = bfa_os_htonl(rspq_spi);
  35. bfa_ioc_mbox_send(&bfa->ioc, &updateq_req,
  36. sizeof(struct bfi_iocfc_updateq_req_s));
  37. }