Skip to content

Commit

Permalink
[SCSI] libfc: fix stats computation in fc_queuecommand()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hillf Danton authored and James Bottomley committed Dec 21, 2010
1 parent 530994d commit e90ff5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/libfc/fc_fcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit e90ff5e

Please sign in to comment.