Lines Matching defs:unit
89 int unit;
122 for (unit = 0; unit < ctlr->channels; unit++) {
123 if ((ctlr->ichannels & (1 << unit)) == 0)
126 ((unit == 0 || unit == 1) && ctlr->legacy) ?
127 unit : devclass_find_free_unit(ata_devclass, 2));
131 device_set_ivars(child, (void *)(intptr_t)unit);
225 int unit = ((struct ata_channel *)device_get_softc(child))->unit;
232 start = (unit ? ATA_SECONDARY : ATA_PRIMARY);
236 myrid = PCIR_BAR(0) + (unit << 3);
243 start = (unit ? ATA_SECONDARY : ATA_PRIMARY) +
248 myrid = PCIR_BAR(1) + (unit << 3);
257 int irq = (unit == 0 ? 14 : 15);
284 int unit = ((struct ata_channel *)device_get_softc(child))->unit;
291 PCIR_BAR(0) + (unit << 3), r);
295 PCIR_BAR(1) + (unit << 3), r);
334 int unit;
341 unit = ((struct ata_channel *)device_get_softc(child))->unit;
343 unit = ATA_PCI_MAX_CH - 1;
344 controller->interrupt[unit].function = function;
345 controller->interrupt[unit].argument = argument;
361 int unit;
364 unit = ((struct ata_channel *)device_get_softc(child))->unit;
366 unit = ATA_PCI_MAX_CH - 1;
367 controller->interrupt[unit].function = NULL;
368 controller->interrupt[unit].argument = NULL;
422 ch->r_io[i].offset = (i - ATA_BMCMD_PORT) + (ch->unit*ATA_BMIOSIZE);
639 ch->unit = (intptr_t)device_get_ivars(dev);
795 int unit;
797 for (unit = 0; unit < ATA_PCI_MAX_CH; unit++) {
798 if ((ch = ctlr->interrupt[unit].argument))
799 ctlr->interrupt[unit].function(ch);