Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ed/if_ed_cbus.c
Show First 20 Lines • Show All 601 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
ed98_alloc_memory(dev, rid) | ed98_alloc_memory(dev, rid) | ||||
device_t dev; | device_t dev; | ||||
int rid; | int rid; | ||||
{ | { | ||||
struct ed_softc *sc = device_get_softc(dev); | struct ed_softc *sc = device_get_softc(dev); | ||||
int error; | int error; | ||||
u_long conf_maddr, conf_msize; | rman_res_t conf_maddr, conf_msize; | ||||
error = bus_get_resource(dev, SYS_RES_MEMORY, 0, &conf_maddr, | error = bus_get_resource(dev, SYS_RES_MEMORY, 0, &conf_maddr, | ||||
&conf_msize); | &conf_msize); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
if ((conf_maddr == 0) || (conf_msize == 0)) | if ((conf_maddr == 0) || (conf_msize == 0)) | ||||
return (ENXIO); | return (ENXIO); | ||||
▲ Show 20 Lines • Show All 377 Lines • ▼ Show 20 Lines | |||||
* Probe and vendor-specific initialization routine for C-NET(98) boards | * Probe and vendor-specific initialization routine for C-NET(98) boards | ||||
*/ | */ | ||||
static int | static int | ||||
ed_probe_CNET98(device_t dev, int port_rid, int flags) | ed_probe_CNET98(device_t dev, int port_rid, int flags) | ||||
{ | { | ||||
struct ed_softc *sc = device_get_softc(dev); | struct ed_softc *sc = device_get_softc(dev); | ||||
int error; | int error; | ||||
u_char tmp; | u_char tmp; | ||||
u_long conf_irq, junk; | rman_res_t conf_irq, junk; | ||||
#ifdef DIAGNOSTIC | #ifdef DIAGNOSTIC | ||||
u_char tmp_s; | u_char tmp_s; | ||||
#endif | #endif | ||||
error = ed98_alloc_port(dev, port_rid); | error = ed98_alloc_port(dev, port_rid); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
▲ Show 20 Lines • Show All 139 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
static int | static int | ||||
ed_probe_CNET98EL(device_t dev, int port_rid, int flags) | ed_probe_CNET98EL(device_t dev, int port_rid, int flags) | ||||
{ | { | ||||
struct ed_softc *sc = device_get_softc(dev); | struct ed_softc *sc = device_get_softc(dev); | ||||
int error; | int error; | ||||
int i; | int i; | ||||
u_char romdata[ETHER_ADDR_LEN * 2], tmp; | u_char romdata[ETHER_ADDR_LEN * 2], tmp; | ||||
u_long conf_irq, junk; | rman_res_t conf_irq, junk; | ||||
error = ed98_alloc_port(dev, port_rid); | error = ed98_alloc_port(dev, port_rid); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
sc->asic_offset = ED_NOVELL_ASIC_OFFSET; | sc->asic_offset = ED_NOVELL_ASIC_OFFSET; | ||||
sc->nic_offset = ED_NOVELL_NIC_OFFSET; | sc->nic_offset = ED_NOVELL_NIC_OFFSET; | ||||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
* Probe and vendor-specific initialization routine for PC-9801-77 boards | * Probe and vendor-specific initialization routine for PC-9801-77 boards | ||||
*/ | */ | ||||
static int | static int | ||||
ed_probe_NEC77(device_t dev, int port_rid, int flags) | ed_probe_NEC77(device_t dev, int port_rid, int flags) | ||||
{ | { | ||||
struct ed_softc *sc = device_get_softc(dev); | struct ed_softc *sc = device_get_softc(dev); | ||||
int error; | int error; | ||||
u_char tmp; | u_char tmp; | ||||
u_long conf_irq, junk; | rman_res_t conf_irq, junk; | ||||
error = ed98_probe_Novell(dev, port_rid, flags); | error = ed98_probe_Novell(dev, port_rid, flags); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
/* LA/T-98 does not need IRQ setting. */ | /* LA/T-98 does not need IRQ setting. */ | ||||
if (ED_TYPE98SUB(flags) == 0) | if (ED_TYPE98SUB(flags) == 0) | ||||
return (0); | return (0); | ||||
Show All 35 Lines | |||||
* Probe and vendor-specific initialization routine for EC/EP-98X boards | * Probe and vendor-specific initialization routine for EC/EP-98X boards | ||||
*/ | */ | ||||
static int | static int | ||||
ed_probe_NW98X(device_t dev, int port_rid, int flags) | ed_probe_NW98X(device_t dev, int port_rid, int flags) | ||||
{ | { | ||||
struct ed_softc *sc = device_get_softc(dev); | struct ed_softc *sc = device_get_softc(dev); | ||||
int error; | int error; | ||||
u_char tmp; | u_char tmp; | ||||
u_long conf_irq, junk; | rman_res_t conf_irq, junk; | ||||
error = ed98_probe_Novell(dev, port_rid, flags); | error = ed98_probe_Novell(dev, port_rid, flags); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
/* Networld 98X3 does not need IRQ setting. */ | /* Networld 98X3 does not need IRQ setting. */ | ||||
if (ED_TYPE98SUB(flags) == 0) | if (ED_TYPE98SUB(flags) == 0) | ||||
return (0); | return (0); | ||||
▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | |||||
* Probe and vendor-specific initialization routine for SB-9801 boards | * Probe and vendor-specific initialization routine for SB-9801 boards | ||||
*/ | */ | ||||
static int | static int | ||||
ed_probe_SB98(device_t dev, int port_rid, int flags) | ed_probe_SB98(device_t dev, int port_rid, int flags) | ||||
{ | { | ||||
struct ed_softc *sc = device_get_softc(dev); | struct ed_softc *sc = device_get_softc(dev); | ||||
int error; | int error; | ||||
u_char tmp; | u_char tmp; | ||||
u_long conf_irq, junk; | rman_res_t conf_irq, junk; | ||||
error = ed98_alloc_port(dev, port_rid); | error = ed98_alloc_port(dev, port_rid); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
sc->asic_offset = ED_NOVELL_ASIC_OFFSET; | sc->asic_offset = ED_NOVELL_ASIC_OFFSET; | ||||
sc->nic_offset = ED_NOVELL_NIC_OFFSET; | sc->nic_offset = ED_NOVELL_NIC_OFFSET; | ||||
▲ Show 20 Lines • Show All 191 Lines • Show Last 20 Lines |