diff options
author | Anirban Chakraborty <anirban.chakraborty@qlogic.com> | 2009-04-07 01:33:40 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-05-20 18:21:07 -0400 |
commit | 2afa19a9377ca61b9489e44bf50029574fbe63be (patch) | |
tree | cdfa3878eb04d833bbcd9ce92196bc4456b5ccf5 /drivers/scsi/qla2xxx/qla_iocb.c | |
parent | 7640335ea5b1a2da0d64303e6003012c619ae01a (diff) |
[SCSI] qla2xxx: Add QoS support.
Set the number of request queues to the module paramater
ql2xmaxqueues. Each vport gets a request queue. The QoS value
set to the request queues determines priority control for queued
IOs. If QoS value is not specified, the vports use the default
queue 0.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_iocb.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index a8abbb95730d..94b69d86482d 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -453,6 +453,7 @@ __qla2x00_marker(struct scsi_qla_host *vha, struct req_que *req, | |||
453 | mrk24->lun[2] = MSB(lun); | 453 | mrk24->lun[2] = MSB(lun); |
454 | host_to_fcp_swap(mrk24->lun, sizeof(mrk24->lun)); | 454 | host_to_fcp_swap(mrk24->lun, sizeof(mrk24->lun)); |
455 | mrk24->vp_index = vha->vp_idx; | 455 | mrk24->vp_index = vha->vp_idx; |
456 | mrk24->handle = MAKE_HANDLE(req->id, mrk24->handle); | ||
456 | } else { | 457 | } else { |
457 | SET_TARGET_ID(ha, mrk->target, loop_id); | 458 | SET_TARGET_ID(ha, mrk->target, loop_id); |
458 | mrk->lun = cpu_to_le16(lun); | 459 | mrk->lun = cpu_to_le16(lun); |
@@ -531,9 +532,6 @@ qla2x00_req_pkt(struct scsi_qla_host *vha, struct req_que *req, | |||
531 | for (cnt = 0; cnt < REQUEST_ENTRY_SIZE / 4; cnt++) | 532 | for (cnt = 0; cnt < REQUEST_ENTRY_SIZE / 4; cnt++) |
532 | *dword_ptr++ = 0; | 533 | *dword_ptr++ = 0; |
533 | 534 | ||
534 | /* Set system defined field. */ | ||
535 | pkt->sys_define = (uint8_t)req->ring_index; | ||
536 | |||
537 | /* Set entry count. */ | 535 | /* Set entry count. */ |
538 | pkt->entry_count = 1; | 536 | pkt->entry_count = 1; |
539 | 537 | ||
@@ -724,19 +722,14 @@ qla24xx_start_scsi(srb_t *sp) | |||
724 | struct scsi_cmnd *cmd = sp->cmd; | 722 | struct scsi_cmnd *cmd = sp->cmd; |
725 | struct scsi_qla_host *vha = sp->fcport->vha; | 723 | struct scsi_qla_host *vha = sp->fcport->vha; |
726 | struct qla_hw_data *ha = vha->hw; | 724 | struct qla_hw_data *ha = vha->hw; |
727 | uint16_t que_id; | ||
728 | 725 | ||
729 | /* Setup device pointers. */ | 726 | /* Setup device pointers. */ |
730 | ret = 0; | 727 | ret = 0; |
731 | que_id = vha->req_ques[0]; | ||
732 | 728 | ||
733 | req = ha->req_q_map[que_id]; | 729 | req = vha->req; |
730 | rsp = ha->rsp_q_map[0]; | ||
734 | sp->que = req; | 731 | sp->que = req; |
735 | 732 | ||
736 | if (req->rsp) | ||
737 | rsp = req->rsp; | ||
738 | else | ||
739 | rsp = ha->rsp_q_map[que_id]; | ||
740 | /* So we know we haven't pci_map'ed anything yet */ | 733 | /* So we know we haven't pci_map'ed anything yet */ |
741 | tot_dsds = 0; | 734 | tot_dsds = 0; |
742 | 735 | ||
@@ -794,7 +787,7 @@ qla24xx_start_scsi(srb_t *sp) | |||
794 | req->cnt -= req_cnt; | 787 | req->cnt -= req_cnt; |
795 | 788 | ||
796 | cmd_pkt = (struct cmd_type_7 *)req->ring_ptr; | 789 | cmd_pkt = (struct cmd_type_7 *)req->ring_ptr; |
797 | cmd_pkt->handle = handle; | 790 | cmd_pkt->handle = MAKE_HANDLE(req->id, handle); |
798 | 791 | ||
799 | /* Zero out remaining portion of packet. */ | 792 | /* Zero out remaining portion of packet. */ |
800 | /* tagged queuing modifier -- default is TSK_SIMPLE (0). */ | 793 | /* tagged queuing modifier -- default is TSK_SIMPLE (0). */ |
@@ -823,6 +816,8 @@ qla24xx_start_scsi(srb_t *sp) | |||
823 | 816 | ||
824 | /* Set total data segment count. */ | 817 | /* Set total data segment count. */ |
825 | cmd_pkt->entry_count = (uint8_t)req_cnt; | 818 | cmd_pkt->entry_count = (uint8_t)req_cnt; |
819 | /* Specify response queue number where completion should happen */ | ||
820 | cmd_pkt->entry_status = (uint8_t) rsp->id; | ||
826 | wmb(); | 821 | wmb(); |
827 | 822 | ||
828 | /* Adjust ring index. */ | 823 | /* Adjust ring index. */ |
@@ -842,7 +837,7 @@ qla24xx_start_scsi(srb_t *sp) | |||
842 | /* Manage unprocessed RIO/ZIO commands in response queue. */ | 837 | /* Manage unprocessed RIO/ZIO commands in response queue. */ |
843 | if (vha->flags.process_response_queue && | 838 | if (vha->flags.process_response_queue && |
844 | rsp->ring_ptr->signature != RESPONSE_PROCESSED) | 839 | rsp->ring_ptr->signature != RESPONSE_PROCESSED) |
845 | qla24xx_process_response_queue(rsp); | 840 | qla24xx_process_response_queue(vha, rsp); |
846 | 841 | ||
847 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 842 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
848 | return QLA_SUCCESS; | 843 | return QLA_SUCCESS; |