Lines Matching refs:ifnum

100 	unsigned int ifnum;  member
683 unsigned int ifnum) in destroy_async_on_interface() argument
691 if (ifnum == list_entry(p, struct async, asynclist)->ifnum) in destroy_async_on_interface()
717 unsigned int ifnum = intf->altsetting->desc.bInterfaceNumber; in driver_disconnect() local
726 if (likely(ifnum < 8*sizeof(ps->ifclaimed))) in driver_disconnect()
727 clear_bit(ifnum, &ps->ifclaimed); in driver_disconnect()
730 ifnum); in driver_disconnect()
735 destroy_async_on_interface(ps, ifnum); in driver_disconnect()
779 static int claimintf(struct usb_dev_state *ps, unsigned int ifnum) in claimintf() argument
785 if (ifnum >= 8*sizeof(ps->ifclaimed)) in claimintf()
788 if (test_bit(ifnum, &ps->ifclaimed)) in claimintf()
792 !test_bit(ifnum, &ps->interface_allowed_mask)) in claimintf()
795 intf = usb_ifnum_to_if(dev, ifnum); in claimintf()
808 set_bit(ifnum, &ps->ifclaimed); in claimintf()
812 static int releaseintf(struct usb_dev_state *ps, unsigned int ifnum) in releaseintf() argument
819 if (ifnum >= 8*sizeof(ps->ifclaimed)) in releaseintf()
822 intf = usb_ifnum_to_if(dev, ifnum); in releaseintf()
825 else if (test_and_clear_bit(ifnum, &ps->ifclaimed)) { in releaseintf()
838 static int checkintf(struct usb_dev_state *ps, unsigned int ifnum) in checkintf() argument
842 if (ifnum >= 8*sizeof(ps->ifclaimed)) in checkintf()
844 if (test_bit(ifnum, &ps->ifclaimed)) in checkintf()
849 current->comm, ifnum); in checkintf()
850 return claimintf(ps, ifnum); in checkintf()
957 int ifnum, ret; in parse_usbdevfs_streams() local
986 ifnum = findintfep(ps->dev, ep); in parse_usbdevfs_streams()
987 if (ifnum < 0) { in parse_usbdevfs_streams()
988 ret = ifnum; in parse_usbdevfs_streams()
993 ret = checkintf(ps, ifnum); in parse_usbdevfs_streams()
996 intf = usb_ifnum_to_if(ps->dev, ifnum); in parse_usbdevfs_streams()
999 if (ifnum != intf->altsetting->desc.bInterfaceNumber) { in parse_usbdevfs_streams()
1093 unsigned int ifnum; in usbdev_release() local
1104 for (ifnum = 0; ps->ifclaimed && ifnum < 8*sizeof(ps->ifclaimed); in usbdev_release()
1105 ifnum++) { in usbdev_release()
1106 if (test_bit(ifnum, &ps->ifclaimed)) in usbdev_release()
1107 releaseintf(ps, ifnum); in usbdev_release()
1625 int i, ret, num_sgs = 0, ifnum = -1; in proc_do_submiturb() local
1650 ifnum = findintfep(ps->dev, uurb->endpoint); in proc_do_submiturb()
1651 if (ifnum < 0) in proc_do_submiturb()
1652 return ifnum; in proc_do_submiturb()
1653 ret = checkintf(ps, ifnum); in proc_do_submiturb()
1929 as->ifnum = ifnum; in proc_do_submiturb()
2295 unsigned int ifnum; in proc_claiminterface() local
2297 if (get_user(ifnum, (unsigned int __user *)arg)) in proc_claiminterface()
2299 return claimintf(ps, ifnum); in proc_claiminterface()
2304 unsigned int ifnum; in proc_releaseinterface() local
2307 if (get_user(ifnum, (unsigned int __user *)arg)) in proc_releaseinterface()
2309 ret = releaseintf(ps, ifnum); in proc_releaseinterface()
2312 destroy_async_on_interface(ps, ifnum); in proc_releaseinterface()