Commit d1af9c7f authored by Finn Thain's avatar Finn Thain Committed by Martin K. Petersen

ncr5380: Remove UNSAFE macro

Configuring core drivers using macros like this one prevents re-unifying
the core driver forks, and prevents implementing the core driver as a
library or a platform driver.

The UNSAFE macro in particular is a poor workaround for the problem of
interrupt latency. Releasing the locks complicates things because then we
would have to handle the possibility of EH handler invocation during a
PDMA transfer.

The comments say that instead of using this macro, "you're going to be
better off twiddling with transfersize". I agree. Remove this stuff.
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Tested-by: default avatarOndrej Zary <linux@rainbow-software.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 010e89d1
...@@ -195,12 +195,6 @@ ...@@ -195,12 +195,6 @@
* rely on phase mismatch and EOP interrupts to determine end * rely on phase mismatch and EOP interrupts to determine end
* of phase. * of phase.
* *
* UNSAFE - leave interrupts enabled during pseudo-DMA transfers. You
* only really want to use this if you're having a problem with
* dropped characters during high speed communications, and even
* then, you're going to be better off twiddling with transfersize
* in the high level code.
*
* Defaults for these will be provided although the user may want to adjust * Defaults for these will be provided although the user may want to adjust
* these to allocate CPU resources to the SCSI driver or "real" code. * these to allocate CPU resources to the SCSI driver or "real" code.
* *
...@@ -553,9 +547,6 @@ static void prepare_info(struct Scsi_Host *instance) ...@@ -553,9 +547,6 @@ static void prepare_info(struct Scsi_Host *instance)
#endif #endif
#ifdef PSEUDO_DMA #ifdef PSEUDO_DMA
"PSEUDO_DMA " "PSEUDO_DMA "
#endif
#ifdef UNSAFE
"UNSAFE "
#endif #endif
""); "");
} }
...@@ -1582,9 +1573,6 @@ static int NCR5380_transfer_dma(struct Scsi_Host *instance, unsigned char *phase ...@@ -1582,9 +1573,6 @@ static int NCR5380_transfer_dma(struct Scsi_Host *instance, unsigned char *phase
* before the setting of DMA mode to after transfer of the last byte. * before the setting of DMA mode to after transfer of the last byte.
*/ */
#if defined(PSEUDO_DMA) && defined(UNSAFE)
spin_unlock_irq(instance->host_lock);
#endif
/* KLL May need eop and parity in 53c400 */ /* KLL May need eop and parity in 53c400 */
if (hostdata->flags & FLAG_NCR53C400) if (hostdata->flags & FLAG_NCR53C400)
NCR5380_write(MODE_REG, MR_BASE | MR_DMA_MODE | NCR5380_write(MODE_REG, MR_BASE | MR_DMA_MODE |
...@@ -1793,9 +1781,6 @@ static int NCR5380_transfer_dma(struct Scsi_Host *instance, unsigned char *phase ...@@ -1793,9 +1781,6 @@ static int NCR5380_transfer_dma(struct Scsi_Host *instance, unsigned char *phase
*data = d + c; *data = d + c;
*count = 0; *count = 0;
*phase = NCR5380_read(STATUS_REG) & PHASE_MASK; *phase = NCR5380_read(STATUS_REG) & PHASE_MASK;
#if defined(PSEUDO_DMA) && defined(UNSAFE)
spin_lock_irq(instance->host_lock);
#endif /* defined(REAL_DMA_POLL) */
return foo; return foo;
#endif /* def REAL_DMA */ #endif /* def REAL_DMA */
} }
......
#define PSEUDO_DMA #define PSEUDO_DMA
#define DONT_USE_INTR #define DONT_USE_INTR
#define UNSAFE /* Leave interrupts enabled during pseudo-dma I/O */
#define DMA_WORKS_RIGHT #define DMA_WORKS_RIGHT
......
#define PSEUDO_DMA #define PSEUDO_DMA
#define UNSAFE /* Not unsafe for PAS16 -- use it */
/* /*
* This driver adapted from Drew Eckhardt's Trantor T128 driver * This driver adapted from Drew Eckhardt's Trantor T128 driver
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment