Lines Matching refs:interface
149 struct usb_interface *interface = &dev->actconfig->interface[i]; in usb_drivers_purge() local
151 if (interface->driver == driver) { in usb_drivers_purge()
153 driver->disconnect(dev, interface->private_data); in usb_drivers_purge()
156 if (interface->driver) in usb_drivers_purge()
157 usb_driver_release_interface(driver, interface); in usb_drivers_purge()
203 if (dev->actconfig->interface[i].altsetting[0].bInterfaceNumber == ifnum) in usb_ifnum_to_ifpos()
214 if (dev->actconfig->interface[i].altsetting[0].bInterfaceNumber == ifnum) in usb_ifnum_to_if()
215 return &dev->actconfig->interface[i]; in usb_ifnum_to_if()
225 for (j = 0; j < dev->actconfig->interface[i].num_altsetting; j++) in usb_epnum_to_ep_desc()
226 for (k = 0; k < dev->actconfig->interface[i].altsetting[j].bNumEndpoints; k++) in usb_epnum_to_ep_desc()
227 if (epnum == dev->actconfig->interface[i].altsetting[j].endpoint[k].bEndpointAddress) in usb_epnum_to_ep_desc()
228 return &dev->actconfig->interface[i].altsetting[j].endpoint[k]; in usb_epnum_to_ep_desc()
625 usb_match_id(struct usb_device *dev, struct usb_interface *interface, in usb_match_id() argument
672 intf = &interface->altsetting [interface->act_altsetting]; in usb_match_id()
711 struct usb_interface *interface; in usb_find_interface_driver() local
724 interface = dev->actconfig->interface + ifnum; in usb_find_interface_driver()
726 if (usb_interface_claimed(interface)) in usb_find_interface_driver()
737 for (i = 0; i < interface->num_altsetting; i++) { in usb_find_interface_driver()
738 interface->act_altsetting = i; in usb_find_interface_driver()
739 id = usb_match_id(dev, interface, id); in usb_find_interface_driver()
751 interface->act_altsetting = 0; in usb_find_interface_driver()
759 interface = dev->actconfig->interface + ifnum; in usb_find_interface_driver()
762 usb_driver_claim_interface(driver, interface, private); in usb_find_interface_driver()
813 static void call_policy_interface (char *verb, struct usb_device *dev, int interface) in call_policy_interface() argument
892 int alt = dev->actconfig->interface [interface].act_altsetting; in call_policy_interface()
896 dev->actconfig->interface [interface].altsetting [alt].bInterfaceClass, in call_policy_interface()
897 dev->actconfig->interface [interface].altsetting [alt].bInterfaceSubClass, in call_policy_interface()
898 dev->actconfig->interface [interface].altsetting [alt].bInterfaceProtocol) in call_policy_interface()
944 if (!usb_interface_claimed(dev->actconfig->interface + ifnum)) { in usb_find_drivers()
1360 static int usb_parse_interface(struct usb_interface *interface, unsigned char *buffer, int size) in usb_parse_interface() argument
1367 interface->act_altsetting = 0; in usb_parse_interface()
1368 interface->num_altsetting = 0; in usb_parse_interface()
1369 interface->max_altsetting = USB_ALTSETTINGALLOC; in usb_parse_interface()
1371 …interface->altsetting = kmalloc(sizeof(struct usb_interface_descriptor) * interface->max_altsettin… in usb_parse_interface()
1373 if (!interface->altsetting) { in usb_parse_interface()
1379 if (interface->num_altsetting >= interface->max_altsetting) { in usb_parse_interface()
1383 oldmas = interface->max_altsetting; in usb_parse_interface()
1384 interface->max_altsetting += USB_ALTSETTINGALLOC; in usb_parse_interface()
1385 if (interface->max_altsetting > USB_MAXALTSETTING) { in usb_parse_interface()
1391 ptr = interface->altsetting; in usb_parse_interface()
1392 …interface->altsetting = kmalloc(sizeof(struct usb_interface_descriptor) * interface->max_altsettin… in usb_parse_interface()
1393 if (!interface->altsetting) { in usb_parse_interface()
1395 interface->altsetting = ptr; in usb_parse_interface()
1398 memcpy(interface->altsetting, ptr, sizeof(struct usb_interface_descriptor) * oldmas); in usb_parse_interface()
1403 ifp = interface->altsetting + interface->num_altsetting; in usb_parse_interface()
1404 interface->num_altsetting++; in usb_parse_interface()
1525 config->interface = (struct usb_interface *) in usb_parse_configuration()
1528 dbg("kmalloc IF %p, numif %i", config->interface, config->bNumInterfaces); in usb_parse_configuration()
1529 if (!config->interface) { in usb_parse_configuration()
1534 memset(config->interface, 0, in usb_parse_configuration()
1594 retval = usb_parse_interface(config->interface + i, buffer, size); in usb_parse_configuration()
1622 if (!cf->interface) in usb_destroy_configuration()
1627 &cf->interface[i]; in usb_destroy_configuration()
1653 kfree(cf->interface); in usb_destroy_configuration()
1752 struct usb_interface *interface = &dev->actconfig->interface[i]; in usb_disconnect() local
1753 struct usb_driver *driver = interface->driver; in usb_disconnect()
1756 driver->disconnect(dev, interface->private_data); in usb_disconnect()
1759 if (interface->driver) in usb_disconnect()
1760 usb_driver_release_interface(driver, interface); in usb_disconnect()
1916 struct usb_interface *ifp = dev->actconfig->interface + i; in usb_set_maxpacket()
1991 int usb_set_interface(struct usb_device *dev, int interface, int alternate) in usb_set_interface() argument
1996 iface = usb_ifnum_to_if(dev, interface); in usb_set_interface()
1998 warn("selecting invalid interface %d", interface); in usb_set_interface()
2006 dev->devnum, interface, alternate); in usb_set_interface()
2012 interface, NULL, 0, HZ * 5)) < 0) in usb_set_interface()