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.8 1999/01/12 00:27:43 eivind 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 isa_device *dvp;
1356 struct cs_softc *sc = malloc(sizeof *sc, M_DEVBUF, M_NOWAIT);
1357
1358 if (read_pnp_parms ( &d , ldn ) == 0 ) {
1359 printf("failed to read pnp parms\n");
1360 return;
1361 }
1362
1363 write_pnp_parms( &d, ldn );
--- 4 unchanged lines hidden (view full) ---
1368 drq = dev->id_drq = d.drq[0];
1369 dev->id_maddr = 0;
1370 dev->id_ointr = csintr_pnp;
1371 flags = dev->id_flags = 0;
1372 unit = dev->id_unit;
1373
1374 if (dev->id_driver == NULL) {
1375 dev->id_driver = &csdriver;
1376 dvp = find_isadev(isa_devtab_net, &csdriver, 0);
1377 if (dvp != NULL)
1378 dev->id_id = dvp->id_id;
1379 }
1380
1381 if (!sc) return;
1382
1383 bzero(sc, sizeof *sc);
1384 if (cs_cs89x0_probe(sc, &irq, &drq, iobase, unit, flags) == 0
1385 || cs_attach(sc, unit, flags) == 0) {
1386 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.8 1999/01/12 00:27:43 eivind 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 isa_device *dvp;
1356 struct cs_softc *sc = malloc(sizeof *sc, M_DEVBUF, M_NOWAIT);
1357
1358 if (read_pnp_parms ( &d , ldn ) == 0 ) {
1359 printf("failed to read pnp parms\n");
1360 return;
1361 }
1362
1363 write_pnp_parms( &d, ldn );
--- 4 unchanged lines hidden (view full) ---
1368 drq = dev->id_drq = d.drq[0];
1369 dev->id_maddr = 0;
1370 dev->id_ointr = csintr_pnp;
1371 flags = dev->id_flags = 0;
1372 unit = dev->id_unit;
1373
1374 if (dev->id_driver == NULL) {
1375 dev->id_driver = &csdriver;
1376 dvp = find_isadev(isa_devtab_net, &csdriver, 0);
1377 if (dvp != NULL)
1378 dev->id_id = dvp->id_id;
1379 }
1380
1381 if (!sc) return;
1382
1383 bzero(sc, sizeof *sc);
1384 if (cs_cs89x0_probe(sc, &irq, &drq, iobase, unit, flags) == 0
1385 || cs_attach(sc, unit, flags) == 0) {
1386 free(sc, M_DEVBUF);
--- 13 unchanged lines hidden ---