Lines Matching refs:ifnum

100 	unsigned int ifnum;  member
664 unsigned int ifnum) in destroy_async_on_interface() argument
672 if (ifnum == list_entry(p, struct async, asynclist)->ifnum) in destroy_async_on_interface()
698 unsigned int ifnum = intf->altsetting->desc.bInterfaceNumber; in driver_disconnect() local
707 if (likely(ifnum < 8*sizeof(ps->ifclaimed))) in driver_disconnect()
708 clear_bit(ifnum, &ps->ifclaimed); in driver_disconnect()
711 ifnum); in driver_disconnect()
716 destroy_async_on_interface(ps, ifnum); in driver_disconnect()
758 static int claimintf(struct usb_dev_state *ps, unsigned int ifnum) in claimintf() argument
764 if (ifnum >= 8*sizeof(ps->ifclaimed)) in claimintf()
767 if (test_bit(ifnum, &ps->ifclaimed)) in claimintf()
771 !test_bit(ifnum, &ps->interface_allowed_mask)) in claimintf()
774 intf = usb_ifnum_to_if(dev, ifnum); in claimintf()
787 set_bit(ifnum, &ps->ifclaimed); in claimintf()
791 static int releaseintf(struct usb_dev_state *ps, unsigned int ifnum) in releaseintf() argument
798 if (ifnum >= 8*sizeof(ps->ifclaimed)) in releaseintf()
801 intf = usb_ifnum_to_if(dev, ifnum); in releaseintf()
804 else if (test_and_clear_bit(ifnum, &ps->ifclaimed)) { in releaseintf()
817 static int checkintf(struct usb_dev_state *ps, unsigned int ifnum) in checkintf() argument
821 if (ifnum >= 8*sizeof(ps->ifclaimed)) in checkintf()
823 if (test_bit(ifnum, &ps->ifclaimed)) in checkintf()
828 current->comm, ifnum); in checkintf()
829 return claimintf(ps, ifnum); in checkintf()
936 int ifnum, ret; in parse_usbdevfs_streams() local
965 ifnum = findintfep(ps->dev, ep); in parse_usbdevfs_streams()
966 if (ifnum < 0) { in parse_usbdevfs_streams()
967 ret = ifnum; in parse_usbdevfs_streams()
972 ret = checkintf(ps, ifnum); in parse_usbdevfs_streams()
975 intf = usb_ifnum_to_if(ps->dev, ifnum); in parse_usbdevfs_streams()
978 if (ifnum != intf->altsetting->desc.bInterfaceNumber) { in parse_usbdevfs_streams()
1072 unsigned int ifnum; in usbdev_release() local
1083 for (ifnum = 0; ps->ifclaimed && ifnum < 8*sizeof(ps->ifclaimed); in usbdev_release()
1084 ifnum++) { in usbdev_release()
1085 if (test_bit(ifnum, &ps->ifclaimed)) in usbdev_release()
1086 releaseintf(ps, ifnum); in usbdev_release()
1600 int i, ret, num_sgs = 0, ifnum = -1; in proc_do_submiturb() local
1625 ifnum = findintfep(ps->dev, uurb->endpoint); in proc_do_submiturb()
1626 if (ifnum < 0) in proc_do_submiturb()
1627 return ifnum; in proc_do_submiturb()
1628 ret = checkintf(ps, ifnum); in proc_do_submiturb()
1904 as->ifnum = ifnum; in proc_do_submiturb()
2270 unsigned int ifnum; in proc_claiminterface() local
2272 if (get_user(ifnum, (unsigned int __user *)arg)) in proc_claiminterface()
2274 return claimintf(ps, ifnum); in proc_claiminterface()
2279 unsigned int ifnum; in proc_releaseinterface() local
2282 if (get_user(ifnum, (unsigned int __user *)arg)) in proc_releaseinterface()
2284 ret = releaseintf(ps, ifnum); in proc_releaseinterface()
2287 destroy_async_on_interface(ps, ifnum); in proc_releaseinterface()