diff options
| -rw-r--r-- | sbin/devmatch/devmatch.c | 2 | ||||
| -rw-r--r-- | sys/kern/subr_bus.c | 1 | ||||
| -rw-r--r-- | sys/sys/bus.h | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/sbin/devmatch/devmatch.c b/sbin/devmatch/devmatch.c index a53cd5d81f827..9173270520a6c 100644 --- a/sbin/devmatch/devmatch.c +++ b/sbin/devmatch/devmatch.c @@ -422,6 +422,8 @@ find_unmatched(struct devinfo_dev *dev, void *arg) break; if (!(dev->dd_flags & DF_ENABLED)) break; + if (dev->dd_flags & DF_ATTACHED_ONCE) + break; parent = devinfo_handle_to_device(dev->dd_parent); bus = strdup(parent->dd_name); p = bus + strlen(bus) - 1; diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 9d09d341ae1df..72bf63eb295c5 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -2950,6 +2950,7 @@ device_attach(device_t dev) dev->state = DS_NOTPRESENT; return (error); } + dev->flags |= DF_ATTACHED_ONCE; attachtime = get_cyclecount() - attachtime; /* * 4 bits per device is a reasonable value for desktop and server diff --git a/sys/sys/bus.h b/sys/sys/bus.h index a96cfc6c8f723..e565002760d7d 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -93,6 +93,7 @@ struct u_device { #define DF_REBID 0x80 /* Can rebid after attach */ #define DF_SUSPENDED 0x100 /* Device is suspended. */ #define DF_QUIET_CHILDREN 0x200 /* Default to quiet for all my children */ +#define DF_ATTACHED_ONCE 0x400 /* Has been attached at least once */ #define DF_NEEDNOMATCH 0x800 /* Has a pending NOMATCH event */ /** |
