From: Finn Thain <fthain@telegraphics.com.au>
To: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Michael Schmitz <schmitzmic@gmail.com>,
linux-m68k@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Russell King <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org
Cc: Sam Creasey <sammy@sammy.net>, Ondrej Zary <linux@rainbow-software.org>
Subject: [PATCH 06/22] ncr5380: Remove PSEUDO_DMA macro
Date: Mon, 14 Mar 2016 15:27:06 +1100 [thread overview]
Message-ID: <20160314042702.216030077@telegraphics.com.au> (raw)
In-Reply-To: 20160314042700.596192247@telegraphics.com.au
[-- Attachment #1: ncr5380-remove-PSEUDO_DMA-macro --]
[-- Type: text/plain, Size: 13269 bytes --]
For those wrapper drivers which only implement Programmed IO, have
NCR5380_dma_xfer_len() evaluate to zero. That allows PDMA to be easily
disabled at run-time and so the PSEUDO_DMA macro is no longer needed.
Also remove the spin counters used for debugging pseudo DMA drivers.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 32 +-------------------------------
drivers/scsi/NCR5380.h | 4 ----
drivers/scsi/arm/cumana_1.c | 2 --
drivers/scsi/arm/oak.c | 3 +--
drivers/scsi/dmx3191d.c | 4 ++++
drivers/scsi/dtc.c | 7 -------
drivers/scsi/dtc.h | 2 --
drivers/scsi/g_NCR5380.c | 1 -
drivers/scsi/g_NCR5380.h | 1 -
drivers/scsi/mac_scsi.c | 10 ----------
drivers/scsi/pas16.c | 10 ----------
drivers/scsi/pas16.h | 2 --
drivers/scsi/t128.c | 4 ----
drivers/scsi/t128.h | 2 --
14 files changed, 6 insertions(+), 78 deletions(-)
Index: linux/drivers/scsi/NCR5380.c
===================================================================
--- linux.orig/drivers/scsi/NCR5380.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/NCR5380.c 2016-03-14 15:26:29.000000000 +1100
@@ -469,34 +469,9 @@ static void prepare_info(struct Scsi_Hos
#ifdef PARITY
"PARITY "
#endif
-#ifdef PSEUDO_DMA
- "PSEUDO_DMA "
-#endif
"");
}
-#ifdef PSEUDO_DMA
-static int __maybe_unused NCR5380_write_info(struct Scsi_Host *instance,
- char *buffer, int length)
-{
- struct NCR5380_hostdata *hostdata = shost_priv(instance);
-
- hostdata->spin_max_r = 0;
- hostdata->spin_max_w = 0;
- return 0;
-}
-
-static int __maybe_unused NCR5380_show_info(struct seq_file *m,
- struct Scsi_Host *instance)
-{
- struct NCR5380_hostdata *hostdata = shost_priv(instance);
-
- seq_printf(m, "Highwater I/O busy spin counts: write %d, read %d\n",
- hostdata->spin_max_w, hostdata->spin_max_r);
- return 0;
-}
-#endif
-
/**
* NCR5380_init - initialise an NCR5380
* @instance: adapter to configure
@@ -1436,7 +1411,6 @@ timeout:
return -1;
}
-#if defined(PSEUDO_DMA)
/*
* Function : int NCR5380_transfer_dma (struct Scsi_Host *instance,
* unsigned char *phase, int *count, unsigned char **data)
@@ -1592,7 +1566,6 @@ static int NCR5380_transfer_dma(struct S
*phase = NCR5380_read(STATUS_REG) & PHASE_MASK;
return foo;
}
-#endif /* PSEUDO_DMA */
/*
* Function : NCR5380_information_transfer (struct Scsi_Host *instance)
@@ -1683,7 +1656,6 @@ static void NCR5380_information_transfer
* in an unconditional loop.
*/
-#if defined(PSEUDO_DMA)
transfersize = 0;
if (!cmd->device->borken)
transfersize = NCR5380_dma_xfer_len(instance, cmd, phase);
@@ -1706,9 +1678,7 @@ static void NCR5380_information_transfer
/* XXX - need to source or sink data here, as appropriate */
} else
cmd->SCp.this_residual -= transfersize - len;
- } else
-#endif /* PSEUDO_DMA */
- {
+ } else {
/* Break up transfer into 3 ms chunks,
* presuming 6 accesses per handshake.
*/
Index: linux/drivers/scsi/NCR5380.h
===================================================================
--- linux.orig/drivers/scsi/NCR5380.h 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/NCR5380.h 2016-03-14 15:26:29.000000000 +1100
@@ -257,10 +257,6 @@ struct NCR5380_hostdata {
#ifdef SUPPORT_TAGS
struct tag_alloc TagAlloc[8][8]; /* 8 targets and 8 LUNs */
#endif
-#ifdef PSEUDO_DMA
- unsigned spin_max_r;
- unsigned spin_max_w;
-#endif
struct workqueue_struct *work_q;
unsigned long accesses_per_ms; /* chip register accesses per ms */
};
Index: linux/drivers/scsi/arm/cumana_1.c
===================================================================
--- linux.orig/drivers/scsi/arm/cumana_1.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/arm/cumana_1.c 2016-03-14 15:26:29.000000000 +1100
@@ -13,8 +13,6 @@
#include <scsi/scsi_host.h>
-#define PSEUDO_DMA
-
#define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata)
#define NCR5380_read(reg) cumanascsi_read(instance, reg)
#define NCR5380_write(reg, value) cumanascsi_write(instance, reg, value)
Index: linux/drivers/scsi/arm/oak.c
===================================================================
--- linux.orig/drivers/scsi/arm/oak.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/arm/oak.c 2016-03-14 15:26:29.000000000 +1100
@@ -14,7 +14,6 @@
#include <scsi/scsi_host.h>
-/*#define PSEUDO_DMA*/
#define DONT_USE_INTR
#define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata)
@@ -24,7 +23,7 @@
#define NCR5380_write(reg, value) \
writeb(value, priv(instance)->base + ((reg) << 2))
-#define NCR5380_dma_xfer_len(instance, cmd, phase) (cmd->transfersize)
+#define NCR5380_dma_xfer_len(instance, cmd, phase) (0)
#define NCR5380_queue_command oakscsi_queue_command
#define NCR5380_info oakscsi_info
Index: linux/drivers/scsi/dtc.c
===================================================================
--- linux.orig/drivers/scsi/dtc.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/dtc.c 2016-03-14 15:26:29.000000000 +1100
@@ -1,4 +1,3 @@
-#define PSEUDO_DMA
#define DONT_USE_INTR
/*
@@ -352,8 +351,6 @@ static inline int NCR5380_pread(struct S
while (!(NCR5380_read(DTC_CONTROL_REG) & D_CR_ACCESS))
++i;
rtrc(0);
- if (i > hostdata->spin_max_r)
- hostdata->spin_max_r = i;
return (0);
}
@@ -400,8 +397,6 @@ static inline int NCR5380_pwrite(struct
rtrc(7);
/* Check for parity error here. fixme. */
rtrc(0);
- if (i > hostdata->spin_max_w)
- hostdata->spin_max_w = i;
return (0);
}
@@ -440,8 +435,6 @@ static struct scsi_host_template driver_
.detect = dtc_detect,
.release = dtc_release,
.proc_name = "dtc3x80",
- .show_info = dtc_show_info,
- .write_info = dtc_write_info,
.info = dtc_info,
.queuecommand = dtc_queue_command,
.eh_abort_handler = dtc_abort,
Index: linux/drivers/scsi/g_NCR5380.c
===================================================================
--- linux.orig/drivers/scsi/g_NCR5380.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/g_NCR5380.c 2016-03-14 15:26:29.000000000 +1100
@@ -57,7 +57,6 @@
*/
#define AUTOPROBE_IRQ
-#define PSEUDO_DMA
#include <asm/io.h>
#include <linux/blkdev.h>
Index: linux/drivers/scsi/mac_scsi.c
===================================================================
--- linux.orig/drivers/scsi/mac_scsi.c 2016-03-14 15:26:22.000000000 +1100
+++ linux/drivers/scsi/mac_scsi.c 2016-03-14 15:26:29.000000000 +1100
@@ -28,8 +28,6 @@
/* Definitions for the core NCR5380 driver. */
-#define PSEUDO_DMA
-
#define NCR5380_implementation_fields unsigned char *pdma_base
#define NCR5380_read(reg) macscsi_read(instance, reg)
@@ -46,8 +44,6 @@
#define NCR5380_abort macscsi_abort
#define NCR5380_bus_reset macscsi_bus_reset
#define NCR5380_info macscsi_info
-#define NCR5380_show_info macscsi_show_info
-#define NCR5380_write_info macscsi_write_info
#include "NCR5380.h"
@@ -111,7 +107,6 @@ static int __init mac_scsi_setup(char *s
__setup("mac5380=", mac_scsi_setup);
#endif /* !MODULE */
-#ifdef PSEUDO_DMA
/*
Pseudo-DMA: (Ove Edlund)
The code attempts to catch bus errors that occur if one for example
@@ -303,7 +298,6 @@ static int macscsi_pwrite(struct Scsi_Ho
return 0;
}
-#endif
static int macscsi_dma_xfer_len(struct Scsi_Host *instance,
struct scsi_cmnd *cmd)
@@ -324,8 +318,6 @@ static int macscsi_dma_xfer_len(struct S
static struct scsi_host_template mac_scsi_template = {
.module = THIS_MODULE,
.proc_name = DRV_MODULE_NAME,
- .show_info = macscsi_show_info,
- .write_info = macscsi_write_info,
.name = "Macintosh NCR5380 SCSI",
.info = macscsi_info,
.queuecommand = macscsi_queue_command,
@@ -351,9 +343,7 @@ static int __init mac_scsi_probe(struct
if (!pio_mem)
return -ENODEV;
-#ifdef PSEUDO_DMA
pdma_mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-#endif
irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
Index: linux/drivers/scsi/pas16.c
===================================================================
--- linux.orig/drivers/scsi/pas16.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/pas16.c 2016-03-14 15:26:29.000000000 +1100
@@ -1,5 +1,3 @@
-#define PSEUDO_DMA
-
/*
* This driver adapted from Drew Eckhardt's Trantor T128 driver
*
@@ -479,7 +477,6 @@ static inline int NCR5380_pread (struct
P_DATA_REG_OFFSET);
register int i = len;
int ii = 0;
- struct NCR5380_hostdata *hostdata = shost_priv(instance);
while ( !(inb(instance->io_port + P_STATUS_REG_OFFSET) & P_ST_RDY) )
++ii;
@@ -492,8 +489,6 @@ static inline int NCR5380_pread (struct
instance->host_no);
return -1;
}
- if (ii > hostdata->spin_max_r)
- hostdata->spin_max_r = ii;
return 0;
}
@@ -516,7 +511,6 @@ static inline int NCR5380_pwrite (struct
register unsigned short reg = (instance->io_port + P_DATA_REG_OFFSET);
register int i = len;
int ii = 0;
- struct NCR5380_hostdata *hostdata = shost_priv(instance);
while ( !((inb(instance->io_port + P_STATUS_REG_OFFSET)) & P_ST_RDY) )
++ii;
@@ -529,8 +523,6 @@ static inline int NCR5380_pwrite (struct
instance->host_no);
return -1;
}
- if (ii > hostdata->spin_max_w)
- hostdata->spin_max_w = ii;
return 0;
}
@@ -550,8 +542,6 @@ static struct scsi_host_template driver_
.detect = pas16_detect,
.release = pas16_release,
.proc_name = "pas16",
- .show_info = pas16_show_info,
- .write_info = pas16_write_info,
.info = pas16_info,
.queuecommand = pas16_queue_command,
.eh_abort_handler = pas16_abort,
Index: linux/drivers/scsi/t128.c
===================================================================
--- linux.orig/drivers/scsi/t128.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/t128.c 2016-03-14 15:26:29.000000000 +1100
@@ -1,5 +1,3 @@
-#define PSEUDO_DMA
-
/*
* Trantor T128/T128F/T228 driver
* Note : architecturally, the T100 and T130 are different and won't
@@ -394,8 +392,6 @@ static struct scsi_host_template driver_
.detect = t128_detect,
.release = t128_release,
.proc_name = "t128",
- .show_info = t128_show_info,
- .write_info = t128_write_info,
.info = t128_info,
.queuecommand = t128_queue_command,
.eh_abort_handler = t128_abort,
Index: linux/drivers/scsi/dmx3191d.c
===================================================================
--- linux.orig/drivers/scsi/dmx3191d.c 2016-03-14 15:26:22.000000000 +1100
+++ linux/drivers/scsi/dmx3191d.c 2016-03-14 15:26:29.000000000 +1100
@@ -39,6 +39,10 @@
#define NCR5380_read(reg) inb(instance->io_port + reg)
#define NCR5380_write(reg, value) outb(value, instance->io_port + reg)
+#define NCR5380_dma_xfer_len(instance, cmd, phase) (0)
+#define NCR5380_pread(instance, dst, len) (0)
+#define NCR5380_pwrite(instance, src, len) (0)
+
#define NCR5380_implementation_fields /* none */
#include "NCR5380.h"
Index: linux/drivers/scsi/dtc.h
===================================================================
--- linux.orig/drivers/scsi/dtc.h 2016-03-14 15:17:25.000000000 +1100
+++ linux/drivers/scsi/dtc.h 2016-03-14 15:26:29.000000000 +1100
@@ -27,8 +27,6 @@
#define NCR5380_abort dtc_abort
#define NCR5380_bus_reset dtc_bus_reset
#define NCR5380_info dtc_info
-#define NCR5380_show_info dtc_show_info
-#define NCR5380_write_info dtc_write_info
/* 15 12 11 10
1001 1100 0000 0000 */
Index: linux/drivers/scsi/g_NCR5380.h
===================================================================
--- linux.orig/drivers/scsi/g_NCR5380.h 2016-03-14 15:26:22.000000000 +1100
+++ linux/drivers/scsi/g_NCR5380.h 2016-03-14 15:26:29.000000000 +1100
@@ -70,7 +70,6 @@
#define NCR5380_pread generic_NCR5380_pread
#define NCR5380_pwrite generic_NCR5380_pwrite
#define NCR5380_info generic_NCR5380_info
-#define NCR5380_show_info generic_NCR5380_show_info
#define BOARD_NCR5380 0
#define BOARD_NCR53C400 1
Index: linux/drivers/scsi/pas16.h
===================================================================
--- linux.orig/drivers/scsi/pas16.h 2016-03-14 15:17:25.000000000 +1100
+++ linux/drivers/scsi/pas16.h 2016-03-14 15:26:29.000000000 +1100
@@ -109,8 +109,6 @@
#define NCR5380_abort pas16_abort
#define NCR5380_bus_reset pas16_bus_reset
#define NCR5380_info pas16_info
-#define NCR5380_show_info pas16_show_info
-#define NCR5380_write_info pas16_write_info
/* 15 14 12 10 7 5 3
1101 0100 1010 1000 */
Index: linux/drivers/scsi/t128.h
===================================================================
--- linux.orig/drivers/scsi/t128.h 2016-03-14 15:17:25.000000000 +1100
+++ linux/drivers/scsi/t128.h 2016-03-14 15:26:29.000000000 +1100
@@ -83,8 +83,6 @@
#define NCR5380_abort t128_abort
#define NCR5380_bus_reset t128_bus_reset
#define NCR5380_info t128_info
-#define NCR5380_show_info t128_show_info
-#define NCR5380_write_info t128_write_info
/* 15 14 12 10 7 5 3
1101 0100 1010 1000 */
WARNING: multiple messages have this Message-ID (diff)
From: fthain@telegraphics.com.au (Finn Thain)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/22] ncr5380: Remove PSEUDO_DMA macro
Date: Mon, 14 Mar 2016 15:27:06 +1100 [thread overview]
Message-ID: <20160314042702.216030077@telegraphics.com.au> (raw)
In-Reply-To: 20160314042700.596192247@telegraphics.com.au
An embedded and charset-unspecified text was scrubbed...
Name: ncr5380-remove-PSEUDO_DMA-macro
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160314/32852948/attachment.ksh>
WARNING: multiple messages have this Message-ID (diff)
From: Finn Thain <fthain@telegraphics.com.au>
To: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Michael Schmitz <schmitzmic@gmail.com>,
<linux-m68k@vger.kernel.org>, <linux-scsi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Russell King <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org
Cc: Ondrej Zary <linux@rainbow-software.org>, Sam Creasey <sammy@sammy.net>
Subject: [PATCH 06/22] ncr5380: Remove PSEUDO_DMA macro
Date: Mon, 14 Mar 2016 15:27:06 +1100 [thread overview]
Message-ID: <20160314042702.216030077@telegraphics.com.au> (raw)
In-Reply-To: 20160314042700.596192247@telegraphics.com.au
[-- Attachment #1: ncr5380-remove-PSEUDO_DMA-macro --]
[-- Type: text/plain, Size: 13269 bytes --]
For those wrapper drivers which only implement Programmed IO, have
NCR5380_dma_xfer_len() evaluate to zero. That allows PDMA to be easily
disabled at run-time and so the PSEUDO_DMA macro is no longer needed.
Also remove the spin counters used for debugging pseudo DMA drivers.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 32 +-------------------------------
drivers/scsi/NCR5380.h | 4 ----
drivers/scsi/arm/cumana_1.c | 2 --
drivers/scsi/arm/oak.c | 3 +--
drivers/scsi/dmx3191d.c | 4 ++++
drivers/scsi/dtc.c | 7 -------
drivers/scsi/dtc.h | 2 --
drivers/scsi/g_NCR5380.c | 1 -
drivers/scsi/g_NCR5380.h | 1 -
drivers/scsi/mac_scsi.c | 10 ----------
drivers/scsi/pas16.c | 10 ----------
drivers/scsi/pas16.h | 2 --
drivers/scsi/t128.c | 4 ----
drivers/scsi/t128.h | 2 --
14 files changed, 6 insertions(+), 78 deletions(-)
Index: linux/drivers/scsi/NCR5380.c
===================================================================
--- linux.orig/drivers/scsi/NCR5380.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/NCR5380.c 2016-03-14 15:26:29.000000000 +1100
@@ -469,34 +469,9 @@ static void prepare_info(struct Scsi_Hos
#ifdef PARITY
"PARITY "
#endif
-#ifdef PSEUDO_DMA
- "PSEUDO_DMA "
-#endif
"");
}
-#ifdef PSEUDO_DMA
-static int __maybe_unused NCR5380_write_info(struct Scsi_Host *instance,
- char *buffer, int length)
-{
- struct NCR5380_hostdata *hostdata = shost_priv(instance);
-
- hostdata->spin_max_r = 0;
- hostdata->spin_max_w = 0;
- return 0;
-}
-
-static int __maybe_unused NCR5380_show_info(struct seq_file *m,
- struct Scsi_Host *instance)
-{
- struct NCR5380_hostdata *hostdata = shost_priv(instance);
-
- seq_printf(m, "Highwater I/O busy spin counts: write %d, read %d\n",
- hostdata->spin_max_w, hostdata->spin_max_r);
- return 0;
-}
-#endif
-
/**
* NCR5380_init - initialise an NCR5380
* @instance: adapter to configure
@@ -1436,7 +1411,6 @@ timeout:
return -1;
}
-#if defined(PSEUDO_DMA)
/*
* Function : int NCR5380_transfer_dma (struct Scsi_Host *instance,
* unsigned char *phase, int *count, unsigned char **data)
@@ -1592,7 +1566,6 @@ static int NCR5380_transfer_dma(struct S
*phase = NCR5380_read(STATUS_REG) & PHASE_MASK;
return foo;
}
-#endif /* PSEUDO_DMA */
/*
* Function : NCR5380_information_transfer (struct Scsi_Host *instance)
@@ -1683,7 +1656,6 @@ static void NCR5380_information_transfer
* in an unconditional loop.
*/
-#if defined(PSEUDO_DMA)
transfersize = 0;
if (!cmd->device->borken)
transfersize = NCR5380_dma_xfer_len(instance, cmd, phase);
@@ -1706,9 +1678,7 @@ static void NCR5380_information_transfer
/* XXX - need to source or sink data here, as appropriate */
} else
cmd->SCp.this_residual -= transfersize - len;
- } else
-#endif /* PSEUDO_DMA */
- {
+ } else {
/* Break up transfer into 3 ms chunks,
* presuming 6 accesses per handshake.
*/
Index: linux/drivers/scsi/NCR5380.h
===================================================================
--- linux.orig/drivers/scsi/NCR5380.h 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/NCR5380.h 2016-03-14 15:26:29.000000000 +1100
@@ -257,10 +257,6 @@ struct NCR5380_hostdata {
#ifdef SUPPORT_TAGS
struct tag_alloc TagAlloc[8][8]; /* 8 targets and 8 LUNs */
#endif
-#ifdef PSEUDO_DMA
- unsigned spin_max_r;
- unsigned spin_max_w;
-#endif
struct workqueue_struct *work_q;
unsigned long accesses_per_ms; /* chip register accesses per ms */
};
Index: linux/drivers/scsi/arm/cumana_1.c
===================================================================
--- linux.orig/drivers/scsi/arm/cumana_1.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/arm/cumana_1.c 2016-03-14 15:26:29.000000000 +1100
@@ -13,8 +13,6 @@
#include <scsi/scsi_host.h>
-#define PSEUDO_DMA
-
#define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata)
#define NCR5380_read(reg) cumanascsi_read(instance, reg)
#define NCR5380_write(reg, value) cumanascsi_write(instance, reg, value)
Index: linux/drivers/scsi/arm/oak.c
===================================================================
--- linux.orig/drivers/scsi/arm/oak.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/arm/oak.c 2016-03-14 15:26:29.000000000 +1100
@@ -14,7 +14,6 @@
#include <scsi/scsi_host.h>
-/*#define PSEUDO_DMA*/
#define DONT_USE_INTR
#define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata)
@@ -24,7 +23,7 @@
#define NCR5380_write(reg, value) \
writeb(value, priv(instance)->base + ((reg) << 2))
-#define NCR5380_dma_xfer_len(instance, cmd, phase) (cmd->transfersize)
+#define NCR5380_dma_xfer_len(instance, cmd, phase) (0)
#define NCR5380_queue_command oakscsi_queue_command
#define NCR5380_info oakscsi_info
Index: linux/drivers/scsi/dtc.c
===================================================================
--- linux.orig/drivers/scsi/dtc.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/dtc.c 2016-03-14 15:26:29.000000000 +1100
@@ -1,4 +1,3 @@
-#define PSEUDO_DMA
#define DONT_USE_INTR
/*
@@ -352,8 +351,6 @@ static inline int NCR5380_pread(struct S
while (!(NCR5380_read(DTC_CONTROL_REG) & D_CR_ACCESS))
++i;
rtrc(0);
- if (i > hostdata->spin_max_r)
- hostdata->spin_max_r = i;
return (0);
}
@@ -400,8 +397,6 @@ static inline int NCR5380_pwrite(struct
rtrc(7);
/* Check for parity error here. fixme. */
rtrc(0);
- if (i > hostdata->spin_max_w)
- hostdata->spin_max_w = i;
return (0);
}
@@ -440,8 +435,6 @@ static struct scsi_host_template driver_
.detect = dtc_detect,
.release = dtc_release,
.proc_name = "dtc3x80",
- .show_info = dtc_show_info,
- .write_info = dtc_write_info,
.info = dtc_info,
.queuecommand = dtc_queue_command,
.eh_abort_handler = dtc_abort,
Index: linux/drivers/scsi/g_NCR5380.c
===================================================================
--- linux.orig/drivers/scsi/g_NCR5380.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/g_NCR5380.c 2016-03-14 15:26:29.000000000 +1100
@@ -57,7 +57,6 @@
*/
#define AUTOPROBE_IRQ
-#define PSEUDO_DMA
#include <asm/io.h>
#include <linux/blkdev.h>
Index: linux/drivers/scsi/mac_scsi.c
===================================================================
--- linux.orig/drivers/scsi/mac_scsi.c 2016-03-14 15:26:22.000000000 +1100
+++ linux/drivers/scsi/mac_scsi.c 2016-03-14 15:26:29.000000000 +1100
@@ -28,8 +28,6 @@
/* Definitions for the core NCR5380 driver. */
-#define PSEUDO_DMA
-
#define NCR5380_implementation_fields unsigned char *pdma_base
#define NCR5380_read(reg) macscsi_read(instance, reg)
@@ -46,8 +44,6 @@
#define NCR5380_abort macscsi_abort
#define NCR5380_bus_reset macscsi_bus_reset
#define NCR5380_info macscsi_info
-#define NCR5380_show_info macscsi_show_info
-#define NCR5380_write_info macscsi_write_info
#include "NCR5380.h"
@@ -111,7 +107,6 @@ static int __init mac_scsi_setup(char *s
__setup("mac5380=", mac_scsi_setup);
#endif /* !MODULE */
-#ifdef PSEUDO_DMA
/*
Pseudo-DMA: (Ove Edlund)
The code attempts to catch bus errors that occur if one for example
@@ -303,7 +298,6 @@ static int macscsi_pwrite(struct Scsi_Ho
return 0;
}
-#endif
static int macscsi_dma_xfer_len(struct Scsi_Host *instance,
struct scsi_cmnd *cmd)
@@ -324,8 +318,6 @@ static int macscsi_dma_xfer_len(struct S
static struct scsi_host_template mac_scsi_template = {
.module = THIS_MODULE,
.proc_name = DRV_MODULE_NAME,
- .show_info = macscsi_show_info,
- .write_info = macscsi_write_info,
.name = "Macintosh NCR5380 SCSI",
.info = macscsi_info,
.queuecommand = macscsi_queue_command,
@@ -351,9 +343,7 @@ static int __init mac_scsi_probe(struct
if (!pio_mem)
return -ENODEV;
-#ifdef PSEUDO_DMA
pdma_mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-#endif
irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
Index: linux/drivers/scsi/pas16.c
===================================================================
--- linux.orig/drivers/scsi/pas16.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/pas16.c 2016-03-14 15:26:29.000000000 +1100
@@ -1,5 +1,3 @@
-#define PSEUDO_DMA
-
/*
* This driver adapted from Drew Eckhardt's Trantor T128 driver
*
@@ -479,7 +477,6 @@ static inline int NCR5380_pread (struct
P_DATA_REG_OFFSET);
register int i = len;
int ii = 0;
- struct NCR5380_hostdata *hostdata = shost_priv(instance);
while ( !(inb(instance->io_port + P_STATUS_REG_OFFSET) & P_ST_RDY) )
++ii;
@@ -492,8 +489,6 @@ static inline int NCR5380_pread (struct
instance->host_no);
return -1;
}
- if (ii > hostdata->spin_max_r)
- hostdata->spin_max_r = ii;
return 0;
}
@@ -516,7 +511,6 @@ static inline int NCR5380_pwrite (struct
register unsigned short reg = (instance->io_port + P_DATA_REG_OFFSET);
register int i = len;
int ii = 0;
- struct NCR5380_hostdata *hostdata = shost_priv(instance);
while ( !((inb(instance->io_port + P_STATUS_REG_OFFSET)) & P_ST_RDY) )
++ii;
@@ -529,8 +523,6 @@ static inline int NCR5380_pwrite (struct
instance->host_no);
return -1;
}
- if (ii > hostdata->spin_max_w)
- hostdata->spin_max_w = ii;
return 0;
}
@@ -550,8 +542,6 @@ static struct scsi_host_template driver_
.detect = pas16_detect,
.release = pas16_release,
.proc_name = "pas16",
- .show_info = pas16_show_info,
- .write_info = pas16_write_info,
.info = pas16_info,
.queuecommand = pas16_queue_command,
.eh_abort_handler = pas16_abort,
Index: linux/drivers/scsi/t128.c
===================================================================
--- linux.orig/drivers/scsi/t128.c 2016-03-14 15:26:27.000000000 +1100
+++ linux/drivers/scsi/t128.c 2016-03-14 15:26:29.000000000 +1100
@@ -1,5 +1,3 @@
-#define PSEUDO_DMA
-
/*
* Trantor T128/T128F/T228 driver
* Note : architecturally, the T100 and T130 are different and won't
@@ -394,8 +392,6 @@ static struct scsi_host_template driver_
.detect = t128_detect,
.release = t128_release,
.proc_name = "t128",
- .show_info = t128_show_info,
- .write_info = t128_write_info,
.info = t128_info,
.queuecommand = t128_queue_command,
.eh_abort_handler = t128_abort,
Index: linux/drivers/scsi/dmx3191d.c
===================================================================
--- linux.orig/drivers/scsi/dmx3191d.c 2016-03-14 15:26:22.000000000 +1100
+++ linux/drivers/scsi/dmx3191d.c 2016-03-14 15:26:29.000000000 +1100
@@ -39,6 +39,10 @@
#define NCR5380_read(reg) inb(instance->io_port + reg)
#define NCR5380_write(reg, value) outb(value, instance->io_port + reg)
+#define NCR5380_dma_xfer_len(instance, cmd, phase) (0)
+#define NCR5380_pread(instance, dst, len) (0)
+#define NCR5380_pwrite(instance, src, len) (0)
+
#define NCR5380_implementation_fields /* none */
#include "NCR5380.h"
Index: linux/drivers/scsi/dtc.h
===================================================================
--- linux.orig/drivers/scsi/dtc.h 2016-03-14 15:17:25.000000000 +1100
+++ linux/drivers/scsi/dtc.h 2016-03-14 15:26:29.000000000 +1100
@@ -27,8 +27,6 @@
#define NCR5380_abort dtc_abort
#define NCR5380_bus_reset dtc_bus_reset
#define NCR5380_info dtc_info
-#define NCR5380_show_info dtc_show_info
-#define NCR5380_write_info dtc_write_info
/* 15 12 11 10
1001 1100 0000 0000 */
Index: linux/drivers/scsi/g_NCR5380.h
===================================================================
--- linux.orig/drivers/scsi/g_NCR5380.h 2016-03-14 15:26:22.000000000 +1100
+++ linux/drivers/scsi/g_NCR5380.h 2016-03-14 15:26:29.000000000 +1100
@@ -70,7 +70,6 @@
#define NCR5380_pread generic_NCR5380_pread
#define NCR5380_pwrite generic_NCR5380_pwrite
#define NCR5380_info generic_NCR5380_info
-#define NCR5380_show_info generic_NCR5380_show_info
#define BOARD_NCR5380 0
#define BOARD_NCR53C400 1
Index: linux/drivers/scsi/pas16.h
===================================================================
--- linux.orig/drivers/scsi/pas16.h 2016-03-14 15:17:25.000000000 +1100
+++ linux/drivers/scsi/pas16.h 2016-03-14 15:26:29.000000000 +1100
@@ -109,8 +109,6 @@
#define NCR5380_abort pas16_abort
#define NCR5380_bus_reset pas16_bus_reset
#define NCR5380_info pas16_info
-#define NCR5380_show_info pas16_show_info
-#define NCR5380_write_info pas16_write_info
/* 15 14 12 10 7 5 3
1101 0100 1010 1000 */
Index: linux/drivers/scsi/t128.h
===================================================================
--- linux.orig/drivers/scsi/t128.h 2016-03-14 15:17:25.000000000 +1100
+++ linux/drivers/scsi/t128.h 2016-03-14 15:26:29.000000000 +1100
@@ -83,8 +83,6 @@
#define NCR5380_abort t128_abort
#define NCR5380_bus_reset t128_bus_reset
#define NCR5380_info t128_info
-#define NCR5380_show_info t128_show_info
-#define NCR5380_write_info t128_write_info
/* 15 14 12 10 7 5 3
1101 0100 1010 1000 */
next prev parent reply other threads:[~2016-03-14 4:27 UTC|newest]
Thread overview: 100+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 4:27 [PATCH 00/22] ncr5380: Eliminate macros, reduce code duplication, fix bugs etc Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 4:27 ` [PATCH 01/22] g_ncr5380: Remove CONFIG_SCSI_GENERIC_NCR53C400 Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:21 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 02/22] ncr5380: Remove FLAG_NO_PSEUDO_DMA where possible Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:21 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 03/22] ncr5380: Remove REAL_DMA and REAL_DMA_POLL macros Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:23 ` Hannes Reinecke
2016-03-14 7:23 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 04/22] atari_NCR5380: Remove DMA_MIN_SIZE macro Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:25 ` Hannes Reinecke
2016-03-14 7:25 ` Hannes Reinecke
2016-03-15 3:18 ` Finn Thain
2016-03-14 4:27 ` [PATCH 05/22] ncr5380: Disable the DMA errata workaround flag by default Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:26 ` Hannes Reinecke
2016-03-14 7:26 ` Hannes Reinecke
2016-03-14 7:26 ` Hannes Reinecke
2016-03-14 4:27 ` Finn Thain [this message]
2016-03-14 4:27 ` [PATCH 06/22] ncr5380: Remove PSEUDO_DMA macro Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:28 ` Hannes Reinecke
2016-03-14 7:28 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 07/22] ncr5380: Remove BOARD_REQUIRES_NO_DELAY macro Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:33 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 08/22] ncr5380: Use DMA hooks for PDMA Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:34 ` Hannes Reinecke
2016-03-14 7:34 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 09/22] ncr5380: Adopt uniform DMA setup convention Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:36 ` Hannes Reinecke
2016-03-14 7:36 ` Hannes Reinecke
2016-03-15 3:19 ` Finn Thain
2016-03-15 3:19 ` Finn Thain
2016-03-15 6:49 ` Hannes Reinecke
2016-03-15 6:49 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 10/22] ncr5380: Merge DMA implementation from atari_NCR5380 core driver Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:38 ` Hannes Reinecke
2016-03-14 7:38 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 11/22] atari_scsi: Adopt NCR5380.c " Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:39 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 12/22] sun3_scsi: " Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:40 ` Hannes Reinecke
2016-03-14 7:40 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 13/22] ncr5380: Remove disused atari_NCR5380.c " Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:42 ` Hannes Reinecke
2016-03-14 7:42 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 14/22] ncr5380: Add MAX_LUN limit Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:43 ` Hannes Reinecke
2016-03-14 7:51 ` Christoph Hellwig
2016-03-15 3:20 ` Finn Thain
2016-03-15 8:26 ` Christoph Hellwig
2016-03-14 4:27 ` [PATCH 15/22] dmx3191d: Drop max_sectors limit Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:43 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 16/22] ncr5380: Fix register decoding for debugging Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:46 ` Hannes Reinecke
2016-03-15 3:21 ` Finn Thain
2016-03-14 4:27 ` [PATCH 17/22] ncr5380: Remove remaining register storage qualifiers Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:46 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 18/22] ncr5380: Remove DONT_USE_INTR and AUTOPROBE_IRQ macros Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:47 ` Hannes Reinecke
2016-03-14 7:47 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 19/22] ncr5380: Update usage documentation Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:47 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 20/22] atari_scsi: Set a reasonable default for cmd_per_lun Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:49 ` Hannes Reinecke
2016-03-15 3:27 ` Finn Thain
2016-03-15 6:53 ` Hannes Reinecke
2016-03-15 8:27 ` Finn Thain
2016-03-15 14:34 ` James Bottomley
2016-03-14 4:27 ` [PATCH 21/22] atari_scsi: Allow can_queue to be increased for Falcon Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:58 ` Hannes Reinecke
2016-03-14 7:58 ` Hannes Reinecke
2016-03-14 4:27 ` [PATCH 22/22] mac_scsi: Fix pseudo DMA implementation Finn Thain
2016-03-14 4:27 ` Finn Thain
2016-03-14 7:59 ` Hannes Reinecke
2016-03-18 7:03 ` [PATCH 00/22] ncr5380: Eliminate macros, reduce code duplication, fix bugs etc Michael Schmitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160314042702.216030077@telegraphics.com.au \
--to=fthain@telegraphics.com.au \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linux@rainbow-software.org \
--cc=martin.petersen@oracle.com \
--cc=sammy@sammy.net \
--cc=schmitzmic@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.