diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2018-11-27 14:53:57 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2018-11-27 14:53:57 +0000 |
commit | 6ef1c54c319a6bc2e3df5c49cb158ed6b75f7885 (patch) | |
tree | eb5d6879539406a833490e2d4d2627ecaada1ae5 /sys/dev/usb | |
parent | ee49953c6c97402c5038685c11ea06a84c79602f (diff) |
Attach the driver only if the stack managed to set the configuration.
Tested by stsp@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/if_zyd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c index 370d025bc51..fa948564709 100644 --- a/sys/dev/usb/if_zyd.c +++ b/sys/dev/usb/if_zyd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_zyd.c,v 1.118 2017/04/08 02:57:25 deraadt Exp $ */ +/* $OpenBSD: if_zyd.c,v 1.119 2018/11/27 14:53:56 mpi Exp $ */ /*- * Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr> @@ -238,7 +238,7 @@ zyd_match(struct device *parent, void *match, void *aux) { struct usb_attach_arg *uaa = aux; - if (!uaa->iface) + if (uaa->iface == NULL || uaa->configno != ZYD_CONFIG_NO) return UMATCH_NONE; return (zyd_lookup(uaa->vendor, uaa->product) != NULL) ? @@ -282,6 +282,7 @@ zyd_attach(struct device *parent, struct device *self, void *aux) usb_device_descriptor_t* ddesc; sc->sc_udev = uaa->device; + sc->sc_iface = uaa->iface; sc->mac_rev = zyd_lookup(uaa->vendor, uaa->product)->rev; |