There seems accumulation needed.

Signed-off-by: Hillf Danton <[email protected]>
---

--- a/drivers/scsi/libfc/fc_fcp.c       2010-09-13 07:07:38.000000000 +0800
+++ b/drivers/scsi/libfc/fc_fcp.c       2010-10-26 20:52:46.000000000 +0800
@@ -1821,11 +1821,11 @@ int fc_queuecommand(struct scsi_cmnd *sc
        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++;
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to