aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorHillf Danton <dhillf@gmail.com>2010-11-30 19:18:33 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:21 -0500
commite90ff5ef0aab1d40f0e92a44d66f8d45a20d8c95 (patch)
tree98ba8bd84832b20a52a9481862b3e9bd0c04ca8f /drivers/scsi/libfc
parent530994d69e5b6b4eca2db4a21b6d945d13646053 (diff)
[SCSI] libfc: fix stats computation in fc_queuecommand()
There seems accumulation needed. Signed-off-by: Hillf Danton <dhillf@gmail.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_fcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index b9ad74de76da..0e985dbaedc4 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -1820,11 +1820,11 @@ static int fc_queuecommand_lck(struct scsi_cmnd *sc_cmd, void (*done)(struct scs
1820 if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) { 1820 if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) {
1821 fsp->req_flags = FC_SRB_READ; 1821 fsp->req_flags = FC_SRB_READ;
1822 stats->InputRequests++; 1822 stats->InputRequests++;
1823 stats->InputMegabytes = fsp->data_len; 1823 stats->InputMegabytes += fsp->data_len;
1824 } else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) { 1824 } else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) {
1825 fsp->req_flags = FC_SRB_WRITE; 1825 fsp->req_flags = FC_SRB_WRITE;
1826 stats->OutputRequests++; 1826 stats->OutputRequests++;
1827 stats->OutputMegabytes = fsp->data_len; 1827 stats->OutputMegabytes += fsp->data_len;
1828 } else { 1828 } else {
1829 fsp->req_flags = 0; 1829 fsp->req_flags = 0;
1830 stats->ControlRequests++; 1830 stats->ControlRequests++;