From: Hillf Danton Date: Wed, 1 Dec 2010 00:18:33 +0000 (-0800) Subject: [SCSI] libfc: fix stats computation in fc_queuecommand() X-Git-Tag: v2.6.38-rc1~27^2~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e90ff5ef0aab1d40f0e92a44d66f8d45a20d8c95;p=profile%2Fivi%2Fkernel-x86-ivi.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 b9ad74d..0e985db 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++;