Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ed/if_ed_3c503.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
int | int | ||||
ed_probe_3Com(device_t dev, int port_rid, int flags) | ed_probe_3Com(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_int memsize; | u_int memsize; | ||||
u_char isa16bit; | u_char isa16bit; | ||||
u_long conf_maddr, conf_msize, irq, junk, pmem; | rman_res_t conf_maddr, conf_msize, irq, junk, pmem; | ||||
error = ed_alloc_port(dev, 0, ED_3COM_IO_PORTS); | error = ed_alloc_port(dev, 0, ED_3COM_IO_PORTS); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
sc->asic_offset = ED_3COM_ASIC_OFFSET; | sc->asic_offset = ED_3COM_ASIC_OFFSET; | ||||
sc->nic_offset = ED_3COM_NIC_OFFSET; | sc->nic_offset = ED_3COM_NIC_OFFSET; | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
break; | break; | ||||
case 4: | case 4: | ||||
ed_asic_outb(sc, ED_3COM_IDCFR, ED_3COM_IDCFR_IRQ4); | ed_asic_outb(sc, ED_3COM_IDCFR, ED_3COM_IDCFR_IRQ4); | ||||
break; | break; | ||||
case 5: | case 5: | ||||
ed_asic_outb(sc, ED_3COM_IDCFR, ED_3COM_IDCFR_IRQ5); | ed_asic_outb(sc, ED_3COM_IDCFR, ED_3COM_IDCFR_IRQ5); | ||||
break; | break; | ||||
default: | default: | ||||
device_printf(dev, "Invalid irq configuration (%ld) must be 3-5,9 for 3c503\n", | device_printf(dev, "Invalid irq configuration (%jd) must be 3-5,9 for 3c503\n", | ||||
irq); | irq); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
/* | /* | ||||
* Initialize GA configuration register. Set bank and enable shared | * Initialize GA configuration register. Set bank and enable shared | ||||
* mem. | * mem. | ||||
*/ | */ | ||||
Show All 37 Lines |