sc->irq = 3; 3 sc->iobase = 0; 4

sc->ispcmcia = 1; 5 sc->cinfop =card_infop;

pcmcia_register_event_callback(card_infop->socket_vnum,

CARD_REMOVAL_EVENT, (caddr_t)el_card_remove, (caddr_t)sc);

6

if (multi_func_flag) 7 lan_set_attribute(sc->ehm.current_val, NET_MODEL_NDX, "3C562");

else

lan_set_attribute(sc->ehm.current_val, NET_MODEL_NDX, "3C589"); break;

case BUS_ISA: 8

sc->irq = irq_sel.channel;

9

sc->isa_tag = isatag;

10

sc->iobase = ((reg-0x200)/0x10)&0x1f; 11

lan_set_attribute(sc->ehm.current_val, NET_MODEL_NDX, "3C509"); break;

}

12

1

Evaluates the bus_type member of the bus data structure for this 3Com 3C5x9 device.

2Performs tasks that are related to the PCMCIA bus if bus_type evaluates to BUS_PCMCIA.

3Sets the interrupt request (IRQ) to the value 3.

4Sets the I/O base of the program card to the value 0 (zero).

5Indicates that this is a PCMCIA unit and saves the card information pointer.

6Calls the pcmcia_register_event_callback( ) routine. See the if_el source file (in the examples directory that is installed with the device driver kit) for a listing of this routine.

7Sets the model identification attribute for enhanced hardware management support.

8Performs tasks that are related to the ISA bus.

9Saves the interrupt request (IRQ) from the ISA bus configuration code.

10

11

12

Saves the tag from the activation process.

Computes the I/O base to give to the device.

Sets the model identification attribute for enhanced hardware management support.

Implementing the Autoconfiguration Support Section (probe) 5–9

Page 67
Image 67
Compaq AA-RNG2A-TE manual Implementing the Autoconfiguration Support Section probe