diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_iocb.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 6bf6c08650e8..73cc96da9421 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * See LICENSE.qla2xxx for copyright and licensing details. | 5 | * See LICENSE.qla2xxx for copyright and licensing details. |
6 | */ | 6 | */ |
7 | #include "qla_def.h" | 7 | #include "qla_def.h" |
8 | #include "qla_target.h" | ||
8 | 9 | ||
9 | #include <linux/blkdev.h> | 10 | #include <linux/blkdev.h> |
10 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
@@ -470,7 +471,7 @@ queuing_error: | |||
470 | /** | 471 | /** |
471 | * qla2x00_start_iocbs() - Execute the IOCB command | 472 | * qla2x00_start_iocbs() - Execute the IOCB command |
472 | */ | 473 | */ |
473 | static void | 474 | void |
474 | qla2x00_start_iocbs(struct scsi_qla_host *vha, struct req_que *req) | 475 | qla2x00_start_iocbs(struct scsi_qla_host *vha, struct req_que *req) |
475 | { | 476 | { |
476 | struct qla_hw_data *ha = vha->hw; | 477 | struct qla_hw_data *ha = vha->hw; |
@@ -571,6 +572,29 @@ qla2x00_marker(struct scsi_qla_host *vha, struct req_que *req, | |||
571 | return (ret); | 572 | return (ret); |
572 | } | 573 | } |
573 | 574 | ||
575 | /* | ||
576 | * qla2x00_issue_marker | ||
577 | * | ||
578 | * Issue marker | ||
579 | * Caller CAN have hardware lock held as specified by ha_locked parameter. | ||
580 | * Might release it, then reaquire. | ||
581 | */ | ||
582 | int qla2x00_issue_marker(scsi_qla_host_t *vha, int ha_locked) | ||
583 | { | ||
584 | if (ha_locked) { | ||
585 | if (__qla2x00_marker(vha, vha->req, vha->req->rsp, 0, 0, | ||
586 | MK_SYNC_ALL) != QLA_SUCCESS) | ||
587 | return QLA_FUNCTION_FAILED; | ||
588 | } else { | ||
589 | if (qla2x00_marker(vha, vha->req, vha->req->rsp, 0, 0, | ||
590 | MK_SYNC_ALL) != QLA_SUCCESS) | ||
591 | return QLA_FUNCTION_FAILED; | ||
592 | } | ||
593 | vha->marker_needed = 0; | ||
594 | |||
595 | return QLA_SUCCESS; | ||
596 | } | ||
597 | |||
574 | /** | 598 | /** |
575 | * qla24xx_calc_iocbs() - Determine number of Command Type 3 and | 599 | * qla24xx_calc_iocbs() - Determine number of Command Type 3 and |
576 | * Continuation Type 1 IOCBs to allocate. | 600 | * Continuation Type 1 IOCBs to allocate. |