Date: Fri, 22 Aug 2008 22:02:41 +0200 (MEST) From: Peter B <pb@ludd.ltu.se> To: freebsd-hackers@freebsd.org Subject: usb match() function Message-ID: <200808222002.m7MK2fvo004486@brother.ludd.ltu.se>
next in thread | raw e-mail | index | archive | help
Within the usb drivers (/usr/src/sys/dev/usb/u*.c) there's an matching routine where the 'uaa->iface' is supposed to be assigned before the routine is called. However for a new device or class this doesn't seem to work. Instead 'uaa' is set like for an generic device (two interfaces, no "default" in my case). So how is one supposed to make the kernel fill in 'uaa->iface' ..? Code excerpt (v7.x): static int *_match(device_t self) { struct usb_attach_arg *uaa = device_get_ivars(self); usb_interface_descriptor_t *id; DPRINTFN(10,("*_match\n")); if (uaa->iface == NULL) return (UMATCH_NONE);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808222002.m7MK2fvo004486>