From 71d90c04a87e5d83dd12a18e730bf5a49659d712 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 2 Feb 2014 19:17:28 +0000 Subject: Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines. Simplebus used to only instantiate its children whose status="okay" but that was improper behavior, fixed in r261352. Now that it doesn't check anymore and probes all its children; the children all have to do the check because really only the children know how to properly interpret their status property strings. Right now all existing drivers only understand "okay" versus something- that's-not-okay, so they all use the new ofw_bus_status_okay() helper. --- sys/dev/usb/controller/dwc_otg_fdt.c | 4 ++++ sys/dev/usb/controller/ehci_fsl.c | 3 +++ sys/dev/usb/controller/ehci_imx.c | 3 +++ sys/dev/usb/controller/ehci_mv.c | 3 +++ 4 files changed, 13 insertions(+) (limited to 'sys/dev/usb/controller') diff --git a/sys/dev/usb/controller/dwc_otg_fdt.c b/sys/dev/usb/controller/dwc_otg_fdt.c index ac7a18d..0f93286 100644 --- a/sys/dev/usb/controller/dwc_otg_fdt.c +++ b/sys/dev/usb/controller/dwc_otg_fdt.c @@ -75,6 +75,10 @@ struct dwc_otg_super_softc { static int dwc_otg_probe(device_t dev) { + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "synopsys,designware-hs-otg2")) return (ENXIO); diff --git a/sys/dev/usb/controller/ehci_fsl.c b/sys/dev/usb/controller/ehci_fsl.c index 6b485b5..7e728d2 100644 --- a/sys/dev/usb/controller/ehci_fsl.c +++ b/sys/dev/usb/controller/ehci_fsl.c @@ -212,6 +212,9 @@ static int fsl_ehci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (((ofw_bus_is_compatible(dev, "fsl-usb2-dr")) == 0) && ((ofw_bus_is_compatible(dev, "fsl-usb2-mph")) == 0)) return (ENXIO); diff --git a/sys/dev/usb/controller/ehci_imx.c b/sys/dev/usb/controller/ehci_imx.c index 6d91b7b..d40f18d 100644 --- a/sys/dev/usb/controller/ehci_imx.c +++ b/sys/dev/usb/controller/ehci_imx.c @@ -161,6 +161,9 @@ static int imx_ehci_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { device_set_desc(dev, "Freescale i.MX integrated USB controller"); return (BUS_PROBE_DEFAULT); diff --git a/sys/dev/usb/controller/ehci_mv.c b/sys/dev/usb/controller/ehci_mv.c index a47e253..32a24b5 100644 --- a/sys/dev/usb/controller/ehci_mv.c +++ b/sys/dev/usb/controller/ehci_mv.c @@ -103,6 +103,9 @@ static int mv_ehci_probe(device_t self) { + if (!ofw_bus_status_okay(self)) + return (ENXIO); + if (!ofw_bus_is_compatible(self, "mrvl,usb-ehci")) return (ENXIO); -- cgit v1.1