|
|
| version 1.6, 2004/02/13 22:12:33 | version 1.7, 2004/02/19 14:31:13 |
|---|---|
| Line 48 | Line 48 |
| #include "if_exvar.h" | #include "if_exvar.h" |
| #include <bus/pccard/pccardvar.h> | #include <bus/pccard/pccardvar.h> |
| #include <bus/pccard/pccarddevs.h> | |
| static const struct pccard_product ex_pccard_products[] = { | |
| PCMCIA_CARD(OLICOM, OC2220, 0), | |
| { NULL } | |
| }; | |
| /* Bus Front End Functions */ | /* Bus Front End Functions */ |
| static int ex_pccard_match (device_t); | |
| static int ex_pccard_probe (device_t); | static int ex_pccard_probe (device_t); |
| static int ex_pccard_attach (device_t); | static int ex_pccard_attach (device_t); |
| static int ex_pccard_detach (device_t); | static int ex_pccard_detach (device_t); |
| static device_method_t ex_pccard_methods[] = { | static device_method_t ex_pccard_methods[] = { |
| /* Device interface */ | /* Device interface */ |
| DEVMETHOD(device_probe, ex_pccard_probe), | DEVMETHOD(device_probe, pccard_compat_probe), |
| DEVMETHOD(device_attach, ex_pccard_attach), | DEVMETHOD(device_attach, pccard_compat_attach), |
| DEVMETHOD(device_detach, ex_pccard_detach), | DEVMETHOD(device_detach, ex_pccard_detach), |
| /* Card interface */ | |
| DEVMETHOD(card_compat_match, ex_pccard_match), | |
| DEVMETHOD(card_compat_probe, ex_pccard_probe), | |
| DEVMETHOD(card_compat_attach, ex_pccard_attach), | |
| { 0, 0 } | { 0, 0 } |
| }; | }; |
| Line 74 extern devclass_t ex_devclass; | Line 86 extern devclass_t ex_devclass; |
| DRIVER_MODULE(if_ex, pccard, ex_pccard_driver, ex_devclass, 0, 0); | DRIVER_MODULE(if_ex, pccard, ex_pccard_driver, ex_devclass, 0, 0); |
| static int | static int |
| ex_pccard_match(device_t dev) | |
| { | |
| const struct pccard_product *pp; | |
| if ((pp = pccard_product_lookup(dev, ex_pccard_products, | |
| sizeof(ex_pccard_products[0]), NULL)) != NULL) { | |
| if (pp->pp_name != NULL) | |
| device_set_desc(dev, pp->pp_name); | |
| return 0; | |
| } | |
| return EIO; | |
| } | |
| static int | |
| ex_pccard_probe(device_t dev) | ex_pccard_probe(device_t dev) |
| { | { |
| u_int iobase; | u_int iobase; |