summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorAlfred M. Szmidt <ams@gnu.org>2005-06-02 18:52:39 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:15:26 +0200
commit8a6f23293ca4540950eb523d9ff9727ca92241cd (patch)
treeb421c6eeeb5710beec5b6568c40d7a036128a535 /linux
parente84cb79bec1f5cfa976558bbc9c155b8b82a1b45 (diff)
2005-05-28 Alfred M. Szmidt <ams@gnu.org>
* linux/src/drivers/scsi/u14-34f.c (ihdlr): Silence gcc 4.x errors. * linux/src/drivers/scsi/qlogicisp.h: Likewise. * linux/src/drivers/scsi/advansys.c: Likewise. (advansys_reset, advansys_interrupt, asc_scsi_done_list, (asc_enqueue, asc_dequeue, asc_dequeue_list, asc_rmqueue, (asc_isqueued): Likewise. * linux/src/drivers/scsi/53c78xx.c (NCR53c7xx_queue_command): Likewise. * linux/src/drivers/net/ne2k-pci.c (ne_block_input) (ne_block_output): Likewise. * linux/src/drivers/net/hp100.c (__initfunc): Likewise. * linux/src/drivers/net/3c507.c (el16_interrupt): Likewise. * linux/dev/drivers/scsi/seagate.c (seagate_st0x_queue_command): Likewise.
Diffstat (limited to 'linux')
-rw-r--r--linux/dev/drivers/scsi/seagate.c2
-rw-r--r--linux/src/drivers/net/3c507.c3
-rw-r--r--linux/src/drivers/net/hp100.c5
-rw-r--r--linux/src/drivers/net/ne2k-pci.c8
-rw-r--r--linux/src/drivers/scsi/53c78xx.c2
-rw-r--r--linux/src/drivers/scsi/advansys.c62
-rw-r--r--linux/src/drivers/scsi/qlogicisp.h50
-rw-r--r--linux/src/drivers/scsi/u14-34f.c3
8 files changed, 95 insertions, 40 deletions
diff --git a/linux/dev/drivers/scsi/seagate.c b/linux/dev/drivers/scsi/seagate.c
index c7321ea..3dd8f9d 100644
--- a/linux/dev/drivers/scsi/seagate.c
+++ b/linux/dev/drivers/scsi/seagate.c
@@ -565,7 +565,7 @@ int seagate_st0x_queue_command (Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
done_fn = done;
current_target = SCpnt->target;
current_lun = SCpnt->lun;
- (const void *) current_cmnd = SCpnt->cmnd;
+ current_cmnd = SCpnt->cmnd;
current_data = (unsigned char *) SCpnt->request_buffer;
current_bufflen = SCpnt->request_bufflen;
SCint = SCpnt;
diff --git a/linux/src/drivers/net/3c507.c b/linux/src/drivers/net/3c507.c
index 6005487..63f85a4 100644
--- a/linux/src/drivers/net/3c507.c
+++ b/linux/src/drivers/net/3c507.c
@@ -71,6 +71,8 @@ static unsigned int net_debug = NET_DEBUG;
static unsigned int netcard_portlist[] =
{ 0x300, 0x320, 0x340, 0x280, 0};
+static void init_rx_bufs(struct device *dev);
+
/*
Details of the i82586.
@@ -589,7 +591,6 @@ el16_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
if ((status & 0x0070) != 0x0040 && dev->start) {
- static void init_rx_bufs(struct device *);
/* The Rx unit is not ready, it must be hung. Restart the receiver by
initializing the rx buffers, and issuing an Rx start command. */
if (net_debug)
diff --git a/linux/src/drivers/net/hp100.c b/linux/src/drivers/net/hp100.c
index 2e4f804..0b86ef4 100644
--- a/linux/src/drivers/net/hp100.c
+++ b/linux/src/drivers/net/hp100.c
@@ -2,7 +2,7 @@
** hp100.c
** HP CASCADE Architecture Driver for 100VG-AnyLan Network Adapters
**
-** $Id: hp100.c,v 1.1 1999/04/26 05:52:18 tb Exp $
+** $Id: hp100.c,v 1.1.4.1 2005/06/02 18:52:39 ams Exp $
**
** Based on the HP100 driver written by Jaroslav Kysela <perex@jcu.cz>
** Extended for new busmaster capable chipsets by
@@ -648,8 +648,7 @@ __initfunc(static int hp100_probe1( struct device *dev, int ioaddr, u_char bus,
{
mem_ptr_phys = (u_int *)( hp100_inw( MEM_MAP_LSW ) |
( hp100_inw( MEM_MAP_MSW ) << 16 ) );
- (u_int)mem_ptr_phys &= ~0x1fff; /* 8k alignment */
-
+ mem_ptr_phys = (u_int *) ((u_int) mem_ptr_phys & ~0x1fff); /* 8k alignment */
if ( bus == HP100_BUS_ISA && ( (u_long)mem_ptr_phys & ~0xfffff ) != 0 )
{
printk("hp100: %s: Can only use programmed i/o mode.\n", dev->name);
diff --git a/linux/src/drivers/net/ne2k-pci.c b/linux/src/drivers/net/ne2k-pci.c
index 3aa556f..bdc3e74 100644
--- a/linux/src/drivers/net/ne2k-pci.c
+++ b/linux/src/drivers/net/ne2k-pci.c
@@ -542,7 +542,10 @@ ne_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offs
if (count & 3) {
buf += count & ~3;
if (count & 2)
- *((u16*)buf)++ = inw(NE_BASE + NE_DATAPORT);
+ {
+ *buf = *(u16 *) buf + 1;
+ *buf = inw(NE_BASE + NE_DATAPORT);
+ }
if (count & 1)
*buf = inb(NE_BASE + NE_DATAPORT);
}
@@ -605,7 +608,8 @@ ne_block_output(struct device *dev, int count,
if (count & 3) {
buf += count & ~3;
if (count & 2)
- outw(*((u16*)buf)++, NE_BASE + NE_DATAPORT);
+ outw(*buf++, NE_BASE + NE_DATAPORT);
+
}
#else
outsw(NE_BASE + NE_DATAPORT, buf, count>>1);
diff --git a/linux/src/drivers/scsi/53c78xx.c b/linux/src/drivers/scsi/53c78xx.c
index 8925ee5..e6a66ff 100644
--- a/linux/src/drivers/scsi/53c78xx.c
+++ b/linux/src/drivers/scsi/53c78xx.c
@@ -3918,7 +3918,7 @@ NCR53c7xx_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *)) {
restore_flags (flags);
cmd->result = 0xffff; /* The NCR will overwrite message
and status with valid data */
- cmd->host_scribble = (unsigned char *) tmp = create_cmd (cmd);
+ cmd->host_scribble = (unsigned char *) (tmp = create_cmd (cmd));
}
cli();
/*
diff --git a/linux/src/drivers/scsi/advansys.c b/linux/src/drivers/scsi/advansys.c
index 5b7b4e0..05cd0f6 100644
--- a/linux/src/drivers/scsi/advansys.c
+++ b/linux/src/drivers/scsi/advansys.c
@@ -1,4 +1,4 @@
-/* $Id: advansys.c,v 1.1 1999/04/26 05:54:04 tb Exp $ */
+/* $Id: advansys.c,v 1.1.4.1 2005/06/02 18:52:38 ams Exp $ */
#define ASC_VERSION "3.1E" /* AdvanSys Driver Version */
/*
@@ -3136,7 +3136,7 @@ typedef int (* ADV_SBRESET_CALLBACK)
/*
* Default EEPROM Configuration structure defined in a_init.c.
*/
-extern ADVEEP_CONFIG Default_EEPROM_Config;
+STATIC ADVEEP_CONFIG Default_EEPROM_Config;
/*
* DvcGetPhyAddr() flag arguments
@@ -3256,7 +3256,7 @@ Forced Error: Driver must define ADV_MAX_SG_LIST.
* REQTIMESTAMP() - system time stamp value
*/
typedef Scsi_Cmnd REQ, *REQP;
-#define REQPNEXT(reqp) ((REQP) ((reqp)->host_scribble))
+#define REQPNEXT(reqp) ((reqp)->host_scribble)
#define REQPNEXTP(reqp) ((REQP *) &((reqp)->host_scribble))
#define REQPTID(reqp) ((reqp)->target)
#define REQPTIME(reqp) ((reqp)->SCp.this_residual)
@@ -6015,16 +6015,19 @@ advansys_reset(Scsi_Cmnd *scp, unsigned int reset_flags)
*/
if (done_scp == NULL) {
done_scp = asc_dequeue_list(&boardp->active, &last_scp, target);
- for (tscp = done_scp; tscp; tscp = REQPNEXT(tscp)) {
+ for (tscp = done_scp; tscp; tscp = (REQP) REQPNEXT(tscp)) {
tscp->result = HOST_BYTE(DID_RESET);
}
} else {
ASC_ASSERT(last_scp != NULL);
- REQPNEXT(last_scp) = asc_dequeue_list(&boardp->active,
- &new_last_scp, target);
- if (new_last_scp != NULL) {
- ASC_ASSERT(REQPNEXT(last_scp) != NULL);
- for (tscp = REQPNEXT(last_scp); tscp; tscp = REQPNEXT(tscp)) {
+ REQPNEXT(last_scp) =
+ (unsigned char *) asc_dequeue_list(&boardp->active,
+ &new_last_scp, target);
+ if (new_last_scp != (Scsi_Cmnd *) NULL) {
+ ASC_ASSERT((REQP) REQPNEXT(last_scp) != NULL);
+ for (tscp = (Scsi_Cmnd *) REQPNEXT(last_scp);
+ tscp;
+ tscp = (Scsi_Cmnd *) REQPNEXT(tscp)) {
tscp->result = HOST_BYTE(DID_RESET);
}
last_scp = new_last_scp;
@@ -6037,16 +6040,19 @@ advansys_reset(Scsi_Cmnd *scp, unsigned int reset_flags)
*/
if (done_scp == NULL) {
done_scp = asc_dequeue_list(&boardp->waiting, &last_scp, target);
- for (tscp = done_scp; tscp; tscp = REQPNEXT(tscp)) {
+ for (tscp = done_scp; tscp; tscp = (REQP) REQPNEXT(tscp)) {
tscp->result = HOST_BYTE(DID_RESET);
}
} else {
ASC_ASSERT(last_scp != NULL);
- REQPNEXT(last_scp) = asc_dequeue_list(&boardp->waiting,
- &new_last_scp, target);
+ REQPNEXT(last_scp) =
+ (unsigned char *) asc_dequeue_list(&boardp->waiting,
+ &new_last_scp, target);
if (new_last_scp != NULL) {
- ASC_ASSERT(REQPNEXT(last_scp) != NULL);
- for (tscp = REQPNEXT(last_scp); tscp; tscp = REQPNEXT(tscp)) {
+ ASC_ASSERT((REQP) REQPNEXT(last_scp) != NULL);
+ for (tscp = (REQP) REQPNEXT(last_scp);
+ tscp;
+ tscp = (REQP) REQPNEXT(tscp)) {
tscp->result = HOST_BYTE(DID_RESET);
}
last_scp = new_last_scp;
@@ -6342,8 +6348,10 @@ advansys_interrupt(int irq, void *dev_id, struct pt_regs *regs)
ASC_TID_ALL);
} else {
ASC_ASSERT(last_scp != NULL);
- REQPNEXT(last_scp) = asc_dequeue_list(&boardp->done,
- &new_last_scp, ASC_TID_ALL);
+ REQPNEXT(last_scp) =
+ (unsigned char *) asc_dequeue_list(&boardp->done,
+ &new_last_scp,
+ ASC_TID_ALL);
if (new_last_scp != NULL) {
ASC_ASSERT(REQPNEXT(last_scp) != NULL);
last_scp = new_last_scp;
@@ -6441,7 +6449,7 @@ asc_scsi_done_list(Scsi_Cmnd *scp)
ASC_DBG(2, "asc_scsi_done_list: begin\n");
while (scp != NULL) {
ASC_DBG1(3, "asc_scsi_done_list: scp %x\n", (unsigned) scp);
- tscp = REQPNEXT(scp);
+ tscp = (REQP) REQPNEXT(scp);
REQPNEXT(scp) = NULL;
ASC_STATS(scp->host, done);
ASC_ASSERT(scp->scsi_done != NULL);
@@ -7874,7 +7882,7 @@ asc_enqueue(asc_queue_t *ascq, REQP reqp, int flag)
tid = REQPTID(reqp);
ASC_ASSERT(tid >= 0 && tid <= ADV_MAX_TID);
if (flag == ASC_FRONT) {
- REQPNEXT(reqp) = ascq->q_first[tid];
+ REQPNEXT(reqp) = (unsigned char *) ascq->q_first[tid];
ascq->q_first[tid] = reqp;
/* If the queue was empty, set the last pointer. */
if (ascq->q_last[tid] == NULL) {
@@ -7882,7 +7890,7 @@ asc_enqueue(asc_queue_t *ascq, REQP reqp, int flag)
}
} else { /* ASC_BACK */
if (ascq->q_last[tid] != NULL) {
- REQPNEXT(ascq->q_last[tid]) = reqp;
+ REQPNEXT(ascq->q_last[tid]) = (unsigned char *) reqp;
}
ascq->q_last[tid] = reqp;
REQPNEXT(reqp) = NULL;
@@ -7925,7 +7933,7 @@ asc_dequeue(asc_queue_t *ascq, int tid)
ASC_ASSERT(tid >= 0 && tid <= ADV_MAX_TID);
if ((reqp = ascq->q_first[tid]) != NULL) {
ASC_ASSERT(ascq->q_tidmask & ADV_TID_TO_TIDMASK(tid));
- ascq->q_first[tid] = REQPNEXT(reqp);
+ ascq->q_first[tid] = (REQP) REQPNEXT(reqp);
/* If the queue is empty, clear its bit and the last pointer. */
if (ascq->q_first[tid] == NULL) {
ascq->q_tidmask &= ~ADV_TID_TO_TIDMASK(tid);
@@ -7992,7 +8000,7 @@ asc_dequeue_list(asc_queue_t *ascq, REQP *lastpp, int tid)
{
REQP reqp;
ascq->q_cur_cnt[tid] = 0;
- for (reqp = firstp; reqp; reqp = REQPNEXT(reqp)) {
+ for (reqp = firstp; reqp; reqp = (REQP) REQPNEXT(reqp)) {
REQTIMESTAT("asc_dequeue_list", ascq, reqp, tid);
}
}
@@ -8008,7 +8016,7 @@ asc_dequeue_list(asc_queue_t *ascq, REQP *lastpp, int tid)
lastp = ascq->q_last[i];
} else {
ASC_ASSERT(lastp != NULL);
- REQPNEXT(lastp) = ascq->q_first[i];
+ REQPNEXT(lastp) = (unsigned char *) ascq->q_first[i];
lastp = ascq->q_last[i];
}
ascq->q_first[i] = ascq->q_last[i] = NULL;
@@ -8021,7 +8029,7 @@ asc_dequeue_list(asc_queue_t *ascq, REQP *lastpp, int tid)
#ifdef ADVANSYS_STATS
{
REQP reqp;
- for (reqp = firstp; reqp; reqp = REQPNEXT(reqp)) {
+ for (reqp = firstp; reqp; reqp = (REQP) REQPNEXT(reqp)) {
REQTIMESTAT("asc_dequeue_list", ascq, reqp, reqp->target);
}
}
@@ -8065,7 +8073,7 @@ asc_rmqueue(asc_queue_t *ascq, REQP reqp)
*/
if (reqp == ascq->q_first[tid]) {
ret = ASC_TRUE;
- ascq->q_first[tid] = REQPNEXT(reqp);
+ ascq->q_first[tid] = (REQP) REQPNEXT(reqp);
/* If the queue is now empty, clear its bit and the last pointer. */
if (ascq->q_first[tid] == NULL) {
ascq->q_tidmask &= ~ADV_TID_TO_TIDMASK(tid);
@@ -8083,8 +8091,8 @@ asc_rmqueue(asc_queue_t *ascq, REQP reqp)
* Set 'prevp' to the first entry, 'currp' to the second entry,
* and search for 'reqp'.
*/
- for (prevp = ascq->q_first[tid], currp = REQPNEXT(prevp);
- currp; prevp = currp, currp = REQPNEXT(currp)) {
+ for (prevp = ascq->q_first[tid], currp = (REQP) REQPNEXT(prevp);
+ currp; prevp = currp, currp = (REQP) REQPNEXT(currp)) {
if (currp == reqp) {
ret = ASC_TRUE;
REQPNEXT(prevp) = REQPNEXT(currp);
@@ -8127,7 +8135,7 @@ asc_isqueued(asc_queue_t *ascq, REQP reqp)
tid = REQPTID(reqp);
ASC_ASSERT(tid >= 0 && tid <= ADV_MAX_TID);
- for (treqp = ascq->q_first[tid]; treqp; treqp = REQPNEXT(treqp)) {
+ for (treqp = ascq->q_first[tid]; treqp; treqp = (REQP) REQPNEXT(treqp)) {
ASC_ASSERT(ascq->q_tidmask & ADV_TID_TO_TIDMASK(tid));
if (treqp == reqp) {
ret = ASC_TRUE;
diff --git a/linux/src/drivers/scsi/qlogicisp.h b/linux/src/drivers/scsi/qlogicisp.h
index e5da4a2..c34fdf5 100644
--- a/linux/src/drivers/scsi/qlogicisp.h
+++ b/linux/src/drivers/scsi/qlogicisp.h
@@ -17,10 +17,52 @@
/* Renamed and updated to 1.3.x by Michael Griffith <grif@cs.ucr.edu> */
/*
- * $Date: 1999/04/26 05:54:53 $
- * $Revision: 1.1 $
+ * $Date: 2005/06/02 18:52:38 $
+ * $Revision: 1.1.4.1 $
+ *
+ * $Log: qlogicisp.h,v $
+ * Revision 1.1 1999/04/26 05:54:53 tb
+ * 1998-11-30 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
+ *
+ * Clean up linux emulation code to make it architecture-independent
+ * as much as possible.
+ *
+ * * linux: Renamed from linuxdev.
+ * * Makefile.in (objfiles): Add linux.o instead of linuxdev.o.
+ * (MAKE): New variable. Used for the linux.o target.
+ * * configure.in: Add AC_CHECK_TOOL(MAKE, make).
+ * * i386/i386/spl.h: Include <i386/ipl.h>, for compatibility with
+ * OSF Mach 3.0. Suggested by Elgin Lee <ehl@funghi.com>.
+ * * linux/src: Renamed from linux/linux.
+ * * linux/dev: Renamed from linux/mach.
+ * * linux/Drivers.in (AC_INIT): Use dev/include/linux/autoconf.h,
+ * instead of mach/include/linux/autoconf.h.
+ * * Makefile.in (all): Target ../linux.o instead of ../linuxdev.o.
+ * * linux/dev/drivers/block/genhd.c: Include <machine/spl.h> instead
+ * of <i386/ipl.h>.
+ * * linux/dev/drivers/net/auto_irq.c: Remove unneeded header files,
+ * <i386/ipl.h> and <i386/pic.h>.
+ * * linux/dev/init/main.c: Many i386-dependent codes moved to ...
+ * * linux/dev/arch/i386/irq.c: ... here.
+ * * linux/dev/arch/i386/setup.c: New file.
+ * * linux/dev/arch/i386/linux_emul.h: Likewise.
+ * * linux/dev/arch/i386/glue/timer.c: Merged into sched.c.
+ * * linux/dev/arch/i386/glue/sched.c: Include <machine/spl.h> instead
+ * of <i386/ipl.h>, and moved to ...
+ * * linux/dev/kernel/sched.c: ... here.
+ * * linux/dev/arch/i386/glue/block.c: Include <machine/spl.h> and
+ * <linux_emul.h>, instead of i386-dependent header files, and
+ * moved to ...
+ * * linux/dev/glue/blocl.c: ... here.
+ * * linux/dev/arch/i386/glue/net.c: Include <machine/spl.h> and
+ * <linux_emul.h>, instead of i386-dependent header files, and
+ * moved to ...
+ * * linux/dev/glue/net.c: ... here.
+ * * linux/dev/arch/i386/glue/misc.c: Remove `x86' and moved to ...
+ * * linux/dev/glue/misc.c: ... here.
+ * * linux/dev/arch/i386/glue/kmem.c: Moved to ...
+ * * linux/dev/glue/kmem.c: ... here.
*
- * $Log: isp1020.h,v $
* Revision 0.5 1995/09/22 02:32:56 root
* do auto request sense
*
@@ -70,7 +112,7 @@ int isp1020_biosparam(Disk *, kdev_t, int[]);
#define NULL (0)
#endif
-extern struct proc_dir_entry proc_scsi_isp1020;
+static struct proc_dir_entry proc_scsi_isp1020;
#define QLOGICISP { \
/* next */ NULL, \
diff --git a/linux/src/drivers/scsi/u14-34f.c b/linux/src/drivers/scsi/u14-34f.c
index cad88bc..ece5330 100644
--- a/linux/src/drivers/scsi/u14-34f.c
+++ b/linux/src/drivers/scsi/u14-34f.c
@@ -1771,7 +1771,8 @@ static inline void ihdlr(int irq, unsigned int j) {
return;
}
- spp = (struct mscp *)DEV2V(ret = inl(sh[j]->io_port + REG_ICM));
+ ret = inl(sh[j]->io_port + REG_ICM);
+ spp = (struct mscp *)DEV2V(ret);
cpp = spp;
/* Clear interrupt pending flag */