summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/atari_scsi.c
diff options
context:
space:
mode:
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;