summaryrefslogtreecommitdiff
path: root/drivers/scsi/g_NCR5380.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@linux-m68k.org>2022-02-18 11:50:36 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2022-02-22 21:11:03 -0500
commitff1269cb3d978655fb4f61f87d08a46af9854567 (patch)
treed648e8d18f356f21584a5f946566080ff55e0d8b /drivers/scsi/g_NCR5380.c
parentcd614642e1a24e501633d5aea79c1bafb10d9f36 (diff)
scsi: NCR5380: Add SCp members to struct NCR5380_cmd
This is necessary for the eventual removal of SCp from struct scsi_cmnd. Link: https://lore.kernel.org/r/20220218195117.25689-9-bvanassche@acm.org Cc: Michael Schmitz <schmitzmic@gmail.com> Cc: Ondrej Zary <linux@zary.sk> Suggested-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Finn Thain <fthain@linux-m68k.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/g_NCR5380.c')
-rw-r--r--drivers/scsi/g_NCR5380.c4
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);
}