diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2011-01-16 22:35:30 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2011-01-16 22:35:30 +0000 |
commit | bf7dd43b0ff651c5b7ba593bceb215dc29ad45d7 (patch) | |
tree | 45e6e943d25ebc8148bddd5d6a8250fbb43a6d85 /sys/dev/usb/umodem.c | |
parent | 3ea785dfac3b842c38d5b36eb3a32b8af8086460 (diff) |
* instead of NULLing pointers to interface descriptors in the uaa, mark
interfaces as being claimed in the usbd_device's copy of the interface
descriptors
* allow ugen(4) to be attached if there are unused interfaces in a
configuration that has had drivers attached
* make ugen(4) aware that it may be sharing a device with (an)other
driver(s), and if so:
* do not let ugen(4) change the configuration
* do not let ugen(4) access the already claimed interfaces
discussed with deraadt and miod
Diffstat (limited to 'sys/dev/usb/umodem.c')
-rw-r--r-- | sys/dev/usb/umodem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index 4b55568eff1..cab12b62537 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umodem.c,v 1.39 2010/12/02 01:37:45 jakemsr Exp $ */ +/* $OpenBSD: umodem.c,v 1.40 2011/01/16 22:35:29 jakemsr Exp $ */ /* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */ /* @@ -280,12 +280,12 @@ umodem_attach(struct device *parent, struct device *self, void *aux) /* Get the data interface too. */ for (i = 0; i < uaa->nifaces; i++) { - if (uaa->ifaces[i] != NULL) { + if (!usbd_iface_claimed(sc->sc_udev, i)) { id = usbd_get_interface_descriptor(uaa->ifaces[i]); if (id != NULL && id->bInterfaceNumber == data_iface_no) { sc->sc_data_iface = uaa->ifaces[i]; - uaa->ifaces[i] = NULL; + usbd_claim_iface(sc->sc_udev, i); } } } |