int hpcioman_match(struct device *parent, struct cfdata *cf, void *aux) { struct hpcio_attach_args *haa = aux; platid_mask_t mask; if (strcmp(haa->haa_busname, HPCIO_BUSNAME)) return (0); /* select platform */ mask = PLATID_DEREF(cf->cf_loc[HPCIOIFCF_PLATFORM]); return (platid_match(&platid, &mask)); }
int vrisabmatch(device_t parent, cfdata_t match, void *aux) { struct hpcio_attach_args *haa = aux; platid_mask_t mask; int n; if (strcmp(haa->haa_busname, match->cf_name)) return (0); if (match->cf_loc[HPCIOIFCF_PLATFORM] == HPCIOIFCF_PLATFORM_DEFAULT) return (1); mask = PLATID_DEREF(match->cf_loc[HPCIOIFCF_PLATFORM]); if ((n = platid_match(&platid, &mask)) != 0) return (n + 2); return (0); }