summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ex/if_ex_pccard.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/sys/dev/ex/if_ex_pccard.c b/sys/dev/ex/if_ex_pccard.c
index 50bd68c..62f034e 100644
--- a/sys/dev/ex/if_ex_pccard.c
+++ b/sys/dev/ex/if_ex_pccard.c
@@ -49,17 +49,29 @@ __FBSDID("$FreeBSD$");
#include <dev/ex/if_exvar.h>
#include <dev/pccard/pccardvar.h>
+#include <dev/pccard/pccarddevs.h>
+
+static const struct pccard_product ex_pccard_products[] = {
+ PCMCIA_CARD(OLICOM, OC2220, 0),
+ { NULL }
+};
/* Bus Front End Functions */
+static int ex_pccard_match (device_t);
static int ex_pccard_probe (device_t);
static int ex_pccard_attach (device_t);
static device_method_t ex_pccard_methods[] = {
/* Device interface */
- DEVMETHOD(device_probe, ex_pccard_probe),
- DEVMETHOD(device_attach, ex_pccard_attach),
+ DEVMETHOD(device_probe, pccard_compat_probe),
+ DEVMETHOD(device_attach, pccard_compat_attach),
DEVMETHOD(device_detach, ex_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 }
};
@@ -72,6 +84,20 @@ static driver_t ex_pccard_driver = {
DRIVER_MODULE(ex, pccard, ex_pccard_driver, ex_devclass, 0, 0);
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)
{
u_int iobase;
OpenPOWER on IntegriCloud