diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_iocb.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index ef0a5481b9dd..46b9307e8be4 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -32,9 +32,11 @@ qla2x00_get_cmd_direction(srb_t *sp) | |||
32 | if (cmd->sc_data_direction == DMA_TO_DEVICE) { | 32 | if (cmd->sc_data_direction == DMA_TO_DEVICE) { |
33 | cflags = CF_WRITE; | 33 | cflags = CF_WRITE; |
34 | vha->qla_stats.output_bytes += scsi_bufflen(cmd); | 34 | vha->qla_stats.output_bytes += scsi_bufflen(cmd); |
35 | vha->qla_stats.output_requests++; | ||
35 | } else if (cmd->sc_data_direction == DMA_FROM_DEVICE) { | 36 | } else if (cmd->sc_data_direction == DMA_FROM_DEVICE) { |
36 | cflags = CF_READ; | 37 | cflags = CF_READ; |
37 | vha->qla_stats.input_bytes += scsi_bufflen(cmd); | 38 | vha->qla_stats.input_bytes += scsi_bufflen(cmd); |
39 | vha->qla_stats.input_requests++; | ||
38 | } | 40 | } |
39 | return (cflags); | 41 | return (cflags); |
40 | } | 42 | } |
@@ -474,7 +476,7 @@ qla2x00_start_iocbs(struct scsi_qla_host *vha, struct req_que *req) | |||
474 | struct qla_hw_data *ha = vha->hw; | 476 | struct qla_hw_data *ha = vha->hw; |
475 | device_reg_t __iomem *reg = ISP_QUE_REG(ha, req->id); | 477 | device_reg_t __iomem *reg = ISP_QUE_REG(ha, req->id); |
476 | 478 | ||
477 | if (IS_QLA82XX(ha)) { | 479 | if (IS_P3P_TYPE(ha)) { |
478 | qla82xx_start_iocbs(vha); | 480 | qla82xx_start_iocbs(vha); |
479 | } else { | 481 | } else { |
480 | /* Adjust ring index. */ | 482 | /* Adjust ring index. */ |
@@ -642,10 +644,12 @@ qla24xx_build_scsi_type_6_iocbs(srb_t *sp, struct cmd_type_6 *cmd_pkt, | |||
642 | cmd_pkt->control_flags = | 644 | cmd_pkt->control_flags = |
643 | __constant_cpu_to_le16(CF_WRITE_DATA); | 645 | __constant_cpu_to_le16(CF_WRITE_DATA); |
644 | vha->qla_stats.output_bytes += scsi_bufflen(cmd); | 646 | vha->qla_stats.output_bytes += scsi_bufflen(cmd); |
647 | vha->qla_stats.output_requests++; | ||
645 | } else if (cmd->sc_data_direction == DMA_FROM_DEVICE) { | 648 | } else if (cmd->sc_data_direction == DMA_FROM_DEVICE) { |
646 | cmd_pkt->control_flags = | 649 | cmd_pkt->control_flags = |
647 | __constant_cpu_to_le16(CF_READ_DATA); | 650 | __constant_cpu_to_le16(CF_READ_DATA); |
648 | vha->qla_stats.input_bytes += scsi_bufflen(cmd); | 651 | vha->qla_stats.input_bytes += scsi_bufflen(cmd); |
652 | vha->qla_stats.input_requests++; | ||
649 | } | 653 | } |
650 | 654 | ||
651 | cur_seg = scsi_sglist(cmd); | 655 | cur_seg = scsi_sglist(cmd); |
@@ -758,10 +762,12 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt, | |||
758 | cmd_pkt->task_mgmt_flags = | 762 | cmd_pkt->task_mgmt_flags = |
759 | __constant_cpu_to_le16(TMF_WRITE_DATA); | 763 | __constant_cpu_to_le16(TMF_WRITE_DATA); |
760 | vha->qla_stats.output_bytes += scsi_bufflen(cmd); | 764 | vha->qla_stats.output_bytes += scsi_bufflen(cmd); |
765 | vha->qla_stats.output_requests++; | ||
761 | } else if (cmd->sc_data_direction == DMA_FROM_DEVICE) { | 766 | } else if (cmd->sc_data_direction == DMA_FROM_DEVICE) { |
762 | cmd_pkt->task_mgmt_flags = | 767 | cmd_pkt->task_mgmt_flags = |
763 | __constant_cpu_to_le16(TMF_READ_DATA); | 768 | __constant_cpu_to_le16(TMF_READ_DATA); |
764 | vha->qla_stats.input_bytes += scsi_bufflen(cmd); | 769 | vha->qla_stats.input_bytes += scsi_bufflen(cmd); |
770 | vha->qla_stats.input_requests++; | ||
765 | } | 771 | } |
766 | 772 | ||
767 | /* One DSD is available in the Command Type 3 IOCB */ | 773 | /* One DSD is available in the Command Type 3 IOCB */ |
@@ -1844,7 +1850,7 @@ skip_cmd_array: | |||
1844 | if (req->cnt < req_cnt) { | 1850 | if (req->cnt < req_cnt) { |
1845 | if (ha->mqenable || IS_QLA83XX(ha)) | 1851 | if (ha->mqenable || IS_QLA83XX(ha)) |
1846 | cnt = RD_REG_DWORD(®->isp25mq.req_q_out); | 1852 | cnt = RD_REG_DWORD(®->isp25mq.req_q_out); |
1847 | else if (IS_QLA82XX(ha)) | 1853 | else if (IS_P3P_TYPE(ha)) |
1848 | cnt = RD_REG_DWORD(®->isp82.req_q_out); | 1854 | cnt = RD_REG_DWORD(®->isp82.req_q_out); |
1849 | else if (IS_FWI2_CAPABLE(ha)) | 1855 | else if (IS_FWI2_CAPABLE(ha)) |
1850 | cnt = RD_REG_DWORD(®->isp24.req_q_out); | 1856 | cnt = RD_REG_DWORD(®->isp24.req_q_out); |
@@ -2056,6 +2062,8 @@ qla24xx_els_iocb(srb_t *sp, struct els_entry_24xx *els_iocb) | |||
2056 | (bsg_job->reply_payload.sg_list))); | 2062 | (bsg_job->reply_payload.sg_list))); |
2057 | els_iocb->rx_len = cpu_to_le32(sg_dma_len | 2063 | els_iocb->rx_len = cpu_to_le32(sg_dma_len |
2058 | (bsg_job->reply_payload.sg_list)); | 2064 | (bsg_job->reply_payload.sg_list)); |
2065 | |||
2066 | sp->fcport->vha->qla_stats.control_requests++; | ||
2059 | } | 2067 | } |
2060 | 2068 | ||
2061 | static void | 2069 | static void |
@@ -2133,6 +2141,8 @@ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb) | |||
2133 | avail_dsds--; | 2141 | avail_dsds--; |
2134 | } | 2142 | } |
2135 | ct_iocb->entry_count = entry_count; | 2143 | ct_iocb->entry_count = entry_count; |
2144 | |||
2145 | sp->fcport->vha->qla_stats.control_requests++; | ||
2136 | } | 2146 | } |
2137 | 2147 | ||
2138 | static void | 2148 | static void |
@@ -2685,6 +2695,9 @@ qla25xx_build_bidir_iocb(srb_t *sp, struct scsi_qla_host *vha, | |||
2685 | vha->bidi_stats.transfer_bytes += req_data_len; | 2695 | vha->bidi_stats.transfer_bytes += req_data_len; |
2686 | vha->bidi_stats.io_count++; | 2696 | vha->bidi_stats.io_count++; |
2687 | 2697 | ||
2698 | vha->qla_stats.output_bytes += req_data_len; | ||
2699 | vha->qla_stats.output_requests++; | ||
2700 | |||
2688 | /* Only one dsd is available for bidirectional IOCB, remaining dsds | 2701 | /* Only one dsd is available for bidirectional IOCB, remaining dsds |
2689 | * are bundled in continuation iocb | 2702 | * are bundled in continuation iocb |
2690 | */ | 2703 | */ |