From 3cc4d3c11a835610eaf5ce6c13389352149848c1 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Mon, 10 Oct 2011 19:42:38 +0000 Subject: Introduce pci_probe_device_hook(pci_chipset_tag_t, struct pci_attach_args *). This mandatory function will get invoked in pci_probe_device(), and allows a pci host driver to alter the pci_attach_args passed to a device when attaching. This function will also, if returning non-zero, cause the device to be skipped completely during all the phases of the PCI device discovery (i.e. ressource enumeration, ressource assignment, and actual attachment). This particular feature is experimental and might be reverted in the future (or the scope narrowed to device attachment only). A dummy #define pci_probe_device_hook() 0 is added to all platforms except sgi, where real functions (currently only returning 0) are added; real meat will be added shortly. Discussed at s2k11, no objection from the usual suspects. --- sys/arch/hppa/include/pci_machdep.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/arch/hppa/include') diff --git a/sys/arch/hppa/include/pci_machdep.h b/sys/arch/hppa/include/pci_machdep.h index 3f3c60fdfc1..0678674fe78 100644 --- a/sys/arch/hppa/include/pci_machdep.h +++ b/sys/arch/hppa/include/pci_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.h,v 1.8 2011/05/21 21:36:17 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.9 2011/10/10 19:42:36 miod Exp $ */ /* * Copyright (c) 2003 Michael Shalayeff @@ -88,6 +88,7 @@ struct hppa_pci_chipset_tag { (*(c)->pc_intr_establish)((c)->_cookie, (ih), (l), (h), (a), (nm)) #define pci_intr_disestablish(c, iv) \ (*(c)->pc_intr_disestablish)((c)->_cookie, (iv)) +#define pci_probe_device_hook(c, a) (0) #define pciide_machdep_compat_intr_establish(a, b, c, d, e) (NULL) #define pciide_machdep_compat_intr_disestablish(a, b) ((void)(a), (void)(b)) -- cgit v1.2.3