Lines Matching defs:bus_num
64 typedef int USBScanFunc(void *opaque, int bus_num, int addr, int class_id,
135 int bus_num;
185 static USBHostDevice *hostdev_find(int bus_num, int addr)
189 if (s->bus_num == bus_num && s->addr == addr)
254 printf("husb: device %d.%d disconnected\n", s->bus_num, s->addr);
410 dprintf("husb: reset device %u.%u\n", s->bus_num, s->addr);
884 static USBDevice *usb_host_device_open_addr(int bus_num, int addr, const char *prod_name)
893 dev->bus_num = bus_num;
896 printf("husb: open device %d.%d\n", bus_num, addr);
903 bus_num, addr);
945 printf("husb: grabbed usb device %d.%d\n", bus_num, addr);
962 "host:%d.%d", bus_num, addr);
988 int bus_num, addr;
996 if (usb_host_find_device(&bus_num, &addr, product_name, sizeof(product_name),
1000 if (hostdev_find(bus_num, addr)) {
1002 bus_num, addr);
1006 return usb_host_device_open_addr(bus_num, addr, product_name);
1012 int bus_num, addr;
1018 if (usb_host_find_device(&bus_num, &addr, product_name, sizeof(product_name),
1022 s = hostdev_find(bus_num, addr);
1063 int bus_num, addr, speed, device_count, class_id, product_id, vendor_id;
1079 bus_num = addr = speed = class_id = product_id = vendor_id = 0;
1088 ret = func(opaque, bus_num, addr, class_id, vendor_id,
1095 bus_num = atoi(buf);
1132 ret = func(opaque, bus_num, addr, class_id, vendor_id,
1182 int bus_num, addr, speed, class_id, product_id, vendor_id;
1198 bus_num = atoi(tmpstr);
1240 ret = func(opaque, bus_num, addr, class_id, vendor_id,
1325 int bus_num;
1334 static int usb_host_auto_scan(void *opaque, int bus_num, int addr,
1346 if (f->bus_num >= 0 && f->bus_num != bus_num)
1361 if (hostdev_find(bus_num, addr))
1364 dprintf("husb: auto open: bus_num %d addr %d\n", bus_num, addr);
1366 dev = usb_host_device_open_addr(bus_num, addr, product_name);
1399 f->bus_num = -1;
1413 case BUS: f->bus_num = strtol(p, NULL, 10); break;
1431 return f1->bus_num == f2->bus_num &&
1466 dprintf("husb: added auto filter: bus_num %d addr %d vid %d pid %d\n",
1467 f->bus_num, f->addr, f->vendor_id, f->product_id);
1486 dprintf("husb: removed auto filter: bus_num %d addr %d vid %d pid %d\n",
1487 pf->bus_num, pf->addr, pf->vendor_id, pf->product_id);
1510 int bus_num;
1515 static int usb_host_find_device_scan(void *opaque, int bus_num, int addr,
1523 (bus_num == s->bus_num &&
1526 s->bus_num = bus_num;
1549 fs.bus_num = *pbus_num;
1563 *pbus_num = fs.bus_num;
1607 static void usb_info_device(int bus_num, int addr, int class_id,
1631 bus_num, addr, speed_str);
1643 static int usb_host_info_device(void *opaque, int bus_num, int addr,
1649 usb_info_device(bus_num, addr, class_id, vendor_id, product_id,
1680 dec2str(f->bus_num, bus, sizeof(bus));