mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 18:56:24 +00:00
scsi: NCR5380: Use sc_data_direction instead of rq_data_dir()
This patch prepares for the removal of the request pointer from struct scsi_cmnd and does not change any functionality. Link: https://lore.kernel.org/r/20210809230355.8186-13-bvanassche@acm.org Cc: Michael Schmitz <schmitzmic@gmail.com> Suggested-by: Finn Thain <fthain@linux-m68k.org> Acked-by: Finn Thain <fthain@linux-m68k.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
cd4b46cdb4
commit
2e4b231ac1
@ -778,7 +778,7 @@ static void NCR5380_dma_complete(struct Scsi_Host *instance)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SUN3
|
||||
if ((sun3scsi_dma_finish(rq_data_dir(hostdata->connected->request)))) {
|
||||
if (sun3scsi_dma_finish(hostdata->connected->sc_data_direction)) {
|
||||
pr_err("scsi%d: overrun in UDC counter -- not prepared to deal with this!\n",
|
||||
instance->host_no);
|
||||
BUG();
|
||||
@ -1710,7 +1710,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
|
||||
count = sun3scsi_dma_xfer_len(hostdata, cmd);
|
||||
|
||||
if (count > 0) {
|
||||
if (rq_data_dir(cmd->request))
|
||||
if (cmd->sc_data_direction == DMA_TO_DEVICE)
|
||||
sun3scsi_dma_send_setup(hostdata,
|
||||
cmd->SCp.ptr, count);
|
||||
else
|
||||
@ -2158,7 +2158,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
|
||||
count = sun3scsi_dma_xfer_len(hostdata, tmp);
|
||||
|
||||
if (count > 0) {
|
||||
if (rq_data_dir(tmp->request))
|
||||
if (tmp->sc_data_direction == DMA_TO_DEVICE)
|
||||
sun3scsi_dma_send_setup(hostdata,
|
||||
tmp->SCp.ptr, count);
|
||||
else
|
||||
|
@ -366,8 +366,9 @@ static inline int sun3scsi_dma_start(unsigned long count, unsigned char *data)
|
||||
}
|
||||
|
||||
/* clean up after our dma is done */
|
||||
static int sun3scsi_dma_finish(int write_flag)
|
||||
static int sun3scsi_dma_finish(enum dma_data_direction data_dir)
|
||||
{
|
||||
const bool write_flag = data_dir == DMA_TO_DEVICE;
|
||||
unsigned short __maybe_unused count;
|
||||
unsigned short fifo;
|
||||
int ret = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user