aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_iocb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_iocb.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_iocb.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_iocb.c b/drivers/scsi/qla4xxx/ql4_iocb.c
index 2a2022a6bb9..f48f37a281d 100644
--- a/drivers/scsi/qla4xxx/ql4_iocb.c
+++ b/drivers/scsi/qla4xxx/ql4_iocb.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * QLogic iSCSI HBA Driver 2 * QLogic iSCSI HBA Driver
3 * Copyright (c) 2003-2010 QLogic Corporation 3 * Copyright (c) 2003-2012 QLogic Corporation
4 * 4 *
5 * See LICENSE.qla4xxx for copyright and licensing details. 5 * See LICENSE.qla4xxx for copyright and licensing details.
6 */ 6 */
@@ -192,35 +192,47 @@ static void qla4xxx_build_scsi_iocbs(struct srb *srb,
192 } 192 }
193} 193}
194 194
195void qla4_83xx_queue_iocb(struct scsi_qla_host *ha)
196{
197 writel(ha->request_in, &ha->qla4_83xx_reg->req_q_in);
198 readl(&ha->qla4_83xx_reg->req_q_in);
199}
200
201void qla4_83xx_complete_iocb(struct scsi_qla_host *ha)
202{
203 writel(ha->response_out, &ha->qla4_83xx_reg->rsp_q_out);
204 readl(&ha->qla4_83xx_reg->rsp_q_out);
205}
206
195/** 207/**
196 * qla4_8xxx_queue_iocb - Tell ISP it's got new request(s) 208 * qla4_82xx_queue_iocb - Tell ISP it's got new request(s)
197 * @ha: pointer to host adapter structure. 209 * @ha: pointer to host adapter structure.
198 * 210 *
199 * This routine notifies the ISP that one or more new request 211 * This routine notifies the ISP that one or more new request
200 * queue entries have been placed on the request queue. 212 * queue entries have been placed on the request queue.
201 **/ 213 **/
202void qla4_8xxx_queue_iocb(struct scsi_qla_host *ha) 214void qla4_82xx_queue_iocb(struct scsi_qla_host *ha)
203{ 215{
204 uint32_t dbval = 0; 216 uint32_t dbval = 0;
205 217
206 dbval = 0x14 | (ha->func_num << 5); 218 dbval = 0x14 | (ha->func_num << 5);
207 dbval = dbval | (0 << 8) | (ha->request_in << 16); 219 dbval = dbval | (0 << 8) | (ha->request_in << 16);
208 220
209 qla4_8xxx_wr_32(ha, ha->nx_db_wr_ptr, ha->request_in); 221 qla4_82xx_wr_32(ha, ha->nx_db_wr_ptr, ha->request_in);
210} 222}
211 223
212/** 224/**
213 * qla4_8xxx_complete_iocb - Tell ISP we're done with response(s) 225 * qla4_82xx_complete_iocb - Tell ISP we're done with response(s)
214 * @ha: pointer to host adapter structure. 226 * @ha: pointer to host adapter structure.
215 * 227 *
216 * This routine notifies the ISP that one or more response/completion 228 * This routine notifies the ISP that one or more response/completion
217 * queue entries have been processed by the driver. 229 * queue entries have been processed by the driver.
218 * This also clears the interrupt. 230 * This also clears the interrupt.
219 **/ 231 **/
220void qla4_8xxx_complete_iocb(struct scsi_qla_host *ha) 232void qla4_82xx_complete_iocb(struct scsi_qla_host *ha)
221{ 233{
222 writel(ha->response_out, &ha->qla4_8xxx_reg->rsp_q_out); 234 writel(ha->response_out, &ha->qla4_82xx_reg->rsp_q_out);
223 readl(&ha->qla4_8xxx_reg->rsp_q_out); 235 readl(&ha->qla4_82xx_reg->rsp_q_out);
224} 236}
225 237
226/** 238/**