All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: James.Bottomley@SteelEye.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [2.6 patch] removed useless SCSI_GENERIC_NCR5380_MMIO
Date: Sat, 12 Nov 2005 05:37:07 +0100	[thread overview]
Message-ID: <20051112043707.GX5376@stusta.de> (raw)

This patch removes the useless SCSI_GENERIC_NCR5380_MMIO.

It's useless, since SCSI_G_NCR5380_MEM != CONFIG_SCSI_G_NCR5380_MEM.

This issue exists at least since kernel 2.6.0 and since it seems noone 
noticed it I'd say we can safely remove it.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/scsi/Kconfig          |   14 -------------
 drivers/scsi/Makefile         |    1 
 drivers/scsi/g_NCR5380.c      |   36 ----------------------------------
 drivers/scsi/g_NCR5380.h      |   19 -----------------
 drivers/scsi/g_NCR5380_mmio.c |   10 ---------
 5 files changed, 80 deletions(-)

--- linux-2.6.14-mm2-full/drivers/scsi/Kconfig.old	2005-11-12 01:16:47.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/scsi/Kconfig	2005-11-12 01:17:05.000000000 +0100
@@ -846,20 +846,6 @@
 	  To compile this driver as a module, choose M here: the
 	  module will be called g_NCR5380.
 
-config SCSI_GENERIC_NCR5380_MMIO
-	tristate "Generic NCR5380/53c400 SCSI MMIO support"
-	depends on ISA && SCSI
-	---help---
-	  This is a driver for the old NCR 53c80 series of SCSI controllers
-	  on boards using memory mapped I/O. 
-	  It is explained in section 3.8 of the SCSI-HOWTO, available from
-	  <http://www.tldp.org/docs.html#howto>.  If it doesn't work out
-	  of the box, you may have to change some settings in
-	  <file:drivers/scsi/g_NCR5380.h>.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called g_NCR5380_mmio.
-
 config SCSI_GENERIC_NCR53C400
 	bool "Enable NCR53c400 extensions"
 	depends on SCSI_GENERIC_NCR5380
--- linux-2.6.14-mm2-full/drivers/scsi/Makefile.old	2005-11-12 01:17:15.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/scsi/Makefile	2005-11-12 01:17:21.000000000 +0100
@@ -74,7 +74,6 @@
 obj-$(CONFIG_SCSI_FUTURE_DOMAIN)+= fdomain.o
 obj-$(CONFIG_SCSI_IN2000)	+= in2000.o
 obj-$(CONFIG_SCSI_GENERIC_NCR5380) += g_NCR5380.o
-obj-$(CONFIG_SCSI_GENERIC_NCR5380_MMIO) += g_NCR5380_mmio.o
 obj-$(CONFIG_SCSI_NCR53C406A)	+= NCR53c406a.o
 obj-$(CONFIG_SCSI_NCR_D700)	+= 53c700.o NCR_D700.o
 obj-$(CONFIG_SCSI_NCR_Q720)	+= NCR_Q720_mod.o
--- linux-2.6.14-mm2-full/drivers/scsi/g_NCR5380.h.old	2005-11-12 01:17:34.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/scsi/g_NCR5380.h	2005-11-12 01:17:48.000000000 +0100
@@ -64,8 +64,6 @@
 #define __STRVAL(x) #x
 #define STRVAL(x) __STRVAL(x)
 
-#ifndef CONFIG_SCSI_G_NCR5380_MEM
-
 #define NCR5380_map_config port
 #define NCR5380_map_type int
 #define NCR5380_map_name port
@@ -82,23 +80,6 @@
 #define NCR5380_read(reg) (inb(NCR5380_map_name + (reg)))
 #define NCR5380_write(reg, value) (outb((value), (NCR5380_map_name + (reg))))
 
-#else 
-/* therefore CONFIG_SCSI_G_NCR5380_MEM */
-
-#define NCR5380_map_config memory
-#define NCR5380_map_type unsigned long
-#define NCR5380_map_name base
-#define NCR5380_instance_name base
-#define NCR53C400_register_offset 0x108
-#define NCR53C400_address_adjust 0
-#define NCR53C400_mem_base 0x3880
-#define NCR53C400_host_buffer 0x3900
-#define NCR5380_region_size 0x3a00
-
-#define NCR5380_read(reg) isa_readb(NCR5380_map_name + NCR53C400_mem_base + (reg))
-#define NCR5380_write(reg, value) isa_writeb(value, NCR5380_map_name + NCR53C400_mem_base + (reg))
-#endif
-
 #define NCR5380_implementation_fields \
     NCR5380_map_type NCR5380_map_name
 
--- linux-2.6.14-mm2-full/drivers/scsi/g_NCR5380.c.old	2005-11-12 01:17:57.000000000 +0100
+++ linux-2.6.14-mm2-full/drivers/scsi/g_NCR5380.c	2005-11-12 01:19:01.000000000 +0100
@@ -373,7 +373,6 @@
 			break;
 		}
 
-#ifndef CONFIG_SCSI_G_NCR5380_MEM
 		if (ports) {
 			/* wakeup sequence for the NCR53C400A and DTC3181E */
 
@@ -423,24 +422,14 @@
 				continue;
 			region_size = NCR5380_region_size;
 		}
-#else
-		if(!request_mem_region(overrides[current_override].NCR5380_map_name, NCR5380_region_size, "ncr5380"))
-			continue;
-#endif
 		instance = scsi_register(tpnt, sizeof(struct NCR5380_hostdata));
 		if (instance == NULL) {
-#ifndef CONFIG_SCSI_G_NCR5380_MEM
 			release_region(overrides[current_override].NCR5380_map_name, region_size);
-#else
-			release_mem_region(overrides[current_override].NCR5380_map_name, NCR5380_region_size);
-#endif
 			continue;
 		}
 
 		instance->NCR5380_instance_name = overrides[current_override].NCR5380_map_name;
-#ifndef CONFIG_SCSI_G_NCR5380_MEM
 		instance->n_io_port = region_size;
-#endif
 
 		NCR5380_init(instance, flags);
 
@@ -506,12 +495,7 @@
 		free_irq(instance->irq, NULL);
 	NCR5380_exit(instance);
 
-#ifndef CONFIG_SCSI_G_NCR5380_MEM
 	release_region(instance->NCR5380_instance_name, instance->n_io_port);
-#else
-	release_mem_region(instance->NCR5380_instance_name, NCR5380_region_size);
-#endif
-
 
 	return 0;
 }
@@ -578,16 +562,11 @@
 		}
 		while (NCR5380_read(C400_CONTROL_STATUS_REG) & CSR_HOST_BUF_NOT_RDY);
 
-#ifndef CONFIG_SCSI_G_NCR5380_MEM
 		{
 			int i;
 			for (i = 0; i < 128; i++)
 				dst[start + i] = NCR5380_read(C400_HOST_BUFFER);
 		}
-#else
-		/* implies CONFIG_SCSI_G_NCR5380_MEM */
-		isa_memcpy_fromio(dst + start, NCR53C400_host_buffer + NCR5380_map_name, 128);
-#endif
 		start += 128;
 		blocks--;
 	}
@@ -598,16 +577,11 @@
 			// FIXME - no timeout
 		}
 
-#ifndef CONFIG_SCSI_G_NCR5380_MEM
 		{
 			int i;	
 			for (i = 0; i < 128; i++)
 				dst[start + i] = NCR5380_read(C400_HOST_BUFFER);
 		}
-#else
-		/* implies CONFIG_SCSI_G_NCR5380_MEM */
-		isa_memcpy_fromio(dst + start, NCR53C400_host_buffer + NCR5380_map_name, 128);
-#endif
 		start += 128;
 		blocks--;
 	}
@@ -664,15 +638,10 @@
 		}
 		while (NCR5380_read(C400_CONTROL_STATUS_REG) & CSR_HOST_BUF_NOT_RDY)
 			; // FIXME - timeout
-#ifndef CONFIG_SCSI_G_NCR5380_MEM
 		{
 			for (i = 0; i < 128; i++)
 				NCR5380_write(C400_HOST_BUFFER, src[start + i]);
 		}
-#else
-		/* implies CONFIG_SCSI_G_NCR5380_MEM */
-		isa_memcpy_toio(NCR53C400_host_buffer + NCR5380_map_name, src + start, 128);
-#endif
 		start += 128;
 		blocks--;
 	}
@@ -680,15 +649,10 @@
 		while (NCR5380_read(C400_CONTROL_STATUS_REG) & CSR_HOST_BUF_NOT_RDY)
 			; // FIXME - no timeout
 
-#ifndef CONFIG_SCSI_G_NCR5380_MEM
 		{
 			for (i = 0; i < 128; i++)
 				NCR5380_write(C400_HOST_BUFFER, src[start + i]);
 		}
-#else
-		/* implies CONFIG_SCSI_G_NCR5380_MEM */
-		isa_memcpy_toio(NCR53C400_host_buffer + NCR5380_map_name, src + start, 128);
-#endif
 		start += 128;
 		blocks--;
 	}
--- linux-2.6.14-mm2-full/drivers/scsi/g_NCR5380_mmio.c	2005-10-28 02:02:08.000000000 +0200
+++ /dev/null	2005-11-08 19:07:57.000000000 +0100
@@ -1,10 +0,0 @@
-/*
- *	There is probably a nicer way to do this but this one makes
- *	pretty obvious what is happening. We rebuild the same file with
- *	different options for mmio versus pio.
- */
-
-#define SCSI_G_NCR5380_MEM
-
-#include "g_NCR5380.c"
-

             reply	other threads:[~2005-11-12  4:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-12  4:37 Adrian Bunk [this message]
2005-11-12  7:10 ` [2.6 patch] removed useless SCSI_GENERIC_NCR5380_MMIO Christoph Hellwig
2005-11-12 18:20 ` Alan Cox
2005-11-12 17:57   ` Adrian Bunk

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=20051112043707.GX5376@stusta.de \
    --to=bunk@stusta.de \
    --cc=James.Bottomley@SteelEye.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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.