diff options
Diffstat (limited to 'drivers/scsi/g_NCR5380.c')
-rw-r--r-- | drivers/scsi/g_NCR5380.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 5923f86a384e..0c768e7d06b9 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c @@ -663,7 +663,7 @@ static inline int generic_NCR5380_psend(struct NCR5380_hostdata *hostdata, static int generic_NCR5380_dma_xfer_len(struct NCR5380_hostdata *hostdata, struct scsi_cmnd *cmd) { - int transfersize = cmd->SCp.this_residual; + int transfersize = NCR5380_to_ncmd(cmd)->this_residual; if (hostdata->flags & FLAG_NO_PSEUDO_DMA) return 0; @@ -675,7 +675,7 @@ static int generic_NCR5380_dma_xfer_len(struct NCR5380_hostdata *hostdata, /* Limit PDMA send to 512 B to avoid random corruption on DTC3181E */ if (hostdata->board == BOARD_DTC3181E && cmd->sc_data_direction == DMA_TO_DEVICE) - transfersize = min(cmd->SCp.this_residual, 512); + transfersize = min(transfersize, 512); return min(transfersize, DMA_MAX_SIZE); } |