Deleted Added
full compact
ppc.c (39521) ppc.c (40565)
1/*-
2 * Copyright (c) 1997, 1998 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1997, 1998 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: ppc.c,v 1.8 1998/09/13 20:57:06 nsouch Exp $
26 * $Id: ppc.c,v 1.9 1998/09/20 14:47:01 nsouch Exp $
27 *
28 */
29#include "ppc.h"
30
31#if NPPC > 0
32
33#include <sys/param.h>
34#include <sys/systm.h>

--- 84 unchanged lines hidden (view full) ---

119static void ppc_wstr(int unit, char byte) { w_str(ppcdata[unit], byte); }
120static void ppc_wctr(int unit, char byte) { w_ctr(ppcdata[unit], byte); }
121static void ppc_wepp(int unit, char byte) { w_epp(ppcdata[unit], byte); }
122static void ppc_wecr(int unit, char byte) { w_ecr(ppcdata[unit], byte); }
123static void ppc_wfifo(int unit, char byte) { w_fifo(ppcdata[unit], byte); }
124
125static void ppc_reset_epp_timeout(int);
126static void ppc_ecp_sync(int);
27 *
28 */
29#include "ppc.h"
30
31#if NPPC > 0
32
33#include <sys/param.h>
34#include <sys/systm.h>

--- 84 unchanged lines hidden (view full) ---

119static void ppc_wstr(int unit, char byte) { w_str(ppcdata[unit], byte); }
120static void ppc_wctr(int unit, char byte) { w_ctr(ppcdata[unit], byte); }
121static void ppc_wepp(int unit, char byte) { w_epp(ppcdata[unit], byte); }
122static void ppc_wecr(int unit, char byte) { w_ecr(ppcdata[unit], byte); }
123static void ppc_wfifo(int unit, char byte) { w_fifo(ppcdata[unit], byte); }
124
125static void ppc_reset_epp_timeout(int);
126static void ppc_ecp_sync(int);
127static ointhand2_t ppcintr;
127
128static int ppc_exec_microseq(int, struct ppb_microseq **);
129static int ppc_generic_setmode(int, int);
130static int ppc_smclike_setmode(int, int);
131
132static struct ppb_adapter ppc_smclike_adapter = {
133
134 0, /* no intr handler, filled by chipset dependent code */

--- 49 unchanged lines hidden (view full) ---

184 }
185
186 printf("ppc%d: ECP sync failed as data still " \
187 "present in FIFO.\n", unit);
188
189 return;
190}
191
128
129static int ppc_exec_microseq(int, struct ppb_microseq **);
130static int ppc_generic_setmode(int, int);
131static int ppc_smclike_setmode(int, int);
132
133static struct ppb_adapter ppc_smclike_adapter = {
134
135 0, /* no intr handler, filled by chipset dependent code */

--- 49 unchanged lines hidden (view full) ---

185 }
186
187 printf("ppc%d: ECP sync failed as data still " \
188 "present in FIFO.\n", unit);
189
190 return;
191}
192
192void
193static void
193ppcintr(int unit)
194{
195 /* call directly upper code */
196 ppb_intr(&ppcdata[unit]->ppc_link);
197
198 return;
199}
200

--- 1070 unchanged lines hidden (view full) ---

1271 struct ppb_data *ppbus;
1272 char * mode;
1273
1274 printf("ppc%d: %s chipset (%s) in %s mode%s\n", ppc->ppc_unit,
1275 ppc_types[ppc->ppc_type], ppc_avms[ppc->ppc_avm],
1276 ppc_modes[ppc->ppc_mode], (PPB_IS_EPP(ppc->ppc_mode)) ?
1277 ppc_epp_protocol[ppc->ppc_epp] : "");
1278
194ppcintr(int unit)
195{
196 /* call directly upper code */
197 ppb_intr(&ppcdata[unit]->ppc_link);
198
199 return;
200}
201

--- 1070 unchanged lines hidden (view full) ---

1272 struct ppb_data *ppbus;
1273 char * mode;
1274
1275 printf("ppc%d: %s chipset (%s) in %s mode%s\n", ppc->ppc_unit,
1276 ppc_types[ppc->ppc_type], ppc_avms[ppc->ppc_avm],
1277 ppc_modes[ppc->ppc_mode], (PPB_IS_EPP(ppc->ppc_mode)) ?
1278 ppc_epp_protocol[ppc->ppc_epp] : "");
1279
1280 isdp->id_ointr = ppcintr;
1281
1279 /*
1280 * Prepare ppbus data area for upper level code.
1281 */
1282 ppbus = ppb_alloc_bus();
1283
1284 if (!ppbus)
1285 return (0);
1286
1287 ppc->ppc_link.ppbus = ppbus;
1288 ppbus->ppb_link = &ppc->ppc_link;
1289
1290 /*
1291 * Probe the ppbus and attach devices found.
1292 */
1293 ppb_attachdevs(ppbus);
1294
1295 return (1);
1296}
1297#endif
1282 /*
1283 * Prepare ppbus data area for upper level code.
1284 */
1285 ppbus = ppb_alloc_bus();
1286
1287 if (!ppbus)
1288 return (0);
1289
1290 ppc->ppc_link.ppbus = ppbus;
1291 ppbus->ppb_link = &ppc->ppc_link;
1292
1293 /*
1294 * Probe the ppbus and attach devices found.
1295 */
1296 ppb_attachdevs(ppbus);
1297
1298 return (1);
1299}
1300#endif