Deleted Added
full compact
27c27
< * $Id: if_ed.c,v 1.96 1996/04/08 01:25:22 davidg Exp $
---
> * $Id: if_ed.c,v 1.97 1996/04/23 18:36:54 nate Exp $
133c133,135
< static int ed_attach __P((struct isa_device *));
---
> static int ed_attach __P((struct ed_softc *, int, int));
> static int ed_attach_isa __P((struct isa_device *));
>
145a148,156
> static int ed_probe_Novell_generic __P((struct ed_softc *, int, int, int));
>
> #include "pci.h"
> #if NPCI > 0
> void *ed_attach_NE2000_pci __P((int, int));
> #endif
>
> #include "crd.h"
> #if NCRD > 0
146a158
> #endif
167d178
< #include "crd.h"
228c239
< if (ed_attach(&dp->isahd)==0)
---
> if (ed_attach_isa(&dp->isahd)==0)
274c285
< edintr(dp->isahd.id_unit);
---
> edintr_sc(&ed_softc[dp->isahd.id_unit]);
281c292
< ed_attach,
---
> ed_attach_isa,
1086,1087c1097,1101
< ed_probe_Novell(isa_dev)
< struct isa_device *isa_dev;
---
> ed_probe_Novell_generic(sc, port, unit, flags)
> struct ed_softc *sc;
> int port;
> int unit;
> int flags;
1089d1102
< struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
1095,1096c1108,1109
< sc->asic_addr = isa_dev->id_iobase + ED_NOVELL_ASIC_OFFSET;
< sc->nic_addr = isa_dev->id_iobase + ED_NOVELL_NIC_OFFSET;
---
> sc->asic_addr = port + ED_NOVELL_ASIC_OFFSET;
> sc->nic_addr = port + ED_NOVELL_NIC_OFFSET;
1135d1147
< isa_dev->id_maddr = 0;
1238c1250
< printf("ed%d: Cannot find start of RAM.\n", isa_dev->id_unit);
---
> printf("ed%d: Cannot find start of RAM.\n", unit);
1260c1272
< printf("ed%d: Cannot find any RAM, start : %d, x = %d.\n", isa_dev->id_unit, mstart, x);
---
> printf("ed%d: Cannot find any RAM, start : %d, x = %d.\n", unit, mstart, x);
1263c1275
< printf("ed%d: RAM start at %d, size : %d.\n", isa_dev->id_unit, mstart, msize);
---
> printf("ed%d: RAM start at %d, size : %d.\n", unit, mstart, msize);
1276c1288
< if ((memsize < 16384) || (isa_dev->id_flags & ED_FLAGS_NO_MULTI_BUFFERING))
---
> if ((memsize < 16384) || (flags & ED_FLAGS_NO_MULTI_BUFFERING))
1302a1315,1319
> static int
> ed_probe_Novell(isa_dev)
> struct isa_device *isa_dev;
> {
> struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
1303a1321,1327
> isa_dev->id_maddr = 0;
> return ed_probe_Novell_generic(sc, isa_dev->id_iobase,
> isa_dev->id_unit, isa_dev->id_flags);
> }
>
> #if NCRD > 0
>
1411a1436,1437
> #endif /* NCRD > 0 */
>
1416,1417c1442,1445
< ed_attach(isa_dev)
< struct isa_device *isa_dev;
---
> ed_attach(sc, unit, flags)
> struct ed_softc *sc;
> int unit;
> int flags;
1419d1446
< struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
1432c1459
< ifp->if_unit = isa_dev->id_unit;
---
> ifp->if_unit = unit;
1445c1472
< if (isa_dev->id_flags & ED_FLAGS_DISABLE_TRANCEIVER)
---
> if (flags & ED_FLAGS_DISABLE_TRANCEIVER)
1464c1491
< printf("ed%d: address %6D, ", isa_dev->id_unit,
---
> printf("%s%d: address %6D, ", ifp->if_name, ifp->if_unit,
1485a1513,1544
> static int
> ed_attach_isa(isa_dev)
> struct isa_device *isa_dev;
> {
> int unit = isa_dev->id_unit;
> struct ed_softc *sc = &ed_softc[unit];
> int flags = isa_dev->id_flags;
>
> return ed_attach(sc, unit, flags);
> }
>
> #if NPCI > 0
> void *
> ed_attach_NE2000_pci(unit, port)
> int unit;
> int port;
> {
> struct ed_softc *sc = malloc(sizeof *sc, M_DEVBUF, M_NOWAIT);
> int isa_flags = 0;
>
> if (!sc)
> return sc;
>
> if (ed_probe_Novell_generic(sc, port, unit, isa_flags) == 0
> || ed_attach(sc, unit, isa_flags) == 0) {
> free(sc, M_DEVBUF);
> return NULL;
> }
> return sc;
> }
> #endif
>
2043,2044c2102,2103
< edintr(unit)
< int unit;
---
> edintr_sc(sc)
> struct ed_softc *sc;
2046d2104
< struct ed_softc *sc = &ed_softc[unit];
2251a2310,2316
> void
> edintr(unit)
> int unit;
> {
> edintr_sc (&ed_softc[unit]);
> }
>