Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ata/ata-isa.c
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | static struct isa_pnp_id ata_ids[] = { | ||||
{0x8006d041, "Standard bus mastering IDE hard disk controller"}, | {0x8006d041, "Standard bus mastering IDE hard disk controller"}, | ||||
{0} | {0} | ||||
}; | }; | ||||
static int | static int | ||||
ata_isa_probe(device_t dev) | ata_isa_probe(device_t dev) | ||||
{ | { | ||||
struct resource *io = NULL, *ctlio = NULL; | struct resource *io = NULL, *ctlio = NULL; | ||||
u_long tmp; | rman_res_t tmp; | ||||
int rid; | int rid; | ||||
/* check isapnp ids */ | /* check isapnp ids */ | ||||
if (ISA_PNP_PROBE(device_get_parent(dev), dev, ata_ids) == ENXIO) | if (ISA_PNP_PROBE(device_get_parent(dev), dev, ata_ids) == ENXIO) | ||||
return ENXIO; | return ENXIO; | ||||
/* allocate the io port range */ | /* allocate the io port range */ | ||||
rid = ATA_IOADDR_RID; | rid = ATA_IOADDR_RID; | ||||
Show All 23 Lines | return ENXIO; | ||||
return (ata_probe(dev)); | return (ata_probe(dev)); | ||||
} | } | ||||
static int | static int | ||||
ata_isa_attach(device_t dev) | ata_isa_attach(device_t dev) | ||||
{ | { | ||||
struct ata_channel *ch = device_get_softc(dev); | struct ata_channel *ch = device_get_softc(dev); | ||||
struct resource *io = NULL, *ctlio = NULL; | struct resource *io = NULL, *ctlio = NULL; | ||||
u_long tmp; | rman_res_t tmp; | ||||
int i, rid; | int i, rid; | ||||
if (ch->attached) | if (ch->attached) | ||||
return (0); | return (0); | ||||
ch->attached = 1; | ch->attached = 1; | ||||
/* allocate the io port range */ | /* allocate the io port range */ | ||||
rid = ATA_IOADDR_RID; | rid = ATA_IOADDR_RID; | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |