diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2016-03-23 21:10:13 +1100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-04-11 16:57:09 -0400 |
commit | e63449c43a58fc185ff35ace6a842817f57ec6c8 (patch) | |
tree | 1f16ee7c7a7c9bd82577bc1033854c1ba80f72c7 /drivers/scsi/atari_scsi.c | |
parent | e4dec6806aceca768b74c1c6402e6d31ecf3c960 (diff) | |
download | linux-e63449c43a58fc185ff35ace6a842817f57ec6c8.tar.bz2 |
atari_NCR5380: Remove DMA_MIN_SIZE macro
Only the atari_scsi and sun3_scsi drivers define DMA_MIN_SIZE.
Both drivers also define NCR5380_dma_xfer_len, which means
DMA_MIN_SIZE can be removed from the core driver.
This removes another discrepancy between the two core drivers.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/atari_scsi.c')
-rw-r--r-- | drivers/scsi/atari_scsi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index c68e895e971f..41ddd95cebe6 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c @@ -83,11 +83,12 @@ #include <scsi/scsi_host.h> +#define DMA_MIN_SIZE 32 + /* Definitions for the core NCR5380 driver. */ #define SUPPORT_TAGS #define MAX_TAGS 32 -#define DMA_MIN_SIZE 32 #define NCR5380_implementation_fields /* none */ @@ -605,6 +606,9 @@ static unsigned long atari_dma_xfer_len(unsigned long wanted_len, { unsigned long possible_len, limit; + if (wanted_len < DMA_MIN_SIZE) + return 0; + if (IS_A_TT()) /* TT SCSI DMA can transfer arbitrary #bytes */ return wanted_len; |