|
From: Andy P. <at...@us...> - 2002-04-09 15:08:51
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi
In directory usw-pr-cvs1:/tmp/cvs-serv12544/acorn/scsi
Modified Files:
acornscsi.c acornscsi.h arxescsi.c cumana_1.c cumana_2.c
ecoscsi.c eesox.c fas216.c msgqueue.c oak.c powertec.c queue.c
Removed Files:
cumana_1.h cumana_2.h ecoscsi.h eesox.h oak.h powertec.h
Log Message:
synch 2.4.15 commit 16
Index: acornscsi.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/acornscsi.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- acornscsi.c 14 Jan 2001 18:58:50 -0000 1.1.1.1
+++ acornscsi.c 9 Apr 2002 14:00:57 -0000 1.2
@@ -144,6 +144,7 @@
#include <linux/ioport.h>
#include <linux/blk.h>
#include <linux/delay.h>
+#include <linux/init.h>
#include <asm/bitops.h>
#include <asm/system.h>
@@ -157,6 +158,8 @@
#include "acornscsi.h"
#include "msgqueue.h"
+#include <scsi/scsicam.h>
+
#define VER_MAJOR 2
#define VER_MINOR 0
#define VER_PATCH 6
@@ -206,24 +209,24 @@
static inline void
sbic_arm_write(unsigned int io_port, int reg, int value)
{
- outb_t(reg, io_port);
- outb_t(value, io_port + 4);
+ __raw_writeb(reg, io_port);
+ __raw_writeb(value, io_port + 4);
}
#define sbic_arm_writenext(io,val) \
- outb_t((val), (io) + 4)
+ __raw_writeb((val), (io) + 4)
static inline
int sbic_arm_read(unsigned int io_port, int reg)
{
if(reg == ASR)
- return inl_t(io_port) & 255;
- outb_t(reg, io_port);
- return inl_t(io_port + 4) & 255;
+ return __raw_readl(io_port) & 255;
+ __raw_writeb(reg, io_port);
+ return __raw_readl(io_port + 4) & 255;
}
#define sbic_arm_readnext(io) \
- inb_t((io) + 4)
+ __raw_readb((io) + 4)
#ifdef USE_DMAC
#define dmac_read(io_port,reg) \
@@ -1056,7 +1059,7 @@
/*
* Allocate some buffer space, limited to half the buffer size
*/
- length = min(host->scsi.SCp.this_residual, DMAC_BUFFER_SIZE / 2);
+ length = min_t(unsigned int, host->scsi.SCp.this_residual, DMAC_BUFFER_SIZE / 2);
if (length) {
host->dma.start_addr = address = host->dma.free_addr;
host->dma.free_addr = (host->dma.free_addr + length) &
@@ -1184,7 +1187,7 @@
/*
* Allocate some buffer space, limited to half the on-board RAM size
*/
- length = min(host->scsi.SCp.this_residual, DMAC_BUFFER_SIZE / 2);
+ length = min_t(unsigned int, host->scsi.SCp.this_residual, DMAC_BUFFER_SIZE / 2);
if (length) {
host->dma.start_addr = address = host->dma.free_addr;
host->dma.free_addr = (host->dma.free_addr + length) &
@@ -1248,7 +1251,7 @@
/*
* Function: void acornscsi_dma_adjust(AS_Host *host)
- * Purpose : adjust DMA pointers & count for bytes transfered to
+ * Purpose : adjust DMA pointers & count for bytes transferred to
* SBIC but not SCSI bus.
* Params : host - host to adjust DMA count for
*/
@@ -1653,8 +1656,8 @@
* to be in operation AFTER the target leaves message out phase.
*/
acornscsi_sbic_issuecmd(host, CMND_ASSERTATN);
- period = max(message[3], sdtr_period / 4);
- length = min(message[4], sdtr_size);
+ period = max_t(unsigned int, message[3], sdtr_period / 4);
+ length = min_t(unsigned int, message[4], sdtr_size);
msgqueue_addmsg(&host->scsi.msgs, 5, EXTENDED_MESSAGE, 3,
EXTENDED_SDTR, period, length);
host->device[host->SCpnt->target].sync_xfer =
@@ -2858,7 +2861,7 @@
* Params : host - host to setup
*/
static
-void acornscsi_init(AS_Host *host)
+void acornscsi_host_init(AS_Host *host)
{
memset(&host->stats, 0, sizeof (host->stats));
queue_initialise(&host->queues.issue);
@@ -2926,7 +2929,7 @@
host->scsi.irq = NO_IRQ;
}
- acornscsi_init(host);
+ acornscsi_host_init(host);
++count;
}
@@ -3118,9 +3121,45 @@
return pos;
}
-#ifdef MODULE
+static Scsi_Host_Template acornscsi_template = {
+ module: THIS_MODULE,
+ proc_info: acornscsi_proc_info,
+ name: "AcornSCSI",
+ detect: acornscsi_detect,
+ release: acornscsi_release,
+ info: acornscsi_info,
+ queuecommand: acornscsi_queuecmd,
+ abort: acornscsi_abort,
+ reset: acornscsi_reset,
+ bios_param: scsicam_bios_param,
+ can_queue: 16,
+ this_id: 7,
+ sg_tablesize: SG_ALL,
+ cmd_per_lun: 2,
+ unchecked_isa_dma: 0,
+ use_clustering: DISABLE_CLUSTERING
+};
-Scsi_Host_Template driver_template = ACORNSCSI_3;
+static int __init acornscsi_init(void)
+{
+ acornscsi_template.module = THIS_MODULE;
+ scsi_register_module(MODULE_SCSI_HA, &acornscsi_template);
+ if (acornscsi_template.present)
+ return 0;
-#include "../../scsi/scsi_module.c"
-#endif
+ scsi_unregister_module(MODULE_SCSI_HA, &acornscsi_template);
+ return -ENODEV;
+}
+
+static void __exit acornscsi_exit(void)
+{
+ scsi_unregister_module(MODULE_SCSI_HA, &acornscsi_template);
+}
+
+module_init(acornscsi_init);
+module_exit(acornscsi_exit);
+
+MODULE_AUTHOR("Russell King");
+MODULE_DESCRIPTION("AcornSCSI driver");
+MODULE_LICENSE("GPL");
+EXPORT_NO_SYMBOLS;
Index: acornscsi.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/acornscsi.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- acornscsi.h 14 Jan 2001 18:58:52 -0000 1.1.1.1
+++ acornscsi.h 9 Apr 2002 14:00:58 -0000 1.2
@@ -12,52 +12,6 @@
#ifndef ACORNSCSI_H
#define ACORNSCSI_H
-#ifndef ASM
-extern int acornscsi_detect (Scsi_Host_Template *);
-extern int acornscsi_release (struct Scsi_Host *);
-extern const char *acornscsi_info (struct Scsi_Host *);
-extern int acornscsi_queuecmd (Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-extern int acornscsi_abort (Scsi_Cmnd *);
-extern int acornscsi_reset (Scsi_Cmnd *, unsigned int);
-extern int acornscsi_proc_info (char *, char **, off_t, int, int, int);
-extern int acornscsi_biosparam (Disk *, kdev_t, int []);
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef CMD_PER_LUN
-#define CMD_PER_LUN 2
-#endif
-
-#ifndef CAN_QUEUE
-#define CAN_QUEUE 16
-#endif
-
-#include "linux/proc_fs.h"
-
-#include <scsi/scsicam.h>
-
-#define ACORNSCSI_3 { \
-proc_info: acornscsi_proc_info, \
-name: "AcornSCSI", \
-detect: acornscsi_detect, \
-release: acornscsi_release, /* Release */ \
-info: acornscsi_info, \
-queuecommand: acornscsi_queuecmd, \
-abort: acornscsi_abort, \
-reset: acornscsi_reset, \
-bios_param: scsicam_bios_param, \
-can_queue: CAN_QUEUE, /* can_queue */ \
-this_id: 7, /* this id */ \
-sg_tablesize: SG_ALL, /* sg_tablesize */ \
-cmd_per_lun: CMD_PER_LUN, /* cmd_per_lun */ \
-unchecked_isa_dma: 0, /* unchecked isa dma */ \
-use_clustering: DISABLE_CLUSTERING \
- }
-
-#ifndef HOSTS_C
-
/* SBIC registers */
#define OWNID 0
#define OWNID_FS1 (1<<7)
@@ -229,9 +183,6 @@
#define MASK_ON (MASKREG_M3|MASKREG_M2|MASKREG_M1|MASKREG_M0)
#define MASK_OFF (MASKREG_M3|MASKREG_M2|MASKREG_M1)
-#define min(x,y) ((x) < (y) ? (x) : (y))
-#define max(x,y) ((x) < (y) ? (y) : (x))
-
/*
* SCSI driver phases
*/
@@ -405,7 +356,4 @@
struct status_entry status[9][STATUS_BUFFER_SIZE];
} AS_Host;
-#endif /* ndef HOSTS_C */
-
-#endif /* ndef ASM */
#endif /* ACORNSCSI_H */
Index: arxescsi.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/arxescsi.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- arxescsi.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ arxescsi.c 9 Apr 2002 14:00:58 -0000 1.2
@@ -439,3 +439,7 @@
module_init(init_arxe_scsi_driver);
module_exit(exit_arxe_scsi_driver);
+MODULE_AUTHOR("Stefan Hanske");
+MODULE_DESCRIPTION("ARXESCSI driver for Acorn machines");
+MODULE_LICENSE("GPL");
+EXPORT_NO_SYMBOLS;
Index: cumana_1.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/cumana_1.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- cumana_1.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ cumana_1.c 9 Apr 2002 14:00:58 -0000 1.2
@@ -34,8 +34,8 @@
/*
* $Log$
- * Revision 1.1.1.2 2001/02/25 23:15:12 kenn
- * Import official 2.4.2 Linus tree
+ * Revision 1.2 2002/04/09 14:00:58 atp
+ * synch 2.4.15 commit 16
*
* Revision 1.3 1998/05/03 20:45:32 alan
* ARM SCSI update. This adds the eesox driver and massively updates the
@@ -427,3 +427,6 @@
module_init(cumanascsi_init);
module_exit(cumanascsi_exit);
+
+MODULE_LICENSE("GPL");
+EXPORT_NO_SYMBOLS;
Index: cumana_2.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/cumana_2.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- cumana_2.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ cumana_2.c 9 Apr 2002 14:00:58 -0000 1.2
@@ -82,15 +82,10 @@
static struct expansion_card *ecs[MAX_ECARDS];
-MODULE_AUTHOR("Russell King");
-MODULE_DESCRIPTION("Cumana SCSI II driver");
-MODULE_PARM(term, "1-8i");
-MODULE_PARM_DESC(term, "SCSI bus termination");
-
/*
* Use term=0,1,0,0,0 to turn terminators on/off
*/
-int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
+static int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
#define NR_SG 256
@@ -200,6 +195,7 @@
memcpy(info->sg + 1, SCp->buffer + 1,
sizeof(struct scatterlist) * bufs);
info->sg[0].address = SCp->ptr;
+ info->sg[0].page = NULL;
info->sg[0].length = SCp->this_residual;
if (direction == DMA_OUT)
@@ -599,3 +595,10 @@
module_init(cumanascsi2_init);
module_exit(cumanascsi2_exit);
+
+MODULE_AUTHOR("Russell King");
+MODULE_DESCRIPTION("Cumana SCSI-2 driver for Acorn machines");
+MODULE_PARM(term, "1-8i");
+MODULE_PARM_DESC(term, "SCSI bus termination");
+MODULE_LICENSE("GPL");
+EXPORT_NO_SYMBOLS;
Index: ecoscsi.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/ecoscsi.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- ecoscsi.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ ecoscsi.c 9 Apr 2002 14:00:58 -0000 1.2
@@ -33,8 +33,8 @@
/*
* $Log$
- * Revision 1.1.1.2 2001/02/25 23:15:12 kenn
- * Import official 2.4.2 Linus tree
+ * Revision 1.2 2002/04/09 14:00:58 atp
+ * synch 2.4.15 commit 16
*
* Revision 1.2 1998/03/08 05:49:47 davem
* Merge to 2.1.89
@@ -235,7 +235,6 @@
#endif
#undef STAT
-#ifndef HOSTS_C
#define NCR5380_implementation_fields \
int port, ctrl
@@ -295,3 +294,8 @@
module_init(ecoscsi_init);
module_exit(ecoscsi_exit);
+
+MODULE_AUTHOR("Russell King");
+MODULE_DESCRIPTION("Econet-SCSI driver for Acorn machines");
+MODULE_LICENSE("GPL");
+EXPORT_NO_SYMBOLS;
Index: eesox.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/eesox.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- eesox.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ eesox.c 9 Apr 2002 14:00:58 -0000 1.2
@@ -80,15 +80,10 @@
static struct expansion_card *ecs[MAX_ECARDS];
-MODULE_AUTHOR("Russell King");
-MODULE_DESCRIPTION("EESOX SCSI driver");
-MODULE_PARM(term, "1-8i");
-MODULE_PARM_DESC(term, "SCSI bus termination");
-
/*
* Use term=0,1,0,0,0 to turn terminators on/off
*/
-int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
+static int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
#define NR_SG 256
@@ -204,7 +199,8 @@
memcpy(info->sg + 1, SCp->buffer + 1,
sizeof(struct scatterlist) * bufs);
info->sg[0].address = SCp->ptr;
- info->sg[0].length = SCp->this_residual;
+ info->sg[0].page = NULL;
+ info->sg[0].length = SCp->this_residual;
if (direction == DMA_OUT)
pci_dir = PCI_DMA_TODEVICE,
@@ -602,3 +598,9 @@
module_init(eesox_init);
module_exit(eesox_exit);
+MODULE_AUTHOR("Russell King");
+MODULE_DESCRIPTION("EESOX 'Fast' SCSI driver for Acorn machines");
+MODULE_PARM(term, "1-8i");
+MODULE_PARM_DESC(term, "SCSI bus termination");
+MODULE_LICENSE("GPL");
+EXPORT_NO_SYMBOLS;
Index: fas216.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/fas216.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- fas216.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ fas216.c 9 Apr 2002 14:00:58 -0000 1.2
@@ -60,9 +60,6 @@
#include "../../scsi/hosts.h"
#include "fas216.h"
-MODULE_AUTHOR("Russell King");
-MODULE_DESCRIPTION("Generic FAS216/NCR53C9x driver");
-
#define VER_MAJOR 0
#define VER_MINOR 0
#define VER_PATCH 5
@@ -2767,13 +2764,6 @@
EXPORT_SYMBOL(fas216_print_stats);
EXPORT_SYMBOL(fas216_print_device);
-#ifdef MODULE
-int __init init_module(void)
-{
- return 0;
-}
-
-void __exit cleanup_module(void)
-{
-}
-#endif
+MODULE_AUTHOR("Russell King");
+MODULE_DESCRIPTION("Generic FAS216/NCR53C9x driver core");
+MODULE_LICENSE("GPL");
Index: msgqueue.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/msgqueue.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- msgqueue.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ msgqueue.c 9 Apr 2002 14:00:58 -0000 1.2
@@ -16,9 +16,6 @@
#include "msgqueue.h"
-MODULE_AUTHOR("Russell King");
-MODULE_DESCRIPTION("SCSI message queue handling");
-
/*
* Function: struct msgqueue_entry *mqe_alloc(MsgQueue_t *msgq)
* Purpose : Allocate a message queue entry
@@ -169,13 +166,6 @@
EXPORT_SYMBOL(msgqueue_addmsg);
EXPORT_SYMBOL(msgqueue_flush);
-#ifdef MODULE
-int __init init_module(void)
-{
- return 0;
-}
-
-void __exit cleanup_module(void)
-{
-}
-#endif
+MODULE_AUTHOR("Russell King");
+MODULE_DESCRIPTION("SCSI message queue handling");
+MODULE_LICENSE("GPL");
Index: oak.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/oak.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- oak.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ oak.c 9 Apr 2002 14:00:58 -0000 1.2
@@ -33,8 +33,8 @@
/*
* $Log$
- * Revision 1.1.1.2 2001/02/25 23:15:12 kenn
- * Import official 2.4.2 Linus tree
+ * Revision 1.2 2002/04/09 14:00:58 atp
+ * synch 2.4.15 commit 16
*
* Revision 1.3 1998/05/03 20:45:37 alan
* ARM SCSI update. This adds the eesox driver and massively updates the
@@ -288,3 +288,8 @@
module_init(oakscsi_init);
module_exit(oakscsi_exit);
+
+MODULE_AUTHOR("Russell King");
+MODULE_DESCRIPTION("Oak SCSI driver");
+MODULE_LICENSE("GPL");
+EXPORT_NO_SYMBOLS;
Index: powertec.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/powertec.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- powertec.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ powertec.c 9 Apr 2002 14:00:58 -0000 1.2
@@ -77,17 +77,12 @@
#define VER_MINOR 0
#define VER_PATCH 5
-MODULE_AUTHOR("Russell King");
-MODULE_DESCRIPTION("Powertec SCSI driver");
-MODULE_PARM(term, "1-8i");
-MODULE_PARM_DESC(term, "SCSI bus termination");
-
static struct expansion_card *ecs[MAX_ECARDS];
/*
* Use term=0,1,0,0,0 to turn terminators on/off
*/
-int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
+static int term[MAX_ECARDS] = { 1, 1, 1, 1, 1, 1, 1, 1 };
#define NR_SG 256
@@ -192,7 +187,8 @@
memcpy(info->sg + 1, SCp->buffer + 1,
sizeof(struct scatterlist) * bufs);
info->sg[0].address = SCp->ptr;
- info->sg[0].length = SCp->this_residual;
+ info->sg[0].page = NULL;
+ info->sg[0].length = SCp->this_residual;
if (direction == DMA_OUT)
pci_dir = PCI_DMA_TODEVICE,
@@ -501,3 +497,10 @@
module_init(powertecscsi_init);
module_exit(powertecscsi_exit);
+
+MODULE_AUTHOR("Russell King");
+MODULE_DESCRIPTION("Powertec SCSI driver");
+MODULE_PARM(term, "1-8i");
+MODULE_PARM_DESC(term, "SCSI bus termination");
+MODULE_LICENSE("GPL");
+EXPORT_NO_SYMBOLS;
Index: queue.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acorn/scsi/queue.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- queue.c 25 Feb 2001 23:15:12 -0000 1.1.1.2
+++ queue.c 9 Apr 2002 14:00:58 -0000 1.2
@@ -25,9 +25,6 @@
#include "../../scsi/scsi.h"
-MODULE_AUTHOR("Russell King");
-MODULE_DESCRIPTION("SCSI command queueing");
-
#define DEBUG
typedef struct queue_entry {
@@ -295,13 +292,6 @@
EXPORT_SYMBOL(queue_remove_cmd);
EXPORT_SYMBOL(queue_probetgtlun);
-#ifdef MODULE
-int __init init_module (void)
-{
- return 0;
-}
-
-void __exit cleanup_module (void)
-{
-}
-#endif
+MODULE_AUTHOR("Russell King");
+MODULE_DESCRIPTION("SCSI command queueing");
+MODULE_LICENSE("GPL");
--- cumana_1.h DELETED ---
--- cumana_2.h DELETED ---
--- ecoscsi.h DELETED ---
--- eesox.h DELETED ---
--- oak.h DELETED ---
--- powertec.h DELETED ---
|