From: Hillf Danton Date: Wed, 1 Dec 2010 00:18:33 +0000 (-0800) Subject: [SCSI] libfc: fix stats computation in fc_queuecommand() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e90ff5ef0aab1d40f0e92a44d66f8d45a20d8c95;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [SCSI] libfc: fix stats computation in fc_queuecommand() There seems accumulation needed. Signed-off-by: Hillf Danton Signed-off-by: Robert Love Signed-off-by: James Bottomley --- 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 if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) { fsp->req_flags = FC_SRB_READ; stats->InputRequests++; - stats->InputMegabytes = fsp->data_len; + stats->InputMegabytes += fsp->data_len; } else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) { fsp->req_flags = FC_SRB_WRITE; stats->OutputRequests++; - stats->OutputMegabytes = fsp->data_len; + stats->OutputMegabytes += fsp->data_len; } else { fsp->req_flags = 0; stats->ControlRequests++;