Tue Mar 17 18:19:15 2009 UTC ()
Add some 'int' into function definitions where the K&R one didn't
specify a type.


(dsl)
diff -r1.22 -r1.23 src/sys/arch/alpha/a12/if_xb.c
diff -r1.6 -r1.7 src/sys/arch/vax/boot/boot/ctu.c
diff -r1.8 -r1.9 src/sys/arch/vax/boot/boot/mfm.c
diff -r1.7 -r1.8 src/sys/arch/vax/boot/boot/tmscp.c
diff -r1.47 -r1.48 src/sys/dev/isa/if_hp.c

cvs diff -r1.22 -r1.23 src/sys/arch/alpha/a12/Attic/if_xb.c (expand / switch to unified diff)

--- src/sys/arch/alpha/a12/Attic/if_xb.c 2009/03/14 21:04:01 1.22
+++ src/sys/arch/alpha/a12/Attic/if_xb.c 2009/03/17 18:19:15 1.23
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_xb.c,v 1.22 2009/03/14 21:04:01 dsl Exp $ */ 1/* $NetBSD: if_xb.c,v 1.23 2009/03/17 18:19:15 dsl Exp $ */
2 2
3/* [Notice revision 2.2] 3/* [Notice revision 2.2]
4 * Copyright (c) 1997, 1998 Avalon Computer Systems, Inc. 4 * Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Author: Ross Harvey 7 * Author: Ross Harvey
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright and 12 * 1. Redistributions of source code must retain the above copyright and
13 * author notice, this list of conditions, and the following disclaimer. 13 * author notice, this list of conditions, and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -64,27 +64,27 @@ @@ -64,27 +64,27 @@
64 * will combine two 64-bit stores before they get off-chip.) Also, the rtmon 64 * will combine two 64-bit stores before they get off-chip.) Also, the rtmon
65 * driver wasn't DMA either, so at least the NetBSD driver is as good as any 65 * driver wasn't DMA either, so at least the NetBSD driver is as good as any
66 * other that exists now. 66 * other that exists now.
67 *  67 *
68 * We'll do DMA and specialized transport ops later. Given the high speed of 68 * We'll do DMA and specialized transport ops later. Given the high speed of
69 * the PIO mode, no current applications require DMA bandwidth, but everyone 69 * the PIO mode, no current applications require DMA bandwidth, but everyone
70 * benefits from low latency. The PIO mode is actually lower in latency 70 * benefits from low latency. The PIO mode is actually lower in latency
71 * anyway. 71 * anyway.
72 */ 72 */
73 73
74#include "opt_avalon_a12.h" /* Config options headers */ 74#include "opt_avalon_a12.h" /* Config options headers */
75#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ 75#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
76 76
77__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.22 2009/03/14 21:04:01 dsl Exp $"); 77__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.23 2009/03/17 18:19:15 dsl Exp $");
78 78
79#include <sys/param.h> 79#include <sys/param.h>
80#include <sys/systm.h> 80#include <sys/systm.h>
81#include <sys/kernel.h> 81#include <sys/kernel.h>
82#include <sys/malloc.h> 82#include <sys/malloc.h>
83#include <sys/device.h> 83#include <sys/device.h>
84#include <sys/socket.h> 84#include <sys/socket.h>
85#include <sys/mbuf.h> 85#include <sys/mbuf.h>
86#include <sys/sockio.h> 86#include <sys/sockio.h>
87 87
88#include <uvm/uvm_extern.h> 88#include <uvm/uvm_extern.h>
89 89
90#include <net/if.h> 90#include <net/if.h>
@@ -216,27 +216,27 @@ xbmatch(struct device *parent, struct cf @@ -216,27 +216,27 @@ xbmatch(struct device *parent, struct cf
216 return cputype == ST_AVALON_A12 216 return cputype == ST_AVALON_A12
217 && !xbfound; 217 && !xbfound;
218} 218}
219 219
220void 220void
221xbattach(struct device *parent, struct device *self, void *aux) 221xbattach(struct device *parent, struct device *self, void *aux)
222{ 222{
223 struct xb_config *ccp; 223 struct xb_config *ccp;
224 224
225 strcpy(xbi.if_xname, self->dv_xname); 225 strcpy(xbi.if_xname, self->dv_xname);
226 xbfound = 1; 226 xbfound = 1;
227 ccp = &xb_configuration; 227 ccp = &xb_configuration;
228 xb_init_config(ccp, 1); 228 xb_init_config(ccp, 1);
229 printf(": driver %s mtu %lu\n", "$Revision: 1.22 $", xbi.if_mtu); 229 printf(": driver %s mtu %lu\n", "$Revision: 1.23 $", xbi.if_mtu);
230} 230}
231 231
232static void 232static void
233xb_init_config(struct xb_config *ccp, int mallocsafe) 233xb_init_config(struct xb_config *ccp, int mallocsafe)
234{ 234{
235 /*  235 /*
236 * The driver actually only needs about 64 bytes of buffer but with a 236 * The driver actually only needs about 64 bytes of buffer but with a
237 * nice contiguous frame we can call m_devget() 237 * nice contiguous frame we can call m_devget()
238 */ 238 */
239 if (mallocsafe && xb_incoming == NULL) { 239 if (mallocsafe && xb_incoming == NULL) {
240 xb_incoming = malloc(xb_incoming_max, M_DEVBUF, M_NOWAIT); 240 xb_incoming = malloc(xb_incoming_max, M_DEVBUF, M_NOWAIT);
241 if (xb_incoming == NULL) 241 if (xb_incoming == NULL)
242 DIE(); 242 DIE();
@@ -695,27 +695,27 @@ set_interrupt_on_fifo_empty(void) @@ -695,27 +695,27 @@ set_interrupt_on_fifo_empty(void)
695 REGVAL(A12_OMR) |= A12_OMR_OMF_ENABLE; 695 REGVAL(A12_OMR) |= A12_OMR_OMF_ENABLE;
696 alpha_mb(); 696 alpha_mb();
697 if(xb_fifo_empty()) { 697 if(xb_fifo_empty()) {
698 REGVAL(A12_OMR) &= ~A12_OMR_OMF_ENABLE; 698 REGVAL(A12_OMR) &= ~A12_OMR_OMF_ENABLE;
699 alpha_mb(); 699 alpha_mb();
700 return 1; 700 return 1;
701 } 701 }
702 return 0; 702 return 0;
703} 703}
704/* 704/*
705 * Write an aligned block of switch words to the FIFO 705 * Write an aligned block of switch words to the FIFO
706 */ 706 */
707Static void 707Static void
708xb_mcrp_write(long *d, n, islast) 708xb_mcrp_write(long *d, int n, int islast)
709{ 709{
710 volatile long *xb_fifo = islast ? REGADDR(A12_FIFO_LWE)  710 volatile long *xb_fifo = islast ? REGADDR(A12_FIFO_LWE)
711 : REGADDR(A12_FIFO); 711 : REGADDR(A12_FIFO);
712 int i; 712 int i;
713 713
714 if (XB_DEBUG && islast && n != 1) 714 if (XB_DEBUG && islast && n != 1)
715 DIE(); 715 DIE();
716 n <<= 1; 716 n <<= 1;
717 for (i = 0; i < n; i += 2) { 717 for (i = 0; i < n; i += 2) {
718 xb_onefree(); 718 xb_onefree();
719 xb_fifo[0] = d[i]; 719 xb_fifo[0] = d[i];
720 xb_fifo[1] = d[i+1]; 720 xb_fifo[1] = d[i+1];
721 alpha_wmb(); 721 alpha_wmb();

cvs diff -r1.6 -r1.7 src/sys/arch/vax/boot/boot/ctu.c (expand / switch to unified diff)

--- src/sys/arch/vax/boot/boot/ctu.c 2009/03/14 21:04:16 1.6
+++ src/sys/arch/vax/boot/boot/ctu.c 2009/03/17 18:19:15 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ctu.c,v 1.6 2009/03/14 21:04:16 dsl Exp $ */ 1/* $NetBSD: ctu.c,v 1.7 2009/03/17 18:19:15 dsl Exp $ */
2/* 2/*
3 * Copyright (c) 1996 Ludd, University of Lule}, Sweden. 3 * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software 14 * 3. All advertising materials mentioning features or use of this software
@@ -56,27 +56,27 @@ enum tu_state { @@ -56,27 +56,27 @@ enum tu_state {
56volatile struct tu_softc { 56volatile struct tu_softc {
57 enum tu_state sc_state; 57 enum tu_state sc_state;
58 char sc_rsp[15]; /* Should be struct rsb; but don't work */ 58 char sc_rsp[15]; /* Should be struct rsb; but don't work */
59 u_char *sc_xfptr; /* Current char to xfer */ 59 u_char *sc_xfptr; /* Current char to xfer */
60 int sc_nbytes; /* Number of bytes to xfer */ 60 int sc_nbytes; /* Number of bytes to xfer */
61 int sc_xbytes; /* Number of xfer'd bytes */ 61 int sc_xbytes; /* Number of xfer'd bytes */
62 int sc_bbytes; /* Number of xfer'd bytes this block */ 62 int sc_bbytes; /* Number of xfer'd bytes this block */
63} tu_sc; 63} tu_sc;
64 64
65void ctutintr(void); 65void ctutintr(void);
66void cturintr(void); 66void cturintr(void);
67 67
68int 68int
69ctuopen(struct open_file *f, adapt, int ctlr, int unit, int part) 69ctuopen(struct open_file *f, int adapt, int ctlr, int unit, int part)
70{ 70{
71 71
72 tu_sc.sc_state = SC_INIT; 72 tu_sc.sc_state = SC_INIT;
73 73
74 mtpr(RSP_TYP_INIT, PR_CSTD); 74 mtpr(RSP_TYP_INIT, PR_CSTD);
75 cturintr(); 75 cturintr();
76 tu_sc.sc_state = SC_READY; 76 tu_sc.sc_state = SC_READY;
77 return 0; 77 return 0;
78 78
79} 79}
80 80
81int 81int
82ctustrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) 82ctustrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize)

cvs diff -r1.8 -r1.9 src/sys/arch/vax/boot/boot/mfm.c (expand / switch to unified diff)

--- src/sys/arch/vax/boot/boot/mfm.c 2009/03/14 21:04:16 1.8
+++ src/sys/arch/vax/boot/boot/mfm.c 2009/03/17 18:19:15 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mfm.c,v 1.8 2009/03/14 21:04:16 dsl Exp $ */ 1/* $NetBSD: mfm.c,v 1.9 2009/03/17 18:19:15 dsl Exp $ */
2/* 2/*
3 * Copyright (c) 1996 Ludd, University of Lule}, Sweden. 3 * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * This code is derived from software contributed to Ludd by 6 * This code is derived from software contributed to Ludd by
7 * Bertram Barth. 7 * Bertram Barth.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -349,27 +349,27 @@ display_xbn(struct mfm_xbn *p) @@ -349,27 +349,27 @@ display_xbn(struct mfm_xbn *p)
349 printf("seek-rate: %d, crc/eec: %s, RCT: %d, RCT-copies: %d\n", 349 printf("seek-rate: %d, crc/eec: %s, RCT: %d, RCT-copies: %d\n",
350 p->seek_rate, p->crc_eec ? "EEC" : "CRC", p->rct, p->rct_ncopies); 350 p->seek_rate, p->crc_eec ? "EEC" : "CRC", p->rct, p->rct_ncopies);
351 printf("media-ID: 0x%x, interleave: %d, headskew: %d, cylskew: %d\n", 351 printf("media-ID: 0x%x, interleave: %d, headskew: %d, cylskew: %d\n",
352 &p->media_id, p->interleave, p->headskew, p->cylskew); 352 &p->media_id, p->interleave, p->headskew, p->cylskew);
353 printf("gap0: %d, gap1: %d, gap2: %d, gap3: %d, sync-value: %d\n", 353 printf("gap0: %d, gap1: %d, gap2: %d, gap3: %d, sync-value: %d\n",
354 p->gap0_size, p->gap1_size, p->gap2_size, p->gap3_size, 354 p->gap0_size, p->gap1_size, p->gap2_size, p->gap3_size,
355 p->sync_value); 355 p->sync_value);
356 printf("serial: %d, checksum: %d, size: %d, reserved: %32c\n", 356 printf("serial: %d, checksum: %d, size: %d, reserved: %32c\n",
357 p->serial_number, p->checksum, sizeof(*p), p->reserved); 357 p->serial_number, p->checksum, sizeof(*p), p->reserved);
358} 358}
359#endif 359#endif
360 360
361int 361int
362mfmopen(struct open_file *f, adapt, int ctlr, int unit, int part) 362mfmopen(struct open_file *f, int adapt, int ctlr, int unit, int part)
363{ 363{
364 char *msg; 364 char *msg;
365 struct disklabel *lp = &mfmlabel; 365 struct disklabel *lp = &mfmlabel;
366 struct mfm_softc *msc = &mfm_softc; 366 struct mfm_softc *msc = &mfm_softc;
367 int err; 367 int err;
368 size_t i; 368 size_t i;
369 369
370 bzero(lp, sizeof(struct disklabel)); 370 bzero(lp, sizeof(struct disklabel));
371 msc->unit = unit; 371 msc->unit = unit;
372 msc->part = part; 372 msc->part = part;
373 373
374 err = mfmstrategy(msc, F_READ, LABELSECTOR, DEV_BSIZE, io_buf, &i); 374 err = mfmstrategy(msc, F_READ, LABELSECTOR, DEV_BSIZE, io_buf, &i);
375 if (err) { 375 if (err) {

cvs diff -r1.7 -r1.8 src/sys/arch/vax/boot/boot/tmscp.c (expand / switch to unified diff)

--- src/sys/arch/vax/boot/boot/tmscp.c 2009/03/14 21:04:16 1.7
+++ src/sys/arch/vax/boot/boot/tmscp.c 2009/03/17 18:19:15 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: tmscp.c,v 1.7 2009/03/14 21:04:16 dsl Exp $ */ 1/* $NetBSD: tmscp.c,v 1.8 2009/03/17 18:19:15 dsl Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Ludd, University of Lule}, Sweden. 3 * Copyright (c) 1995 Ludd, University of Lule}, Sweden.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software 14 * 3. All advertising materials mentioning features or use of this software
@@ -67,27 +67,27 @@ static volatile struct uda { @@ -67,27 +67,27 @@ static volatile struct uda {
67} uda; 67} uda;
68 68
69struct udadevice { 69struct udadevice {
70 short udaip; 70 short udaip;
71 short udasa; 71 short udasa;
72}; 72};
73 73
74static volatile struct uda *ubauda; 74static volatile struct uda *ubauda;
75static volatile struct udadevice *udacsr; 75static volatile struct udadevice *udacsr;
76static struct ra_softc ra_softc; 76static struct ra_softc ra_softc;
77static int curblock; 77static int curblock;
78 78
79 79
80tmscpopen(struct open_file *f, adapt, int ctlr, int unit, int part) 80tmscpopen(struct open_file *f, int adapt, int ctlr, int unit, int part)
81{ 81{
82 char *msg; 82 char *msg;
83 extern u_int tmsaddr; 83 extern u_int tmsaddr;
84 volatile struct ra_softc *ra=&ra_softc; 84 volatile struct ra_softc *ra=&ra_softc;
85 volatile u_int *nisse; 85 volatile u_int *nisse;
86 unsigned short johan; 86 unsigned short johan;
87 int i,err; 87 int i,err;
88 88
89 curblock = 0; 89 curblock = 0;
90 if(adapt>nuba) return(EADAPT); 90 if(adapt>nuba) return(EADAPT);
91 if(ctlr>nuda) return(ECTLR); 91 if(ctlr>nuda) return(ECTLR);
92 ra->udaddr=uioaddr[adapt]+tmsaddr; 92 ra->udaddr=uioaddr[adapt]+tmsaddr;
93 ra->ubaddr=(int)ubaaddr[adapt]; 93 ra->ubaddr=(int)ubaaddr[adapt];

cvs diff -r1.47 -r1.48 src/sys/dev/isa/Attic/if_hp.c (expand / switch to unified diff)

--- src/sys/dev/isa/Attic/if_hp.c 2009/03/14 21:04:20 1.47
+++ src/sys/dev/isa/Attic/if_hp.c 2009/03/17 18:19:15 1.48
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_hp.c,v 1.47 2009/03/14 21:04:20 dsl Exp $ */ 1/* $NetBSD: if_hp.c,v 1.48 2009/03/17 18:19:15 dsl Exp $ */
2 2
3/* XXX THIS DRIVER IS BROKEN. IT WILL NOT EVEN COMPILE. */ 3/* XXX THIS DRIVER IS BROKEN. IT WILL NOT EVEN COMPILE. */
4 4
5/*- 5/*-
6 * Copyright (c) 1990 The Regents of the University of California. 6 * Copyright (c) 1990 The Regents of the University of California.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -70,27 +70,27 @@ @@ -70,27 +70,27 @@
70 * insight on the ne2000 gained from Robert Clements PC/FTP driver. 70 * insight on the ne2000 gained from Robert Clements PC/FTP driver.
71 * 71 *
72 * receive bottom end totally rewritten by Curt Mayer, Dec 1992. 72 * receive bottom end totally rewritten by Curt Mayer, Dec 1992.
73 * no longer loses back to back packets. 73 * no longer loses back to back packets.
74 * note to driver writers: RTFM! 74 * note to driver writers: RTFM!
75 * 75 *
76 * hooks for packet filter added by Charles Hannum, 29DEC1992. 76 * hooks for packet filter added by Charles Hannum, 29DEC1992.
77 * 77 *
78 * Mostly rewritten for HP-labelled EISA controllers by Charles Hannum, 78 * Mostly rewritten for HP-labelled EISA controllers by Charles Hannum,
79 * 18JAN1993. 79 * 18JAN1993.
80 */ 80 */
81 81
82#include <sys/cdefs.h> 82#include <sys/cdefs.h>
83__KERNEL_RCSID(0, "$NetBSD: if_hp.c,v 1.47 2009/03/14 21:04:20 dsl Exp $"); 83__KERNEL_RCSID(0, "$NetBSD: if_hp.c,v 1.48 2009/03/17 18:19:15 dsl Exp $");
84 84
85#include "hp.h" 85#include "hp.h"
86#if NHP > 0 86#if NHP > 0
87 87
88#include "opt_inet.h" 88#include "opt_inet.h"
89#include "rnd.h" 89#include "rnd.h"
90 90
91#include <sys/param.h> 91#include <sys/param.h>
92#include <sys/systm.h> 92#include <sys/systm.h>
93#include <sys/mbuf.h> 93#include <sys/mbuf.h>
94#include <sys/buf.h> 94#include <sys/buf.h>
95#include <sys/protosw.h> 95#include <sys/protosw.h>
96#include <sys/socket.h> 96#include <sys/socket.h>
@@ -233,27 +233,27 @@ hpprobe(struct isa_device *dvp) @@ -233,27 +233,27 @@ hpprobe(struct isa_device *dvp)
233 splx(s); 233 splx(s);
234 return (0); 234 return (0);
235 } 235 }
236#endif 236#endif
237 237
238 outb(hpc + hp_option, 0); 238 outb(hpc + hp_option, 0);
239 239
240 splx(s); 240 splx(s);
241 return (32); 241 return (32);
242} 242}
243/* 243/*
244 * Fetch from onboard ROM/RAM 244 * Fetch from onboard ROM/RAM
245 */ 245 */
246hpfetch(struct hp_softc *ns, void *up, ad, len) 246hpfetch(struct hp_softc *ns, void *up, int ad, int len)
247{ 247{
248 u_char cmd; 248 u_char cmd;
249 int hpc = ns->ns_port; 249 int hpc = ns->ns_port;
250 int counter = 100000; 250 int counter = 100000;
251 251
252 outb(hpc + hp_option, inb(hpc + hp_option) | HP_DATA); 252 outb(hpc + hp_option, inb(hpc + hp_option) | HP_DATA);
253 253
254 cmd = inb(hpc + ds_cmd); 254 cmd = inb(hpc + ds_cmd);
255 outb(hpc + ds_cmd, DSCM_NODMA | DSCM_PG0 | DSCM_START); 255 outb(hpc + ds_cmd, DSCM_NODMA | DSCM_PG0 | DSCM_START);
256 256
257 /* Setup remote DMA */ 257 /* Setup remote DMA */
258 outb(hpc + ds0_isr, DSIS_RDC); 258 outb(hpc + ds0_isr, DSIS_RDC);
259 259
@@ -293,27 +293,27 @@ hpfetch(struct hp_softc *ns, void *up, a @@ -293,27 +293,27 @@ hpfetch(struct hp_softc *ns, void *up, a
293 printf("hpfetch: done len=%d\n", len); 293 printf("hpfetch: done len=%d\n", len);
294#endif 294#endif
295 295
296 /* Wait till done, then shutdown feature */ 296 /* Wait till done, then shutdown feature */
297 while ((inb(hpc + ds0_isr) & DSIS_RDC) == 0 && counter-- > 0); 297 while ((inb(hpc + ds0_isr) & DSIS_RDC) == 0 && counter-- > 0);
298 outb(hpc + ds0_isr, DSIS_RDC); 298 outb(hpc + ds0_isr, DSIS_RDC);
299 outb(hpc + ds_cmd, cmd); 299 outb(hpc + ds_cmd, cmd);
300 300
301 outb(hpc + hp_option, inb(hpc + hp_option) & ~HP_DATA); 301 outb(hpc + hp_option, inb(hpc + hp_option) & ~HP_DATA);
302} 302}
303/* 303/*
304 * Put to onboard RAM 304 * Put to onboard RAM
305 */ 305 */
306hpput(struct hp_softc *ns, void *up, ad, len) 306hpput(struct hp_softc *ns, void *up, int ad, int len)
307{ 307{
308 u_char cmd; 308 u_char cmd;
309 int hpc = ns->ns_port; 309 int hpc = ns->ns_port;
310 int counter = 100000; 310 int counter = 100000;
311 311
312 outb(hpc + hp_option, inb(hpc + hp_option) | HP_DATA); 312 outb(hpc + hp_option, inb(hpc + hp_option) | HP_DATA);
313 313
314 cmd = inb(hpc + ds_cmd); 314 cmd = inb(hpc + ds_cmd);
315 outb(hpc + ds_cmd, DSCM_NODMA | DSCM_PG0 | DSCM_START); 315 outb(hpc + ds_cmd, DSCM_NODMA | DSCM_PG0 | DSCM_START);
316 316
317 /* Setup for remote DMA */ 317 /* Setup for remote DMA */
318 outb(hpc + ds0_isr, DSIS_RDC); 318 outb(hpc + ds0_isr, DSIS_RDC);
319 319