Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cs/if_cs.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
return (0); | return (0); | ||||
} | } | ||||
int | int | ||||
cs_cs89x0_probe(device_t dev) | cs_cs89x0_probe(device_t dev) | ||||
{ | { | ||||
int i; | int i; | ||||
int error; | int error; | ||||
u_long irq, junk; | rman_res_t irq, junk; | ||||
struct cs_softc *sc = device_get_softc(dev); | struct cs_softc *sc = device_get_softc(dev); | ||||
unsigned rev_type = 0; | unsigned rev_type = 0; | ||||
uint16_t id; | uint16_t id; | ||||
char chip_revision; | char chip_revision; | ||||
uint16_t eeprom_buff[CHKSUM_LEN]; | uint16_t eeprom_buff[CHKSUM_LEN]; | ||||
int chip_type, pp_isaint; | int chip_type, pp_isaint; | ||||
sc->dev = dev; | sc->dev = dev; | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
int | int | ||||
cs_alloc_port(device_t dev, int rid, int size) | cs_alloc_port(device_t dev, int rid, int size) | ||||
{ | { | ||||
struct cs_softc *sc = device_get_softc(dev); | struct cs_softc *sc = device_get_softc(dev); | ||||
struct resource *res; | struct resource *res; | ||||
res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, | res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, | ||||
0ul, ~0ul, size, RF_ACTIVE); | 0, ~0, size, RF_ACTIVE); | ||||
if (res == NULL) | if (res == NULL) | ||||
return (ENOENT); | return (ENOENT); | ||||
sc->port_rid = rid; | sc->port_rid = rid; | ||||
sc->port_res = res; | sc->port_res = res; | ||||
return (0); | return (0); | ||||
} | } | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |