1/*
2 * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko.
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
--- 13 unchanged lines hidden (view full) ---
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 */
28
29/*
30 * $Id: if_cs.c,v 1.9 1999/01/28 01:59:53 dillon Exp $
31 *
32 * Device driver for Crystal Semiconductor CS8920 based ethernet
33 * adapters. By Maxim Bolotin and Oleg Sharoiko, 27-April-1997
34 */
35
36/* #define CS_DEBUG */
37#include "cs.h"
38#include "bpfilter.h"
--- 1308 unchanged lines hidden (view full) ---
1347 struct isa_device *dev)
1348{
1349
1350 struct pnp_cinfo d;
1351 int ldn = 0;
1352 int iobase, unit, flags;
1353 u_int irq;
1354 int drq;
1355 struct cs_softc *sc = malloc(sizeof *sc, M_DEVBUF, M_NOWAIT);
1356
1357 if (read_pnp_parms ( &d , ldn ) == 0 ) {
1358 printf("failed to read pnp parms\n");
1359 return;
1360 }
1361
1362 write_pnp_parms( &d, ldn );
--- 4 unchanged lines hidden (view full) ---
1367 drq = dev->id_drq = d.drq[0];
1368 dev->id_maddr = 0;
1369 dev->id_ointr = csintr_pnp;
1370 flags = dev->id_flags = 0;
1371 unit = dev->id_unit;
1372
1373 if (dev->id_driver == NULL) {
1374 dev->id_driver = &csdriver;
1375 dev->id_id = isa_compat_nextid();
1376 }
1377
1378 if (!sc) return;
1379
1380 bzero(sc, sizeof *sc);
1381 if (cs_cs89x0_probe(sc, &irq, &drq, iobase, unit, flags) == 0
1382 || cs_attach(sc, unit, flags) == 0) {
1383 free(sc, M_DEVBUF);
--- 13 unchanged lines hidden ---
2 * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko.
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
--- 13 unchanged lines hidden (view full) ---
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 */
28
29/*
30 * $Id: if_cs.c,v 1.9 1999/01/28 01:59:53 dillon Exp $
31 *
32 * Device driver for Crystal Semiconductor CS8920 based ethernet
33 * adapters. By Maxim Bolotin and Oleg Sharoiko, 27-April-1997
34 */
35
36/* #define CS_DEBUG */
37#include "cs.h"
38#include "bpfilter.h"
--- 1308 unchanged lines hidden (view full) ---
1347 struct isa_device *dev)
1348{
1349
1350 struct pnp_cinfo d;
1351 int ldn = 0;
1352 int iobase, unit, flags;
1353 u_int irq;
1354 int drq;
1355 struct cs_softc *sc = malloc(sizeof *sc, M_DEVBUF, M_NOWAIT);
1356
1357 if (read_pnp_parms ( &d , ldn ) == 0 ) {
1358 printf("failed to read pnp parms\n");
1359 return;
1360 }
1361
1362 write_pnp_parms( &d, ldn );
--- 4 unchanged lines hidden (view full) ---
1367 drq = dev->id_drq = d.drq[0];
1368 dev->id_maddr = 0;
1369 dev->id_ointr = csintr_pnp;
1370 flags = dev->id_flags = 0;
1371 unit = dev->id_unit;
1372
1373 if (dev->id_driver == NULL) {
1374 dev->id_driver = &csdriver;
1375 dev->id_id = isa_compat_nextid();
1376 }
1377
1378 if (!sc) return;
1379
1380 bzero(sc, sizeof *sc);
1381 if (cs_cs89x0_probe(sc, &irq, &drq, iobase, unit, flags) == 0
1382 || cs_attach(sc, unit, flags) == 0) {
1383 free(sc, M_DEVBUF);
--- 13 unchanged lines hidden ---