summaryrefslogtreecommitdiff
path: root/drivers/scsi/atari_scsi.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2016-03-23 13:10:13 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2016-04-11 23:57:09 +0300
commite63449c43a58fc185ff35ace6a842817f57ec6c8 (patch)
tree1f16ee7c7a7c9bd82577bc1033854c1ba80f72c7 /drivers/scsi/atari_scsi.c
parente4dec6806aceca768b74c1c6402e6d31ecf3c960 (diff)
downloadlinux-e63449c43a58fc185ff35ace6a842817f57ec6c8.tar.xz
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.c6
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;