if ((b->slot % 1000) != pa->pa_device)
slot = pa->pa_bus * 1000 + pa->pa_function * 100 + pa->pa_device; if (b->slot != slot)
dec_kn20aa_device_register(dev, aux)	struct device *dev;	void *aux;{	static int found, initted, scsiboot, netboot;	static struct device *pcidev, *scsidev;	struct bootdev_data *b = bootdev_data;	struct device *parent = dev->dv_parent;	struct cfdata *cf = dev->dv_cfdata;	struct cfdriver *cd = cf->cf_driver;	if (found)		return;	if (!initted) {		scsiboot = (strcmp(b->protocol, "SCSI") == 0);		netboot = (strcmp(b->protocol, "BOOTP") == 0) ||		    (strcmp(b->protocol, "MOP") == 0);#if 0		printf("scsiboot = %d, netboot = %d\n", scsiboot, netboot);#endif		initted =1;	}	if (pcidev == NULL) {		if (strcmp(cd->cd_name, "pci"))			return;		else {			struct pcibus_attach_args *pba = aux;			if ((b->slot / 1000) != pba->pba_bus)				return;				pcidev = dev;#if 0			printf("\npcidev = %s\n", pcidev->dv_xname);#endif			return;		}	}	if (scsiboot && (scsidev == NULL)) {		if (parent != pcidev)			return;		else {			struct pci_attach_args *pa = aux;			if ((b->slot % 1000) != pa->pa_device)				return;			/* XXX function? */				scsidev = dev;#if 0			printf("\nscsidev = %s\n", scsidev->dv_xname);#endif			return;		}	}	if (scsiboot &&	    (!strcmp(cd->cd_name, "sd") ||	     !strcmp(cd->cd_name, "st") ||	     !strcmp(cd->cd_name, "cd"))) {		struct scsibus_attach_args *sa = aux;		if (parent->dv_parent != scsidev)			return;		if (b->unit / 100 != sa->sa_sc_link->target)			return;		/* XXX LUN! */		switch (b->boot_dev_type) {		case 0:			if (strcmp(cd->cd_name, "sd") &&			    strcmp(cd->cd_name, "cd"))				return;			break;		case 1:			if (strcmp(cd->cd_name, "st"))				return;			break;		default:			return;		}		/* we've found it! */		booted_device = dev;#if 0		printf("\nbooted_device = %s\n", booted_device->dv_xname);#endif		found = 1;	}	if (netboot) {		if (parent != pcidev)			return;		else {			struct pci_attach_args *pa = aux;			if ((b->slot % 1000) != pa->pa_device)				return;			/* XXX function? */				booted_device = dev;#if 0			printf("\nbooted_device = %s\n", booted_device->dv_xname);#endif			found = 1;			return;		}	}}