libata-sff: separate out BMDMA qc_issue
[safe/jmp/linux-2.6] / drivers / scsi / bfa / bfa_iocfc_q.c
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 #include <bfa.h>
19 #include "bfa_intr_priv.h"
20
21 BFA_TRC_FILE(HAL, IOCFC_Q);
22
23 void
24 bfa_iocfc_updateq(struct bfa_s *bfa, u32 reqq_ba, u32 rspq_ba,
25                                 u32 reqq_sci, u32 rspq_spi, bfa_cb_iocfc_t cbfn,
26                                 void *cbarg)
27 {
28         struct bfa_iocfc_s *iocfc = &bfa->iocfc;
29         struct bfi_iocfc_updateq_req_s updateq_req;
30
31         iocfc->updateq_cbfn = cbfn;
32         iocfc->updateq_cbarg = cbarg;
33
34         bfi_h2i_set(updateq_req.mh, BFI_MC_IOCFC, BFI_IOCFC_H2I_UPDATEQ_REQ,
35                         bfa_lpuid(bfa));
36
37         updateq_req.reqq_ba = bfa_os_htonl(reqq_ba);
38         updateq_req.rspq_ba = bfa_os_htonl(rspq_ba);
39         updateq_req.reqq_sci = bfa_os_htonl(reqq_sci);
40         updateq_req.rspq_spi = bfa_os_htonl(rspq_spi);
41
42         bfa_ioc_mbox_send(&bfa->ioc, &updateq_req,
43                         sizeof(struct bfi_iocfc_updateq_req_s));
44 }