diff --git a/reactos/drivers/usb/cromwell/Makefile b/reactos/drivers/usb/cromwell/Makefile new file mode 100644 index 00000000000..b38e31bc053 --- /dev/null +++ b/reactos/drivers/usb/cromwell/Makefile @@ -0,0 +1,50 @@ +# +# ReactOS USB-Cromwell Drivers +# + +PATH_TO_TOP = ../../.. + +include $(PATH_TO_TOP)/rules.mak + +DRIVERS = core host + +all: $(DRIVERS) + +depends: + +implib: $(DRIVERS:%=%_implib) + +clean: $(DRIVERS:%=%_clean) + +install: $(DRIVERS:%=%_install) + +bootcd: $(DRIVERS:%=%_bootcd) + +.PHONY: all depends implib clean install bootcd + + +# +# USB DRIVERS +# +$(DRIVERS): %: + $(MAKE) -C $* + +$(DRIVERS:%=%_implib): %_implib: + $(MAKE) -C $* implib + +$(DRIVERS:%=%_clean): %_clean: + $(MAKE) -C $* clean + +$(DRIVERS:%=%_install): %_install: + $(MAKE) -C $* install + +$(DRIVERS:%=%_bootcd): %_bootcd: + $(MAKE) -C $* bootcd + +.PHONY: $(DRIVERS) $(DRIVERS:%=%_implib) $(DRIVERS:%=%_clean) $(DRIVERS:%=%_install) $(DRIVERS:%=%_bootcd) + + +etags: + find . -name "*.[ch]" -print | etags --language=c - + +# EOF diff --git a/reactos/drivers/usb/cromwell/core/buffer_simple.c b/reactos/drivers/usb/cromwell/core/buffer_simple.c new file mode 100644 index 00000000000..7ac70ce30cb --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/buffer_simple.c @@ -0,0 +1,42 @@ +/* + * buffer_simple.c -- replacement for usb/core/buffer.c + * + * (c) Georg Acher, georg@acher.org + * + */ + +#include "../usb_wrapper.h" +#define __KERNEL__ +#define CONFIG_PCI +#include "hcd.h" + +/*------------------------------------------------------------------------*/ +int hcd_buffer_create (struct usb_hcd *hcd) +{ + return 0; +} +/*------------------------------------------------------------------------*/ +void hcd_buffer_destroy (struct usb_hcd *hcd) +{ +} +/*------------------------------------------------------------------------*/ +void *hcd_buffer_alloc ( + struct usb_bus *bus, + size_t size, + int mem_flags, + dma_addr_t *dma +) +{ + return kmalloc(size,0); +} +/*------------------------------------------------------------------------*/ +void hcd_buffer_free ( + struct usb_bus *bus, + size_t size, + void *addr, + dma_addr_t dma +) +{ + kfree(addr); +} + diff --git a/reactos/drivers/usb/cromwell/core/config.c b/reactos/drivers/usb/cromwell/core/config.c new file mode 100644 index 00000000000..7d400e982d8 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/config.c @@ -0,0 +1,508 @@ +#if 0 +#include +#include +#include +#include +#include +#else +#include "../usb_wrapper.h" +#endif + +#define USB_MAXALTSETTING 128 /* Hard limit */ +#define USB_MAXENDPOINTS 30 /* Hard limit */ + +/* these maximums are arbitrary */ +#define USB_MAXCONFIG 8 +#define USB_ALTSETTINGALLOC 4 +#define USB_MAXINTERFACES 32 + +static int usb_parse_endpoint(struct usb_host_endpoint *endpoint, unsigned char *buffer, int size) +{ + struct usb_descriptor_header *header; + unsigned char *begin; + int parsed = 0, len, numskipped; + + header = (struct usb_descriptor_header *)buffer; + + /* Everything should be fine being passed into here, but we sanity */ + /* check JIC */ + if (header->bLength > size) { + err("ran out of descriptors parsing"); + return -1; + } + + if (header->bDescriptorType != USB_DT_ENDPOINT) { + warn("unexpected descriptor 0x%X, expecting endpoint, 0x%X", + header->bDescriptorType, USB_DT_ENDPOINT); + return parsed; + } + + if (header->bLength == USB_DT_ENDPOINT_AUDIO_SIZE) + memcpy(&endpoint->desc, buffer, USB_DT_ENDPOINT_AUDIO_SIZE); + else + memcpy(&endpoint->desc, buffer, USB_DT_ENDPOINT_SIZE); + + le16_to_cpus(&endpoint->desc.wMaxPacketSize); + + buffer += header->bLength; + size -= header->bLength; + parsed += header->bLength; + + /* Skip over the rest of the Class Specific or Vendor Specific */ + /* descriptors */ + begin = buffer; + numskipped = 0; + while (size >= sizeof(struct usb_descriptor_header)) { + header = (struct usb_descriptor_header *)buffer; + + if (header->bLength < 2) { + err("invalid descriptor length of %d", header->bLength); + return -1; + } + + /* If we find another "proper" descriptor then we're done */ + if ((header->bDescriptorType == USB_DT_ENDPOINT) || + (header->bDescriptorType == USB_DT_INTERFACE) || + (header->bDescriptorType == USB_DT_CONFIG) || + (header->bDescriptorType == USB_DT_DEVICE)) + break; + + dbg("skipping descriptor 0x%X", + header->bDescriptorType); + numskipped++; + + buffer += header->bLength; + size -= header->bLength; + parsed += header->bLength; + } + if (numskipped) + dbg("skipped %d class/vendor specific endpoint descriptors", numskipped); + + /* Copy any unknown descriptors into a storage area for drivers */ + /* to later parse */ + len = (int)(buffer - begin); + if (!len) { + endpoint->extra = NULL; + endpoint->extralen = 0; + return parsed; + } + + endpoint->extra = kmalloc(len, GFP_KERNEL); + + if (!endpoint->extra) { + err("couldn't allocate memory for endpoint extra descriptors"); + endpoint->extralen = 0; + return parsed; + } + + memcpy(endpoint->extra, begin, len); + endpoint->extralen = len; + + return parsed; +} + +static int usb_parse_interface(struct usb_interface *interface, unsigned char *buffer, int size) +{ + int i, len, numskipped, retval, parsed = 0; + struct usb_descriptor_header *header; + struct usb_host_interface *ifp; + unsigned char *begin; + + interface->act_altsetting = 0; + interface->num_altsetting = 0; + interface->max_altsetting = USB_ALTSETTINGALLOC; + device_initialize(&interface->dev); + + interface->altsetting = kmalloc(sizeof(*interface->altsetting) * interface->max_altsetting, + GFP_KERNEL); + + if (!interface->altsetting) { + err("couldn't kmalloc interface->altsetting"); + return -1; + } + + while (size > 0) { + struct usb_interface_descriptor *d; + + if (interface->num_altsetting >= interface->max_altsetting) { + struct usb_host_interface *ptr; + int oldmas; + + oldmas = interface->max_altsetting; + interface->max_altsetting += USB_ALTSETTINGALLOC; + if (interface->max_altsetting > USB_MAXALTSETTING) { + warn("too many alternate settings (incr %d max %d)\n", + USB_ALTSETTINGALLOC, USB_MAXALTSETTING); + return -1; + } + + ptr = kmalloc(sizeof(*ptr) * interface->max_altsetting, GFP_KERNEL); + if (ptr == NULL) { + err("couldn't kmalloc interface->altsetting"); + return -1; + } + memcpy(ptr, interface->altsetting, sizeof(*interface->altsetting) * oldmas); + kfree(interface->altsetting); + interface->altsetting = ptr; + } + + ifp = interface->altsetting + interface->num_altsetting; + ifp->endpoint = NULL; + ifp->extra = NULL; + ifp->extralen = 0; + interface->num_altsetting++; + + memcpy(ifp, buffer, USB_DT_INTERFACE_SIZE); + + /* Skip over the interface */ + buffer += ifp->desc.bLength; + parsed += ifp->desc.bLength; + size -= ifp->desc.bLength; + + begin = buffer; + numskipped = 0; + + /* Skip over any interface, class or vendor descriptors */ + while (size >= sizeof(struct usb_descriptor_header)) { + header = (struct usb_descriptor_header *)buffer; + + if (header->bLength < 2) { + err("invalid descriptor length of %d", header->bLength); + return -1; + } + + /* If we find another "proper" descriptor then we're done */ + if ((header->bDescriptorType == USB_DT_INTERFACE) || + (header->bDescriptorType == USB_DT_ENDPOINT) || + (header->bDescriptorType == USB_DT_CONFIG) || + (header->bDescriptorType == USB_DT_DEVICE)) + break; + + numskipped++; + + buffer += header->bLength; + parsed += header->bLength; + size -= header->bLength; + } + + if (numskipped) + dbg("skipped %d class/vendor specific interface descriptors", numskipped); + + /* Copy any unknown descriptors into a storage area for */ + /* drivers to later parse */ + len = (int)(buffer - begin); + if (len) { + ifp->extra = kmalloc(len, GFP_KERNEL); + + if (!ifp->extra) { + err("couldn't allocate memory for interface extra descriptors"); + ifp->extralen = 0; + return -1; + } + memcpy(ifp->extra, begin, len); + ifp->extralen = len; + } + + /* Did we hit an unexpected descriptor? */ + header = (struct usb_descriptor_header *)buffer; + if ((size >= sizeof(struct usb_descriptor_header)) && + ((header->bDescriptorType == USB_DT_CONFIG) || + (header->bDescriptorType == USB_DT_DEVICE))) + return parsed; + + if (ifp->desc.bNumEndpoints > USB_MAXENDPOINTS) { + warn("too many endpoints"); + return -1; + } + + ifp->endpoint = (struct usb_host_endpoint *) + kmalloc(ifp->desc.bNumEndpoints * + sizeof(struct usb_host_endpoint), GFP_KERNEL); + if (!ifp->endpoint) { + err("out of memory"); + return -1; + } + + memset(ifp->endpoint, 0, ifp->desc.bNumEndpoints * + sizeof(struct usb_host_endpoint)); + + for (i = 0; i < ifp->desc.bNumEndpoints; i++) { + header = (struct usb_descriptor_header *)buffer; + + if (header->bLength > size) { + err("ran out of descriptors parsing"); + return -1; + } + + retval = usb_parse_endpoint(ifp->endpoint + i, buffer, size); + if (retval < 0) + return retval; + + buffer += retval; + parsed += retval; + size -= retval; + } + + /* We check to see if it's an alternate to this one */ + d = (struct usb_interface_descriptor *)buffer; + if (size < USB_DT_INTERFACE_SIZE + || d->bDescriptorType != USB_DT_INTERFACE + || !d->bAlternateSetting) + return parsed; + } + + return parsed; +} + +int usb_parse_configuration(struct usb_host_config *config, char *buffer) +{ + int i, retval, size; + struct usb_descriptor_header *header; + + memcpy(&config->desc, buffer, USB_DT_CONFIG_SIZE); + le16_to_cpus(&config->desc.wTotalLength); + size = config->desc.wTotalLength; + + if (config->desc.bNumInterfaces > USB_MAXINTERFACES) { + warn("too many interfaces"); + return -1; + } + + config->interface = (struct usb_interface *) + kmalloc(config->desc.bNumInterfaces * + sizeof(struct usb_interface), GFP_KERNEL); + dbg("kmalloc IF %p, numif %i", config->interface, config->desc.bNumInterfaces); + if (!config->interface) { + err("out of memory"); + return -1; + } + + memset(config->interface, 0, + config->desc.bNumInterfaces * sizeof(struct usb_interface)); + + buffer += config->desc.bLength; + size -= config->desc.bLength; + + config->extra = NULL; + config->extralen = 0; + + for (i = 0; i < config->desc.bNumInterfaces; i++) { + int numskipped, len; + char *begin; + + /* Skip over the rest of the Class Specific or Vendor */ + /* Specific descriptors */ + begin = buffer; + numskipped = 0; + while (size >= sizeof(struct usb_descriptor_header)) { + header = (struct usb_descriptor_header *)buffer; + + if ((header->bLength > size) || (header->bLength < 2)) { + err("invalid descriptor length of %d", header->bLength); + return -1; + } + + /* If we find another "proper" descriptor then we're done */ + if ((header->bDescriptorType == USB_DT_ENDPOINT) || + (header->bDescriptorType == USB_DT_INTERFACE) || + (header->bDescriptorType == USB_DT_CONFIG) || + (header->bDescriptorType == USB_DT_DEVICE)) + break; + + dbg("skipping descriptor 0x%X", header->bDescriptorType); + numskipped++; + + buffer += header->bLength; + size -= header->bLength; + } + if (numskipped) + dbg("skipped %d class/vendor specific endpoint descriptors", numskipped); + + /* Copy any unknown descriptors into a storage area for */ + /* drivers to later parse */ + len = (int)(buffer - begin); + if (len) { + if (config->extralen) { + warn("extra config descriptor"); + } else { + config->extra = kmalloc(len, GFP_KERNEL); + if (!config->extra) { + err("couldn't allocate memory for config extra descriptors"); + config->extralen = 0; + return -1; + } + + memcpy(config->extra, begin, len); + config->extralen = len; + } + } + + retval = usb_parse_interface(config->interface + i, buffer, size); + if (retval < 0) + return retval; + + buffer += retval; + size -= retval; + } + + return size; +} + +// hub-only!! ... and only exported for reset/reinit path. +// otherwise used internally on disconnect/destroy path +void usb_destroy_configuration(struct usb_device *dev) +{ + int c, i, j, k; + + if (!dev->config) + return; + + if (dev->rawdescriptors) { + for (i = 0; i < dev->descriptor.bNumConfigurations; i++) + kfree(dev->rawdescriptors[i]); + + kfree(dev->rawdescriptors); + } + + for (c = 0; c < dev->descriptor.bNumConfigurations; c++) { + struct usb_host_config *cf = &dev->config[c]; + + if (!cf->interface) + break; + + for (i = 0; i < cf->desc.bNumInterfaces; i++) { + struct usb_interface *ifp = + &cf->interface[i]; + + if (!ifp->altsetting) + break; + + for (j = 0; j < ifp->num_altsetting; j++) { + struct usb_host_interface *as = + &ifp->altsetting[j]; + + if(as->extra) { + kfree(as->extra); + } + + if (!as->endpoint) + break; + + for(k = 0; k < as->desc.bNumEndpoints; k++) { + if(as->endpoint[k].extra) { + kfree(as->endpoint[k].extra); + } + } + kfree(as->endpoint); + } + + kfree(ifp->altsetting); + } + kfree(cf->interface); + } + kfree(dev->config); +} + + +// hub-only!! ... and only in reset path, or usb_new_device() +// (used by real hubs and virtual root hubs) +int usb_get_configuration(struct usb_device *dev) +{ + int result; + unsigned int cfgno, length; + unsigned char *buffer; + unsigned char *bigbuffer; + struct usb_config_descriptor *desc; + + if (dev->descriptor.bNumConfigurations > USB_MAXCONFIG) { + warn("too many configurations"); + return -EINVAL; + } + + if (dev->descriptor.bNumConfigurations < 1) { + warn("not enough configurations"); + return -EINVAL; + } + + dev->config = (struct usb_host_config *) + kmalloc(dev->descriptor.bNumConfigurations * + sizeof(struct usb_host_config), GFP_KERNEL); + if (!dev->config) { + err("out of memory"); + return -ENOMEM; + } + memset(dev->config, 0, dev->descriptor.bNumConfigurations * + sizeof(struct usb_host_config)); + + dev->rawdescriptors = (char **)kmalloc(sizeof(char *) * + dev->descriptor.bNumConfigurations, GFP_KERNEL); + if (!dev->rawdescriptors) { + err("out of memory"); + return -ENOMEM; + } + + buffer = kmalloc(8, GFP_KERNEL); + if (!buffer) { + err("unable to allocate memory for configuration descriptors"); + return -ENOMEM; + } + desc = (struct usb_config_descriptor *)buffer; + + for (cfgno = 0; cfgno < dev->descriptor.bNumConfigurations; cfgno++) { + /* We grab the first 8 bytes so we know how long the whole */ + /* configuration is */ + result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, buffer, 8); + if (result < 8) { + if (result < 0) + err("unable to get descriptor"); + else { + err("config descriptor too short (expected %i, got %i)", 8, result); + result = -EINVAL; + } + goto err; + } + + /* Get the full buffer */ + length = le16_to_cpu(desc->wTotalLength); + + bigbuffer = kmalloc(length, GFP_KERNEL); + if (!bigbuffer) { + err("unable to allocate memory for configuration descriptors"); + result = -ENOMEM; + goto err; + } + + /* Now that we know the length, get the whole thing */ + result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, bigbuffer, length); + if (result < 0) { + err("couldn't get all of config descriptors"); + kfree(bigbuffer); + goto err; + } + + if (result < length) { + err("config descriptor too short (expected %i, got %i)", length, result); + result = -EINVAL; + kfree(bigbuffer); + goto err; + } + + dev->rawdescriptors[cfgno] = bigbuffer; + + result = usb_parse_configuration(&dev->config[cfgno], bigbuffer); + if (result > 0) + dbg("descriptor data left"); + else if (result < 0) { + result = -EINVAL; + goto err; + } + } + + kfree(buffer); + return 0; +err: + kfree(buffer); + dev->descriptor.bNumConfigurations = cfgno; + return result; +} + diff --git a/reactos/drivers/usb/cromwell/core/hcd-pci.c b/reactos/drivers/usb/cromwell/core/hcd-pci.c new file mode 100644 index 00000000000..ca7182c0b2a --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/hcd-pci.c @@ -0,0 +1,365 @@ +/* + * (C) Copyright David Brownell 2000-2002 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#if 0 +#include + +#ifdef CONFIG_USB_DEBUG + #define DEBUG +#else + #undef DEBUG +#endif + +#include +#include +#include +#include +#include +#include +#include "hcd.h" +#else +#define DEBUG +#include "../usb_wrapper.h" +#include "hcd.h" +#endif + + +/* PCI-based HCs are normal, but custom bus glue should be ok */ + + +/*-------------------------------------------------------------------------*/ + +/* configure so an HC device and id are always provided */ +/* always called with process context; sleeping is OK */ + +/** + * usb_hcd_pci_probe - initialize PCI-based HCDs + * @dev: USB Host Controller being probed + * @id: pci hotplug id connecting controller to HCD framework + * Context: !in_interrupt() + * + * Allocates basic PCI resources for this USB host controller, and + * then invokes the start() method for the HCD associated with it + * through the hotplug entry's driver_data. + * + * Store this function in the HCD's struct pci_driver as probe(). + */ +int STDCALL usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id) +{ + struct hc_driver *driver; + unsigned long resource, len; + void *base; + struct usb_hcd *hcd; + int retval, region; + char buf [8]; + //char *bufp = buf; + + if (usb_disabled()) + return -ENODEV; + + if (!id || !(driver = (struct hc_driver *) id->driver_data)) + return -EINVAL; + + if (pci_enable_device (dev) < 0) + return -ENODEV; + + if (!dev->irq) { + err ("Found HC with no IRQ. Check BIOS/PCI %s setup!", + dev->slot_name); + return -ENODEV; + } + + if (driver->flags & HCD_MEMORY) { // EHCI, OHCI + region = 0; + resource = pci_resource_start (dev, 0); + len = pci_resource_len (dev, 0); + if (!request_mem_region (resource, len, driver->description)) { + dbg ("controller already in use"); + return -EBUSY; + } + base = ioremap_nocache (resource, len); + if (base == NULL) { + dbg ("error mapping memory"); + retval = -EFAULT; +clean_1: + release_mem_region (resource, len); + err ("init %s fail, %d", dev->slot_name, retval); + return retval; + } + + } else { // UHCI + resource = len = 0; + for (region = 0; region < PCI_ROM_RESOURCE; region++) { + if (!(pci_resource_flags (dev, region) & IORESOURCE_IO)) + continue; + + resource = pci_resource_start (dev, region); + len = pci_resource_len (dev, region); + if (request_region (resource, len, + driver->description)) + break; + } + if (region == PCI_ROM_RESOURCE) { + dbg ("no i/o regions available"); + return -EBUSY; + } + base = (void *) resource; + } + + // driver->start(), later on, will transfer device from + // control by SMM/BIOS to control by Linux (if needed) + + pci_set_master (dev); + + hcd = driver->hcd_alloc (); + if (hcd == NULL){ + dbg ("hcd alloc fail"); + retval = -ENOMEM; +clean_2: + if (driver->flags & HCD_MEMORY) { + iounmap (base); + goto clean_1; + } else { + release_region (resource, len); + err ("init %s fail, %d", dev->slot_name, retval); + return retval; + } + } + pci_set_drvdata (dev, hcd); + hcd->driver = driver; + hcd->description = driver->description; + hcd->pdev = dev; + hcd->self.bus_name = dev->slot_name; + hcd->product_desc = dev->dev.name; + hcd->self.controller = &dev->dev; + hcd->controller = hcd->self.controller; + + if ((retval = hcd_buffer_create (hcd)) != 0) { +clean_3: + driver->hcd_free (hcd); + goto clean_2; + } + + dev_info (hcd->controller, "%s\n", hcd->product_desc); + +#ifndef __sparc__ + sprintf (buf, "%d", dev->irq); +#else + bufp = __irq_itoa(dev->irq); +#endif + if (request_irq (dev->irq, usb_hcd_irq, SA_SHIRQ, hcd->description, hcd) + != 0) { + dev_err (hcd->controller, + "request interrupt %s failed\n", bufp); + retval = -EBUSY; + goto clean_3; + } + hcd->irq = dev->irq; + + hcd->regs = base; + hcd->region = region; + dev_info (hcd->controller, "irq %s, %s %p\n", bufp, + (driver->flags & HCD_MEMORY) ? "pci mem" : "io base", + base); + + usb_bus_init (&hcd->self); + hcd->self.op = &usb_hcd_operations; + hcd->self.hcpriv = (void *) hcd; + + INIT_LIST_HEAD (&hcd->dev_list); + + usb_register_bus (&hcd->self); + + if ((retval = driver->start (hcd)) < 0) + usb_hcd_pci_remove (dev); + + return retval; +} +EXPORT_SYMBOL (usb_hcd_pci_probe); + + +/* may be called without controller electrically present */ +/* may be called with controller, bus, and devices active */ + +/** + * usb_hcd_pci_remove - shutdown processing for PCI-based HCDs + * @dev: USB Host Controller being removed + * Context: !in_interrupt() + * + * Reverses the effect of usb_hcd_pci_probe(), first invoking + * the HCD's stop() method. It is always called from a thread + * context, normally "rmmod", "apmd", or something similar. + * + * Store this function in the HCD's struct pci_driver as remove(). + */ +void STDCALL usb_hcd_pci_remove (struct pci_dev *dev) +{ + struct usb_hcd *hcd; + struct usb_device *hub; + + hcd = pci_get_drvdata(dev); + if (!hcd) + return; + dev_info (hcd->controller, "remove, state %x\n", hcd->state); + + if (in_interrupt ()) + BUG (); + + hub = hcd->self.root_hub; + hcd->state = USB_STATE_QUIESCING; + + dev_dbg (hcd->controller, "roothub graceful disconnect\n"); + usb_disconnect (&hub); + + hcd->driver->stop (hcd); + hcd_buffer_destroy (hcd); + hcd->state = USB_STATE_HALT; + pci_set_drvdata (dev, 0); + + free_irq (hcd->irq, hcd); + if (hcd->driver->flags & HCD_MEMORY) { + iounmap (hcd->regs); + release_mem_region (pci_resource_start (dev, 0), + pci_resource_len (dev, 0)); + } else { + release_region (pci_resource_start (dev, hcd->region), + pci_resource_len (dev, hcd->region)); + } + + usb_deregister_bus (&hcd->self); + if (atomic_read (&hcd->self.refcnt) != 1) { + dev_warn (hcd->controller, + "dangling refs (%d) to bus %d!\n", + atomic_read (&hcd->self.refcnt) - 1, + hcd->self.busnum); + } + hcd->driver->hcd_free (hcd); +} +EXPORT_SYMBOL (usb_hcd_pci_remove); + + +#ifdef CONFIG_PM + +/* + * Some "sleep" power levels imply updating struct usb_driver + * to include a callback asking hcds to do their bit by checking + * if all the drivers can suspend. Gets involved with remote wakeup. + * + * If there are pending urbs, then HCs will need to access memory, + * causing extra power drain. New sleep()/wakeup() PM calls might + * be needed, beyond PCI suspend()/resume(). The root hub timer + * still be accessing memory though ... + * + * FIXME: USB should have some power budgeting support working with + * all kinds of hubs. + * + * FIXME: This assumes only D0->D3 suspend and D3->D0 resume. + * D1 and D2 states should do something, yes? + * + * FIXME: Should provide generic enable_wake(), calling pci_enable_wake() + * for all supported states, so that USB remote wakeup can work for any + * devices that support it (and are connected via powered hubs). + * + * FIXME: resume doesn't seem to work right any more... + */ + + +// 2.4 kernels have issued concurrent resumes (w/APM) +// we defend against that error; PCI doesn't yet. + +/** + * usb_hcd_pci_suspend - power management suspend of a PCI-based HCD + * @dev: USB Host Controller being suspended + * + * Store this function in the HCD's struct pci_driver as suspend(). + */ +int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state) +{ + struct usb_hcd *hcd; + int retval; + + hcd = pci_get_drvdata(dev); + dev_info (hcd->controller, "suspend to state %d\n", state); + + pci_save_state (dev, hcd->pci_state); + + // FIXME for all connected devices, leaf-to-root: + // driver->suspend() + // proposed "new 2.5 driver model" will automate that + + /* driver may want to disable DMA etc */ + retval = hcd->driver->suspend (hcd, state); + hcd->state = USB_STATE_SUSPENDED; + + pci_set_power_state (dev, state); + return retval; +} +EXPORT_SYMBOL (usb_hcd_pci_suspend); + +/** + * usb_hcd_pci_resume - power management resume of a PCI-based HCD + * @dev: USB Host Controller being resumed + * + * Store this function in the HCD's struct pci_driver as resume(). + */ +int usb_hcd_pci_resume (struct pci_dev *dev) +{ + struct usb_hcd *hcd; + int retval; + + hcd = pci_get_drvdata(dev); + dev_info (hcd->controller, "resume\n"); + + /* guard against multiple resumes (APM bug?) */ + atomic_inc (&hcd->resume_count); + if (atomic_read (&hcd->resume_count) != 1) { + dev_err (hcd->controller, "concurrent PCI resumes\n"); + retval = 0; + goto done; + } + + retval = -EBUSY; + if (hcd->state != USB_STATE_SUSPENDED) { + dev_dbg (hcd->controller, "can't resume, not suspended!\n"); + goto done; + } + hcd->state = USB_STATE_RESUMING; + + pci_set_power_state (dev, 0); + pci_restore_state (dev, hcd->pci_state); + + retval = hcd->driver->resume (hcd); + if (!HCD_IS_RUNNING (hcd->state)) { + dev_dbg (hcd->controller, "resume fail, retval %d\n", retval); + usb_hc_died (hcd); +// FIXME: recover, reset etc. + } else { + // FIXME for all connected devices, root-to-leaf: + // driver->resume (); + // proposed "new 2.5 driver model" will automate that + } + +done: + atomic_dec (&hcd->resume_count); + return retval; +} +EXPORT_SYMBOL (usb_hcd_pci_resume); + +#endif /* CONFIG_PM */ + + diff --git a/reactos/drivers/usb/cromwell/core/hcd.c b/reactos/drivers/usb/cromwell/core/hcd.c new file mode 100644 index 00000000000..a9efdf7a77f --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/hcd.c @@ -0,0 +1,1499 @@ +/* + * (C) Copyright Linus Torvalds 1999 + * (C) Copyright Johannes Erdfelt 1999-2001 + * (C) Copyright Andreas Gal 1999 + * (C) Copyright Gregory P. Smith 1999 + * (C) Copyright Deti Fliegl 1999 + * (C) Copyright Randy Dunlap 2000 + * (C) Copyright David Brownell 2000-2002 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#if 0 +#include + +#ifdef CONFIG_USB_DEBUG +#define DEBUG +#endif + +#include +#include +#include +#include +#include +#include /* for UTS_SYSNAME */ +#include /* for hcd->pdev and dma addressing */ +#include +#include + +#include +#else +#include "../usb_wrapper.h" +//#define DEBUG +#endif + +#include "hcd.h" + +// #define USB_BANDWIDTH_MESSAGES + +/*-------------------------------------------------------------------------*/ + +/* + * USB Host Controller Driver framework + * + * Plugs into usbcore (usb_bus) and lets HCDs share code, minimizing + * HCD-specific behaviors/bugs. + * + * This does error checks, tracks devices and urbs, and delegates to a + * "hc_driver" only for code (and data) that really needs to know about + * hardware differences. That includes root hub registers, i/o queues, + * and so on ... but as little else as possible. + * + * Shared code includes most of the "root hub" code (these are emulated, + * though each HC's hardware works differently) and PCI glue, plus request + * tracking overhead. The HCD code should only block on spinlocks or on + * hardware handshaking; blocking on software events (such as other kernel + * threads releasing resources, or completing actions) is all generic. + * + * Happens the USB 2.0 spec says this would be invisible inside the "USBD", + * and includes mostly a "HCDI" (HCD Interface) along with some APIs used + * only by the hub driver ... and that neither should be seen or used by + * usb client device drivers. + * + * Contributors of ideas or unattributed patches include: David Brownell, + * Roman Weissgaerber, Rory Bolt, Greg Kroah-Hartman, ... + * + * HISTORY: + * 2002-02-21 Pull in most of the usb_bus support from usb.c; some + * associated cleanup. "usb_hcd" still != "usb_bus". + * 2001-12-12 Initial patch version for Linux 2.5.1 kernel. + */ + +/*-------------------------------------------------------------------------*/ + +/* host controllers we manage */ +LIST_HEAD (usb_bus_list); +EXPORT_SYMBOL_GPL (usb_bus_list); + +/* used when allocating bus numbers */ +#define USB_MAXBUS 64 +struct usb_busmap { + unsigned long busmap [USB_MAXBUS / (8*sizeof (unsigned long))]; +}; +static struct usb_busmap busmap; + +/* used when updating list of hcds */ +DECLARE_MUTEX (usb_bus_list_lock); /* exported only for usbfs */ +EXPORT_SYMBOL_GPL (usb_bus_list_lock); + +/* used when updating hcd data */ +static spinlock_t hcd_data_lock = SPIN_LOCK_UNLOCKED; + +/*-------------------------------------------------------------------------*/ + +/* + * Sharable chunks of root hub code. + */ + +/*-------------------------------------------------------------------------*/ + +#define KERNEL_REL ((LINUX_VERSION_CODE >> 16) & 0x0ff) +#define KERNEL_VER ((LINUX_VERSION_CODE >> 8) & 0x0ff) + +/* usb 2.0 root hub device descriptor */ +static const u8 usb2_rh_dev_descriptor [18] = { + 0x12, /* __u8 bLength; */ + 0x01, /* __u8 bDescriptorType; Device */ + 0x00, 0x02, /* __u16 bcdUSB; v2.0 */ + + 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ + 0x00, /* __u8 bDeviceSubClass; */ + 0x01, /* __u8 bDeviceProtocol; [ usb 2.0 single TT ]*/ + 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ + + 0x00, 0x00, /* __u16 idVendor; */ + 0x00, 0x00, /* __u16 idProduct; */ + KERNEL_VER, KERNEL_REL, /* __u16 bcdDevice */ + + 0x03, /* __u8 iManufacturer; */ + 0x02, /* __u8 iProduct; */ + 0x01, /* __u8 iSerialNumber; */ + 0x01 /* __u8 bNumConfigurations; */ +}; + +/* no usb 2.0 root hub "device qualifier" descriptor: one speed only */ + +/* usb 1.1 root hub device descriptor */ +static const u8 usb11_rh_dev_descriptor [18] = { + 0x12, /* __u8 bLength; */ + 0x01, /* __u8 bDescriptorType; Device */ + 0x10, 0x01, /* __u16 bcdUSB; v1.1 */ + + 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ + 0x00, /* __u8 bDeviceSubClass; */ + 0x00, /* __u8 bDeviceProtocol; [ low/full speeds only ] */ + 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ + + 0x00, 0x00, /* __u16 idVendor; */ + 0x00, 0x00, /* __u16 idProduct; */ + KERNEL_VER, KERNEL_REL, /* __u16 bcdDevice */ + + 0x03, /* __u8 iManufacturer; */ + 0x02, /* __u8 iProduct; */ + 0x01, /* __u8 iSerialNumber; */ + 0x01 /* __u8 bNumConfigurations; */ +}; + + +/*-------------------------------------------------------------------------*/ + +/* Configuration descriptors for our root hubs */ + +static const u8 fs_rh_config_descriptor [] = { + + /* one configuration */ + 0x09, /* __u8 bLength; */ + 0x02, /* __u8 bDescriptorType; Configuration */ + 0x19, 0x00, /* __u16 wTotalLength; */ + 0x01, /* __u8 bNumInterfaces; (1) */ + 0x01, /* __u8 bConfigurationValue; */ + 0x00, /* __u8 iConfiguration; */ + 0x40, /* __u8 bmAttributes; + Bit 7: Bus-powered, + 6: Self-powered, + 5 Remote-wakwup, + 4..0: resvd */ + 0x00, /* __u8 MaxPower; */ + + /* USB 1.1: + * USB 2.0, single TT organization (mandatory): + * one interface, protocol 0 + * + * USB 2.0, multiple TT organization (optional): + * two interfaces, protocols 1 (like single TT) + * and 2 (multiple TT mode) ... config is + * sometimes settable + * NOT IMPLEMENTED + */ + + /* one interface */ + 0x09, /* __u8 if_bLength; */ + 0x04, /* __u8 if_bDescriptorType; Interface */ + 0x00, /* __u8 if_bInterfaceNumber; */ + 0x00, /* __u8 if_bAlternateSetting; */ + 0x01, /* __u8 if_bNumEndpoints; */ + 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ + 0x00, /* __u8 if_bInterfaceSubClass; */ + 0x00, /* __u8 if_bInterfaceProtocol; [usb1.1 or single tt] */ + 0x00, /* __u8 if_iInterface; */ + + /* one endpoint (status change endpoint) */ + 0x07, /* __u8 ep_bLength; */ + 0x05, /* __u8 ep_bDescriptorType; Endpoint */ + 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ + 0x03, /* __u8 ep_bmAttributes; Interrupt */ + 0x02, 0x00, /* __u16 ep_wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */ + 0xff /* __u8 ep_bInterval; (255ms -- usb 2.0 spec) */ +}; + +static const u8 hs_rh_config_descriptor [] = { + + /* one configuration */ + 0x09, /* __u8 bLength; */ + 0x02, /* __u8 bDescriptorType; Configuration */ + 0x19, 0x00, /* __u16 wTotalLength; */ + 0x01, /* __u8 bNumInterfaces; (1) */ + 0x01, /* __u8 bConfigurationValue; */ + 0x00, /* __u8 iConfiguration; */ + 0x40, /* __u8 bmAttributes; + Bit 7: Bus-powered, + 6: Self-powered, + 5 Remote-wakwup, + 4..0: resvd */ + 0x00, /* __u8 MaxPower; */ + + /* USB 1.1: + * USB 2.0, single TT organization (mandatory): + * one interface, protocol 0 + * + * USB 2.0, multiple TT organization (optional): + * two interfaces, protocols 1 (like single TT) + * and 2 (multiple TT mode) ... config is + * sometimes settable + * NOT IMPLEMENTED + */ + + /* one interface */ + 0x09, /* __u8 if_bLength; */ + 0x04, /* __u8 if_bDescriptorType; Interface */ + 0x00, /* __u8 if_bInterfaceNumber; */ + 0x00, /* __u8 if_bAlternateSetting; */ + 0x01, /* __u8 if_bNumEndpoints; */ + 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ + 0x00, /* __u8 if_bInterfaceSubClass; */ + 0x00, /* __u8 if_bInterfaceProtocol; [usb1.1 or single tt] */ + 0x00, /* __u8 if_iInterface; */ + + /* one endpoint (status change endpoint) */ + 0x07, /* __u8 ep_bLength; */ + 0x05, /* __u8 ep_bDescriptorType; Endpoint */ + 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ + 0x03, /* __u8 ep_bmAttributes; Interrupt */ + 0x02, 0x00, /* __u16 ep_wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */ + 0x0c /* __u8 ep_bInterval; (256ms -- usb 2.0 spec) */ +}; + +/*-------------------------------------------------------------------------*/ + +/* + * helper routine for returning string descriptors in UTF-16LE + * input can actually be ISO-8859-1; ASCII is its 7-bit subset + */ +static int ascii2utf (char *s, u8 *utf, int utfmax) +{ + int retval; + + for (retval = 0; *s && utfmax > 1; utfmax -= 2, retval += 2) { + *utf++ = *s++; + *utf++ = 0; + } + return retval; +} + +/* + * rh_string - provides manufacturer, product and serial strings for root hub + * @id: the string ID number (1: serial number, 2: product, 3: vendor) + * @hcd: the host controller for this root hub + * @type: string describing our driver + * @data: return packet in UTF-16 LE + * @len: length of the return packet + * + * Produces either a manufacturer, product or serial number string for the + * virtual root hub device. + */ +static int rh_string ( + int id, + struct usb_hcd *hcd, + u8 *data, + int len +) { + char buf [100]; + + // language ids + if (id == 0) { + *data++ = 4; *data++ = 3; /* 4 bytes string data */ + *data++ = 0x09; *data++ = 0x04; /* MSFT-speak for "en-us" */ + return 4; + + // serial number + } else if (id == 1) { + strcpy (buf, hcd->self.bus_name); + + // product description + } else if (id == 2) { + strcpy (buf, hcd->product_desc); + + // id 3 == vendor description + } else if (id == 3) { + sprintf (buf, "%s %s %s", UTS_SYSNAME, UTS_RELEASE, + hcd->description); + + // unsupported IDs --> "protocol stall" + } else + return 0; + + data [0] = 2 * (strlen (buf) + 1); + data [1] = 3; /* type == string */ + return 2 + ascii2utf (buf, data + 2, len - 2); +} + + +/* Root hub control transfers execute synchronously */ +static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) +{ + struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *) urb->setup_packet; + u16 typeReq, wValue, wIndex, wLength; + const u8 *bufp = 0; + u8 *ubuf = urb->transfer_buffer; + int len = 0; + //unsigned long flags; + + typeReq = (cmd->bRequestType << 8) | cmd->bRequest; + wValue = le16_to_cpu (cmd->wValue); + wIndex = le16_to_cpu (cmd->wIndex); + wLength = le16_to_cpu (cmd->wLength); + + if (wLength > urb->transfer_buffer_length) + goto error; + + /* set up for success */ + urb->status = 0; + urb->actual_length = wLength; + switch (typeReq) { + + /* DEVICE REQUESTS */ + + case DeviceRequest | USB_REQ_GET_STATUS: + // DEVICE_REMOTE_WAKEUP + ubuf [0] = 1; // selfpowered + ubuf [1] = 0; + /* FALLTHROUGH */ + case DeviceOutRequest | USB_REQ_CLEAR_FEATURE: + case DeviceOutRequest | USB_REQ_SET_FEATURE: + dev_dbg (hcd->controller, "no device features yet yet\n"); + break; + case DeviceRequest | USB_REQ_GET_CONFIGURATION: + ubuf [0] = 1; + /* FALLTHROUGH */ + case DeviceOutRequest | USB_REQ_SET_CONFIGURATION: + break; + case DeviceRequest | USB_REQ_GET_DESCRIPTOR: + switch (wValue & 0xff00) { + case USB_DT_DEVICE << 8: + if (hcd->driver->flags & HCD_USB2) + bufp = usb2_rh_dev_descriptor; + else if (hcd->driver->flags & HCD_USB11) + bufp = usb11_rh_dev_descriptor; + else + goto error; + len = 18; + break; + case USB_DT_CONFIG << 8: + if (hcd->driver->flags & HCD_USB2) { + bufp = hs_rh_config_descriptor; + len = sizeof hs_rh_config_descriptor; + } else { + bufp = fs_rh_config_descriptor; + len = sizeof fs_rh_config_descriptor; + } + break; + case USB_DT_STRING << 8: + urb->actual_length = rh_string ( + wValue & 0xff, hcd, + ubuf, wLength); + break; + default: + goto error; + } + break; + case DeviceRequest | USB_REQ_GET_INTERFACE: + ubuf [0] = 0; + /* FALLTHROUGH */ + case DeviceOutRequest | USB_REQ_SET_INTERFACE: + break; + case DeviceOutRequest | USB_REQ_SET_ADDRESS: + // wValue == urb->dev->devaddr + dev_dbg (hcd->controller, "root hub device address %d\n", + wValue); + break; + + /* INTERFACE REQUESTS (no defined feature/status flags) */ + + /* ENDPOINT REQUESTS */ + + case EndpointRequest | USB_REQ_GET_STATUS: + // ENDPOINT_HALT flag + ubuf [0] = 0; + ubuf [1] = 0; + /* FALLTHROUGH */ + case EndpointOutRequest | USB_REQ_CLEAR_FEATURE: + case EndpointOutRequest | USB_REQ_SET_FEATURE: + dev_dbg (hcd->controller, "no endpoint features yet\n"); + break; + + /* CLASS REQUESTS (and errors) */ + + default: + /* non-generic request */ + urb->status = hcd->driver->hub_control (hcd, + typeReq, wValue, wIndex, + ubuf, wLength); + break; +error: + /* "protocol stall" on error */ + urb->status = -EPIPE; + dev_dbg (hcd->controller, "unsupported hub control message (maxchild %d)\n", + urb->dev->maxchild); + } + if (urb->status) { + urb->actual_length = 0; + dev_dbg (hcd->controller, "CTRL: TypeReq=0x%x val=0x%x idx=0x%x len=%d ==> %d\n", + typeReq, wValue, wIndex, wLength, urb->status); + } + if (bufp) { + if (urb->transfer_buffer_length < len) + len = urb->transfer_buffer_length; + urb->actual_length = len; + // always USB_DIR_IN, toward host + memcpy (ubuf, bufp, len); + } + + /* any errors get returned through the urb completion */ + local_irq_save (flags); + usb_hcd_giveback_urb (hcd, urb, NULL); + local_irq_restore (flags); + return 0; +} + +/*-------------------------------------------------------------------------*/ + +/* + * Root Hub interrupt transfers are synthesized with a timer. + * Completions are called in_interrupt() but not in_irq(). + */ + +static void rh_report_status (unsigned long ptr); + +static int rh_status_urb (struct usb_hcd *hcd, struct urb *urb) +{ + int len = 1 + (urb->dev->maxchild / 8); + + /* rh_timer protected by hcd_data_lock */ + if (hcd->rh_timer.data + || urb->status != -EINPROGRESS + || urb->transfer_buffer_length < len) { + dev_dbg (hcd->controller, + "not queuing rh status urb, stat %d\n", + urb->status); + return -EINVAL; + } + + init_timer (&hcd->rh_timer); + + hcd->rh_timer.function = rh_report_status; + hcd->rh_timer.data = (unsigned long) urb; + /* USB 2.0 spec says 256msec; this is close enough */ + hcd->rh_timer.expires = jiffies + HZ/4; + add_timer (&hcd->rh_timer); + urb->hcpriv = hcd; /* nonzero to indicate it's queued */ + return 0; +} + +/* timer callback */ + +static void rh_report_status (unsigned long ptr) +{ + struct urb *urb; + struct usb_hcd *hcd; + int length; + //unsigned long flags; + + urb = (struct urb *) ptr; + local_irq_save (flags); + spin_lock (&urb->lock); + + /* do nothing if the hc is gone or the urb's been unlinked */ + if (!urb->dev + || urb->status != -EINPROGRESS + || (hcd = urb->dev->bus->hcpriv) == 0 + || !HCD_IS_RUNNING (hcd->state)) { + spin_unlock (&urb->lock); + local_irq_restore (flags); + return; + } + + length = hcd->driver->hub_status_data (hcd, urb->transfer_buffer); + + /* complete the status urb, or retrigger the timer */ + spin_lock (&hcd_data_lock); + if (length > 0) { + hcd->rh_timer.data = 0; + urb->actual_length = length; + urb->status = 0; + urb->hcpriv = 0; + } else + mod_timer (&hcd->rh_timer, jiffies + HZ/4); + spin_unlock (&hcd_data_lock); + spin_unlock (&urb->lock); + + /* local irqs are always blocked in completions */ + if (length > 0) + usb_hcd_giveback_urb (hcd, urb, NULL); + local_irq_restore (flags); +} + +/*-------------------------------------------------------------------------*/ + +static int rh_urb_enqueue (struct usb_hcd *hcd, struct urb *urb) +{ + if (usb_pipeint (urb->pipe)) { + int retval; + unsigned long flags; + + spin_lock_irqsave (&hcd_data_lock, flags); + retval = rh_status_urb (hcd, urb); + spin_unlock_irqrestore (&hcd_data_lock, flags); + return retval; + } + if (usb_pipecontrol (urb->pipe)) + return rh_call_control (hcd, urb); + else + return -EINVAL; +} + +/*-------------------------------------------------------------------------*/ + +void usb_rh_status_dequeue (struct usb_hcd *hcd, struct urb *urb) +{ + //unsigned long flags; + + /* note: always a synchronous unlink */ + del_timer_sync (&hcd->rh_timer); + hcd->rh_timer.data = 0; + + local_irq_save (flags); + urb->hcpriv = 0; + usb_hcd_giveback_urb (hcd, urb, NULL); + local_irq_restore (flags); +} + +/*-------------------------------------------------------------------------*/ + +/* exported only within usbcore */ +void usb_bus_get (struct usb_bus *bus) +{ + atomic_inc (&bus->refcnt); +} + +/* exported only within usbcore */ +void usb_bus_put (struct usb_bus *bus) +{ + if (atomic_dec_and_test (&bus->refcnt)) + kfree (bus); +} + +/*-------------------------------------------------------------------------*/ + +/** + * usb_bus_init - shared initialization code + * @bus: the bus structure being initialized + * + * This code is used to initialize a usb_bus structure, memory for which is + * separately managed. + */ +void STDCALL usb_bus_init (struct usb_bus *bus) +{ + memset (&bus->devmap, 0, sizeof(struct usb_devmap)); + + bus->devnum_next = 1; + + bus->root_hub = NULL; + bus->hcpriv = NULL; + bus->busnum = -1; + bus->bandwidth_allocated = 0; + bus->bandwidth_int_reqs = 0; + bus->bandwidth_isoc_reqs = 0; + + INIT_LIST_HEAD (&bus->bus_list); + + atomic_set (&bus->refcnt, 1); +} + +/** + * usb_alloc_bus - creates a new USB host controller structure + * @op: pointer to a struct usb_operations that this bus structure should use + * Context: !in_interrupt() + * + * Creates a USB host controller bus structure with the specified + * usb_operations and initializes all the necessary internal objects. + * + * If no memory is available, NULL is returned. + * + * The caller should call usb_free_bus() when it is finished with the structure. + */ +struct usb_bus STDCALL *usb_alloc_bus (struct usb_operations *op) +{ + struct usb_bus *bus; + + bus = kmalloc (sizeof *bus, GFP_KERNEL); + if (!bus) + return NULL; + usb_bus_init (bus); + bus->op = op; + return bus; +} + +/** + * usb_free_bus - frees the memory used by a bus structure + * @bus: pointer to the bus to free + * + * To be invoked by a HCD, only as the last step of decoupling from + * hardware. It is an error to call this if the reference count is + * anything but one. That would indicate that some system component + * did not correctly shut down, and thought the hardware was still + * accessible. + */ +void STDCALL usb_free_bus (struct usb_bus *bus) +{ + if (!bus) + return; + if (atomic_read (&bus->refcnt) != 1) + err ("usb_free_bus #%d, count != 1", bus->busnum); + usb_bus_put (bus); +} + +/*-------------------------------------------------------------------------*/ + +/** + * usb_register_bus - registers the USB host controller with the usb core + * @bus: pointer to the bus to register + * Context: !in_interrupt() + * + * Assigns a bus number, and links the controller into usbcore data + * structures so that it can be seen by scanning the bus list. + */ +void STDCALL usb_register_bus(struct usb_bus *bus) +{ + int busnum; + + down (&usb_bus_list_lock); + busnum = find_next_zero_bit (busmap.busmap, USB_MAXBUS, 1); + if (busnum < USB_MAXBUS) { + set_bit (busnum, busmap.busmap); + bus->busnum = busnum; + } else + warn ("too many buses"); + + usb_bus_get (bus); + + /* Add it to the list of buses */ + list_add (&bus->bus_list, &usb_bus_list); + up (&usb_bus_list_lock); + + usbfs_add_bus (bus); + + dev_info (bus->controller, "new USB bus registered, assigned bus number %d\n", bus->busnum); +} + +/** + * usb_deregister_bus - deregisters the USB host controller + * @bus: pointer to the bus to deregister + * Context: !in_interrupt() + * + * Recycles the bus number, and unlinks the controller from usbcore data + * structures so that it won't be seen by scanning the bus list. + */ +void STDCALL usb_deregister_bus (struct usb_bus *bus) +{ + dev_info (bus->controller, "USB bus %d deregistered\n", bus->busnum); + + /* + * NOTE: make sure that all the devices are removed by the + * controller code, as well as having it call this when cleaning + * itself up + */ + down (&usb_bus_list_lock); + list_del (&bus->bus_list); + up (&usb_bus_list_lock); + + usbfs_remove_bus (bus); + + clear_bit (bus->busnum, busmap.busmap); + + usb_bus_put (bus); +} + +/** + * usb_register_root_hub - called by HCD to register its root hub + * @usb_dev: the usb root hub device to be registered. + * @parent_dev: the parent device of this root hub. + * + * The USB host controller calls this function to register the root hub + * properly with the USB subsystem. It sets up the device properly in + * the driverfs tree, and then calls usb_new_device() to register the + * usb device. + */ +int STDCALL usb_register_root_hub (struct usb_device *usb_dev, struct device *parent_dev) +{ + int retval; + + sprintf (&usb_dev->dev.bus_id[0], "usb%d", usb_dev->bus->busnum); + usb_dev->state = USB_STATE_DEFAULT; + retval = usb_new_device (usb_dev, parent_dev); + if (retval) + dev_err (parent_dev, "can't register root hub for %s, %d\n", + usb_dev->dev.bus_id, retval); + return retval; +} + + +/*-------------------------------------------------------------------------*/ + +/** + * usb_calc_bus_time - approximate periodic transaction time in nanoseconds + * @speed: from dev->speed; USB_SPEED_{LOW,FULL,HIGH} + * @is_input: true iff the transaction sends data to the host + * @isoc: true for isochronous transactions, false for interrupt ones + * @bytecount: how many bytes in the transaction. + * + * Returns approximate bus time in nanoseconds for a periodic transaction. + * See USB 2.0 spec section 5.11.3; only periodic transfers need to be + * scheduled in software, this function is only used for such scheduling. + */ +long STDCALL usb_calc_bus_time (int speed, int is_input, int isoc, int bytecount) +{ + unsigned long tmp; + + switch (speed) { + case USB_SPEED_LOW: /* INTR only */ + if (is_input) { + tmp = (67667L * (31L + 10L * BitTime (bytecount))) / 1000L; + return (64060L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp); + } else { + tmp = (66700L * (31L + 10L * BitTime (bytecount))) / 1000L; + return (64107L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp); + } + case USB_SPEED_FULL: /* ISOC or INTR */ + if (isoc) { + tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L; + return (((is_input) ? 7268L : 6265L) + BW_HOST_DELAY + tmp); + } else { + tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L; + return (9107L + BW_HOST_DELAY + tmp); + } + case USB_SPEED_HIGH: /* ISOC or INTR */ + // FIXME adjust for input vs output + if (isoc) + tmp = HS_USECS (bytecount); + else + tmp = HS_USECS_ISO (bytecount); + return tmp; + default: + dbg ("bogus device speed!"); + return -1; + } +} + +/* + * usb_check_bandwidth(): + * + * old_alloc is from host_controller->bandwidth_allocated in microseconds; + * bustime is from calc_bus_time(), but converted to microseconds. + * + * returns if successful, + * or -ENOSPC if bandwidth request fails. + * + * FIXME: + * This initial implementation does not use Endpoint.bInterval + * in managing bandwidth allocation. + * It probably needs to be expanded to use Endpoint.bInterval. + * This can be done as a later enhancement (correction). + * + * This will also probably require some kind of + * frame allocation tracking...meaning, for example, + * that if multiple drivers request interrupts every 10 USB frames, + * they don't all have to be allocated at + * frame numbers N, N+10, N+20, etc. Some of them could be at + * N+11, N+21, N+31, etc., and others at + * N+12, N+22, N+32, etc. + * + * Similarly for isochronous transfers... + * + * Individual HCDs can schedule more directly ... this logic + * is not correct for high speed transfers. + */ +int STDCALL usb_check_bandwidth (struct usb_device *dev, struct urb *urb) +{ + unsigned int pipe = urb->pipe; + long bustime; + int is_in = usb_pipein (pipe); + int is_iso = usb_pipeisoc (pipe); + int old_alloc = dev->bus->bandwidth_allocated; + int new_alloc; + + + bustime = NS_TO_US (usb_calc_bus_time (dev->speed, is_in, is_iso, + usb_maxpacket (dev, pipe, !is_in))); + if (is_iso) + bustime /= urb->number_of_packets; + + new_alloc = old_alloc + (int) bustime; + if (new_alloc > FRAME_TIME_MAX_USECS_ALLOC) { +#ifdef DEBUG + char *mode = +#ifdef CONFIG_USB_BANDWIDTH + ""; +#else + "would have "; +#endif + dev_dbg (&dev->dev, "usb_check_bandwidth %sFAILED: %d + %ld = %d usec\n", + mode, old_alloc, bustime, new_alloc); +#endif +#ifdef CONFIG_USB_BANDWIDTH + bustime = -ENOSPC; /* report error */ +#endif + } + + return bustime; +} + + +/** + * usb_claim_bandwidth - records bandwidth for a periodic transfer + * @dev: source/target of request + * @urb: request (urb->dev == dev) + * @bustime: bandwidth consumed, in (average) microseconds per frame + * @isoc: true iff the request is isochronous + * + * Bus bandwidth reservations are recorded purely for diagnostic purposes. + * HCDs are expected not to overcommit periodic bandwidth, and to record such + * reservations whenever endpoints are added to the periodic schedule. + * + * FIXME averaging per-frame is suboptimal. Better to sum over the HCD's + * entire periodic schedule ... 32 frames for OHCI, 1024 for UHCI, settable + * for EHCI (256/512/1024 frames, default 1024) and have the bus expose how + * large its periodic schedule is. + */ +void STDCALL usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, int bustime, int isoc) +{ + dev->bus->bandwidth_allocated += bustime; + if (isoc) + dev->bus->bandwidth_isoc_reqs++; + else + dev->bus->bandwidth_int_reqs++; + urb->bandwidth = bustime; + +#ifdef USB_BANDWIDTH_MESSAGES + dev_dbg (&dev->dev, "bandwidth alloc increased by %d (%s) to %d for %d requesters\n", + bustime, + isoc ? "ISOC" : "INTR", + dev->bus->bandwidth_allocated, + dev->bus->bandwidth_int_reqs + dev->bus->bandwidth_isoc_reqs); +#endif +} + + +/** + * usb_release_bandwidth - reverses effect of usb_claim_bandwidth() + * @dev: source/target of request + * @urb: request (urb->dev == dev) + * @isoc: true iff the request is isochronous + * + * This records that previously allocated bandwidth has been released. + * Bandwidth is released when endpoints are removed from the host controller's + * periodic schedule. + */ +void STDCALL usb_release_bandwidth (struct usb_device *dev, struct urb *urb, int isoc) +{ + dev->bus->bandwidth_allocated -= urb->bandwidth; + if (isoc) + dev->bus->bandwidth_isoc_reqs--; + else + dev->bus->bandwidth_int_reqs--; + +#ifdef USB_BANDWIDTH_MESSAGES + dev_dbg (&dev->dev, "bandwidth alloc reduced by %d (%s) to %d for %d requesters\n", + urb->bandwidth, + isoc ? "ISOC" : "INTR", + dev->bus->bandwidth_allocated, + dev->bus->bandwidth_int_reqs + dev->bus->bandwidth_isoc_reqs); +#endif + urb->bandwidth = 0; +} + + +/*-------------------------------------------------------------------------*/ + +/* + * Generic HC operations. + */ + +/*-------------------------------------------------------------------------*/ + +/* called from khubd, or root hub init threads for hcd-private init */ +static int hcd_alloc_dev (struct usb_device *udev) +{ + struct hcd_dev *dev; + struct usb_hcd *hcd; + unsigned long flags; + + if (!udev || udev->hcpriv) + return -EINVAL; + if (!udev->bus || !udev->bus->hcpriv) + return -ENODEV; + hcd = udev->bus->hcpriv; + if (hcd->state == USB_STATE_QUIESCING) + return -ENOLINK; + + dev = (struct hcd_dev *) kmalloc (sizeof *dev, GFP_KERNEL); + if (dev == NULL) + return -ENOMEM; + memset (dev, 0, sizeof *dev); + + INIT_LIST_HEAD (&dev->dev_list); + INIT_LIST_HEAD (&dev->urb_list); + + spin_lock_irqsave (&hcd_data_lock, flags); + list_add (&dev->dev_list, &hcd->dev_list); + // refcount is implicit + udev->hcpriv = dev; + spin_unlock_irqrestore (&hcd_data_lock, flags); + + return 0; +} + +/*-------------------------------------------------------------------------*/ + +static void urb_unlink (struct urb *urb) +{ + unsigned long flags; + struct usb_device *dev; + + /* Release any periodic transfer bandwidth */ + if (urb->bandwidth) + usb_release_bandwidth (urb->dev, urb, + usb_pipeisoc (urb->pipe)); + + /* clear all state linking urb to this dev (and hcd) */ + + spin_lock_irqsave (&hcd_data_lock, flags); + list_del_init (&urb->urb_list); + dev = urb->dev; + spin_unlock_irqrestore (&hcd_data_lock, flags); + usb_put_dev (dev); +} + + +/* may be called in any context with a valid urb->dev usecount + * caller surrenders "ownership" of urb + * expects usb_submit_urb() to have sanity checked and conditioned all + * inputs in the urb + */ +static int hcd_submit_urb (struct urb *urb, int mem_flags) +{ + int status; + struct usb_hcd *hcd = urb->dev->bus->hcpriv; + struct hcd_dev *dev = urb->dev->hcpriv; + unsigned long flags; + + + if (!hcd || !dev) + return -ENODEV; +// printk("submit_urb %p, # %i, t %i\n",urb,urb->dev->devnum,usb_pipetype(urb->pipe)); + /* + * FIXME: make urb timeouts be generic, keeping the HCD cores + * as simple as possible. + */ + + // NOTE: a generic device/urb monitoring hook would go here. + // hcd_monitor_hook(MONITOR_URB_SUBMIT, urb) + // It would catch submission paths for all urbs. + + /* + * Atomically queue the urb, first to our records, then to the HCD. + * Access to urb->status is controlled by urb->lock ... changes on + * i/o completion (normal or fault) or unlinking. + */ + + // FIXME: verify that quiescing hc works right (RH cleans up) + + spin_lock_irqsave (&hcd_data_lock, flags); + if (HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_QUIESCING) { + usb_get_dev (urb->dev); + list_add_tail (&urb->urb_list, &dev->urb_list); + status = 0; + } else { + INIT_LIST_HEAD (&urb->urb_list); + status = -ESHUTDOWN; + } + spin_unlock_irqrestore (&hcd_data_lock, flags); + if (status) + return status; + + /* increment urb's reference count as part of giving it to the HCD + * (which now controls it). HCD guarantees that it either returns + * an error or calls giveback(), but not both. + */ + + urb = usb_get_urb (urb); + if (urb->dev == hcd->self.root_hub) { + /* NOTE: requirement on hub callers (usbfs and the hub + * driver, for now) that URBs' urb->transfer_buffer be + * valid and usb_buffer_{sync,unmap}() not be needed, since + * they could clobber root hub response data. + */ + urb->transfer_flags |= URB_NO_DMA_MAP; + status = rh_urb_enqueue (hcd, urb); + goto done; + } + + /* lower level hcd code should use *_dma exclusively, + * unless it uses pio or talks to another transport. + */ + if (!(urb->transfer_flags & URB_NO_DMA_MAP) + && hcd->controller->dma_mask) { + if (usb_pipecontrol (urb->pipe)) + urb->setup_dma = dma_map_single ( + hcd->controller, + urb->setup_packet, + sizeof (struct usb_ctrlrequest), + DMA_TO_DEVICE); + if (urb->transfer_buffer_length != 0) + urb->transfer_dma = dma_map_single ( + hcd->controller, + urb->transfer_buffer, + urb->transfer_buffer_length, + usb_pipein (urb->pipe) + ? DMA_FROM_DEVICE + : DMA_TO_DEVICE); + } + + status = hcd->driver->urb_enqueue (hcd, urb, mem_flags); +done: + if (status) { + usb_put_urb (urb); + urb_unlink (urb); + } + return status; +} + +/*-------------------------------------------------------------------------*/ + +/* called in any context */ +static int hcd_get_frame_number (struct usb_device *udev) +{ + struct usb_hcd *hcd = (struct usb_hcd *)udev->bus->hcpriv; + return hcd->driver->get_frame_number (hcd); +} + +/*-------------------------------------------------------------------------*/ + +/* this makes the hcd giveback() the urb more quickly, by kicking it + * off hardware queues (which may take a while) and returning it as + * soon as practical. we've already set up the urb's return status, + * but we can't know if the callback completed already. + */ +static void +unlink1 (struct usb_hcd *hcd, struct urb *urb) +{ + if (urb == (struct urb *) hcd->rh_timer.data) + usb_rh_status_dequeue (hcd, urb); + else { + int value; + + /* failures "should" be harmless */ + value = hcd->driver->urb_dequeue (hcd, urb); + if (value != 0) + dev_dbg (hcd->controller, + "dequeue %p --> %d\n", + urb, value); + } +} + +struct completion_splice { // modified urb context: + /* did we complete? */ + struct completion done; + + /* original urb data */ + usb_complete_t complete; + void *context; +}; + +static void unlink_complete (struct urb *urb, struct pt_regs *regs) +{ + struct completion_splice *splice; + + splice = (struct completion_splice *) urb->context; + + /* issue original completion call */ + urb->complete = splice->complete; + urb->context = splice->context; + urb->complete (urb, regs); + + /* then let the synchronous unlink call complete */ + complete (&splice->done); +} + +/* + * called in any context; note ASYNC_UNLINK restrictions + * + * caller guarantees urb won't be recycled till both unlink() + * and the urb's completion function return + */ +static int hcd_unlink_urb (struct urb *urb) +{ + struct hcd_dev *dev; + struct usb_hcd *hcd = 0; + struct device *sys = 0; + unsigned long flags; + struct completion_splice splice; + int retval; + + if (!urb) + return -EINVAL; + + /* + * we contend for urb->status with the hcd core, + * which changes it while returning the urb. + * + * Caller guaranteed that the urb pointer hasn't been freed, and + * that it was submitted. But as a rule it can't know whether or + * not it's already been unlinked ... so we respect the reversed + * lock sequence needed for the usb_hcd_giveback_urb() code paths + * (urb lock, then hcd_data_lock) in case some other CPU is now + * unlinking it. + */ + spin_lock_irqsave (&urb->lock, flags); + spin_lock (&hcd_data_lock); + + if (!urb->dev || !urb->dev->bus) { + retval = -ENODEV; + goto done; + } + + dev = urb->dev->hcpriv; + sys = &urb->dev->dev; + hcd = urb->dev->bus->hcpriv; + if (!dev || !hcd) { + retval = -ENODEV; + goto done; + } + + if (!urb->hcpriv) { + retval = -EINVAL; + goto done; + } + + /* Any status except -EINPROGRESS means something already started to + * unlink this URB from the hardware. So there's no more work to do. + * + * FIXME use better explicit urb state + */ + if (urb->status != -EINPROGRESS) { + retval = -EBUSY; + goto done; + } + + /* maybe set up to block until the urb's completion fires. the + * lower level hcd code is always async, locking on urb->status + * updates; an intercepted completion unblocks us. + */ + if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) { + if (in_interrupt ()) { + dev_dbg (hcd->controller, "non-async unlink in_interrupt"); + retval = -EWOULDBLOCK; + goto done; + } + /* synchronous unlink: block till we see the completion */ + init_completion (&splice.done); + splice.complete = urb->complete; + splice.context = urb->context; + urb->complete = unlink_complete; + urb->context = &splice; + urb->status = -ENOENT; + } else { + /* asynchronous unlink */ + urb->status = -ECONNRESET; + } + spin_unlock (&hcd_data_lock); + spin_unlock_irqrestore (&urb->lock, flags); + + // FIXME remove splicing, so this becomes unlink1 (hcd, urb); + if (urb == (struct urb *) hcd->rh_timer.data) { + usb_rh_status_dequeue (hcd, urb); + retval = 0; + } else { + retval = hcd->driver->urb_dequeue (hcd, urb); + + /* hcds shouldn't really fail these calls, but... */ + if (retval) { + dev_dbg (sys, "dequeue %p --> %d\n", urb, retval); + if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) { + spin_lock_irqsave (&urb->lock, flags); + urb->complete = splice.complete; + urb->context = splice.context; + spin_unlock_irqrestore (&urb->lock, flags); + } + goto bye; + } + } + + /* block till giveback, if needed */ + if (urb->transfer_flags & URB_ASYNC_UNLINK) + return -EINPROGRESS; + + wait_for_completion (&splice.done); + return 0; + +done: + spin_unlock (&hcd_data_lock); + spin_unlock_irqrestore (&urb->lock, flags); +bye: + if (retval && sys && sys->driver) + dev_dbg (sys, "hcd_unlink_urb %p fail %d\n", urb, retval); + return retval; +} + +/*-------------------------------------------------------------------------*/ + +/* disables the endpoint: cancels any pending urbs, then synchronizes with + * the hcd to make sure all endpoint state is gone from hardware. use for + * set_configuration, set_interface, driver removal, physical disconnect. + * + * example: a qh stored in hcd_dev.ep[], holding state related to endpoint + * type, maxpacket size, toggle, halt status, and scheduling. + */ +static void hcd_endpoint_disable (struct usb_device *udev, int endpoint) +{ + unsigned long flags; + struct hcd_dev *dev; + struct usb_hcd *hcd; + struct urb *urb; + unsigned epnum = endpoint & USB_ENDPOINT_NUMBER_MASK; + + dev = udev->hcpriv; + hcd = udev->bus->hcpriv; + +rescan: + /* (re)block new requests, as best we can */ + if (endpoint & USB_DIR_IN) { + usb_endpoint_halt (udev, epnum, 0); + udev->epmaxpacketin [epnum] = 0; + } else { + usb_endpoint_halt (udev, epnum, 1); + udev->epmaxpacketout [epnum] = 0; + } + + /* then kill any current requests */ + spin_lock_irqsave (&hcd_data_lock, flags); + list_for_each_entry (urb, &dev->urb_list, urb_list) { + int tmp = urb->pipe; + + /* ignore urbs for other endpoints */ + if (usb_pipeendpoint (tmp) != epnum) + continue; + if ((tmp ^ endpoint) & USB_DIR_IN) + continue; + + /* another cpu may be in hcd, spinning on hcd_data_lock + * to giveback() this urb. the races here should be + * small, but a full fix needs a new "can't submit" + * urb state. + */ + if (urb->status != -EINPROGRESS) + continue; + usb_get_urb (urb); + spin_unlock_irqrestore (&hcd_data_lock, flags); + + spin_lock_irqsave (&urb->lock, flags); + tmp = urb->status; + if (tmp == -EINPROGRESS) + urb->status = -ESHUTDOWN; + spin_unlock_irqrestore (&urb->lock, flags); + + /* kick hcd unless it's already returning this */ + if (tmp == -EINPROGRESS) { + tmp = urb->pipe; + unlink1 (hcd, urb); + dev_dbg (hcd->controller, + "shutdown urb %p pipe %08x ep%d%s%s\n", + urb, tmp, usb_pipeendpoint (tmp), + (tmp & USB_DIR_IN) ? "in" : "out", + ({ char *s; \ + switch (usb_pipetype (tmp)) { \ + case PIPE_CONTROL: s = ""; break; \ + case PIPE_BULK: s = "-bulk"; break; \ + case PIPE_INTERRUPT: s = "-intr"; break; \ + default: s = "-iso"; break; \ + }; s;})); + } + usb_put_urb (urb); + + /* list contents may have changed */ + goto rescan; + } + spin_unlock_irqrestore (&hcd_data_lock, flags); + + /* synchronize with the hardware, so old configuration state + * clears out immediately (and will be freed). + */ + might_sleep (); + if (hcd->driver->endpoint_disable) + hcd->driver->endpoint_disable (hcd, dev, endpoint); +} + +/*-------------------------------------------------------------------------*/ + +/* called by khubd, rmmod, apmd, or other thread for hcd-private cleanup. + * we're guaranteed that the device is fully quiesced. also, that each + * endpoint has been hcd_endpoint_disabled. + */ + +static int hcd_free_dev (struct usb_device *udev) +{ + struct hcd_dev *dev; + struct usb_hcd *hcd; + unsigned long flags; + + if (!udev || !udev->hcpriv) + return -EINVAL; + + if (!udev->bus || !udev->bus->hcpriv) + return -ENODEV; + + // should udev->devnum == -1 ?? + + dev = udev->hcpriv; + hcd = udev->bus->hcpriv; + + /* device driver problem with refcounts? */ + if (!list_empty (&dev->urb_list)) { + dev_dbg (hcd->controller, "free busy dev, %s devnum %d (bug!)\n", + hcd->self.bus_name, udev->devnum); + return -EINVAL; + } + + spin_lock_irqsave (&hcd_data_lock, flags); + list_del (&dev->dev_list); + udev->hcpriv = NULL; + spin_unlock_irqrestore (&hcd_data_lock, flags); + + kfree (dev); + return 0; +} + +/* + * usb_hcd_operations - adapts usb_bus framework to HCD framework (bus glue) + * + * When registering a USB bus through the HCD framework code, use this + * usb_operations vector. The PCI glue layer does so automatically; only + * bus glue for non-PCI system busses will need to use this. + */ +struct usb_operations usb_hcd_operations = { + .allocate = hcd_alloc_dev, + .get_frame_number = hcd_get_frame_number, + .submit_urb = hcd_submit_urb, + .unlink_urb = hcd_unlink_urb, + .deallocate = hcd_free_dev, + .buffer_alloc = hcd_buffer_alloc, + .buffer_free = hcd_buffer_free, + .disable = hcd_endpoint_disable, +}; +EXPORT_SYMBOL (usb_hcd_operations); + +/*-------------------------------------------------------------------------*/ + +/** + * usb_hcd_giveback_urb - return URB from HCD to device driver + * @hcd: host controller returning the URB + * @urb: urb being returned to the USB device driver. + * @regs: pt_regs, passed down to the URB completion handler + * Context: in_interrupt() + * + * This hands the URB from HCD to its USB device driver, using its + * completion function. The HCD has freed all per-urb resources + * (and is done using urb->hcpriv). It also released all HCD locks; + * the device driver won't cause problems if it frees, modifies, + * or resubmits this URB. + */ +void STDCALL usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs) +{ + urb_unlink (urb); + + // NOTE: a generic device/urb monitoring hook would go here. + // hcd_monitor_hook(MONITOR_URB_FINISH, urb, dev) + // It would catch exit/unlink paths for all urbs. + + /* lower level hcd code should use *_dma exclusively */ + if (!(urb->transfer_flags & URB_NO_DMA_MAP)) { + if (usb_pipecontrol (urb->pipe)) + pci_unmap_single (hcd->pdev, urb->setup_dma, + sizeof (struct usb_ctrlrequest), + PCI_DMA_TODEVICE); + if (urb->transfer_buffer_length != 0) + pci_unmap_single (hcd->pdev, urb->transfer_dma, + urb->transfer_buffer_length, + usb_pipein (urb->pipe) + ? PCI_DMA_FROMDEVICE + : PCI_DMA_TODEVICE); + } + + /* pass ownership to the completion handler */ + urb->complete (urb, regs); + usb_put_urb (urb); +} + +/*-------------------------------------------------------------------------*/ + +/** + * usb_hcd_irq - hook IRQs to HCD framework (bus glue) + * @irq: the IRQ being raised + * @__hcd: pointer to the HCD whose IRQ is beinng signaled + * @r: saved hardware registers + * + * When registering a USB bus through the HCD framework code, use this + * to handle interrupts. The PCI glue layer does so automatically; only + * bus glue for non-PCI system busses will need to use this. + */ +irqreturn_t usb_hcd_irq (int irq, void *__hcd, struct pt_regs * r) +{ + struct usb_hcd *hcd = __hcd; + int start = hcd->state; + + if (unlikely (hcd->state == USB_STATE_HALT)) /* irq sharing? */ + return IRQ_NONE; + + hcd->driver->irq (hcd, r); + if (hcd->state != start && hcd->state == USB_STATE_HALT) + usb_hc_died (hcd); + return IRQ_HANDLED; +} + +/*-------------------------------------------------------------------------*/ + +static void hcd_panic (void *_hcd) +{ + struct usb_hcd *hcd = _hcd; + hcd->driver->stop (hcd); +} + +/** + * usb_hc_died - report abnormal shutdown of a host controller (bus glue) + * @hcd: pointer to the HCD representing the controller + * + * This is called by bus glue to report a USB host controller that died + * while operations may still have been pending. It's called automatically + * by the PCI glue, so only glue for non-PCI busses should need to call it. + */ +void STDCALL usb_hc_died (struct usb_hcd *hcd) +{ + struct list_head *devlist, *urblist; + struct hcd_dev *dev; + struct urb *urb; + unsigned long flags; + + /* flag every pending urb as done */ + spin_lock_irqsave (&hcd_data_lock, flags); + list_for_each (devlist, &hcd->dev_list) { + dev = list_entry (devlist, struct hcd_dev, dev_list); + list_for_each (urblist, &dev->urb_list) { + urb = list_entry (urblist, struct urb, urb_list); + dev_dbg (hcd->controller, "shutdown %s urb %p pipe %x, current status %d\n", + hcd->self.bus_name, urb, urb->pipe, urb->status); + if (urb->status == -EINPROGRESS) + urb->status = -ESHUTDOWN; + } + } + urb = (struct urb *) hcd->rh_timer.data; + if (urb) + urb->status = -ESHUTDOWN; + spin_unlock_irqrestore (&hcd_data_lock, flags); + + /* hcd->stop() needs a task context */ + INIT_WORK (&hcd->work, hcd_panic, hcd); + (void) schedule_work (&hcd->work); +} + diff --git a/reactos/drivers/usb/cromwell/core/hcd.h b/reactos/drivers/usb/cromwell/core/hcd.h new file mode 100644 index 00000000000..15eae1d8949 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/hcd.h @@ -0,0 +1,430 @@ +/* + * Copyright (c) 2001-2002 by David Brownell + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + +#ifdef __KERNEL__ + +/* This file contains declarations of usbcore internals that are mostly + * used or exposed by Host Controller Drivers. + */ + +/* + * USB Packet IDs (PIDs) + */ +#define USB_PID_UNDEF_0 0xf0 +#define USB_PID_OUT 0xe1 +#define USB_PID_ACK 0xd2 +#define USB_PID_DATA0 0xc3 +#define USB_PID_PING 0xb4 /* USB 2.0 */ +#define USB_PID_SOF 0xa5 +#define USB_PID_NYET 0x96 /* USB 2.0 */ +#define USB_PID_DATA2 0x87 /* USB 2.0 */ +#define USB_PID_SPLIT 0x78 /* USB 2.0 */ +#define USB_PID_IN 0x69 +#define USB_PID_NAK 0x5a +#define USB_PID_DATA1 0x4b +#define USB_PID_PREAMBLE 0x3c /* Token mode */ +#define USB_PID_ERR 0x3c /* USB 2.0: handshake mode */ +#define USB_PID_SETUP 0x2d +#define USB_PID_STALL 0x1e +#define USB_PID_MDATA 0x0f /* USB 2.0 */ + +/*-------------------------------------------------------------------------*/ + +/* + * USB Host Controller Driver (usb_hcd) framework + * + * Since "struct usb_bus" is so thin, you can't share much code in it. + * This framework is a layer over that, and should be more sharable. + */ + +/*-------------------------------------------------------------------------*/ + +struct usb_hcd { /* usb_bus.hcpriv points to this */ + + /* + * housekeeping + */ + struct usb_bus self; /* hcd is-a bus */ + + const char *product_desc; /* product/vendor string */ + const char *description; /* "ehci-hcd" etc */ + + struct timer_list rh_timer; /* drives root hub */ + struct list_head dev_list; /* devices on this bus */ + struct work_struct work; + + /* + * hardware info/state + */ + struct hc_driver *driver; /* hw-specific hooks */ + int irq; /* irq allocated */ + void *regs; /* device memory/io */ + struct device *controller; /* handle to hardware */ + + /* a few non-PCI controllers exist, mostly for OHCI */ + struct pci_dev *pdev; /* pci is typical */ +#ifdef CONFIG_PCI + int region; /* pci region for regs */ + u32 pci_state [16]; /* for PM state save */ + atomic_t resume_count; /* multiple resumes issue */ +#endif + +#define HCD_BUFFER_POOLS 4 + struct pci_pool *pool [HCD_BUFFER_POOLS]; + + int state; +# define __ACTIVE 0x01 +# define __SLEEPY 0x02 +# define __SUSPEND 0x04 +# define __TRANSIENT 0x80 + +# define USB_STATE_HALT 0 +# define USB_STATE_RUNNING (__ACTIVE) +# define USB_STATE_READY (__ACTIVE|__SLEEPY) +# define USB_STATE_QUIESCING (__SUSPEND|__TRANSIENT|__ACTIVE) +# define USB_STATE_RESUMING (__SUSPEND|__TRANSIENT) +# define USB_STATE_SUSPENDED (__SUSPEND) + +#define HCD_IS_RUNNING(state) ((state) & __ACTIVE) +#define HCD_IS_SUSPENDED(state) ((state) & __SUSPEND) + + /* more shared queuing code would be good; it should support + * smarter scheduling, handle transaction translators, etc; + * input size of periodic table to an interrupt scheduler. + * (ohci 32, uhci 1024, ehci 256/512/1024). + */ +}; + +/* 2.4 does this a bit differently ... */ +static inline struct usb_bus *hcd_to_bus (struct usb_hcd *hcd) +{ + return &hcd->self; +} + + +struct hcd_dev { /* usb_device.hcpriv points to this */ + struct list_head dev_list; /* on this hcd */ + struct list_head urb_list; /* pending on this dev */ + + /* per-configuration HC/HCD state, such as QH or ED */ + void *ep[32]; +}; + +// urb.hcpriv is really hardware-specific + +struct hcd_timeout { /* timeouts we allocate */ + struct list_head timeout_list; + struct timer_list timer; +}; + +/*-------------------------------------------------------------------------*/ + +/* + * FIXME usb_operations should vanish or become hc_driver, + * when usb_bus and usb_hcd become the same thing. + */ + +struct usb_operations { + int (*allocate)(struct usb_device *); + int (*deallocate)(struct usb_device *); + int (*get_frame_number) (struct usb_device *usb_dev); + int (*submit_urb) (struct urb *urb, int mem_flags); + int (*unlink_urb) (struct urb *urb); + + /* allocate dma-consistent buffer for URB_DMA_NOMAPPING */ + void *(*buffer_alloc)(struct usb_bus *bus, size_t size, + int mem_flags, + dma_addr_t *dma); + void (*buffer_free)(struct usb_bus *bus, size_t size, + void *addr, dma_addr_t dma); + + void (*disable)(struct usb_device *udev, int bEndpointAddress); +}; + +/* each driver provides one of these, and hardware init support */ + +struct pt_regs; + +struct hc_driver { + const char *description; /* "ehci-hcd" etc */ + + /* irq handler */ + void (*irq) (struct usb_hcd *hcd, struct pt_regs *regs); + + int flags; +#define HCD_MEMORY 0x0001 /* HC regs use memory (else I/O) */ +#define HCD_USB11 0x0010 /* USB 1.1 */ +#define HCD_USB2 0x0020 /* USB 2.0 */ + + /* called to init HCD and root hub */ + int (*start) (struct usb_hcd *hcd); + + /* called after all devices were suspended */ + int (*suspend) (struct usb_hcd *hcd, u32 state); + + /* called before any devices get resumed */ + int (*resume) (struct usb_hcd *hcd); + + /* cleanly make HCD stop writing memory and doing I/O */ + void (*stop) (struct usb_hcd *hcd); + + /* return current frame number */ + int (*get_frame_number) (struct usb_hcd *hcd); + + /* memory lifecycle */ + struct usb_hcd *(*hcd_alloc) (void); + void (*hcd_free) (struct usb_hcd *hcd); + + /* manage i/o requests, device state */ + int (*urb_enqueue) (struct usb_hcd *hcd, struct urb *urb, + int mem_flags); + int (*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb); + + /* hw synch, freeing endpoint resources that urb_dequeue can't */ + void (*endpoint_disable)(struct usb_hcd *hcd, + struct hcd_dev *dev, int bEndpointAddress); + + /* root hub support */ + int (*hub_status_data) (struct usb_hcd *hcd, char *buf); + int (*hub_control) (struct usb_hcd *hcd, + u16 typeReq, u16 wValue, u16 wIndex, + char *buf, u16 wLength); +}; + +extern void STDCALL usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs); +extern void STDCALL usb_bus_init (struct usb_bus *bus); +extern void usb_rh_status_dequeue (struct usb_hcd *hcd, struct urb *urb); + +#ifdef CONFIG_PCI +struct pci_dev; +struct pci_device_id; +extern int STDCALL usb_hcd_pci_probe (struct pci_dev *dev, + const struct pci_device_id *id); +extern void STDCALL usb_hcd_pci_remove (struct pci_dev *dev); + +#ifdef CONFIG_PM +// FIXME: see Documentation/power/pci.txt (2.4.6 and later?) +// extern int usb_hcd_pci_save_state (struct pci_dev *dev, u32 state); +extern int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state); +extern int usb_hcd_pci_resume (struct pci_dev *dev); +// extern int usb_hcd_pci_enable_wake (struct pci_dev *dev, u32 state, int flg); +#endif /* CONFIG_PM */ + +#endif /* CONFIG_PCI */ + +/* pci-ish (pdev null is ok) buffer alloc/mapping support */ +int hcd_buffer_create (struct usb_hcd *hcd); +void hcd_buffer_destroy (struct usb_hcd *hcd); + +void *hcd_buffer_alloc (struct usb_bus *bus, size_t size, + int mem_flags, dma_addr_t *dma); +void hcd_buffer_free (struct usb_bus *bus, size_t size, + void *addr, dma_addr_t dma); + +/* generic bus glue, needed for host controllers that don't use PCI */ +extern struct usb_operations usb_hcd_operations; +extern irqreturn_t usb_hcd_irq (int irq, void *__hcd, struct pt_regs *r); +extern void STDCALL usb_hc_died (struct usb_hcd *hcd); + +/* -------------------------------------------------------------------------- */ + +/* Enumeration is only for the hub driver, or HCD virtual root hubs */ +extern int usb_new_device(struct usb_device *dev, struct device *parent); +extern void STDCALL usb_connect(struct usb_device *dev); +extern void usb_disconnect(struct usb_device **); + +/* exported to hub driver ONLY to support usb_reset_device () */ +extern int usb_get_configuration(struct usb_device *dev); +extern void usb_set_maxpacket(struct usb_device *dev); +extern void usb_destroy_configuration(struct usb_device *dev); +extern int usb_set_address(struct usb_device *dev); + +/* use these only before the device's address has been set */ +#define usb_snddefctrl(dev) ((PIPE_CONTROL << 30)) +#define usb_rcvdefctrl(dev) ((PIPE_CONTROL << 30) | USB_DIR_IN) + +/*-------------------------------------------------------------------------*/ + +/* + * HCD Root Hub support + */ + +#include "hub.h" + +/* (shifted) direction/type/recipient from the USB 2.0 spec, table 9.2 */ +#define DeviceRequest \ + ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8) +#define DeviceOutRequest \ + ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8) + +#define InterfaceRequest \ + ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) + +#define EndpointRequest \ + ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) +#define EndpointOutRequest \ + ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) + +/* table 9.6 standard features */ +#define DEVICE_REMOTE_WAKEUP 1 +#define ENDPOINT_HALT 0 + +/* class requests from the USB 2.0 hub spec, table 11-15 */ +/* GetBusState and SetHubDescriptor are optional, omitted */ +#define ClearHubFeature (0x2000 | USB_REQ_CLEAR_FEATURE) +#define ClearPortFeature (0x2300 | USB_REQ_CLEAR_FEATURE) +#define GetHubDescriptor (0xa000 | USB_REQ_GET_DESCRIPTOR) +#define GetHubStatus (0xa000 | USB_REQ_GET_STATUS) +#define GetPortStatus (0xa300 | USB_REQ_GET_STATUS) +#define SetHubFeature (0x2000 | USB_REQ_SET_FEATURE) +#define SetPortFeature (0x2300 | USB_REQ_SET_FEATURE) + + +/*-------------------------------------------------------------------------*/ + +/* + * Generic bandwidth allocation constants/support + */ +#define FRAME_TIME_USECS 1000L +#define BitTime(bytecount) (7 * 8 * bytecount / 6) /* with integer truncation */ + /* Trying not to use worst-case bit-stuffing + of (7/6 * 8 * bytecount) = 9.33 * bytecount */ + /* bytecount = data payload byte count */ + +#define NS_TO_US(ns) ((ns + 500L) / 1000L) + /* convert & round nanoseconds to microseconds */ + +extern void STDCALL usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, + int bustime, int isoc); +extern void STDCALL usb_release_bandwidth (struct usb_device *dev, struct urb *urb, + int isoc); + +/* + * Full/low speed bandwidth allocation constants/support. + */ +#define BW_HOST_DELAY 1000L /* nanoseconds */ +#define BW_HUB_LS_SETUP 333L /* nanoseconds */ + /* 4 full-speed bit times (est.) */ + +#define FRAME_TIME_BITS 12000L /* frame = 1 millisecond */ +#define FRAME_TIME_MAX_BITS_ALLOC (90L * FRAME_TIME_BITS / 100L) +#define FRAME_TIME_MAX_USECS_ALLOC (90L * FRAME_TIME_USECS / 100L) + +extern int STDCALL usb_check_bandwidth (struct usb_device *dev, struct urb *urb); + +/* + * Ceiling microseconds (typical) for that many bytes at high speed + * ISO is a bit less, no ACK ... from USB 2.0 spec, 5.11.3 (and needed + * to preallocate bandwidth) + */ +#define USB2_HOST_DELAY 5 /* nsec, guess */ +#define HS_USECS(bytes) NS_TO_US ( ((55 * 8 * 2083)/1000) \ + + ((2083UL * (3167 + BitTime (bytes)))/1000) \ + + USB2_HOST_DELAY) +#define HS_USECS_ISO(bytes) NS_TO_US ( ((long)(38 * 8 * 2.083)) \ + + ((2083UL * (3167 + BitTime (bytes)))/1000) \ + + USB2_HOST_DELAY) + +extern long STDCALL usb_calc_bus_time (int speed, int is_input, + int isoc, int bytecount); + +/*-------------------------------------------------------------------------*/ + +extern struct usb_bus STDCALL *usb_alloc_bus (struct usb_operations *); +extern void STDCALL usb_free_bus (struct usb_bus *); + +extern void STDCALL usb_register_bus (struct usb_bus *); +extern void STDCALL usb_deregister_bus (struct usb_bus *); + +extern int STDCALL usb_register_root_hub (struct usb_device *usb_dev, + struct device *parent_dev); + +/* for portability to 2.4, hcds should call this */ +static inline int hcd_register_root (struct usb_hcd *hcd) +{ + return usb_register_root_hub ( + hcd_to_bus (hcd)->root_hub, hcd->controller); +} + +/*-------------------------------------------------------------------------*/ + +/* exported only within usbcore */ + +extern struct list_head usb_bus_list; +extern struct semaphore usb_bus_list_lock; + +extern void usb_bus_get (struct usb_bus *bus); +extern void usb_bus_put (struct usb_bus *bus); + +extern int usb_find_interface_driver (struct usb_device *dev, + struct usb_interface *interface); + +#define usb_endpoint_halt(dev, ep, out) ((dev)->halted[out] |= (1 << (ep))) + +#define usb_endpoint_out(ep_dir) (!((ep_dir) & USB_DIR_IN)) + +/* + * USB device fs stuff + */ + +#ifdef CONFIG_USB_DEVICEFS + +/* + * these are expected to be called from the USB core/hub thread + * with the kernel lock held + */ +extern void usbfs_add_bus(struct usb_bus *bus); +extern void usbfs_remove_bus(struct usb_bus *bus); +extern void usbfs_add_device(struct usb_device *dev); +extern void usbfs_remove_device(struct usb_device *dev); +extern void usbfs_update_special (void); + +extern int usbfs_init(void); +extern void usbfs_cleanup(void); + +#else /* CONFIG_USB_DEVICEFS */ + +static inline void usbfs_add_bus(struct usb_bus *bus) {} +static inline void usbfs_remove_bus(struct usb_bus *bus) {} +static inline void usbfs_add_device(struct usb_device *dev) {} +static inline void usbfs_remove_device(struct usb_device *dev) {} +static inline void usbfs_update_special (void) {} + +static inline int usbfs_init(void) { return 0; } +static inline void usbfs_cleanup(void) { } + +#endif /* CONFIG_USB_DEVICEFS */ + +/*-------------------------------------------------------------------------*/ + +/* hub.h ... DeviceRemovable in 2.4.2-ac11, gone in 2.4.10 */ +// bleech -- resurfaced in 2.4.11 or 2.4.12 +#define bitmap DeviceRemovable + + +/*-------------------------------------------------------------------------*/ + +/* random stuff */ + +#define RUN_CONTEXT (in_irq () ? "in_irq" \ + : (in_interrupt () ? "in_interrupt" : "can sleep")) + + +#endif /* __KERNEL__ */ + diff --git a/reactos/drivers/usb/cromwell/core/hub.c b/reactos/drivers/usb/cromwell/core/hub.c new file mode 100644 index 00000000000..744ec729b87 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/hub.c @@ -0,0 +1,1383 @@ +/* + * USB hub driver. + * + * (C) Copyright 1999 Linus Torvalds + * (C) Copyright 1999 Johannes Erdfelt + * (C) Copyright 1999 Gregory P. Smith + * (C) Copyright 2001 Brad Hards (bhards@bigpond.net.au) + * + */ +#define DEBUG +#if 0 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef CONFIG_USB_DEBUG + #define DEBUG +#else + #undef DEBUG +#endif +#include +#include +#include + +#include +#include +#include + +#include "hcd.h" +#include "hub.h" +#else +#include "../usb_wrapper.h" +#include "hcd.h" +#include "hub.h" +#define DEBUG +#endif + +/* Wakes up khubd */ +static spinlock_t hub_event_lock = SPIN_LOCK_UNLOCKED; +static DECLARE_MUTEX(usb_address0_sem); + +static LIST_HEAD(hub_event_list); /* List of hubs needing servicing */ +static LIST_HEAD(hub_list); /* List of all hubs (for cleanup) */ + +static DECLARE_WAIT_QUEUE_HEAD(khubd_wait); +static pid_t khubd_pid = 0; /* PID of khubd */ +static DECLARE_COMPLETION(khubd_exited); + +#ifdef DEBUG +static inline char *portspeed (int portstatus) +{ + if (portstatus & (1 << USB_PORT_FEAT_HIGHSPEED)) + return "480 Mb/s"; + else if (portstatus & (1 << USB_PORT_FEAT_LOWSPEED)) + return "1.5 Mb/s"; + else + return "12 Mb/s"; +} +#endif + +/* for dev_info, dev_dbg, etc */ +static inline struct device *hubdev (struct usb_device *dev) +{ + return &dev->actconfig->interface [0].dev; +} + +/* USB 2.0 spec Section 11.24.4.5 */ +static int get_hub_descriptor(struct usb_device *dev, void *data, int size) +{ + return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_DESCRIPTOR, USB_DIR_IN | USB_RT_HUB, + USB_DT_HUB << 8, 0, data, size, HZ * USB_CTRL_GET_TIMEOUT); +} + +/* + * USB 2.0 spec Section 11.24.2.1 + */ +static int clear_hub_feature(struct usb_device *dev, int feature) +{ + return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_CLEAR_FEATURE, USB_RT_HUB, feature, 0, NULL, 0, HZ); +} + +/* + * USB 2.0 spec Section 11.24.2.2 + * BUG: doesn't handle port indicator selector in high byte of wIndex + */ +static int clear_port_feature(struct usb_device *dev, int port, int feature) +{ + return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_CLEAR_FEATURE, USB_RT_PORT, feature, port, NULL, 0, HZ); +} + +/* + * USB 2.0 spec Section 11.24.2.13 + * BUG: doesn't handle port indicator selector in high byte of wIndex + */ +static int set_port_feature(struct usb_device *dev, int port, int feature) +{ + return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_SET_FEATURE, USB_RT_PORT, feature, port, NULL, 0, HZ); +} + +/* + * USB 2.0 spec Section 11.24.2.6 + */ +static int get_hub_status(struct usb_device *dev, + struct usb_hub_status *data) +{ + return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0, + data, sizeof(*data), HZ * USB_CTRL_GET_TIMEOUT); +} + +/* + * USB 2.0 spec Section 11.24.2.7 + */ +static int get_port_status(struct usb_device *dev, int port, + struct usb_port_status *data) +{ + return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port, + data, sizeof(*data), HZ * USB_CTRL_GET_TIMEOUT); +} + +/* completion function, fires on port status changes and various faults */ +static void hub_irq(struct urb *urb, struct pt_regs *regs) +{ + struct usb_hub *hub = (struct usb_hub *)urb->context; + unsigned long flags; + int status; + + switch (urb->status) { + case -ENOENT: /* synchronous unlink */ + case -ECONNRESET: /* async unlink */ + case -ESHUTDOWN: /* hardware going away */ + return; + + default: /* presumably an error */ + /* Cause a hub reset after 10 consecutive errors */ + dev_dbg (&hub->intf->dev, "transfer --> %d\n", urb->status); + if ((++hub->nerrors < 10) || hub->error) + goto resubmit; + hub->error = urb->status; + /* FALL THROUGH */ + + /* let khubd handle things */ + case 0: /* we got data: port status changed */ + break; + } + + hub->nerrors = 0; + + /* Something happened, let khubd figure it out */ + spin_lock_irqsave(&hub_event_lock, flags); + if (list_empty(&hub->event_list)) { + list_add(&hub->event_list, &hub_event_list); + wake_up(&khubd_wait); + } + spin_unlock_irqrestore(&hub_event_lock, flags); + +resubmit: + if ((status = usb_submit_urb (hub->urb, GFP_ATOMIC)) != 0 + /* ENODEV means we raced disconnect() */ + && status != -ENODEV) + dev_err (&hub->intf->dev, "resubmit --> %d\n", urb->status); +} + +/* USB 2.0 spec Section 11.24.2.3 */ +static inline int +hub_clear_tt_buffer (struct usb_device *hub, u16 devinfo, u16 tt) +{ + return usb_control_msg (hub, usb_rcvctrlpipe (hub, 0), + HUB_CLEAR_TT_BUFFER, USB_DIR_IN | USB_RECIP_OTHER, + devinfo, tt, 0, 0, HZ); +} + +/* + * enumeration blocks khubd for a long time. we use keventd instead, since + * long blocking there is the exception, not the rule. accordingly, HCDs + * talking to TTs must queue control transfers (not just bulk and iso), so + * both can talk to the same hub concurrently. + */ +static void hub_tt_kevent (void *arg) +{ + struct usb_hub *hub = arg; + unsigned long flags; + + spin_lock_irqsave (&hub->tt.lock, flags); + while (!list_empty (&hub->tt.clear_list)) { + struct list_head *temp; + struct usb_tt_clear *clear; + struct usb_device *dev; + int status; + + temp = hub->tt.clear_list.next; + clear = list_entry (temp, struct usb_tt_clear, clear_list); + list_del (&clear->clear_list); + + /* drop lock so HCD can concurrently report other TT errors */ + spin_unlock_irqrestore (&hub->tt.lock, flags); + dev = interface_to_usbdev (hub->intf); + status = hub_clear_tt_buffer (dev, clear->devinfo, clear->tt); + spin_lock_irqsave (&hub->tt.lock, flags); + + if (status) + err ("usb-%s-%s clear tt %d (%04x) error %d", + dev->bus->bus_name, dev->devpath, + clear->tt, clear->devinfo, status); + kfree (clear); + } + spin_unlock_irqrestore (&hub->tt.lock, flags); +} + +/** + * usb_hub_tt_clear_buffer - clear control/bulk TT state in high speed hub + * @dev: the device whose split transaction failed + * @pipe: identifies the endpoint of the failed transaction + * + * High speed HCDs use this to tell the hub driver that some split control or + * bulk transaction failed in a way that requires clearing internal state of + * a transaction translator. This is normally detected (and reported) from + * interrupt context. + * + * It may not be possible for that hub to handle additional full (or low) + * speed transactions until that state is fully cleared out. + */ +void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe) +{ + struct usb_tt *tt = dev->tt; + unsigned long flags; + struct usb_tt_clear *clear; + + /* we've got to cope with an arbitrary number of pending TT clears, + * since each TT has "at least two" buffers that can need it (and + * there can be many TTs per hub). even if they're uncommon. + */ + if ((clear = kmalloc (sizeof *clear, SLAB_ATOMIC)) == 0) { + err ("can't save CLEAR_TT_BUFFER state for hub at usb-%s-%s", + dev->bus->bus_name, tt->hub->devpath); + /* FIXME recover somehow ... RESET_TT? */ + return; + } + + /* info that CLEAR_TT_BUFFER needs */ + clear->tt = tt->multi ? dev->ttport : 1; + clear->devinfo = usb_pipeendpoint (pipe); + clear->devinfo |= dev->devnum << 4; + clear->devinfo |= usb_pipecontrol (pipe) + ? (USB_ENDPOINT_XFER_CONTROL << 11) + : (USB_ENDPOINT_XFER_BULK << 11); + if (usb_pipein (pipe)) + clear->devinfo |= 1 << 15; + + /* tell keventd to clear state for this TT */ + spin_lock_irqsave (&tt->lock, flags); + list_add_tail (&clear->clear_list, &tt->clear_list); + schedule_work (&tt->kevent); + spin_unlock_irqrestore (&tt->lock, flags); +} + +static void hub_power_on(struct usb_hub *hub) +{ + struct usb_device *dev; + int i; + + /* Enable power to the ports */ + dev_dbg(hubdev(interface_to_usbdev(hub->intf)), + "enabling power on all ports\n"); + dev = interface_to_usbdev(hub->intf); + + for (i = 0; i < hub->descriptor->bNbrPorts; i++) + set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER); + + /* Wait for power to be enabled */ + wait_ms(hub->descriptor->bPwrOn2PwrGood * 2); +} + +static int hub_hub_status(struct usb_hub *hub, + u16 *status, u16 *change) +{ + struct usb_device *dev = interface_to_usbdev (hub->intf); + int ret; + + ret = get_hub_status(dev, &hub->status->hub); + if (ret < 0) + dev_err (hubdev (dev), + "%s failed (err = %d)\n", __FUNCTION__, ret); + else { + *status = le16_to_cpu(hub->status->hub.wHubStatus); + *change = le16_to_cpu(hub->status->hub.wHubChange); + ret = 0; + } + return ret; +} + +static int hub_configure(struct usb_hub *hub, + struct usb_endpoint_descriptor *endpoint) +{ + struct usb_device *dev = interface_to_usbdev (hub->intf); + struct device *hub_dev; + u16 hubstatus, hubchange; + unsigned int pipe; + int maxp, ret; + char *message; + + hub->buffer = usb_buffer_alloc(dev, sizeof(*hub->buffer), GFP_KERNEL, + &hub->buffer_dma); + if (!hub->buffer) { + message = "can't allocate hub irq buffer"; + ret = -ENOMEM; + goto fail; + } + + hub->status = kmalloc(sizeof(*hub->status), GFP_KERNEL); + if (!hub->status) { + message = "can't kmalloc hub status buffer"; + ret = -ENOMEM; + goto fail; + } + + hub->descriptor = kmalloc(sizeof(*hub->descriptor), GFP_KERNEL); + if (!hub->descriptor) { + message = "can't kmalloc hub descriptor"; + ret = -ENOMEM; + goto fail; + } + + /* Request the entire hub descriptor. + * hub->descriptor can handle USB_MAXCHILDREN ports, + * but the hub can/will return fewer bytes here. + */ + ret = get_hub_descriptor(dev, hub->descriptor, + sizeof(*hub->descriptor)); + if (ret < 0) { + message = "can't read hub descriptor"; + goto fail; + } else if (hub->descriptor->bNbrPorts > USB_MAXCHILDREN) { + message = "hub has too many ports!"; + ret = -ENODEV; + goto fail; + } + + hub_dev = hubdev(dev); + dev->maxchild = hub->descriptor->bNbrPorts; + dev_info (hub_dev, "%d port%s detected\n", dev->maxchild, + (dev->maxchild == 1) ? "" : "s"); + + le16_to_cpus(&hub->descriptor->wHubCharacteristics); + + if (hub->descriptor->wHubCharacteristics & HUB_CHAR_COMPOUND) { + int i; + char portstr [USB_MAXCHILDREN + 1]; + + for (i = 0; i < dev->maxchild; i++) + portstr[i] = hub->descriptor->DeviceRemovable + [((i + 1) / 8)] & (1 << ((i + 1) % 8)) + ? 'F' : 'R'; + portstr[dev->maxchild] = 0; + dev_dbg(hub_dev, "compound device; port removable status: %s\n", portstr); + } else + dev_dbg(hub_dev, "standalone hub\n"); + + switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) { + case 0x00: + dev_dbg(hub_dev, "ganged power switching\n"); + break; + case 0x01: + dev_dbg(hub_dev, "individual port power switching\n"); + break; + case 0x02: + case 0x03: + dev_dbg(hub_dev, "unknown reserved power switching mode\n"); + break; + } + + switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_OCPM) { + case 0x00: + dev_dbg(hub_dev, "global over-current protection\n"); + break; + case 0x08: + dev_dbg(hub_dev, "individual port over-current protection\n"); + break; + case 0x10: + case 0x18: + dev_dbg(hub_dev, "no over-current protection\n"); + break; + } + + spin_lock_init (&hub->tt.lock); + INIT_LIST_HEAD (&hub->tt.clear_list); + INIT_WORK (&hub->tt.kevent, hub_tt_kevent, hub); + switch (dev->descriptor.bDeviceProtocol) { + case 0: + break; + case 1: + dev_dbg(hub_dev, "Single TT\n"); + hub->tt.hub = dev; + break; + case 2: + dev_dbg(hub_dev, "TT per port\n"); + hub->tt.hub = dev; + hub->tt.multi = 1; + break; + default: + dev_dbg(hub_dev, "Unrecognized hub protocol %d\n", + dev->descriptor.bDeviceProtocol); + break; + } + + switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_TTTT) { + case 0x00: + if (dev->descriptor.bDeviceProtocol != 0) + dev_dbg(hub_dev, "TT requires at most 8 FS bit times\n"); + break; + case 0x20: + dev_dbg(hub_dev, "TT requires at most 16 FS bit times\n"); + break; + case 0x40: + dev_dbg(hub_dev, "TT requires at most 24 FS bit times\n"); + break; + case 0x60: + dev_dbg(hub_dev, "TT requires at most 32 FS bit times\n"); + break; + } + + dev_dbg(hub_dev, "Port indicators are %s supported\n", + (hub->descriptor->wHubCharacteristics & HUB_CHAR_PORTIND) + ? "" : "not"); + + dev_dbg(hub_dev, "power on to power good time: %dms\n", + hub->descriptor->bPwrOn2PwrGood * 2); + dev_dbg(hub_dev, "hub controller current requirement: %dmA\n", + hub->descriptor->bHubContrCurrent); + + ret = hub_hub_status(hub, &hubstatus, &hubchange); + if (ret < 0) { + message = "can't get hub status"; + goto fail; + } + + dev_dbg(hub_dev, "local power source is %s\n", + (hubstatus & HUB_STATUS_LOCAL_POWER) + ? "lost (inactive)" : "good"); + + dev_dbg(hub_dev, "%sover-current condition exists\n", + (hubstatus & HUB_STATUS_OVERCURRENT) ? "" : "no "); + + /* Start the interrupt endpoint */ + pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); + maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); + + if (maxp > sizeof(*hub->buffer)) + maxp = sizeof(*hub->buffer); + + hub->urb = usb_alloc_urb(0, GFP_KERNEL); + if (!hub->urb) { + message = "couldn't allocate interrupt urb"; + ret = -ENOMEM; + goto fail; + } + + usb_fill_int_urb(hub->urb, dev, pipe, *hub->buffer, maxp, hub_irq, + hub, endpoint->bInterval); + hub->urb->transfer_dma = hub->buffer_dma; + hub->urb->transfer_flags |= URB_NO_DMA_MAP; + ret = usb_submit_urb(hub->urb, GFP_KERNEL); + if (ret) { + message = "couldn't submit status urb"; + goto fail; + } + + /* Wake up khubd */ + wake_up(&khubd_wait); + + hub_power_on(hub); + + return 0; + +fail: + dev_err (&hub->intf->dev, "config failed, %s (err %d)\n", + message, ret); + /* hub_disconnect() frees urb and descriptor */ + return ret; +} + +static void hub_disconnect(struct usb_interface *intf) +{ + struct usb_hub *hub = usb_get_intfdata (intf); + unsigned long flags; + + if (!hub) + return; + + usb_set_intfdata (intf, NULL); + spin_lock_irqsave(&hub_event_lock, flags); + + /* Delete it and then reset it */ + list_del(&hub->event_list); + INIT_LIST_HEAD(&hub->event_list); + list_del(&hub->hub_list); + INIT_LIST_HEAD(&hub->hub_list); + + spin_unlock_irqrestore(&hub_event_lock, flags); + + down(&hub->khubd_sem); /* Wait for khubd to leave this hub alone. */ + up(&hub->khubd_sem); + + /* assuming we used keventd, it must quiesce too */ + if (hub->tt.hub) + flush_scheduled_work (); + + if (hub->urb) { + usb_unlink_urb(hub->urb); + usb_free_urb(hub->urb); + hub->urb = NULL; + } + + if (hub->descriptor) { + kfree(hub->descriptor); + hub->descriptor = NULL; + } + + if (hub->status) { + kfree(hub->status); + hub->status = NULL; + } + + if (hub->buffer) { + usb_buffer_free(interface_to_usbdev(intf), + sizeof(*hub->buffer), hub->buffer, + hub->buffer_dma); + hub->buffer = NULL; + } + + /* Free the memory */ + kfree(hub); +} + +static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + struct usb_host_interface *desc; + struct usb_endpoint_descriptor *endpoint; + struct usb_device *dev; + struct usb_hub *hub; + unsigned long flags; + + desc = intf->altsetting + intf->act_altsetting; + dev = interface_to_usbdev(intf); + + /* Some hubs have a subclass of 1, which AFAICT according to the */ + /* specs is not defined, but it works */ + if ((desc->desc.bInterfaceSubClass != 0) && + (desc->desc.bInterfaceSubClass != 1)) { +descriptor_error: + dev_err (&intf->dev, "bad descriptor, ignoring hub\n"); + return -EIO; + } + + /* Multiple endpoints? What kind of mutant ninja-hub is this? */ + if (desc->desc.bNumEndpoints != 1) { + goto descriptor_error; + } + + endpoint = &desc->endpoint[0].desc; + + /* Output endpoint? Curiouser and curiouser.. */ + if (!(endpoint->bEndpointAddress & USB_DIR_IN)) { + goto descriptor_error; + } + + /* If it's not an interrupt endpoint, we'd better punt! */ + if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) + != USB_ENDPOINT_XFER_INT) { + goto descriptor_error; + return -EIO; + } + + /* We found a hub */ + dev_info (hubdev (dev), "USB hub found\n"); + + hub = kmalloc(sizeof(*hub), GFP_KERNEL); + if (!hub) { + err("couldn't kmalloc hub struct"); + return -ENOMEM; + } + + memset(hub, 0, sizeof(*hub)); + + INIT_LIST_HEAD(&hub->event_list); + hub->intf = intf; + init_MUTEX(&hub->khubd_sem); + + /* Record the new hub's existence */ + spin_lock_irqsave(&hub_event_lock, flags); + INIT_LIST_HEAD(&hub->hub_list); + list_add(&hub->hub_list, &hub_list); + spin_unlock_irqrestore(&hub_event_lock, flags); + + usb_set_intfdata (intf, hub); + + if (hub_configure(hub, endpoint) >= 0) { + strcpy (intf->dev.name, "Hub"); + return 0; + } + + hub_disconnect (intf); + return -ENODEV; +} + +static int +hub_ioctl(struct usb_interface *intf, unsigned int code, void *user_data) +{ + struct usb_device *hub = interface_to_usbdev (intf); + + /* assert ifno == 0 (part of hub spec) */ + switch (code) { + case USBDEVFS_HUB_PORTINFO: { + struct usbdevfs_hub_portinfo *info = user_data; + unsigned long flags; + int i; + + spin_lock_irqsave(&hub_event_lock, flags); + if (hub->devnum <= 0) + info->nports = 0; + else { + info->nports = hub->maxchild; + for (i = 0; i < info->nports; i++) { + if (hub->children[i] == NULL) + info->port[i] = 0; + else + info->port[i] = + hub->children[i]->devnum; + } + } + spin_unlock_irqrestore(&hub_event_lock, flags); + + return info->nports + 1; + } + + default: + return -ENOSYS; + } +} + +static int hub_reset(struct usb_hub *hub) +{ + struct usb_device *dev = interface_to_usbdev(hub->intf); + int i; + + /* Disconnect any attached devices */ + for (i = 0; i < hub->descriptor->bNbrPorts; i++) { + if (dev->children[i]) + usb_disconnect(&dev->children[i]); + } + + /* Attempt to reset the hub */ + if (hub->urb) + usb_unlink_urb(hub->urb); + else + return -1; + + if (usb_reset_device(dev)) + return -1; + + hub->urb->dev = dev; + if (usb_submit_urb(hub->urb, GFP_KERNEL)) + return -1; + + hub_power_on(hub); + + return 0; +} + +static void hub_start_disconnect(struct usb_device *dev) +{ + struct usb_device *parent = dev->parent; + int i; + + /* Find the device pointer to disconnect */ + if (parent) { + for (i = 0; i < parent->maxchild; i++) { + if (parent->children[i] == dev) { + usb_disconnect(&parent->children[i]); + return; + } + } + } + + err("cannot disconnect hub %s", dev->devpath); +} + +static int hub_port_status(struct usb_device *dev, int port, + u16 *status, u16 *change) +{ + struct usb_hub *hub = usb_get_intfdata (dev->actconfig->interface); + int ret; + + ret = get_port_status(dev, port + 1, &hub->status->port); + if (ret < 0) + dev_err (hubdev (dev), + "%s failed (err = %d)\n", __FUNCTION__, ret); + else { + *status = le16_to_cpu(hub->status->port.wPortStatus); + *change = le16_to_cpu(hub->status->port.wPortChange); + ret = 0; + } + return ret; +} + +#define HUB_RESET_TRIES 5 +#define HUB_PROBE_TRIES 2 +#define HUB_SHORT_RESET_TIME 10 +#define HUB_LONG_RESET_TIME 200 +#define HUB_RESET_TIMEOUT 500 + +/* return: -1 on error, 0 on success, 1 on disconnect. */ +static int hub_port_wait_reset(struct usb_device *hub, int port, + struct usb_device *dev, unsigned int delay) +{ + int delay_time, ret; + u16 portstatus; + u16 portchange; + + for (delay_time = 0; + delay_time < HUB_RESET_TIMEOUT; + delay_time += delay) { + /* wait to give the device a chance to reset */ + wait_ms(delay); + + /* read and decode port status */ + ret = hub_port_status(hub, port, &portstatus, &portchange); + if (ret < 0) { + return -1; + } + + /* Device went away? */ + if (!(portstatus & USB_PORT_STAT_CONNECTION)) + return 1; + + /* bomb out completely if something weird happened */ + if ((portchange & USB_PORT_STAT_C_CONNECTION)) + return -1; + + /* if we`ve finished resetting, then break out of the loop */ + if (!(portstatus & USB_PORT_STAT_RESET) && + (portstatus & USB_PORT_STAT_ENABLE)) { + if (portstatus & USB_PORT_STAT_HIGH_SPEED) + dev->speed = USB_SPEED_HIGH; + else if (portstatus & USB_PORT_STAT_LOW_SPEED) + dev->speed = USB_SPEED_LOW; + else + dev->speed = USB_SPEED_FULL; + return 0; + } + + /* switch to the long delay after two short delay failures */ + if (delay_time >= 2 * HUB_SHORT_RESET_TIME) + delay = HUB_LONG_RESET_TIME; + + dev_dbg (hubdev (hub), + "port %d not reset yet, waiting %dms\n", + port + 1, delay); + } + + return -1; +} + +/* return: -1 on error, 0 on success, 1 on disconnect. */ +static int hub_port_reset(struct usb_device *hub, int port, + struct usb_device *dev, unsigned int delay) +{ + int i, status; + + /* Reset the port */ + for (i = 0; i < HUB_RESET_TRIES; i++) { + set_port_feature(hub, port + 1, USB_PORT_FEAT_RESET); + + /* return on disconnect or reset */ + status = hub_port_wait_reset(hub, port, dev, delay); + if (status != -1) { + clear_port_feature(hub, + port + 1, USB_PORT_FEAT_C_RESET); + dev->state = status + ? USB_STATE_NOTATTACHED + : USB_STATE_DEFAULT; + return status; + } + + dev_dbg (hubdev (hub), + "port %d not enabled, trying reset again...\n", + port + 1); + delay = HUB_LONG_RESET_TIME; + } + + dev_err (hubdev (hub), + "Cannot enable port %i. Maybe the USB cable is bad?\n", + port + 1); + + return -1; +} + +int hub_port_disable(struct usb_device *hub, int port) +{ + int ret; + + ret = clear_port_feature(hub, port + 1, USB_PORT_FEAT_ENABLE); + if (ret) + dev_err(hubdev(hub), "cannot disable port %d (err = %d)\n", + port + 1, ret); + + return ret; +} + +/* USB 2.0 spec, 7.1.7.3 / fig 7-29: + * + * Between connect detection and reset signaling there must be a delay + * of 100ms at least for debounce and power-settling. The corresponding + * timer shall restart whenever the downstream port detects a disconnect. + * + * Apparently there are some bluetooth and irda-dongles and a number + * of low-speed devices which require longer delays of about 200-400ms. + * Not covered by the spec - but easy to deal with. + * + * This implementation uses 400ms minimum debounce timeout and checks + * every 25ms for transient disconnects to restart the delay. + */ + +#define HUB_DEBOUNCE_TIMEOUT 400 +#define HUB_DEBOUNCE_STEP 25 +#define HUB_DEBOUNCE_STABLE 4 + +/* return: -1 on error, 0 on success, 1 on disconnect. */ +static int hub_port_debounce(struct usb_device *hub, int port) +{ + int ret; + int delay_time, stable_count; + u16 portchange, portstatus; + unsigned connection; + + connection = 0; + stable_count = 0; + for (delay_time = 0; delay_time < HUB_DEBOUNCE_TIMEOUT; delay_time += HUB_DEBOUNCE_STEP) { + wait_ms(HUB_DEBOUNCE_STEP); + + ret = hub_port_status(hub, port, &portstatus, &portchange); + if (ret < 0) + return -1; + + if ((portstatus & USB_PORT_STAT_CONNECTION) == connection) { + if (connection) { + if (++stable_count == HUB_DEBOUNCE_STABLE) + break; + } + } else { + stable_count = 0; + } + connection = portstatus & USB_PORT_STAT_CONNECTION; + + if ((portchange & USB_PORT_STAT_C_CONNECTION)) { + clear_port_feature(hub, port+1, USB_PORT_FEAT_C_CONNECTION); + } + } + + /* XXX Replace this with dbg() when 2.6 is about to ship. */ + dev_dbg (hubdev (hub), + "debounce: port %d: delay %dms stable %d status 0x%x\n", + port + 1, delay_time, stable_count, portstatus); + + return ((portstatus&USB_PORT_STAT_CONNECTION)) ? 0 : 1; +} + +static void hub_port_connect_change(struct usb_hub *hubstate, int port, + u16 portstatus, u16 portchange) +{ + struct usb_device *hub = interface_to_usbdev(hubstate->intf); + struct usb_device *dev; + unsigned int delay = HUB_SHORT_RESET_TIME; + int i; + + dev_dbg (&hubstate->intf->dev, + "port %d, status %x, change %x, %s\n", + port + 1, portstatus, portchange, portspeed (portstatus)); + + /* Clear the connection change status */ + clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_CONNECTION); + + /* Disconnect any existing devices under this port */ + if (hub->children[port]) + usb_disconnect(&hub->children[port]); + + /* Return now if nothing is connected */ + if (!(portstatus & USB_PORT_STAT_CONNECTION)) { + if (portstatus & USB_PORT_STAT_ENABLE) + hub_port_disable(hub, port); + + return; + } + + if (hub_port_debounce(hub, port)) { + dev_err (&hubstate->intf->dev, + "connect-debounce failed, port %d disabled\n", + port+1); + hub_port_disable(hub, port); + return; + } + + /* Some low speed devices have problems with the quick delay, so */ + /* be a bit pessimistic with those devices. RHbug #23670 */ + if (portstatus & USB_PORT_STAT_LOW_SPEED) + delay = HUB_LONG_RESET_TIME; + + down(&usb_address0_sem); + + for (i = 0; i < HUB_PROBE_TRIES; i++) { + struct usb_device *pdev; + int len; + + /* Allocate a new device struct */ + dev = usb_alloc_dev(hub, hub->bus); + if (!dev) { + dev_err (&hubstate->intf->dev, + "couldn't allocate usb_device\n"); + break; + } + + hub->children[port] = dev; + dev->state = USB_STATE_POWERED; + + /* Reset the device, and detect its speed */ + if (hub_port_reset(hub, port, dev, delay)) { + usb_put_dev(dev); + break; + } + + /* Find a new address for it */ + usb_connect(dev); + + /* Set up TT records, if needed */ + if (hub->tt) { + dev->tt = hub->tt; + dev->ttport = hub->ttport; + } else if (dev->speed != USB_SPEED_HIGH + && hub->speed == USB_SPEED_HIGH) { + dev->tt = &hubstate->tt; + dev->ttport = port + 1; + } + + /* Save readable and stable topology id, distinguishing + * devices by location for diagnostics, tools, etc. The + * string is a path along hub ports, from the root. Each + * device's id will be stable until USB is re-cabled, and + * hubs are often labeled with these port numbers. + * + * Initial size: ".NN" times five hubs + NUL = 16 bytes max + * (quite rare, since most hubs have 4-6 ports). + */ + pdev = dev->parent; + if (pdev->devpath [0] != '0') /* parent not root? */ + len = snprintf (dev->devpath, sizeof dev->devpath, + "%s.%d", pdev->devpath, port + 1); + /* root == "0", root port 2 == "2", port 3 that hub "2.3" */ + else + len = snprintf (dev->devpath, sizeof dev->devpath, + "%d", port + 1); + if (len == sizeof dev->devpath) + dev_err (&hubstate->intf->dev, + "devpath size! usb/%03d/%03d path %s\n", + dev->bus->busnum, dev->devnum, dev->devpath); + dev_info (&hubstate->intf->dev, + "new USB device on port %d, assigned address %d\n", + port + 1, dev->devnum); + + /* put the device in the global device tree. the hub port + * is the "bus_id"; hubs show in hierarchy like bridges + */ + dev->dev.parent = dev->parent->dev.parent->parent; + + /* Run it through the hoops (find a driver, etc) */ + if (!usb_new_device(dev, &hub->dev)) + goto done; + + /* Free the configuration if there was an error */ + usb_put_dev(dev); + + /* Switch to a long reset time */ + delay = HUB_LONG_RESET_TIME; + } + + hub->children[port] = NULL; + hub_port_disable(hub, port); +done: + up(&usb_address0_sem); +} + +static void hub_events(void) +{ + unsigned long flags; + struct list_head *tmp; + struct usb_device *dev; + struct usb_hub *hub; + u16 hubstatus; + u16 hubchange; + u16 portstatus; + u16 portchange; + int i, ret; + int m=0; + /* + * We restart the list every time to avoid a deadlock with + * deleting hubs downstream from this one. This should be + * safe since we delete the hub from the event list. + * Not the most efficient, but avoids deadlocks. + */ + + while (m<5) { + m++; + spin_lock_irqsave(&hub_event_lock, flags); + + if (list_empty(&hub_event_list)) + break; + + /* Grab the next entry from the beginning of the list */ + tmp = hub_event_list.next; + + hub = list_entry(tmp, struct usb_hub, event_list); + dev = interface_to_usbdev(hub->intf); + + list_del_init(tmp); + + if (unlikely(down_trylock(&hub->khubd_sem))) + BUG(); /* never blocks, we were on list */ + + spin_unlock_irqrestore(&hub_event_lock, flags); + + if (hub->error) { + dev_dbg (&hub->intf->dev, "resetting for error %d\n", + hub->error); + + if (hub_reset(hub)) { + dev_dbg (&hub->intf->dev, + "can't reset; disconnecting\n"); + up(&hub->khubd_sem); + hub_start_disconnect(dev); + continue; + } + + hub->nerrors = 0; + hub->error = 0; + } + + for (i = 0; i < hub->descriptor->bNbrPorts; i++) { + ret = hub_port_status(dev, i, &portstatus, &portchange); + if (ret < 0) { + continue; + } + + if (portchange & USB_PORT_STAT_C_CONNECTION) { + hub_port_connect_change(hub, i, portstatus, portchange); + } else if (portchange & USB_PORT_STAT_C_ENABLE) { + dev_dbg (hubdev (dev), + "port %d enable change, status %x\n", + i + 1, portstatus); + clear_port_feature(dev, + i + 1, USB_PORT_FEAT_C_ENABLE); + + /* + * EM interference sometimes causes badly + * shielded USB devices to be shutdown by + * the hub, this hack enables them again. + * Works at least with mouse driver. + */ + if (!(portstatus & USB_PORT_STAT_ENABLE) + && (portstatus & USB_PORT_STAT_CONNECTION) + && (dev->children[i])) { + dev_err (&hub->intf->dev, + "port %i " + "disabled by hub (EMI?), " + "re-enabling...", + i + 1); + hub_port_connect_change(hub, + i, portstatus, portchange); + } + } + + if (portchange & USB_PORT_STAT_C_SUSPEND) { + dev_dbg (&hub->intf->dev, + "suspend change on port %d\n", + i + 1); + clear_port_feature(dev, + i + 1, USB_PORT_FEAT_C_SUSPEND); + } + + if (portchange & USB_PORT_STAT_C_OVERCURRENT) { + dev_err (&hub->intf->dev, + "over-current change on port %d\n", + i + 1); + clear_port_feature(dev, + i + 1, USB_PORT_FEAT_C_OVER_CURRENT); + hub_power_on(hub); + } + + if (portchange & USB_PORT_STAT_C_RESET) { + dev_dbg (&hub->intf->dev, + "reset change on port %d\n", + i + 1); + clear_port_feature(dev, + i + 1, USB_PORT_FEAT_C_RESET); + } + } /* end for i */ + + /* deal with hub status changes */ + if (hub_hub_status(hub, &hubstatus, &hubchange) < 0) + dev_err (&hub->intf->dev, "get_hub_status failed\n"); + else { + if (hubchange & HUB_CHANGE_LOCAL_POWER) { + dev_dbg (&hub->intf->dev, "power change\n"); + clear_hub_feature(dev, C_HUB_LOCAL_POWER); + } + if (hubchange & HUB_CHANGE_OVERCURRENT) { + dev_dbg (&hub->intf->dev, "overcurrent change\n"); + wait_ms(500); /* Cool down */ + clear_hub_feature(dev, C_HUB_OVER_CURRENT); + hub_power_on(hub); + } + } + up(&hub->khubd_sem); + } /* end while (1) */ + + spin_unlock_irqrestore(&hub_event_lock, flags); +} + +static int hub_thread(void *__hub) +{ + /* + * This thread doesn't need any user-level access, + * so get rid of all our resources + */ + + daemonize("khubd"); + allow_signal(SIGKILL); + /* Send me a signal to get me die (for debugging) */ + do { + + hub_events(); + wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list)); + + if (current->flags & PF_FREEZE) + refrigerator(PF_IOTHREAD); + + } while (!signal_pending(current)); + +// dbg("hub_thread exiting"); + complete_and_exit(&khubd_exited, 0); +} + +static struct usb_device_id hub_id_table [] = { + { .match_flags = USB_DEVICE_ID_MATCH_DEV_CLASS, + .bDeviceClass = USB_CLASS_HUB}, + { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS, + .bInterfaceClass = USB_CLASS_HUB}, + { } /* Terminating entry */ +}; + +MODULE_DEVICE_TABLE (usb, hub_id_table); + +static struct usb_driver hub_driver = { + .owner = THIS_MODULE, + .name = "hub", + .probe = hub_probe, + .disconnect = hub_disconnect, + .ioctl = hub_ioctl, + .id_table = hub_id_table, +}; + +/* + * This should be a separate module. + */ +int usb_hub_init(void) +{ + pid_t pid; + + if (usb_register(&hub_driver) < 0) { + err("Unable to register USB hub driver"); + return -1; + } + + pid = kernel_thread(hub_thread, NULL, + CLONE_FS | CLONE_FILES | CLONE_SIGHAND); + if (pid >= 0) { + khubd_pid = pid; + return 0; + } + + /* Fall through if kernel_thread failed */ + usb_deregister(&hub_driver); + err("failed to start hub_thread"); + + return -1; +} + +void usb_hub_cleanup(void) +{ + int ret; + + /* Kill the thread */ + ret = kill_proc(khubd_pid, SIGKILL, 1); + + wait_for_completion(&khubd_exited); + + /* + * Hub resources are freed for us by usb_deregister. It calls + * usb_driver_purge on every device which in turn calls that + * devices disconnect function if it is using this driver. + * The hub_disconnect function takes care of releasing the + * individual hub resources. -greg + */ + usb_deregister(&hub_driver); +} /* usb_hub_cleanup() */ + +/* + * WARNING - If a driver calls usb_reset_device, you should simulate a + * disconnect() and probe() for other interfaces you doesn't claim. This + * is left up to the driver writer right now. This insures other drivers + * have a chance to re-setup their interface. + * + * Take a look at proc_resetdevice in devio.c for some sample code to + * do this. + * Use this only from within your probe function, otherwise use + * usb_reset_device() below, which ensure proper locking + */ +int usb_physical_reset_device(struct usb_device *dev) +{ + struct usb_device *parent = dev->parent; + struct usb_device_descriptor *descriptor; + int i, ret, port = -1; + + if (!parent) { + err("attempting to reset root hub!"); + return -EINVAL; + } + + for (i = 0; i < parent->maxchild; i++) + if (parent->children[i] == dev) { + port = i; + break; + } + + if (port < 0) + return -ENOENT; + + descriptor = kmalloc(sizeof *descriptor, GFP_NOIO); + if (!descriptor) { + return -ENOMEM; + } + + down(&usb_address0_sem); + + /* Send a reset to the device */ + if (hub_port_reset(parent, port, dev, HUB_SHORT_RESET_TIME)) { + hub_port_disable(parent, port); + up(&usb_address0_sem); + kfree(descriptor); + return(-ENODEV); + } + + /* Reprogram the Address */ + ret = usb_set_address(dev); + if (ret < 0) { + err("USB device not accepting new address (error=%d)", ret); + hub_port_disable(parent, port); + up(&usb_address0_sem); + kfree(descriptor); + return ret; + } + + /* Let the SET_ADDRESS settle */ + wait_ms(10); + + up(&usb_address0_sem); + + /* + * Now we fetch the configuration descriptors for the device and + * see if anything has changed. If it has, we dump the current + * parsed descriptors and reparse from scratch. Then we leave + * the device alone for the caller to finish setting up. + * + * If nothing changed, we reprogram the configuration and then + * the alternate settings. + */ + + ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, descriptor, + sizeof(*descriptor)); + if (ret < 0) { + kfree(descriptor); + return ret; + } + + le16_to_cpus(&descriptor->bcdUSB); + le16_to_cpus(&descriptor->idVendor); + le16_to_cpus(&descriptor->idProduct); + le16_to_cpus(&descriptor->bcdDevice); + + if (RtlCompareMemory(&dev->descriptor, descriptor, sizeof(*descriptor))) { + kfree(descriptor); + usb_destroy_configuration(dev); + + ret = usb_get_device_descriptor(dev); + if (ret < sizeof(dev->descriptor)) { + if (ret < 0) + err("unable to get device %s descriptor " + "(error=%d)", dev->devpath, ret); + else + err("USB device %s descriptor short read " + "(expected %Zi, got %i)", + dev->devpath, + sizeof(dev->descriptor), ret); + + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return -EIO; + } + + ret = usb_get_configuration(dev); + if (ret < 0) { + err("unable to get configuration (error=%d)", ret); + usb_destroy_configuration(dev); + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + + dev->actconfig = dev->config; + usb_set_maxpacket(dev); + + return 1; + } + + kfree(descriptor); + + ret = usb_set_configuration(dev, dev->actconfig->desc.bConfigurationValue); + if (ret < 0) { + err("failed to set dev %s active configuration (error=%d)", + dev->devpath, ret); + return ret; + } + + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { + struct usb_interface *intf = &dev->actconfig->interface[i]; + struct usb_interface_descriptor *as; + + as = &intf->altsetting[intf->act_altsetting].desc; + ret = usb_set_interface(dev, as->bInterfaceNumber, + as->bAlternateSetting); + if (ret < 0) { + err("failed to set active alternate setting " + "for dev %s interface %d (error=%d)", + dev->devpath, i, ret); + return ret; + } + } + + return 0; +} + +int usb_reset_device(struct usb_device *udev) +{ + //struct device *gdev = &udev->dev; + int r; + + down_read(&gdev->bus->subsys.rwsem); + r = usb_physical_reset_device(udev); + up_read(&gdev->bus->subsys.rwsem); + + return r; +} + + diff --git a/reactos/drivers/usb/cromwell/core/hub.h b/reactos/drivers/usb/cromwell/core/hub.h new file mode 100644 index 00000000000..f51a9992cc6 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/hub.h @@ -0,0 +1,195 @@ +#ifndef __LINUX_HUB_H +#define __LINUX_HUB_H + +/* + * Hub protocol and driver data structures. + * + * Some of these are known to the "virtual root hub" code + * in host controller drivers. + */ +#if 0 +#include +#include +#include /* likely()/unlikely() */ +#endif +/* + * Hub request types + */ + +#define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE) +#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER) + +/* + * Hub class requests + * See USB 2.0 spec Table 11-16 + */ +#define HUB_CLEAR_TT_BUFFER 8 +#define HUB_RESET_TT 9 +#define HUB_GET_TT_STATE 10 +#define HUB_STOP_TT 11 + +/* + * Hub Class feature numbers + * See USB 2.0 spec Table 11-17 + */ +#define C_HUB_LOCAL_POWER 0 +#define C_HUB_OVER_CURRENT 1 + +/* + * Port feature numbers + * See USB 2.0 spec Table 11-17 + */ +#define USB_PORT_FEAT_CONNECTION 0 +#define USB_PORT_FEAT_ENABLE 1 +#define USB_PORT_FEAT_SUSPEND 2 +#define USB_PORT_FEAT_OVER_CURRENT 3 +#define USB_PORT_FEAT_RESET 4 +#define USB_PORT_FEAT_POWER 8 +#define USB_PORT_FEAT_LOWSPEED 9 +#define USB_PORT_FEAT_HIGHSPEED 10 +#define USB_PORT_FEAT_C_CONNECTION 16 +#define USB_PORT_FEAT_C_ENABLE 17 +#define USB_PORT_FEAT_C_SUSPEND 18 +#define USB_PORT_FEAT_C_OVER_CURRENT 19 +#define USB_PORT_FEAT_C_RESET 20 +#define USB_PORT_FEAT_TEST 21 +#define USB_PORT_FEAT_INDICATOR 22 + +/* + * Hub Status and Hub Change results + * See USB 2.0 spec Table 11-19 and Table 11-20 + */ +struct usb_port_status { + __u16 wPortStatus; + __u16 wPortChange; +} __attribute__ ((packed)); + +/* + * wPortStatus bit field + * See USB 2.0 spec Table 11-21 + */ +#define USB_PORT_STAT_CONNECTION 0x0001 +#define USB_PORT_STAT_ENABLE 0x0002 +#define USB_PORT_STAT_SUSPEND 0x0004 +#define USB_PORT_STAT_OVERCURRENT 0x0008 +#define USB_PORT_STAT_RESET 0x0010 +/* bits 5 to 7 are reserved */ +#define USB_PORT_STAT_POWER 0x0100 +#define USB_PORT_STAT_LOW_SPEED 0x0200 +#define USB_PORT_STAT_HIGH_SPEED 0x0400 +#define USB_PORT_STAT_TEST 0x0800 +#define USB_PORT_STAT_INDICATOR 0x1000 +/* bits 13 to 15 are reserved */ + +/* + * wPortChange bit field + * See USB 2.0 spec Table 11-22 + * Bits 0 to 4 shown, bits 5 to 15 are reserved + */ +#define USB_PORT_STAT_C_CONNECTION 0x0001 +#define USB_PORT_STAT_C_ENABLE 0x0002 +#define USB_PORT_STAT_C_SUSPEND 0x0004 +#define USB_PORT_STAT_C_OVERCURRENT 0x0008 +#define USB_PORT_STAT_C_RESET 0x0010 + +/* + * wHubCharacteristics (masks) + * See USB 2.0 spec Table 11-13, offset 3 + */ +#define HUB_CHAR_LPSM 0x0003 /* D1 .. D0 */ +#define HUB_CHAR_COMPOUND 0x0004 /* D2 */ +#define HUB_CHAR_OCPM 0x0018 /* D4 .. D3 */ +#define HUB_CHAR_TTTT 0x0060 /* D6 .. D5 */ +#define HUB_CHAR_PORTIND 0x0080 /* D7 */ + +struct usb_hub_status { + __u16 wHubStatus; + __u16 wHubChange; +} __attribute__ ((packed)); + +/* + * Hub Status & Hub Change bit masks + * See USB 2.0 spec Table 11-19 and Table 11-20 + * Bits 0 and 1 for wHubStatus and wHubChange + * Bits 2 to 15 are reserved for both + */ +#define HUB_STATUS_LOCAL_POWER 0x0001 +#define HUB_STATUS_OVERCURRENT 0x0002 +#define HUB_CHANGE_LOCAL_POWER 0x0001 +#define HUB_CHANGE_OVERCURRENT 0x0002 + + +/* + * Hub descriptor + * See USB 2.0 spec Table 11-13 + */ + +#define USB_DT_HUB (USB_TYPE_CLASS | 0x09) +#define USB_DT_HUB_NONVAR_SIZE 7 + +struct usb_hub_descriptor { + __u8 bDescLength; + __u8 bDescriptorType; + __u8 bNbrPorts; + __u16 wHubCharacteristics; + __u8 bPwrOn2PwrGood; + __u8 bHubContrCurrent; + /* add 1 bit for hub status change; round to bytes */ + __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8]; + __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8]; +} __attribute__ ((packed)); + +struct usb_device; + +/* + * As of USB 2.0, full/low speed devices are segregated into trees. + * One type grows from USB 1.1 host controllers (OHCI, UHCI etc). + * The other type grows from high speed hubs when they connect to + * full/low speed devices using "Transaction Translators" (TTs). + * + * TTs should only be known to the hub driver, and high speed bus + * drivers (only EHCI for now). They affect periodic scheduling and + * sometimes control/bulk error recovery. + */ +struct usb_tt { + struct usb_device *hub; /* upstream highspeed hub */ + int multi; /* true means one TT per port */ + + /* for control/bulk error recovery (CLEAR_TT_BUFFER) */ + spinlock_t lock; + struct list_head clear_list; /* of usb_tt_clear */ + struct work_struct kevent; +}; + +struct usb_tt_clear { + struct list_head clear_list; + unsigned tt; + u16 devinfo; +}; + +extern void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe); + +struct usb_hub { + struct usb_interface *intf; /* the "real" device */ + struct urb *urb; /* for interrupt polling pipe */ + + /* buffer for urb ... 1 bit each for hub and children, rounded up */ + char (*buffer)[(USB_MAXCHILDREN + 1 + 7) / 8]; + dma_addr_t buffer_dma; /* DMA address for buffer */ + union { + struct usb_hub_status hub; + struct usb_port_status port; + } *status; /* buffer for status reports */ + + int error; /* last reported error */ + int nerrors; /* track consecutive errors */ + + struct list_head hub_list; /* all hubs */ + struct list_head event_list; /* hubs w/data or errs ready */ + + struct usb_hub_descriptor *descriptor; /* class descriptor */ + struct semaphore khubd_sem; + struct usb_tt tt; /* Transaction Translator */ +}; + +#endif /* __LINUX_HUB_H */ diff --git a/reactos/drivers/usb/cromwell/core/makefile b/reactos/drivers/usb/cromwell/core/makefile new file mode 100644 index 00000000000..eeba46f94d7 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/makefile @@ -0,0 +1,18 @@ +PATH_TO_TOP = ../../../.. + +TARGET_TYPE = export_driver + +TARGET_NAME = usbcore + +TARGET_DDKLIBS = ntoskrnl.a + +TARGET_CFLAGS = -Wall -I$(PATH_TO_TOP)/ntoskrnl/include + +TARGET_OBJECTS = \ + message.o hcd.o hcd-pci.o hub.o usb.o config.o urb.o \ + buffer_simple.o usb-debug.o ../sys/ros_wrapper.o \ + ../sys/linuxwrapper.o usbcore.o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk diff --git a/reactos/drivers/usb/cromwell/core/makefile.crom b/reactos/drivers/usb/cromwell/core/makefile.crom new file mode 100644 index 00000000000..489af5802be --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/makefile.crom @@ -0,0 +1,6 @@ + +O_TARGET := message.o hcd.o hcd-pci.o hub.o usb.o config.o urb.o buffer_simple.o urb.o usb-debug.o + +#O_TARGET := urb.o + +include $(TOPDIR)/Rules.make diff --git a/reactos/drivers/usb/cromwell/core/message.c b/reactos/drivers/usb/cromwell/core/message.c new file mode 100644 index 00000000000..b43a52dc4e6 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/message.c @@ -0,0 +1,1053 @@ +/* + * message.c - synchronous message handling + */ +#if 0 +#include /* for scatterlist macros */ +#include +#include +#include +#include +#include +#include +#else +#include "../usb_wrapper.h" +#endif + +#include "hcd.h" /* for usbcore internals */ + +struct usb_api_data { + wait_queue_head_t wqh; + int done; +}; + +static void usb_api_blocking_completion(struct urb *urb, struct pt_regs *regs) +{ + struct usb_api_data *awd = (struct usb_api_data *)urb->context; + + awd->done = 1; + wmb(); + wake_up(&awd->wqh); +} + +// Starts urb and waits for completion or timeout +static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length) +{ + //DECLARE_WAITQUEUE(wait, current); // Fireball, 24Jan05 - silent gcc complaining about unused wait variable + struct usb_api_data awd; + int status; + + init_waitqueue_head(&awd.wqh); + awd.done = 0; + + set_current_state(TASK_UNINTERRUPTIBLE); + add_wait_queue(&awd.wqh, &wait); + + urb->context = &awd; + status = usb_submit_urb(urb, GFP_ATOMIC); + if (status) { + // something went wrong + usb_free_urb(urb); + set_current_state(TASK_RUNNING); + remove_wait_queue(&awd.wqh, &wait); + return status; + } + + while (timeout && !awd.done) + { + timeout = schedule_timeout(timeout); + set_current_state(TASK_UNINTERRUPTIBLE); + rmb(); + } + + set_current_state(TASK_RUNNING); + remove_wait_queue(&awd.wqh, &wait); + + if (!timeout && !awd.done) { + if (urb->status != -EINPROGRESS) { /* No callback?!! */ + printk(KERN_ERR "usb: raced timeout, " + "pipe 0x%x status %d time left %d\n", + urb->pipe, urb->status, timeout); + status = urb->status; + } else { + warn("usb_control/bulk_msg: timeout"); + usb_unlink_urb(urb); // remove urb safely + status = -ETIMEDOUT; + } + } else + status = urb->status; + + if (actual_length) + *actual_length = urb->actual_length; + + usb_free_urb(urb); + return status; +} + +/*-------------------------------------------------------------------*/ +// returns status (negative) or length (positive) +int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, + struct usb_ctrlrequest *cmd, void *data, int len, int timeout) +{ + struct urb *urb; + int retv; + int length; + + urb = usb_alloc_urb(0, GFP_NOIO); + if (!urb) + return -ENOMEM; + + usb_fill_control_urb(urb, usb_dev, pipe, (unsigned char*)cmd, data, len, + usb_api_blocking_completion, 0); + + retv = usb_start_wait_urb(urb, timeout, &length); + + if (retv < 0) + return retv; + else + return length; +} + +/** + * usb_control_msg - Builds a control urb, sends it off and waits for completion + * @dev: pointer to the usb device to send the message to + * @pipe: endpoint "pipe" to send the message to + * @request: USB message request value + * @requesttype: USB message request type value + * @value: USB message value + * @index: USB message index value + * @data: pointer to the data to send + * @size: length in bytes of the data to send + * @timeout: time in jiffies to wait for the message to complete before + * timing out (if 0 the wait is forever) + * Context: !in_interrupt () + * + * This function sends a simple control message to a specified endpoint + * and waits for the message to complete, or timeout. + * + * If successful, it returns the number of bytes transferred, otherwise a negative error number. + * + * Don't use this function from within an interrupt context, like a + * bottom half handler. If you need an asynchronous message, or need to send + * a message from within interrupt context, use usb_submit_urb() + * If a thread in your driver uses this call, make sure your disconnect() + * method can wait for it to complete. Since you don't have a handle on + * the URB used, you can't cancel the request. + */ +int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, + __u16 value, __u16 index, void *data, __u16 size, int timeout) +{ + struct usb_ctrlrequest *dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO); + int ret; + + if (!dr) + return -ENOMEM; + + dr->bRequestType= requesttype; + dr->bRequest = request; + dr->wValue = cpu_to_le16p(&value); + dr->wIndex = cpu_to_le16p(&index); + dr->wLength = cpu_to_le16p(&size); + + //dbg("usb_control_msg"); + + ret = usb_internal_control_msg(dev, pipe, dr, data, size, timeout); + + kfree(dr); + + return ret; +} + + +/** + * usb_bulk_msg - Builds a bulk urb, sends it off and waits for completion + * @usb_dev: pointer to the usb device to send the message to + * @pipe: endpoint "pipe" to send the message to + * @data: pointer to the data to send + * @len: length in bytes of the data to send + * @actual_length: pointer to a location to put the actual length transferred in bytes + * @timeout: time in jiffies to wait for the message to complete before + * timing out (if 0 the wait is forever) + * Context: !in_interrupt () + * + * This function sends a simple bulk message to a specified endpoint + * and waits for the message to complete, or timeout. + * + * If successful, it returns 0, otherwise a negative error number. + * The number of actual bytes transferred will be stored in the + * actual_length paramater. + * + * Don't use this function from within an interrupt context, like a + * bottom half handler. If you need an asynchronous message, or need to + * send a message from within interrupt context, use usb_submit_urb() + * If a thread in your driver uses this call, make sure your disconnect() + * method can wait for it to complete. Since you don't have a handle on + * the URB used, you can't cancel the request. + */ +int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, + void *data, int len, int *actual_length, int timeout) +{ + struct urb *urb; + + if (len < 0) + return -EINVAL; + + urb=usb_alloc_urb(0, GFP_KERNEL); + if (!urb) + return -ENOMEM; + + usb_fill_bulk_urb(urb, usb_dev, pipe, data, len, + usb_api_blocking_completion, 0); + + return usb_start_wait_urb(urb,timeout,actual_length); +} + +/*-------------------------------------------------------------------*/ +//#warning "Scatter-gather stuff disabled" +#if 0 +static void sg_clean (struct usb_sg_request *io) +{ + if (io->urbs) { + while (io->entries--) + usb_free_urb (io->urbs [io->entries]); + kfree (io->urbs); + io->urbs = 0; + } + if (io->dev->dev.dma_mask != 0) + usb_buffer_unmap_sg (io->dev, io->pipe, io->sg, io->nents); + io->dev = 0; +} + +static void sg_complete (struct urb *urb, struct pt_regs *regs) +{ + struct usb_sg_request *io = (struct usb_sg_request *) urb->context; + unsigned long flags; + + spin_lock_irqsave (&io->lock, flags); + + /* In 2.5 we require hcds' endpoint queues not to progress after fault + * reports, until the completion callback (this!) returns. That lets + * device driver code (like this routine) unlink queued urbs first, + * if it needs to, since the HC won't work on them at all. So it's + * not possible for page N+1 to overwrite page N, and so on. + * + * That's only for "hard" faults; "soft" faults (unlinks) sometimes + * complete before the HCD can get requests away from hardware, + * though never during cleanup after a hard fault. + */ + if (io->status + && (io->status != -ECONNRESET + || urb->status != -ECONNRESET) + && urb->actual_length) { + dev_err (io->dev->bus->controller, + "dev %s ep%d%s scatterlist error %d/%d\n", + io->dev->devpath, + usb_pipeendpoint (urb->pipe), + usb_pipein (urb->pipe) ? "in" : "out", + urb->status, io->status); + // BUG (); + } + + if (urb->status && urb->status != -ECONNRESET) { + int i, found, status; + + io->status = urb->status; + + /* the previous urbs, and this one, completed already. + * unlink the later ones so they won't rx/tx bad data, + * + * FIXME don't bother unlinking urbs that haven't yet been + * submitted; those non-error cases shouldn't be syslogged + */ + for (i = 0, found = 0; i < io->entries; i++) { + if (found) { + status = usb_unlink_urb (io->urbs [i]); + if (status && status != -EINPROGRESS) + err ("sg_complete, unlink --> %d", + status); + } else if (urb == io->urbs [i]) + found = 1; + } + } + + /* on the last completion, signal usb_sg_wait() */ + io->bytes += urb->actual_length; + io->count--; + if (!io->count) + complete (&io->complete); + + spin_unlock_irqrestore (&io->lock, flags); +} + + +/** + * usb_sg_init - initializes scatterlist-based bulk/interrupt I/O request + * @io: request block being initialized. until usb_sg_wait() returns, + * treat this as a pointer to an opaque block of memory, + * @dev: the usb device that will send or receive the data + * @pipe: endpoint "pipe" used to transfer the data + * @period: polling rate for interrupt endpoints, in frames or + * (for high speed endpoints) microframes; ignored for bulk + * @sg: scatterlist entries + * @nents: how many entries in the scatterlist + * @length: how many bytes to send from the scatterlist, or zero to + * send every byte identified in the list. + * @mem_flags: SLAB_* flags affecting memory allocations in this call + * + * Returns zero for success, else a negative errno value. This initializes a + * scatter/gather request, allocating resources such as I/O mappings and urb + * memory (except maybe memory used by USB controller drivers). + * + * The request must be issued using usb_sg_wait(), which waits for the I/O to + * complete (or to be canceled) and then cleans up all resources allocated by + * usb_sg_init(). + * + * The request may be canceled with usb_sg_cancel(), either before or after + * usb_sg_wait() is called. + */ +int usb_sg_init ( + struct usb_sg_request *io, + struct usb_device *dev, + unsigned pipe, + unsigned period, + struct scatterlist *sg, + int nents, + size_t length, + int mem_flags +) +{ + int i; + int urb_flags; + int dma; + + if (!io || !dev || !sg + || usb_pipecontrol (pipe) + || usb_pipeisoc (pipe) + || nents <= 0) + return -EINVAL; + + spin_lock_init (&io->lock); + io->dev = dev; + io->pipe = pipe; + io->sg = sg; + io->nents = nents; + + /* not all host controllers use DMA (like the mainstream pci ones); + * they can use PIO (sl811) or be software over another transport. + */ + dma = (dev->dev.dma_mask != 0); + if (dma) + io->entries = usb_buffer_map_sg (dev, pipe, sg, nents); + else + io->entries = nents; + + /* initialize all the urbs we'll use */ + if (io->entries <= 0) + return io->entries; + + io->count = 0; + io->urbs = kmalloc (io->entries * sizeof *io->urbs, mem_flags); + if (!io->urbs) + goto nomem; + + urb_flags = URB_ASYNC_UNLINK | URB_NO_DMA_MAP | URB_NO_INTERRUPT; + if (usb_pipein (pipe)) + urb_flags |= URB_SHORT_NOT_OK; + + for (i = 0; i < io->entries; i++, io->count = i) { + unsigned len; + + io->urbs [i] = usb_alloc_urb (0, mem_flags); + if (!io->urbs [i]) { + io->entries = i; + goto nomem; + } + + io->urbs [i]->dev = dev; + io->urbs [i]->pipe = pipe; + io->urbs [i]->interval = period; + io->urbs [i]->transfer_flags = urb_flags; + + io->urbs [i]->complete = sg_complete; + io->urbs [i]->context = io; + io->urbs [i]->status = -EINPROGRESS; + io->urbs [i]->actual_length = 0; + + if (dma) { + /* hc may use _only_ transfer_dma */ + io->urbs [i]->transfer_dma = sg_dma_address (sg + i); + len = sg_dma_len (sg + i); + } else { + /* hc may use _only_ transfer_buffer */ + io->urbs [i]->transfer_buffer = + page_address (sg [i].page) + sg [i].offset; + len = sg [i].length; + } + + if (length) { + len = min_t (unsigned, len, length); + length -= len; + if (length == 0) + io->entries = i + 1; + } + io->urbs [i]->transfer_buffer_length = len; + } + io->urbs [--i]->transfer_flags &= ~URB_NO_INTERRUPT; + + /* transaction state */ + io->status = 0; + io->bytes = 0; + init_completion (&io->complete); + return 0; + +nomem: + sg_clean (io); + return -ENOMEM; +} + + +/** + * usb_sg_wait - synchronously execute scatter/gather request + * @io: request block handle, as initialized with usb_sg_init(). + * some fields become accessible when this call returns. + * Context: !in_interrupt () + * + * This function blocks until the specified I/O operation completes. It + * leverages the grouping of the related I/O requests to get good transfer + * rates, by queueing the requests. At higher speeds, such queuing can + * significantly improve USB throughput. + * + * There are three kinds of completion for this function. + * (1) success, where io->status is zero. The number of io->bytes + * transferred is as requested. + * (2) error, where io->status is a negative errno value. The number + * of io->bytes transferred before the error is usually less + * than requested, and can be nonzero. + * (3) cancelation, a type of error with status -ECONNRESET that + * is initiated by usb_sg_cancel(). + * + * When this function returns, all memory allocated through usb_sg_init() or + * this call will have been freed. The request block parameter may still be + * passed to usb_sg_cancel(), or it may be freed. It could also be + * reinitialized and then reused. + * + * Data Transfer Rates: + * + * Bulk transfers are valid for full or high speed endpoints. + * The best full speed data rate is 19 packets of 64 bytes each + * per frame, or 1216 bytes per millisecond. + * The best high speed data rate is 13 packets of 512 bytes each + * per microframe, or 52 KBytes per millisecond. + * + * The reason to use interrupt transfers through this API would most likely + * be to reserve high speed bandwidth, where up to 24 KBytes per millisecond + * could be transferred. That capability is less useful for low or full + * speed interrupt endpoints, which allow at most one packet per millisecond, + * of at most 8 or 64 bytes (respectively). + */ +void usb_sg_wait (struct usb_sg_request *io) +{ + int i; + unsigned long flags; + + /* queue the urbs. */ + spin_lock_irqsave (&io->lock, flags); + for (i = 0; i < io->entries && !io->status; i++) { + int retval; + + retval = usb_submit_urb (io->urbs [i], SLAB_ATOMIC); + + /* after we submit, let completions or cancelations fire; + * we handshake using io->status. + */ + spin_unlock_irqrestore (&io->lock, flags); + switch (retval) { + /* maybe we retrying will recover */ + case -ENXIO: // hc didn't queue this one + case -EAGAIN: + case -ENOMEM: + retval = 0; + i--; + // FIXME: should it usb_sg_cancel() on INTERRUPT? + yield (); + break; + + /* no error? continue immediately. + * + * NOTE: to work better with UHCI (4K I/O buffer may + * need 3K of TDs) it may be good to limit how many + * URBs are queued at once; N milliseconds? + */ + case 0: + cpu_relax (); + break; + + /* fail any uncompleted urbs */ + default: + io->urbs [i]->status = retval; + dbg ("usb_sg_msg, submit --> %d", retval); + usb_sg_cancel (io); + } + spin_lock_irqsave (&io->lock, flags); + if (retval && io->status == -ECONNRESET) + io->status = retval; + } + spin_unlock_irqrestore (&io->lock, flags); + + /* OK, yes, this could be packaged as non-blocking. + * So could the submit loop above ... but it's easier to + * solve neither problem than to solve both! + */ + wait_for_completion (&io->complete); + + sg_clean (io); +} + +/** + * usb_sg_cancel - stop scatter/gather i/o issued by usb_sg_wait() + * @io: request block, initialized with usb_sg_init() + * + * This stops a request after it has been started by usb_sg_wait(). + * It can also prevents one initialized by usb_sg_init() from starting, + * so that call just frees resources allocated to the request. + */ +void usb_sg_cancel (struct usb_sg_request *io) +{ + unsigned long flags; + + spin_lock_irqsave (&io->lock, flags); + + /* shut everything down, if it didn't already */ + if (!io->status) { + int i; + + io->status = -ECONNRESET; + for (i = 0; i < io->entries; i++) { + int retval; + + if (!io->urbs [i]->dev) + continue; + retval = usb_unlink_urb (io->urbs [i]); + if (retval && retval != -EINPROGRESS) + warn ("usb_sg_cancel, unlink --> %d", retval); + // FIXME don't warn on "not yet submitted" error + } + } + spin_unlock_irqrestore (&io->lock, flags); +} +#endif +/*-------------------------------------------------------------------*/ + +/** + * usb_get_descriptor - issues a generic GET_DESCRIPTOR request + * @dev: the device whose descriptor is being retrieved + * @type: the descriptor type (USB_DT_*) + * @index: the number of the descriptor + * @buf: where to put the descriptor + * @size: how big is "buf"? + * Context: !in_interrupt () + * + * Gets a USB descriptor. Convenience functions exist to simplify + * getting some types of descriptors. Use + * usb_get_device_descriptor() for USB_DT_DEVICE, + * and usb_get_string() or usb_string() for USB_DT_STRING. + * Configuration descriptors (USB_DT_CONFIG) are part of the device + * structure, at least for the current configuration. + * In addition to a number of USB-standard descriptors, some + * devices also use class-specific or vendor-specific descriptors. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns the number of bytes received on success, or else the status code + * returned by the underlying usb_control_msg() call. + */ +int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char index, void *buf, int size) +{ + int i = 5; + int result; + + memset(buf,0,size); // Make sure we parse really received data + + while (i--) { + /* retries if the returned length was 0; flakey device */ + if ((result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, + (type << 8) + index, 0, buf, size, + HZ * USB_CTRL_GET_TIMEOUT)) > 0 + || result == -EPIPE) + break; + } + return result; +} + +/** + * usb_get_string - gets a string descriptor + * @dev: the device whose string descriptor is being retrieved + * @langid: code for language chosen (from string descriptor zero) + * @index: the number of the descriptor + * @buf: where to put the string + * @size: how big is "buf"? + * Context: !in_interrupt () + * + * Retrieves a string, encoded using UTF-16LE (Unicode, 16 bits per character, + * in little-endian byte order). + * The usb_string() function will often be a convenient way to turn + * these strings into kernel-printable form. + * + * Strings may be referenced in device, configuration, interface, or other + * descriptors, and could also be used in vendor-specific ways. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns the number of bytes received on success, or else the status code + * returned by the underlying usb_control_msg() call. + */ +int usb_get_string(struct usb_device *dev, unsigned short langid, unsigned char index, void *buf, int size) +{ + return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, + (USB_DT_STRING << 8) + index, langid, buf, size, + HZ * USB_CTRL_GET_TIMEOUT); +} + +/** + * usb_get_device_descriptor - (re)reads the device descriptor + * @dev: the device whose device descriptor is being updated + * Context: !in_interrupt () + * + * Updates the copy of the device descriptor stored in the device structure, + * which dedicates space for this purpose. Note that several fields are + * converted to the host CPU's byte order: the USB version (bcdUSB), and + * vendors product and version fields (idVendor, idProduct, and bcdDevice). + * That lets device drivers compare against non-byteswapped constants. + * + * There's normally no need to use this call, although some devices + * will change their descriptors after events like updating firmware. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns the number of bytes received on success, or else the status code + * returned by the underlying usb_control_msg() call. + */ +int usb_get_device_descriptor(struct usb_device *dev) +{ + int ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, + sizeof(dev->descriptor)); + if (ret >= 0) { + le16_to_cpus(&dev->descriptor.bcdUSB); + le16_to_cpus(&dev->descriptor.idVendor); + le16_to_cpus(&dev->descriptor.idProduct); + le16_to_cpus(&dev->descriptor.bcdDevice); + } + return ret; +} + +/** + * usb_get_status - issues a GET_STATUS call + * @dev: the device whose status is being checked + * @type: USB_RECIP_*; for device, interface, or endpoint + * @target: zero (for device), else interface or endpoint number + * @data: pointer to two bytes of bitmap data + * Context: !in_interrupt () + * + * Returns device, interface, or endpoint status. Normally only of + * interest to see if the device is self powered, or has enabled the + * remote wakeup facility; or whether a bulk or interrupt endpoint + * is halted ("stalled"). + * + * Bits in these status bitmaps are set using the SET_FEATURE request, + * and cleared using the CLEAR_FEATURE request. The usb_clear_halt() + * function should be used to clear halt ("stall") status. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns the number of bytes received on success, or else the status code + * returned by the underlying usb_control_msg() call. + */ +int usb_get_status(struct usb_device *dev, int type, int target, void *data) +{ + return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_STATUS, USB_DIR_IN | type, 0, target, data, 2, + HZ * USB_CTRL_GET_TIMEOUT); +} + + +// hub-only!! ... and only exported for reset/reinit path. +// otherwise used internally, when setting up a config +void usb_set_maxpacket(struct usb_device *dev) +{ + int i, b; + + /* NOTE: affects all endpoints _except_ ep0 */ + for (i=0; iactconfig->desc.bNumInterfaces; i++) { + struct usb_interface *ifp = dev->actconfig->interface + i; + struct usb_host_interface *as = ifp->altsetting + ifp->act_altsetting; + struct usb_host_endpoint *ep = as->endpoint; + int e; + + for (e=0; edesc.bNumEndpoints; e++) { + struct usb_endpoint_descriptor *d; + d = &ep [e].desc; + b = d->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; + if ((d->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == + USB_ENDPOINT_XFER_CONTROL) { /* Control => bidirectional */ + dev->epmaxpacketout[b] = d->wMaxPacketSize; + dev->epmaxpacketin [b] = d->wMaxPacketSize; + } + else if (usb_endpoint_out(d->bEndpointAddress)) { + if (d->wMaxPacketSize > dev->epmaxpacketout[b]) + dev->epmaxpacketout[b] = d->wMaxPacketSize; + } + else { + if (d->wMaxPacketSize > dev->epmaxpacketin [b]) + dev->epmaxpacketin [b] = d->wMaxPacketSize; + } + } + } +} + +/** + * usb_clear_halt - tells device to clear endpoint halt/stall condition + * @dev: device whose endpoint is halted + * @pipe: endpoint "pipe" being cleared + * Context: !in_interrupt () + * + * This is used to clear halt conditions for bulk and interrupt endpoints, + * as reported by URB completion status. Endpoints that are halted are + * sometimes referred to as being "stalled". Such endpoints are unable + * to transmit or receive data until the halt status is cleared. Any URBs + * queued for such an endpoint should normally be unlinked by the driver + * before clearing the halt condition, as described in sections 5.7.5 + * and 5.8.5 of the USB 2.0 spec. + * + * Note that control and isochronous endpoints don't halt, although control + * endpoints report "protocol stall" (for unsupported requests) using the + * same status code used to report a true stall. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns zero on success, or else the status code returned by the + * underlying usb_control_msg() call. + */ +int usb_clear_halt(struct usb_device *dev, int pipe) +{ + int result; + int endp = usb_pipeendpoint(pipe); + + if (usb_pipein (pipe)) + endp |= USB_DIR_IN; + + /* we don't care if it wasn't halted first. in fact some devices + * (like some ibmcam model 1 units) seem to expect hosts to make + * this request for iso endpoints, which can't halt! + */ + result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT, 0, endp, NULL, 0, + HZ * USB_CTRL_SET_TIMEOUT); + + /* don't un-halt or force to DATA0 except on success */ + if (result < 0) + return result; + + /* NOTE: seems like Microsoft and Apple don't bother verifying + * the clear "took", so some devices could lock up if you check... + * such as the Hagiwara FlashGate DUAL. So we won't bother. + * + * NOTE: make sure the logic here doesn't diverge much from + * the copy in usb-storage, for as long as we need two copies. + */ + + /* toggle was reset by the clear, then ep was reactivated */ + usb_settoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe), 0); + usb_endpoint_running(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe)); + + return 0; +} + +/** + * usb_set_interface - Makes a particular alternate setting be current + * @dev: the device whose interface is being updated + * @interface: the interface being updated + * @alternate: the setting being chosen. + * Context: !in_interrupt () + * + * This is used to enable data transfers on interfaces that may not + * be enabled by default. Not all devices support such configurability. + * Only the driver bound to an interface may change its setting. + * + * Within any given configuration, each interface may have several + * alternative settings. These are often used to control levels of + * bandwidth consumption. For example, the default setting for a high + * speed interrupt endpoint may not send more than 64 bytes per microframe, + * while interrupt transfers of up to 3KBytes per microframe are legal. + * Also, isochronous endpoints may never be part of an + * interface's default setting. To access such bandwidth, alternate + * interface settings must be made current. + * + * Note that in the Linux USB subsystem, bandwidth associated with + * an endpoint in a given alternate setting is not reserved until an URB + * is submitted that needs that bandwidth. Some other operating systems + * allocate bandwidth early, when a configuration is chosen. + * + * This call is synchronous, and may not be used in an interrupt context. + * Also, drivers must not change altsettings while urbs are scheduled for + * endpoints in that interface; all such urbs must first be completed + * (perhaps forced by unlinking). + * + * Returns zero on success, or else the status code returned by the + * underlying usb_control_msg() call. + */ +int usb_set_interface(struct usb_device *dev, int interface, int alternate) +{ + struct usb_interface *iface; + struct usb_host_interface *iface_as; + int i, ret; + void (*disable)(struct usb_device *, int) = dev->bus->op->disable; + + iface = usb_ifnum_to_if(dev, interface); + if (!iface) { + warn("selecting invalid interface %d", interface); + return -EINVAL; + } + + /* 9.4.10 says devices don't need this, if the interface + only has one alternate setting */ + if (iface->num_altsetting == 1) { + dbg("ignoring set_interface for dev %d, iface %d, alt %d", + dev->devnum, interface, alternate); + return 0; + } + + if (alternate < 0 || alternate >= iface->num_altsetting) + return -EINVAL; + + if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE, + iface->altsetting[alternate] + .desc.bAlternateSetting, + interface, NULL, 0, HZ * 5)) < 0) + return ret; + + /* FIXME drivers shouldn't need to replicate/bugfix the logic here + * when they implement async or easily-killable versions of this or + * other "should-be-internal" functions (like clear_halt). + * should hcd+usbcore postprocess control requests? + */ + + /* prevent submissions using previous endpoint settings */ + iface_as = iface->altsetting + iface->act_altsetting; + for (i = 0; i < iface_as->desc.bNumEndpoints; i++) { + u8 ep = iface_as->endpoint [i].desc.bEndpointAddress; + int out = !(ep & USB_DIR_IN); + + /* clear out hcd state, then usbcore state */ + if (disable) + disable (dev, ep); + ep &= USB_ENDPOINT_NUMBER_MASK; + (out ? dev->epmaxpacketout : dev->epmaxpacketin ) [ep] = 0; + } + iface->act_altsetting = alternate; + + /* 9.1.1.5: reset toggles for all endpoints affected by this iface-as + * + * Note: + * Despite EP0 is always present in all interfaces/AS, the list of + * endpoints from the descriptor does not contain EP0. Due to its + * omnipresence one might expect EP0 being considered "affected" by + * any SetInterface request and hence assume toggles need to be reset. + * However, EP0 toggles are re-synced for every individual transfer + * during the SETUP stage - hence EP0 toggles are "don't care" here. + * (Likewise, EP0 never "halts" on well designed devices.) + */ + + iface_as = &iface->altsetting[alternate]; + for (i = 0; i < iface_as->desc.bNumEndpoints; i++) { + u8 ep = iface_as->endpoint[i].desc.bEndpointAddress; + int out = !(ep & USB_DIR_IN); + + ep &= USB_ENDPOINT_NUMBER_MASK; + usb_settoggle (dev, ep, out, 0); + (out ? dev->epmaxpacketout : dev->epmaxpacketin) [ep] + = iface_as->endpoint [i].desc.wMaxPacketSize; + usb_endpoint_running (dev, ep, out); + } + + return 0; +} + +/** + * usb_set_configuration - Makes a particular device setting be current + * @dev: the device whose configuration is being updated + * @configuration: the configuration being chosen. + * Context: !in_interrupt () + * + * This is used to enable non-default device modes. Not all devices + * support this kind of configurability. By default, configuration + * zero is selected after enumeration; many devices only have a single + * configuration. + * + * USB devices may support one or more configurations, which affect + * power consumption and the functionality available. For example, + * the default configuration is limited to using 100mA of bus power, + * so that when certain device functionality requires more power, + * and the device is bus powered, that functionality will be in some + * non-default device configuration. Other device modes may also be + * reflected as configuration options, such as whether two ISDN + * channels are presented as independent 64Kb/s interfaces or as one + * bonded 128Kb/s interface. + * + * Note that USB has an additional level of device configurability, + * associated with interfaces. That configurability is accessed using + * usb_set_interface(). + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns zero on success, or else the status code returned by the + * underlying usb_control_msg() call. + */ +int usb_set_configuration(struct usb_device *dev, int configuration) +{ + int i, ret; + struct usb_host_config *cp = NULL; + void (*disable)(struct usb_device *, int) = dev->bus->op->disable; + + for (i=0; idescriptor.bNumConfigurations; i++) { + if (dev->config[i].desc.bConfigurationValue == configuration) { + cp = &dev->config[i]; + break; + } + } + if ((!cp && configuration != 0) || (cp && configuration == 0)) { + warn("selecting invalid configuration %d", configuration); + return -EINVAL; + } + + /* if it's already configured, clear out old state first. */ + if (dev->state != USB_STATE_ADDRESS && disable) { + for (i = 1 /* skip ep0 */; i < 15; i++) { + disable (dev, i); + disable (dev, USB_DIR_IN | i); + } + } + dev->toggle[0] = dev->toggle[1] = 0; + dev->halted[0] = dev->halted[1] = 0; + dev->state = USB_STATE_ADDRESS; + + if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_SET_CONFIGURATION, 0, configuration, 0, + NULL, 0, HZ * USB_CTRL_SET_TIMEOUT)) < 0) + return ret; + if (configuration) + dev->state = USB_STATE_CONFIGURED; + dev->actconfig = cp; + + /* reset more hc/hcd endpoint state */ + usb_set_maxpacket(dev); + + return 0; +} + + +/** + * usb_string - returns ISO 8859-1 version of a string descriptor + * @dev: the device whose string descriptor is being retrieved + * @index: the number of the descriptor + * @buf: where to put the string + * @size: how big is "buf"? + * Context: !in_interrupt () + * + * This converts the UTF-16LE encoded strings returned by devices, from + * usb_get_string_descriptor(), to null-terminated ISO-8859-1 encoded ones + * that are more usable in most kernel contexts. Note that all characters + * in the chosen descriptor that can't be encoded using ISO-8859-1 + * are converted to the question mark ("?") character, and this function + * chooses strings in the first language supported by the device. + * + * The ASCII (or, redundantly, "US-ASCII") character set is the seven-bit + * subset of ISO 8859-1. ISO-8859-1 is the eight-bit subset of Unicode, + * and is appropriate for use many uses of English and several other + * Western European languages. (But it doesn't include the "Euro" symbol.) + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns length of the string (>= 0) or usb_control_msg status (< 0). + */ +int usb_string(struct usb_device *dev, int index, char *buf, size_t size) +{ + unsigned char *tbuf; + int err, len; + unsigned int u, idx; + + if (size <= 0 || !buf || !index) + return -EINVAL; + buf[0] = 0; + tbuf = kmalloc(256, GFP_KERNEL); + if (!tbuf) + return -ENOMEM; + + /* get langid for strings if it's not yet known */ + if (!dev->have_langid) { + err = usb_get_string(dev, 0, 0, tbuf, 4); + if (err < 0) { + err("error getting string descriptor 0 (error=%d)", err); + goto errout; + } else if (tbuf[0] < 4) { + err("string descriptor 0 too short"); + err = -EINVAL; + goto errout; + } else { + dev->have_langid = -1; + dev->string_langid = tbuf[2] | (tbuf[3]<< 8); + /* always use the first langid listed */ + dbg("USB device number %d default language ID 0x%x", + dev->devnum, dev->string_langid); + } + } + + /* + * ask for the length of the string + */ + + err = usb_get_string(dev, dev->string_langid, index, tbuf, 2); + if(err<2) + goto errout; + len=tbuf[0]; + + err = usb_get_string(dev, dev->string_langid, index, tbuf, len); + if (err < 0) + goto errout; + + size--; /* leave room for trailing NULL char in output buffer */ + for (idx = 0, u = 2; u < err; u += 2) { + if (idx >= size) + break; + if (tbuf[u+1]) /* high byte */ + buf[idx++] = '?'; /* non ISO-8859-1 character */ + else + buf[idx++] = tbuf[u]; + } + buf[idx] = 0; + err = idx; + + errout: + kfree(tbuf); + return err; +} + +// synchronous request completion model +EXPORT_SYMBOL(usb_control_msg); +EXPORT_SYMBOL(usb_bulk_msg); + +EXPORT_SYMBOL(usb_sg_init); +EXPORT_SYMBOL(usb_sg_cancel); +EXPORT_SYMBOL(usb_sg_wait); + +// synchronous control message convenience routines +EXPORT_SYMBOL(usb_get_descriptor); +EXPORT_SYMBOL(usb_get_device_descriptor); +EXPORT_SYMBOL(usb_get_status); +EXPORT_SYMBOL(usb_get_string); +EXPORT_SYMBOL(usb_string); +EXPORT_SYMBOL(usb_clear_halt); +EXPORT_SYMBOL(usb_set_configuration); +EXPORT_SYMBOL(usb_set_interface); + diff --git a/reactos/drivers/usb/cromwell/core/urb.c b/reactos/drivers/usb/cromwell/core/urb.c new file mode 100644 index 00000000000..08b691fd1ff --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/urb.c @@ -0,0 +1,398 @@ +#include "../usb_wrapper.h" +#include "hcd.h" + +/** + * usb_init_urb - initializes a urb so that it can be used by a USB driver + * @urb: pointer to the urb to initialize + * + * Initializes a urb so that the USB subsystem can use it properly. + * + * If a urb is created with a call to usb_alloc_urb() it is not + * necessary to call this function. Only use this if you allocate the + * space for a struct urb on your own. If you call this function, be + * careful when freeing the memory for your urb that it is no longer in + * use by the USB core. + * + * Only use this function if you _really_ understand what you are doing. + */ +void STDCALL usb_init_urb(struct urb *urb) +{ + if (urb) { + memset(urb, 0, sizeof(*urb)); + urb->count = (atomic_t)ATOMIC_INIT(1); + spin_lock_init(&urb->lock); + } +} + +/** + * usb_alloc_urb - creates a new urb for a USB driver to use + * @iso_packets: number of iso packets for this urb + * @mem_flags: the type of memory to allocate, see kmalloc() for a list of + * valid options for this. + * + * Creates an urb for the USB driver to use, initializes a few internal + * structures, incrementes the usage counter, and returns a pointer to it. + * + * If no memory is available, NULL is returned. + * + * If the driver want to use this urb for interrupt, control, or bulk + * endpoints, pass '0' as the number of iso packets. + * + * The driver must call usb_free_urb() when it is finished with the urb. + */ +struct urb STDCALL *usb_alloc_urb(int iso_packets, int mem_flags) +{ + struct urb *urb; + + urb = (struct urb *)kmalloc(sizeof(struct urb) + + iso_packets * sizeof(struct usb_iso_packet_descriptor), + mem_flags); + if (!urb) { + err("alloc_urb: kmalloc failed"); + return NULL; + } + usb_init_urb(urb); + return urb; +} + +/** + * usb_free_urb - frees the memory used by a urb when all users of it are finished + * @urb: pointer to the urb to free + * + * Must be called when a user of a urb is finished with it. When the last user + * of the urb calls this function, the memory of the urb is freed. + * + * Note: The transfer buffer associated with the urb is not freed, that must be + * done elsewhere. + */ +void STDCALL usb_free_urb(struct urb *urb) +{ + if (urb) + if (atomic_dec_and_test(&urb->count)) + { + kfree(urb); + } +} + +/** + * usb_get_urb - increments the reference count of the urb + * @urb: pointer to the urb to modify + * + * This must be called whenever a urb is transferred from a device driver to a + * host controller driver. This allows proper reference counting to happen + * for urbs. + * + * A pointer to the urb with the incremented reference counter is returned. + */ +struct urb STDCALL * usb_get_urb(struct urb *urb) +{ + if (urb) { + atomic_inc(&urb->count); + return urb; + } else + return NULL; +} + + +/*-------------------------------------------------------------------*/ + +/** + * usb_submit_urb - issue an asynchronous transfer request for an endpoint + * @urb: pointer to the urb describing the request + * @mem_flags: the type of memory to allocate, see kmalloc() for a list + * of valid options for this. + * + * This submits a transfer request, and transfers control of the URB + * describing that request to the USB subsystem. Request completion will + * be indicated later, asynchronously, by calling the completion handler. + * The three types of completion are success, error, and unlink + * (also called "request cancellation"). + * URBs may be submitted in interrupt context. + * + * The caller must have correctly initialized the URB before submitting + * it. Functions such as usb_fill_bulk_urb() and usb_fill_control_urb() are + * available to ensure that most fields are correctly initialized, for + * the particular kind of transfer, although they will not initialize + * any transfer flags. + * + * Successful submissions return 0; otherwise this routine returns a + * negative error number. If the submission is successful, the complete() + * callback from the urb will be called exactly once, when the USB core and + * host controller driver are finished with the urb. When the completion + * function is called, control of the URB is returned to the device + * driver which issued the request. The completion handler may then + * immediately free or reuse that URB. + * + * For control endpoints, the synchronous usb_control_msg() call is + * often used (in non-interrupt context) instead of this call. + * That is often used through convenience wrappers, for the requests + * that are standardized in the USB 2.0 specification. For bulk + * endpoints, a synchronous usb_bulk_msg() call is available. + * + * Request Queuing: + * + * URBs may be submitted to endpoints before previous ones complete, to + * minimize the impact of interrupt latencies and system overhead on data + * throughput. This is required for continuous isochronous data streams, + * and may also be required for some kinds of interrupt transfers. Such + * queueing also maximizes bandwidth utilization by letting USB controllers + * start work on later requests before driver software has finished the + * completion processing for earlier requests. + * + * Bulk and Isochronous URBs may always be queued. At this writing, all + * mainstream host controller drivers support queueing for control and + * interrupt transfer requests. + * + * Reserved Bandwidth Transfers: + * + * Periodic transfers (interrupt or isochronous) are performed repeatedly, + * using the interval specified in the urb. Submitting the first urb to + * the endpoint reserves the bandwidth necessary to make those transfers. + * If the USB subsystem can't allocate sufficient bandwidth to perform + * the periodic request, submitting such a periodic request should fail. + * + * Device drivers must explicitly request that repetition, by ensuring that + * some URB is always on the endpoint's queue (except possibly for short + * periods during completion callacks). When there is no longer an urb + * queued, the endpoint's bandwidth reservation is canceled. This means + * drivers can use their completion handlers to ensure they keep bandwidth + * they need, by reinitializing and resubmitting the just-completed urb + * until the driver longer needs that periodic bandwidth. + * + * Memory Flags: + * + * The general rules for how to decide which mem_flags to use + * are the same as for kmalloc. There are four + * different possible values; GFP_KERNEL, GFP_NOFS, GFP_NOIO and + * GFP_ATOMIC. + * + * GFP_NOFS is not ever used, as it has not been implemented yet. + * + * GFP_ATOMIC is used when + * (a) you are inside a completion handler, an interrupt, bottom half, + * tasklet or timer, or + * (b) you are holding a spinlock or rwlock (does not apply to + * semaphores), or + * (c) current->state != TASK_RUNNING, this is the case only after + * you've changed it. + * + * GFP_NOIO is used in the block io path and error handling of storage + * devices. + * + * All other situations use GFP_KERNEL. + * + * Some more specific rules for mem_flags can be inferred, such as + * (1) start_xmit, timeout, and receive methods of network drivers must + * use GFP_ATOMIC (they are called with a spinlock held); + * (2) queuecommand methods of scsi drivers must use GFP_ATOMIC (also + * called with a spinlock held); + * (3) If you use a kernel thread with a network driver you must use + * GFP_NOIO, unless (b) or (c) apply; + * (4) after you have done a down() you can use GFP_KERNEL, unless (b) or (c) + * apply or your are in a storage driver's block io path; + * (5) USB probe and disconnect can use GFP_KERNEL unless (b) or (c) apply; and + * (6) changing firmware on a running storage or net device uses + * GFP_NOIO, unless b) or c) apply + * + */ +int STDCALL usb_submit_urb(struct urb *urb, int mem_flags) +{ + int pipe, temp, max; + struct usb_device *dev; + struct usb_operations *op; + int is_out; +// printk("sub dev %p bus %p num %i op %p sub %p\n", +// urb->dev, urb->dev->bus,urb->dev->devnum,urb->dev->bus->op, urb->dev->bus->op->submit_urb); + if (!urb || urb->hcpriv || !urb->complete) + return -EINVAL; + if (!(dev = urb->dev) || + (dev->state < USB_STATE_DEFAULT) || + (!dev->bus) || (dev->devnum <= 0)) + return -ENODEV; + if (!(op = dev->bus->op) || !op->submit_urb) + return -ENODEV; + + urb->status = -EINPROGRESS; + urb->actual_length = 0; + urb->bandwidth = 0; + + /* Lots of sanity checks, so HCDs can rely on clean data + * and don't need to duplicate tests + */ + pipe = urb->pipe; + temp = usb_pipetype (pipe); + is_out = usb_pipeout (pipe); + + if (!usb_pipecontrol (pipe) && dev->state < USB_STATE_CONFIGURED) + return -ENODEV; + + /* (actually HCDs may need to duplicate this, endpoint might yet + * stall due to queued bulk/intr transactions that complete after + * we check) + */ + if (usb_endpoint_halted (dev, usb_pipeendpoint (pipe), is_out)) + return -EPIPE; + + /* FIXME there should be a sharable lock protecting us against + * config/altsetting changes and disconnects, kicking in here. + * (here == before maxpacket, and eventually endpoint type, + * checks get made.) + */ + + max = usb_maxpacket (dev, pipe, is_out); + if (max <= 0) { + dbg ("%s: bogus endpoint %d-%s on usb-%s-%s (bad maxpacket %d)", + __FUNCTION__, + usb_pipeendpoint (pipe), is_out ? "OUT" : "IN", + dev->bus->bus_name, dev->devpath, + max); + return -EMSGSIZE; + } + + /* periodic transfers limit size per frame/uframe, + * but drivers only control those sizes for ISO. + * while we're checking, initialize return status. + */ + if (temp == PIPE_ISOCHRONOUS) { + int n, len; + + /* "high bandwidth" mode, 1-3 packets/uframe? */ + if (dev->speed == USB_SPEED_HIGH) { + int mult = 1 + ((max >> 11) & 0x03); + max &= 0x03ff; + max *= mult; + } + + if (urb->number_of_packets <= 0) + return -EINVAL; + for (n = 0; n < urb->number_of_packets; n++) { + len = urb->iso_frame_desc [n].length; + if (len < 0 || len > max) + return -EMSGSIZE; + urb->iso_frame_desc [n].status = -EXDEV; + urb->iso_frame_desc [n].actual_length = 0; + } + } + + /* the I/O buffer must be mapped/unmapped, except when length=0 */ + if (urb->transfer_buffer_length < 0) + return -EMSGSIZE; + +#ifdef DEBUG + /* stuff that drivers shouldn't do, but which shouldn't + * cause problems in HCDs if they get it wrong. + */ + { + unsigned int orig_flags = urb->transfer_flags; + unsigned int allowed; + + /* enforce simple/standard policy */ + allowed = URB_ASYNC_UNLINK; // affects later unlinks + allowed |= URB_NO_DMA_MAP; + allowed |= URB_NO_INTERRUPT; + switch (temp) { + case PIPE_BULK: + if (is_out) + allowed |= URB_ZERO_PACKET; + /* FALLTHROUGH */ + case PIPE_CONTROL: + allowed |= URB_NO_FSBR; /* only affects UHCI */ + /* FALLTHROUGH */ + default: /* all non-iso endpoints */ + if (!is_out) + allowed |= URB_SHORT_NOT_OK; + break; + case PIPE_ISOCHRONOUS: + allowed |= URB_ISO_ASAP; + break; + } + urb->transfer_flags &= allowed; + + /* fail if submitter gave bogus flags */ + if (urb->transfer_flags != orig_flags) { + err ("BOGUS urb flags, %x --> %x", + orig_flags, urb->transfer_flags); + return -EINVAL; + } + } +#endif + /* + * Force periodic transfer intervals to be legal values that are + * a power of two (so HCDs don't need to). + * + * FIXME want bus->{intr,iso}_sched_horizon values here. Each HC + * supports different values... this uses EHCI/UHCI defaults (and + * EHCI can use smaller non-default values). + */ + switch (temp) { + case PIPE_ISOCHRONOUS: + case PIPE_INTERRUPT: + /* too small? */ + if (urb->interval <= 0) + return -EINVAL; + /* too big? */ + switch (dev->speed) { + case USB_SPEED_HIGH: /* units are microframes */ + // NOTE usb handles 2^15 + if (urb->interval > (1024 * 8)) + urb->interval = 1024 * 8; + temp = 1024 * 8; + break; + case USB_SPEED_FULL: /* units are frames/msec */ + case USB_SPEED_LOW: + if (temp == PIPE_INTERRUPT) { + if (urb->interval > 255) + return -EINVAL; + // NOTE ohci only handles up to 32 + temp = 128; + } else { + if (urb->interval > 1024) + urb->interval = 1024; + // NOTE usb and ohci handle up to 2^15 + temp = 1024; + } + break; + default: + return -EINVAL; + } + /* power of two? */ + while (temp > urb->interval) + temp >>= 1; + urb->interval = temp; + } + + return op->submit_urb (urb, mem_flags); +} + +/*-------------------------------------------------------------------*/ + +/** + * usb_unlink_urb - abort/cancel a transfer request for an endpoint + * @urb: pointer to urb describing a previously submitted request + * + * This routine cancels an in-progress request. The requests's + * completion handler will be called with a status code indicating + * that the request has been canceled, and that control of the URB + * has been returned to that device driver. + * + * When the URB_ASYNC_UNLINK transfer flag for the URB is clear, this + * request is synchronous. Success is indicated by returning zero, + * at which time the urb will have been unlinked, + * and the completion function will see status -ENOENT. Failure is + * indicated by any other return value. This mode may not be used + * when unlinking an urb from an interrupt context, such as a bottom + * half or a completion handler, + * + * When the URB_ASYNC_UNLINK transfer flag for the URB is set, this + * request is asynchronous. Success is indicated by returning -EINPROGRESS, + * at which time the urb will normally not have been unlinked, + * and the completion function will see status -ECONNRESET. Failure is + * indicated by any other return value. + */ +int STDCALL usb_unlink_urb(struct urb *urb) +{ + if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op) + return urb->dev->bus->op->unlink_urb(urb); + else + return -ENODEV; +} diff --git a/reactos/drivers/usb/cromwell/core/usb-debug.c b/reactos/drivers/usb/cromwell/core/usb-debug.c new file mode 100644 index 00000000000..a2a3404f4c6 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usb-debug.c @@ -0,0 +1,206 @@ +/* + * debug.c - USB debug helper routines. + * + * I just want these out of the way where they aren't in your + * face, but so that you can still use them.. + */ +#define CONFIG_USB_DEBUG +#if 0 +#include +#include +#include +#include +#ifdef CONFIG_USB_DEBUG + #define DEBUG +#else + #undef DEBUG +#endif +#include +#else +#include "../usb_wrapper.h" +#endif + +static void usb_show_endpoint(struct usb_host_endpoint *endpoint) +{ + usb_show_endpoint_descriptor(&endpoint->desc); +} + +static void usb_show_interface(struct usb_host_interface *altsetting) +{ + int i; + + usb_show_interface_descriptor(&altsetting->desc); + + for (i = 0; i < altsetting->desc.bNumEndpoints; i++) + usb_show_endpoint(altsetting->endpoint + i); +} + +static void usb_show_config(struct usb_host_config *config) +{ + int i, j; + struct usb_interface *ifp; + + usb_show_config_descriptor(&config->desc); + for (i = 0; i < config->desc.bNumInterfaces; i++) { + ifp = config->interface + i; + + if (!ifp) + break; + + printk("\n Interface: %d\n", i); + for (j = 0; j < ifp->num_altsetting; j++) + usb_show_interface(ifp->altsetting + j); + } +} + +void usb_show_device(struct usb_device *dev) +{ + int i; + + usb_show_device_descriptor(&dev->descriptor); + for (i = 0; i < dev->descriptor.bNumConfigurations; i++) + usb_show_config(dev->config + i); +} + +/* + * Parse and show the different USB descriptors. + */ +void usb_show_device_descriptor(struct usb_device_descriptor *desc) +{ + if (!desc) + { + printk("Invalid USB device descriptor (NULL POINTER)\n"); + return; + } + printk(" Length = %2d%s\n", desc->bLength, + desc->bLength == USB_DT_DEVICE_SIZE ? "" : " (!!!)"); + printk(" DescriptorType = %02x\n", desc->bDescriptorType); + + printk(" USB version = %x.%02x\n", + desc->bcdUSB >> 8, desc->bcdUSB & 0xff); + printk(" Vendor:Product = %04x:%04x\n", + desc->idVendor, desc->idProduct); + printk(" MaxPacketSize0 = %d\n", desc->bMaxPacketSize0); + printk(" NumConfigurations = %d\n", desc->bNumConfigurations); + printk(" Device version = %x.%02x\n", + desc->bcdDevice >> 8, desc->bcdDevice & 0xff); + + printk(" Device Class:SubClass:Protocol = %02x:%02x:%02x\n", + desc->bDeviceClass, desc->bDeviceSubClass, desc->bDeviceProtocol); + switch (desc->bDeviceClass) { + case 0: + printk(" Per-interface classes\n"); + break; + case USB_CLASS_AUDIO: + printk(" Audio device class\n"); + break; + case USB_CLASS_COMM: + printk(" Communications class\n"); + break; + case USB_CLASS_HID: + printk(" Human Interface Devices class\n"); + break; + case USB_CLASS_PRINTER: + printk(" Printer device class\n"); + break; + case USB_CLASS_MASS_STORAGE: + printk(" Mass Storage device class\n"); + break; + case USB_CLASS_HUB: + printk(" Hub device class\n"); + break; + case USB_CLASS_VENDOR_SPEC: + printk(" Vendor class\n"); + break; + default: + printk(" Unknown class\n"); + } +} + +void usb_show_config_descriptor(struct usb_config_descriptor *desc) +{ + printk("Configuration:\n"); + printk(" bLength = %4d%s\n", desc->bLength, + desc->bLength == USB_DT_CONFIG_SIZE ? "" : " (!!!)"); + printk(" bDescriptorType = %02x\n", desc->bDescriptorType); + printk(" wTotalLength = %04x\n", desc->wTotalLength); + printk(" bNumInterfaces = %02x\n", desc->bNumInterfaces); + printk(" bConfigurationValue = %02x\n", desc->bConfigurationValue); + printk(" iConfiguration = %02x\n", desc->iConfiguration); + printk(" bmAttributes = %02x\n", desc->bmAttributes); + printk(" bMaxPower = %4dmA\n", desc->bMaxPower * 2); +} + +void usb_show_interface_descriptor(struct usb_interface_descriptor *desc) +{ + printk(" Alternate Setting: %2d\n", desc->bAlternateSetting); + printk(" bLength = %4d%s\n", desc->bLength, + desc->bLength == USB_DT_INTERFACE_SIZE ? "" : " (!!!)"); + printk(" bDescriptorType = %02x\n", desc->bDescriptorType); + printk(" bInterfaceNumber = %02x\n", desc->bInterfaceNumber); + printk(" bAlternateSetting = %02x\n", desc->bAlternateSetting); + printk(" bNumEndpoints = %02x\n", desc->bNumEndpoints); + printk(" bInterface Class:SubClass:Protocol = %02x:%02x:%02x\n", + desc->bInterfaceClass, desc->bInterfaceSubClass, desc->bInterfaceProtocol); + printk(" iInterface = %02x\n", desc->iInterface); +} + +void usb_show_endpoint_descriptor(struct usb_endpoint_descriptor *desc) +{ + char *LengthCommentString = (desc->bLength == + USB_DT_ENDPOINT_AUDIO_SIZE) ? " (Audio)" : (desc->bLength == + USB_DT_ENDPOINT_SIZE) ? "" : " (!!!)"; + char *EndpointType[4] = { "Control", "Isochronous", "Bulk", "Interrupt" }; + + printk(" Endpoint:\n"); + printk(" bLength = %4d%s\n", + desc->bLength, LengthCommentString); + printk(" bDescriptorType = %02x\n", desc->bDescriptorType); + printk(" bEndpointAddress = %02x (%s)\n", desc->bEndpointAddress, + (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == + USB_ENDPOINT_XFER_CONTROL ? "i/o" : + (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) ? "in" : "out"); + printk(" bmAttributes = %02x (%s)\n", desc->bmAttributes, + EndpointType[USB_ENDPOINT_XFERTYPE_MASK & desc->bmAttributes]); + printk(" wMaxPacketSize = %04x\n", desc->wMaxPacketSize); + printk(" bInterval = %02x\n", desc->bInterval); + + /* Audio extensions to the endpoint descriptor */ + if (desc->bLength == USB_DT_ENDPOINT_AUDIO_SIZE) { + printk(" bRefresh = %02x\n", desc->bRefresh); + printk(" bSynchAddress = %02x\n", desc->bSynchAddress); + } +} + +void usb_show_string(struct usb_device *dev, char *id, int index) +{ + char *buf; + + if (!index) + return; + if (!(buf = kmalloc(256, GFP_KERNEL))) + return; + if (usb_string(dev, index, buf, 256) > 0) + dev_printk(KERN_INFO, &dev->dev, "%s: %s\n", id, buf); + kfree(buf); +} + +void usb_dump_urb (struct urb *urb) +{ + printk ("urb :%p\n", urb); + printk ("dev :%p\n", urb->dev); + printk ("pipe :%08X\n", urb->pipe); + printk ("status :%d\n", urb->status); + printk ("transfer_flags :%08X\n", urb->transfer_flags); + printk ("transfer_buffer :%p\n", urb->transfer_buffer); + printk ("transfer_buffer_length:%d\n", urb->transfer_buffer_length); + printk ("actual_length :%d\n", urb->actual_length); + printk ("setup_packet :%p\n", urb->setup_packet); + printk ("start_frame :%d\n", urb->start_frame); + printk ("number_of_packets :%d\n", urb->number_of_packets); + printk ("interval :%d\n", urb->interval); + printk ("error_count :%d\n", urb->error_count); + printk ("context :%p\n", urb->context); + printk ("complete :%p\n", urb->complete); +} + diff --git a/reactos/drivers/usb/cromwell/core/usb.c b/reactos/drivers/usb/cromwell/core/usb.c new file mode 100644 index 00000000000..4206935def1 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usb.c @@ -0,0 +1,1596 @@ +/* + * drivers/usb/usb.c + * + * (C) Copyright Linus Torvalds 1999 + * (C) Copyright Johannes Erdfelt 1999-2001 + * (C) Copyright Andreas Gal 1999 + * (C) Copyright Gregory P. Smith 1999 + * (C) Copyright Deti Fliegl 1999 (new USB architecture) + * (C) Copyright Randy Dunlap 2000 + * (C) Copyright David Brownell 2000-2001 (kernel hotplug, usb_device_id, + more docs, etc) + * (C) Copyright Yggdrasil Computing, Inc. 2000 + * (usb_device_id matching changes by Adam J. Richter) + * (C) Copyright Greg Kroah-Hartman 2002-2003 + * + * NOTE! This is not actually a driver at all, rather this is + * just a collection of helper routines that implement the + * generic USB things that the real drivers can use.. + * + * Think of this as a "USB library" rather than anything else. + * It should be considered a slave, with no callbacks. Callbacks + * are evil. + */ + +#if 0 +#include + +#ifdef CONFIG_USB_DEBUG + #define DEBUG +#else + #undef DEBUG +#endif + +#include +#include +#include +#include +#include /* for in_interrupt() */ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include "hcd.h" +#include "usb.h" +#else +#include "../usb_wrapper.h" +#include "hcd.h" +#endif + + +extern int usb_hub_init(void); +extern void usb_hub_cleanup(void); +extern int usb_major_init(void); +extern void usb_major_cleanup(void); + + +int nousb; /* Disable USB when built into kernel image */ + /* Not honored on modular build */ + + +static int generic_probe (struct device *dev) +{ + return 0; +} +static int generic_remove (struct device *dev) +{ + return 0; +} + +static struct device_driver usb_generic_driver = { + .name = "usb", + .bus = &usb_bus_type, + .probe = generic_probe, + .remove = generic_remove, +}; + +static int usb_generic_driver_data; + +/* needs to be called with BKL held */ +int usb_device_probe(struct device *dev) +{ + struct usb_interface * intf = to_usb_interface(dev); + struct usb_driver * driver = to_usb_driver(dev->driver); + const struct usb_device_id *id; + int error = -ENODEV; + + dev_dbg(dev, "%s\n", __FUNCTION__); + + if (!driver->probe) + return error; + + id = usb_match_id (intf, driver->id_table); + if (id) { + dev_dbg (dev, "%s - got id\n", __FUNCTION__); + down (&driver->serialize); + error = driver->probe (intf, id); + up (&driver->serialize); + } + if (!error) + intf->driver = driver; + + return error; +} + +int usb_device_remove(struct device *dev) +{ + struct usb_interface *intf; + struct usb_driver *driver; + + intf = list_entry(dev,struct usb_interface,dev); + driver = to_usb_driver(dev->driver); + + down(&driver->serialize); + + if (intf->driver && intf->driver->disconnect) + intf->driver->disconnect(intf); + + /* if driver->disconnect didn't release the interface */ + if (intf->driver) + usb_driver_release_interface(driver, intf); + + up(&driver->serialize); + + return 0; +} + +/** + * usb_register - register a USB driver + * @new_driver: USB operations for the driver + * + * Registers a USB driver with the USB core. The list of unattached + * interfaces will be rescanned whenever a new driver is added, allowing + * the new driver to attach to any recognized devices. + * Returns a negative error code on failure and 0 on success. + * + * NOTE: if you want your driver to use the USB major number, you must call + * usb_register_dev() to enable that functionality. This function no longer + * takes care of that. + */ +int usb_register(struct usb_driver *new_driver) +{ + int retval = 0; + + if (nousb) + return -ENODEV; + + new_driver->driver.name = (char *)new_driver->name; + new_driver->driver.bus = &usb_bus_type; + new_driver->driver.probe = usb_device_probe; + new_driver->driver.remove = usb_device_remove; + + init_MUTEX(&new_driver->serialize); + + retval = driver_register(&new_driver->driver); + + if (!retval) { + info("registered new driver %s", new_driver->name); + usbfs_update_special(); + } else { + err("problem %d when registering driver %s", + retval, new_driver->name); + } + + return retval; +} + +/** + * usb_deregister - unregister a USB driver + * @driver: USB operations of the driver to unregister + * Context: !in_interrupt (), must be called with BKL held + * + * Unlinks the specified driver from the internal USB driver list. + * + * NOTE: If you called usb_register_dev(), you still need to call + * usb_deregister_dev() to clean up your driver's allocated minor numbers, + * this * call will no longer do it for you. + */ +void usb_deregister(struct usb_driver *driver) +{ + info("deregistering driver %s", driver->name); + + driver_unregister (&driver->driver); + + usbfs_update_special(); +} + +/** + * usb_ifnum_to_if - get the interface object with a given interface number (usbcore-internal) + * @dev: the device whose current configuration is considered + * @ifnum: the desired interface + * + * This walks the device descriptor for the currently active configuration + * and returns a pointer to the interface with that particular interface + * number, or null. + * + * Note that configuration descriptors are not required to assign interface + * numbers sequentially, so that it would be incorrect to assume that + * the first interface in that descriptor corresponds to interface zero. + * This routine helps device drivers avoid such mistakes. + * However, you should make sure that you do the right thing with any + * alternate settings available for this interfaces. + */ +struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, unsigned ifnum) +{ + int i; + + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) + if (dev->actconfig->interface[i].altsetting[0] + .desc.bInterfaceNumber == ifnum) + return &dev->actconfig->interface[i]; + + return NULL; +} + +/** + * usb_epnum_to_ep_desc - get the endpoint object with a given endpoint number + * @dev: the device whose current configuration is considered + * @epnum: the desired endpoint + * + * This walks the device descriptor for the currently active configuration, + * and returns a pointer to the endpoint with that particular endpoint + * number, or null. + * + * Note that interface descriptors are not required to assign endpont + * numbers sequentially, so that it would be incorrect to assume that + * the first endpoint in that descriptor corresponds to interface zero. + * This routine helps device drivers avoid such mistakes. + */ +struct usb_endpoint_descriptor * +usb_epnum_to_ep_desc(struct usb_device *dev, unsigned epnum) +{ + int i, j, k; + + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) + for (j = 0; j < dev->actconfig->interface[i].num_altsetting; j++) + for (k = 0; k < dev->actconfig->interface[i] + .altsetting[j].desc.bNumEndpoints; k++) + if (epnum == dev->actconfig->interface[i] + .altsetting[j].endpoint[k] + .desc.bEndpointAddress) + return &dev->actconfig->interface[i] + .altsetting[j].endpoint[k] + .desc; + + return NULL; +} + +/** + * usb_driver_claim_interface - bind a driver to an interface + * @driver: the driver to be bound + * @iface: the interface to which it will be bound + * @priv: driver data associated with that interface + * + * This is used by usb device drivers that need to claim more than one + * interface on a device when probing (audio and acm are current examples). + * No device driver should directly modify internal usb_interface or + * usb_device structure members. + * + * Few drivers should need to use this routine, since the most natural + * way to bind to an interface is to return the private data from + * the driver's probe() method. Any driver that does use this must + * first be sure that no other driver has claimed the interface, by + * checking with usb_interface_claimed(). + */ +void usb_driver_claim_interface(struct usb_driver *driver, struct usb_interface *iface, void* priv) +{ + if (!iface || !driver) + return; + + // FIXME change API to report an error in this case + if (iface->driver) + err ("%s driver booted %s off interface %p", + driver->name, iface->driver->name, iface); + else + dbg("%s driver claimed interface %p", driver->name, iface); + + iface->driver = driver; + usb_set_intfdata(iface, priv); +} + +/** + * usb_interface_claimed - returns true iff an interface is claimed + * @iface: the interface being checked + * + * This should be used by drivers to check other interfaces to see if + * they are available or not. If another driver has claimed the interface, + * they may not claim it. Otherwise it's OK to claim it using + * usb_driver_claim_interface(). + * + * Returns true (nonzero) iff the interface is claimed, else false (zero). + */ +int usb_interface_claimed(struct usb_interface *iface) +{ + if (!iface) + return 0; + + return (iface->driver != NULL); +} /* usb_interface_claimed() */ + +/** + * usb_driver_release_interface - unbind a driver from an interface + * @driver: the driver to be unbound + * @iface: the interface from which it will be unbound + * + * This should be used by drivers to release their claimed interfaces. + * It is normally called in their disconnect() methods, and only for + * drivers that bound to more than one interface in their probe(). + * + * When the USB subsystem disconnect()s a driver from some interface, + * it automatically invokes this method for that interface. That + * means that even drivers that used usb_driver_claim_interface() + * usually won't need to call this. + */ +void usb_driver_release_interface(struct usb_driver *driver, struct usb_interface *iface) +{ + /* this should never happen, don't release something that's not ours */ + if (!iface || iface->driver != driver) + return; + + iface->driver = NULL; + usb_set_intfdata(iface, NULL); +} + +/** + * usb_match_id - find first usb_device_id matching device or interface + * @interface: the interface of interest + * @id: array of usb_device_id structures, terminated by zero entry + * + * usb_match_id searches an array of usb_device_id's and returns + * the first one matching the device or interface, or null. + * This is used when binding (or rebinding) a driver to an interface. + * Most USB device drivers will use this indirectly, through the usb core, + * but some layered driver frameworks use it directly. + * These device tables are exported with MODULE_DEVICE_TABLE, through + * modutils and "modules.usbmap", to support the driver loading + * functionality of USB hotplugging. + * + * What Matches: + * + * The "match_flags" element in a usb_device_id controls which + * members are used. If the corresponding bit is set, the + * value in the device_id must match its corresponding member + * in the device or interface descriptor, or else the device_id + * does not match. + * + * "driver_info" is normally used only by device drivers, + * but you can create a wildcard "matches anything" usb_device_id + * as a driver's "modules.usbmap" entry if you provide an id with + * only a nonzero "driver_info" field. If you do this, the USB device + * driver's probe() routine should use additional intelligence to + * decide whether to bind to the specified interface. + * + * What Makes Good usb_device_id Tables: + * + * The match algorithm is very simple, so that intelligence in + * driver selection must come from smart driver id records. + * Unless you have good reasons to use another selection policy, + * provide match elements only in related groups, and order match + * specifiers from specific to general. Use the macros provided + * for that purpose if you can. + * + * The most specific match specifiers use device descriptor + * data. These are commonly used with product-specific matches; + * the USB_DEVICE macro lets you provide vendor and product IDs, + * and you can also match against ranges of product revisions. + * These are widely used for devices with application or vendor + * specific bDeviceClass values. + * + * Matches based on device class/subclass/protocol specifications + * are slightly more general; use the USB_DEVICE_INFO macro, or + * its siblings. These are used with single-function devices + * where bDeviceClass doesn't specify that each interface has + * its own class. + * + * Matches based on interface class/subclass/protocol are the + * most general; they let drivers bind to any interface on a + * multiple-function device. Use the USB_INTERFACE_INFO + * macro, or its siblings, to match class-per-interface style + * devices (as recorded in bDeviceClass). + * + * Within those groups, remember that not all combinations are + * meaningful. For example, don't give a product version range + * without vendor and product IDs; or specify a protocol without + * its associated class and subclass. + */ +const struct usb_device_id * +usb_match_id(struct usb_interface *interface, const struct usb_device_id *id) +{ + struct usb_host_interface *intf; + struct usb_device *dev; + + /* proc_connectinfo in devio.c may call us with id == NULL. */ + if (id == NULL) + return NULL; + + intf = &interface->altsetting [interface->act_altsetting]; + dev = interface_to_usbdev(interface); + + /* It is important to check that id->driver_info is nonzero, + since an entry that is all zeroes except for a nonzero + id->driver_info is the way to create an entry that + indicates that the driver want to examine every + device and interface. */ + for (; id->idVendor || id->bDeviceClass || id->bInterfaceClass || + id->driver_info; id++) { + + if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && + id->idVendor != dev->descriptor.idVendor) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) && + id->idProduct != dev->descriptor.idProduct) + continue; + + /* No need to test id->bcdDevice_lo != 0, since 0 is never + greater than any unsigned number. */ + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) && + (id->bcdDevice_lo > dev->descriptor.bcdDevice)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) && + (id->bcdDevice_hi < dev->descriptor.bcdDevice)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) && + (id->bDeviceClass != dev->descriptor.bDeviceClass)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) && + (id->bDeviceSubClass!= dev->descriptor.bDeviceSubClass)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) && + (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_CLASS) && + (id->bInterfaceClass != intf->desc.bInterfaceClass)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_SUBCLASS) && + (id->bInterfaceSubClass != intf->desc.bInterfaceSubClass)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_PROTOCOL) && + (id->bInterfaceProtocol != intf->desc.bInterfaceProtocol)) + continue; + + return id; + } + + return NULL; +} + +/** + * usb_find_interface - find usb_interface pointer for driver and device + * @drv: the driver whose current configuration is considered + * @minor: the minor number of the desired device + * + * This walks the driver device list and returns a pointer to the interface + * with the matching minor. Note, this only works for devices that share the + * USB major number. + */ +struct usb_interface *usb_find_interface(struct usb_driver *drv, int minor) +{ + struct list_head *entry; + struct device *dev; + struct usb_interface *intf; + + list_for_each(entry, &drv->driver.devices) { + dev = container_of(entry, struct device, driver_list); + + /* can't look at usb devices, only interfaces */ + if (dev->driver == &usb_generic_driver) + continue; + + intf = to_usb_interface(dev); + if (intf->minor == -1) + continue; + if (intf->minor == minor) + return intf; + } + + /* no device found that matches */ + return NULL; +} + +static int usb_device_match (struct device *dev, struct device_driver *drv) +{ + struct usb_interface *intf; + struct usb_driver *usb_drv; + const struct usb_device_id *id; + + /* check for generic driver, which we don't match any device with */ + if (drv == &usb_generic_driver) + return 0; + + intf = to_usb_interface(dev); + + usb_drv = to_usb_driver(drv); + id = usb_drv->id_table; + + id = usb_match_id (intf, usb_drv->id_table); + if (id) + return 1; + + return 0; +} + + +#ifdef CONFIG_HOTPLUG + +/* + * USB hotplugging invokes what /proc/sys/kernel/hotplug says + * (normally /sbin/hotplug) when USB devices get added or removed. + * + * This invokes a user mode policy agent, typically helping to load driver + * or other modules, configure the device, and more. Drivers can provide + * a MODULE_DEVICE_TABLE to help with module loading subtasks. + * + * We're called either from khubd (the typical case) or from root hub + * (init, kapmd, modprobe, rmmod, etc), but the agents need to handle + * delays in event delivery. Use sysfs (and DEVPATH) to make sure the + * device (and this configuration!) are still present. + */ +static int usb_hotplug (struct device *dev, char **envp, int num_envp, + char *buffer, int buffer_size) +{ + struct usb_interface *intf; + struct usb_device *usb_dev; + char *scratch; + int i = 0; + int length = 0; + + dbg ("%s", __FUNCTION__); + + if (!dev) + return -ENODEV; + + /* Must check driver_data here, as on remove driver is always NULL */ + if ((dev->driver == &usb_generic_driver) || + (dev->driver_data == &usb_generic_driver_data)) + return 0; + + intf = to_usb_interface(dev); + usb_dev = interface_to_usbdev (intf); + + if (usb_dev->devnum < 0) { + dbg ("device already deleted ??"); + return -ENODEV; + } + if (!usb_dev->bus) { + dbg ("bus already removed?"); + return -ENODEV; + } + + scratch = buffer; + +#ifdef CONFIG_USB_DEVICEFS + /* If this is available, userspace programs can directly read + * all the device descriptors we don't tell them about. Or + * even act as usermode drivers. + * + * FIXME reduce hardwired intelligence here + */ + envp [i++] = scratch; + length += snprintf (scratch, buffer_size - length, + "DEVICE=/proc/bus/usb/%03d/%03d", + usb_dev->bus->busnum, usb_dev->devnum); + if ((buffer_size - length <= 0) || (i >= num_envp)) + return -ENOMEM; + ++length; + scratch += length; +#endif + + /* per-device configurations are common */ + envp [i++] = scratch; + length += snprintf (scratch, buffer_size - length, "PRODUCT=%x/%x/%x", + usb_dev->descriptor.idVendor, + usb_dev->descriptor.idProduct, + usb_dev->descriptor.bcdDevice); + if ((buffer_size - length <= 0) || (i >= num_envp)) + return -ENOMEM; + ++length; + scratch += length; + + /* class-based driver binding models */ + envp [i++] = scratch; + length += snprintf (scratch, buffer_size - length, "TYPE=%d/%d/%d", + usb_dev->descriptor.bDeviceClass, + usb_dev->descriptor.bDeviceSubClass, + usb_dev->descriptor.bDeviceProtocol); + if ((buffer_size - length <= 0) || (i >= num_envp)) + return -ENOMEM; + ++length; + scratch += length; + + if (usb_dev->descriptor.bDeviceClass == 0) { + int alt = intf->act_altsetting; + + /* 2.4 only exposed interface zero. in 2.5, hotplug + * agents are called for all interfaces, and can use + * $DEVPATH/bInterfaceNumber if necessary. + */ + envp [i++] = scratch; + length += snprintf (scratch, buffer_size - length, + "INTERFACE=%d/%d/%d", + intf->altsetting[alt].desc.bInterfaceClass, + intf->altsetting[alt].desc.bInterfaceSubClass, + intf->altsetting[alt].desc.bInterfaceProtocol); + if ((buffer_size - length <= 0) || (i >= num_envp)) + return -ENOMEM; + ++length; + scratch += length; + + } + envp [i++] = 0; + + return 0; +} + +#else + +static int usb_hotplug (struct device *dev, char **envp, + int num_envp, char *buffer, int buffer_size) +{ + return -ENODEV; +} + +#endif /* CONFIG_HOTPLUG */ + +/** + * usb_alloc_dev - allocate a usb device structure (usbcore-internal) + * @parent: hub to which device is connected + * @bus: bus used to access the device + * Context: !in_interrupt () + * + * Only hub drivers (including virtual root hub drivers for host + * controllers) should ever call this. + * + * This call is synchronous, and may not be used in an interrupt context. + */ +struct usb_device STDCALL *usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus) +{ + struct usb_device *dev; + + dev = kmalloc(sizeof(*dev), GFP_KERNEL); + if (!dev) + return NULL; + + memset(dev, 0, sizeof(*dev)); + + device_initialize(&dev->dev); + dev->state = USB_STATE_ATTACHED; + + usb_bus_get(bus); + + if (!parent) + dev->devpath [0] = '0'; + dev->bus = bus; + dev->parent = parent; + INIT_LIST_HEAD(&dev->filelist); + + init_MUTEX(&dev->serialize); + + if (dev->bus->op->allocate) + dev->bus->op->allocate(dev); + + return dev; +} + +/** + * usb_get_dev - increments the reference count of the usb device structure + * @dev: the device being referenced + * + * Each live reference to a device should be refcounted. + * + * Drivers for USB interfaces should normally record such references in + * their probe() methods, when they bind to an interface, and release + * them by calling usb_put_dev(), in their disconnect() methods. + * + * A pointer to the device with the incremented reference counter is returned. + */ +struct usb_device *usb_get_dev (struct usb_device *dev) +{ + struct device *tmp; + + if (!dev) + return NULL; + + tmp = get_device(&dev->dev); + if (tmp) + return to_usb_device(tmp); + else + return NULL; +} + +/** + * usb_put_dev - release a use of the usb device structure + * @dev: device that's been disconnected + * + * Must be called when a user of a device is finished with it. When the last + * user of the device calls this function, the memory of the device is freed. + */ +void STDCALL usb_put_dev(struct usb_device *dev) +{ + if (dev) + put_device(&dev->dev); +} + +/** + * usb_release_dev - free a usb device structure when all users of it are finished. + * @dev: device that's been disconnected + * + * Will be called only by the device core when all users of this usb device are + * done. + */ +static void usb_release_dev(struct device *dev) +{ + struct usb_device *udev; + + udev = to_usb_device(dev); + + if (udev->bus && udev->bus->op && udev->bus->op->deallocate) + udev->bus->op->deallocate(udev); + usb_destroy_configuration (udev); + usb_bus_put (udev->bus); + kfree (udev); +} + + +static struct usb_device *match_device(struct usb_device *dev, + u16 vendor_id, u16 product_id) +{ + struct usb_device *ret_dev = NULL; + int child; + + dbg("looking at vendor %d, product %d", + dev->descriptor.idVendor, + dev->descriptor.idProduct); + + /* see if this device matches */ + if ((dev->descriptor.idVendor == vendor_id) && + (dev->descriptor.idProduct == product_id)) { + dbg ("found the device!"); + ret_dev = usb_get_dev(dev); + goto exit; + } + + /* look through all of the children of this device */ + for (child = 0; child < dev->maxchild; ++child) { + if (dev->children[child]) { + ret_dev = match_device(dev->children[child], + vendor_id, product_id); + if (ret_dev) + goto exit; + } + } +exit: + return ret_dev; +} + +/** + * usb_find_device - find a specific usb device in the system + * @vendor_id: the vendor id of the device to find + * @product_id: the product id of the device to find + * + * Returns a pointer to a struct usb_device if such a specified usb + * device is present in the system currently. The usage count of the + * device will be incremented if a device is found. Make sure to call + * usb_put_dev() when the caller is finished with the device. + * + * If a device with the specified vendor and product id is not found, + * NULL is returned. + */ +struct usb_device *usb_find_device(u16 vendor_id, u16 product_id) +{ + struct list_head *buslist; + struct usb_bus *bus; + struct usb_device *dev = NULL; + + down(&usb_bus_list_lock); + for (buslist = usb_bus_list.next; + buslist != &usb_bus_list; + buslist = buslist->next) { + bus = container_of(buslist, struct usb_bus, bus_list); + dev = match_device(bus->root_hub, vendor_id, product_id); + if (dev) + goto exit; + } +exit: + up(&usb_bus_list_lock); + return dev; +} + +/** + * usb_get_current_frame_number - return current bus frame number + * @dev: the device whose bus is being queried + * + * Returns the current frame number for the USB host controller + * used with the given USB device. This can be used when scheduling + * isochronous requests. + * + * Note that different kinds of host controller have different + * "scheduling horizons". While one type might support scheduling only + * 32 frames into the future, others could support scheduling up to + * 1024 frames into the future. + */ +int usb_get_current_frame_number(struct usb_device *dev) +{ + return dev->bus->op->get_frame_number (dev); +} + +/*-------------------------------------------------------------------*/ +/* + * __usb_get_extra_descriptor() finds a descriptor of specific type in the + * extra field of the interface and endpoint descriptor structs. + */ + +int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr) +{ + struct usb_descriptor_header *header; + + while (size >= sizeof(struct usb_descriptor_header)) { + header = (struct usb_descriptor_header *)buffer; + + if (header->bLength < 2) { + err("invalid descriptor length of %d", header->bLength); + return -1; + } + + if (header->bDescriptorType == type) { + *ptr = header; + return 0; + } + + buffer += header->bLength; + size -= header->bLength; + } + return -1; +} + +/** + * usb_disconnect - disconnect a device (usbcore-internal) + * @pdev: pointer to device being disconnected + * Context: !in_interrupt () + * + * Something got disconnected. Get rid of it, and all of its children. + * + * Only hub drivers (including virtual root hub drivers for host + * controllers) should ever call this. + * + * This call is synchronous, and may not be used in an interrupt context. + */ +void usb_disconnect(struct usb_device **pdev) +{ + struct usb_device *dev = *pdev; + struct usb_bus *bus; + struct usb_operations *ops; + int i; + + might_sleep (); + + if (!dev) { + pr_debug ("%s nodev\n", __FUNCTION__); + return; + } + bus = dev->bus; + if (!bus) { + pr_debug ("%s nobus\n", __FUNCTION__); + return; + } + ops = bus->op; + + *pdev = NULL; + + /* mark the device as inactive, so any further urb submissions for + * this device will fail. + */ + dev->state = USB_STATE_NOTATTACHED; + + dev_info (&dev->dev, "USB disconnect, address %d\n", dev->devnum); + + /* Free up all the children before we remove this device */ + for (i = 0; i < USB_MAXCHILDREN; i++) { + struct usb_device **child = dev->children + i; + if (*child) + usb_disconnect(child); + } + + /* disconnect() drivers from interfaces (a key side effect) */ + dev_dbg (&dev->dev, "unregistering interfaces\n"); + if (dev->actconfig) { + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { + struct usb_interface *interface; + + /* remove this interface */ + interface = &dev->actconfig->interface[i]; + device_unregister(&interface->dev); + } + } + + /* deallocate hcd/hardware state */ + if (ops->disable) { + void (*disable)(struct usb_device *, int) = ops->disable; + + for (i = 0; i < 15; i++) { + disable (dev, i); + disable (dev, USB_DIR_IN | i); + } + } + + dev_dbg (&dev->dev, "unregistering device\n"); + /* Free the device number and remove the /proc/bus/usb entry */ + if (dev->devnum > 0) { + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + usbfs_remove_device(dev); + } + device_unregister(&dev->dev); + + /* Decrement the reference count, it'll auto free everything when */ + /* it hits 0 which could very well be now */ + usb_put_dev(dev); +} + +/** + * usb_connect - pick device address (usbcore-internal) + * @dev: newly detected device (in DEFAULT state) + * + * Picks a device address. It's up to the hub (or root hub) driver + * to handle and manage enumeration, starting from the DEFAULT state. + * Only hub drivers (including virtual root hub drivers for host + * controllers) should ever call this. + */ +void STDCALL usb_connect(struct usb_device *dev) +{ + int devnum; + // FIXME needs locking for SMP!! + /* why? this is called only from the hub thread, + * which hopefully doesn't run on multiple CPU's simultaneously 8-) + * ... it's also called from modprobe/rmmod/apmd threads as part + * of virtual root hub init/reinit. In the init case, the hub code + * won't have seen this, but not so for reinit ... + */ + dev->descriptor.bMaxPacketSize0 = 8; /* Start off at 8 bytes */ + + /* Try to allocate the next devnum beginning at bus->devnum_next. */ + devnum = find_next_zero_bit(dev->bus->devmap.devicemap, 128, dev->bus->devnum_next); + if (devnum >= 128) + devnum = find_next_zero_bit(dev->bus->devmap.devicemap, 128, 1); + + dev->bus->devnum_next = ( devnum >= 127 ? 1 : devnum + 1); + + if (devnum < 128) { + set_bit(devnum, dev->bus->devmap.devicemap); + dev->devnum = devnum; + } +} + + +// hub-only!! ... and only exported for reset/reinit path. +// otherwise used internally, for usb_new_device() +int usb_set_address(struct usb_device *dev) +{ + int retval; + + if (dev->devnum == 0) + return -EINVAL; + if (dev->state != USB_STATE_DEFAULT && dev->state != USB_STATE_ADDRESS) + return -EINVAL; + retval = usb_control_msg(dev, usb_snddefctrl(dev), USB_REQ_SET_ADDRESS, + 0, dev->devnum, 0, NULL, 0, HZ * USB_CTRL_SET_TIMEOUT); + if (retval == 0) + dev->state = USB_STATE_ADDRESS; + return retval; +} + + +/* improve on the default device description, if we can ... and + * while we're at it, maybe show the vendor and product strings. + */ +static void set_device_description (struct usb_device *dev) +{ + void *buf; + int mfgr = dev->descriptor.iManufacturer; + int prod = dev->descriptor.iProduct; + int vendor_id = dev->descriptor.idVendor; + int product_id = dev->descriptor.idProduct; + char *mfgr_str, *prod_str; + + /* set default; keep it if there are no strings, or kmalloc fails */ + sprintf (dev->dev.name, "USB device %04x:%04x", + vendor_id, product_id); + + if (!(buf = kmalloc(256 * 2, GFP_KERNEL))) + return; + + prod_str = (char *) buf; + mfgr_str = (char *) buf + 256; + + if (prod && usb_string (dev, prod, prod_str, 256) > 0) { +#ifdef DEBUG + dev_printk (KERN_INFO, &dev->dev, "Product: %s\n", prod_str); +#endif + } else { + prod_str = 0; + } + + if (mfgr && usb_string (dev, mfgr, mfgr_str, 256) > 0) { +#ifdef DEBUG + dev_printk (KERN_INFO, &dev->dev, "Manufacturer: %s\n", mfgr_str); +#endif + } else { + mfgr_str = 0; + } + + /* much like pci ... describe as either: + * - both strings: 'product descr (vendor descr)' + * - product only: 'product descr (USB device vvvv:pppp)' + * - vendor only: 'USB device vvvv:pppp (vendor descr)' + * - neither string: 'USB device vvvv:pppp' + */ + + if (prod_str && mfgr_str) { + + snprintf(dev->dev.name, sizeof dev->dev.name, + "%s (%s)", prod_str, mfgr_str); + } else if (prod_str) { + snprintf(dev->dev.name, sizeof dev->dev.name, + "%s (USB device %04x:%04x)", + prod_str, vendor_id, product_id); + + } else if (mfgr_str) { + snprintf(dev->dev.name, sizeof dev->dev.name, + "USB device %04x:%04x (%s)", + vendor_id, product_id, mfgr_str); + } + //usbprintk("USB connected: %s\n",dev->dev.name); + kfree(buf); +} + +/* + * By the time we get here, we chose a new device address + * and is in the default state. We need to identify the thing and + * get the ball rolling.. + * + * Returns 0 for success, != 0 for error. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Only hub drivers (including virtual root hub drivers for host + * controllers) should ever call this. + */ +#define NEW_DEVICE_RETRYS 2 +#define SET_ADDRESS_RETRYS 2 +int usb_new_device(struct usb_device *dev, struct device *parent) +{ + int err = 0; + int i; + int j; + + /* + * Set the driver for the usb device to point to the "generic" driver. + * This prevents the main usb device from being sent to the usb bus + * probe function. Yes, it's a hack, but a nice one :) + * + * Do it asap, so more driver model stuff (like the device.h message + * utilities) can be used in hcd submit/unlink code paths. + */ + usb_generic_driver.bus = &usb_bus_type; + dev->dev.parent = parent; + dev->dev.driver = &usb_generic_driver; + dev->dev.bus = &usb_bus_type; + dev->dev.release = usb_release_dev; + dev->dev.driver_data = &usb_generic_driver_data; + usb_get_dev(dev); + if (dev->dev.bus_id[0] == 0) + sprintf (&dev->dev.bus_id[0], "%d-%s", + dev->bus->busnum, dev->devpath); + + /* dma masks come from the controller; readonly, except to hcd */ + dev->dev.dma_mask = parent->dma_mask; + + /* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... + * it's fixed size except for full speed devices. + */ + switch (dev->speed) { + case USB_SPEED_HIGH: /* fixed at 64 */ + i = 64; + break; + case USB_SPEED_FULL: /* 8, 16, 32, or 64 */ + /* to determine the ep0 maxpacket size, read the first 8 + * bytes from the device descriptor to get bMaxPacketSize0; + * then correct our initial (small) guess. + */ + // FALLTHROUGH + case USB_SPEED_LOW: /* fixed at 8 */ + i = 8; + break; + default: + return -EINVAL; + } + dev->epmaxpacketin [0] = i; + dev->epmaxpacketout[0] = i; + + for (i = 0; i < NEW_DEVICE_RETRYS; ++i) { + + for (j = 0; j < SET_ADDRESS_RETRYS; ++j) { + err = usb_set_address(dev); + if (err >= 0) + break; + wait_ms(200); + } + if (err < 0) { + dev_err(&dev->dev, "USB device not accepting new address=%d (error=%d)\n", + dev->devnum, err); + dev->state = USB_STATE_DEFAULT; + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + + wait_ms(10); /* Let the SET_ADDRESS settle */ + + /* high and low speed devices don't need this... */ + err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, 8); + if (err >= 8) + break; + wait_ms(100); + } + + if (err < 8) { + if (err < 0) + dev_err(&dev->dev, "USB device not responding, giving up (error=%d)\n", err); + else + dev_err(&dev->dev, "USB device descriptor short read (expected %i, got %i)\n", 8, err); + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + if (dev->speed == USB_SPEED_FULL) { + dev->epmaxpacketin [0] = dev->descriptor.bMaxPacketSize0; + dev->epmaxpacketout[0] = dev->descriptor.bMaxPacketSize0; + } + + /* USB device state == addressed ... still not usable */ + + err = usb_get_device_descriptor(dev); + if (err < (signed)sizeof(dev->descriptor)) { + if (err < 0) + dev_err(&dev->dev, "unable to get device descriptor (error=%d)\n", err); + else + dev_err(&dev->dev, "USB device descriptor short read (expected %Zi, got %i)\n", + sizeof(dev->descriptor), err); + + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + + err = usb_get_configuration(dev); + if (err < 0) { + dev_err(&dev->dev, "unable to get device %d configuration (error=%d)\n", + dev->devnum, err); + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + + /* we set the default configuration here */ + err = usb_set_configuration(dev, dev->config[0].desc.bConfigurationValue); + if (err) { + dev_err(&dev->dev, "failed to set device %d default configuration (error=%d)\n", + dev->devnum, err); + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + + /* USB device state == configured ... tell the world! */ + + dev_dbg(&dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n", + dev->descriptor.iManufacturer, dev->descriptor.iProduct, dev->descriptor.iSerialNumber); + set_device_description (dev); + +#ifdef DEBUG + if (dev->descriptor.iSerialNumber) + usb_show_string(dev, "SerialNumber", dev->descriptor.iSerialNumber); +#endif + /* put into sysfs, with device and config specific files */ + err = device_add (&dev->dev); + if (err) + return err; + usb_create_driverfs_dev_files (dev); + + /* Register all of the interfaces for this device with the driver core. + * Remember, interfaces get bound to drivers, not devices. */ + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { + struct usb_interface *interface = &dev->actconfig->interface[i]; + struct usb_interface_descriptor *desc; + + desc = &interface->altsetting [interface->act_altsetting].desc; + interface->dev.parent = &dev->dev; + interface->dev.driver = NULL; + interface->dev.bus = &usb_bus_type; + interface->dev.dma_mask = parent->dma_mask; + sprintf (&interface->dev.bus_id[0], "%d-%s:%d", + dev->bus->busnum, dev->devpath, + desc->bInterfaceNumber); + if (!desc->iInterface + || usb_string (dev, desc->iInterface, + interface->dev.name, + sizeof interface->dev.name) <= 0) { + /* typically devices won't bother with interface + * descriptions; this is the normal case. an + * interface's driver might describe it better. + * (also: iInterface is per-altsetting ...) + */ + sprintf (&interface->dev.name[0], + "usb-%s-%s interface %d", + dev->bus->bus_name, dev->devpath, + desc->bInterfaceNumber); + } + dev_dbg (&dev->dev, "%s - registering interface %s\n", __FUNCTION__, interface->dev.bus_id); + device_add (&interface->dev); + usb_create_driverfs_intf_files (interface); + } + /* add a /proc/bus/usb entry */ + usbfs_add_device(dev); + + return 0; +} + +/** + * usb_buffer_alloc - allocate dma-consistent buffer for URB_NO_DMA_MAP + * @dev: device the buffer will be used with + * @size: requested buffer size + * @mem_flags: affect whether allocation may block + * @dma: used to return DMA address of buffer + * + * Return value is either null (indicating no buffer could be allocated), or + * the cpu-space pointer to a buffer that may be used to perform DMA to the + * specified device. Such cpu-space buffers are returned along with the DMA + * address (through the pointer provided). + * + * These buffers are used with URB_NO_DMA_MAP set in urb->transfer_flags to + * avoid behaviors like using "DMA bounce buffers", or tying down I/O mapping + * hardware for long idle periods. The implementation varies between + * platforms, depending on details of how DMA will work to this device. + * Using these buffers also helps prevent cacheline sharing problems on + * architectures where CPU caches are not DMA-coherent. + * + * When the buffer is no longer used, free it with usb_buffer_free(). + */ +void *usb_buffer_alloc ( + struct usb_device *dev, + size_t size, + int mem_flags, + dma_addr_t *dma +) +{ + if (!dev || !dev->bus || !dev->bus->op || !dev->bus->op->buffer_alloc) + return 0; + return dev->bus->op->buffer_alloc (dev->bus, size, mem_flags, dma); +} + +/** + * usb_buffer_free - free memory allocated with usb_buffer_alloc() + * @dev: device the buffer was used with + * @size: requested buffer size + * @addr: CPU address of buffer + * @dma: DMA address of buffer + * + * This reclaims an I/O buffer, letting it be reused. The memory must have + * been allocated using usb_buffer_alloc(), and the parameters must match + * those provided in that allocation request. + */ +void usb_buffer_free ( + struct usb_device *dev, + size_t size, + void *addr, + dma_addr_t dma +) +{ + if (!dev || !dev->bus || !dev->bus->op || !dev->bus->op->buffer_free) + return; + dev->bus->op->buffer_free (dev->bus, size, addr, dma); +} + +/** + * usb_buffer_map - create DMA mapping(s) for an urb + * @urb: urb whose transfer_buffer will be mapped + * + * Return value is either null (indicating no buffer could be mapped), or + * the parameter. URB_NO_DMA_MAP is added to urb->transfer_flags if the + * operation succeeds. If the device is connected to this system through + * a non-DMA controller, this operation always succeeds. + * + * This call would normally be used for an urb which is reused, perhaps + * as the target of a large periodic transfer, with usb_buffer_dmasync() + * calls to synchronize memory and dma state. It may not be used for + * control requests. + * + * Reverse the effect of this call with usb_buffer_unmap(). + */ +struct urb *usb_buffer_map (struct urb *urb) +{ + struct usb_bus *bus; + struct device *controller; + + if (!urb + || usb_pipecontrol (urb->pipe) + || !urb->dev + || !(bus = urb->dev->bus) + || !(controller = bus->controller)) + return 0; + + if (controller->dma_mask) { + urb->transfer_dma = dma_map_single (controller, + urb->transfer_buffer, urb->transfer_buffer_length, + usb_pipein (urb->pipe) + ? DMA_FROM_DEVICE : DMA_TO_DEVICE); + // FIXME generic api broken like pci, can't report errors + // if (urb->transfer_dma == DMA_ADDR_INVALID) return 0; + } else + urb->transfer_dma = ~0; + urb->transfer_flags |= URB_NO_DMA_MAP; + return urb; +} + +/** + * usb_buffer_dmasync - synchronize DMA and CPU view of buffer(s) + * @urb: urb whose transfer_buffer will be synchronized + */ +void usb_buffer_dmasync (struct urb *urb) +{ + struct usb_bus *bus; + struct device *controller; + + if (!urb + || !(urb->transfer_flags & URB_NO_DMA_MAP) + || !urb->dev + || !(bus = urb->dev->bus) + || !(controller = bus->controller)) + return; + + if (controller->dma_mask) + dma_sync_single (controller, + urb->transfer_dma, urb->transfer_buffer_length, + usb_pipein (urb->pipe) + ? DMA_FROM_DEVICE : DMA_TO_DEVICE); +} + +/** + * usb_buffer_unmap - free DMA mapping(s) for an urb + * @urb: urb whose transfer_buffer will be unmapped + * + * Reverses the effect of usb_buffer_map(). + */ +void usb_buffer_unmap (struct urb *urb) +{ + struct usb_bus *bus; + struct device *controller; + + if (!urb + || !(urb->transfer_flags & URB_NO_DMA_MAP) + || !urb->dev + || !(bus = urb->dev->bus) + || !(controller = bus->controller)) + return; + + if (controller->dma_mask) + dma_unmap_single (controller, + urb->transfer_dma, urb->transfer_buffer_length, + usb_pipein (urb->pipe) + ? DMA_FROM_DEVICE : DMA_TO_DEVICE); + urb->transfer_flags &= ~URB_NO_DMA_MAP; +} + +/** + * usb_buffer_map_sg - create scatterlist DMA mapping(s) for an endpoint + * @dev: device to which the scatterlist will be mapped + * @pipe: endpoint defining the mapping direction + * @sg: the scatterlist to map + * @nents: the number of entries in the scatterlist + * + * Return value is either < 0 (indicating no buffers could be mapped), or + * the number of DMA mapping array entries in the scatterlist. + * + * The caller is responsible for placing the resulting DMA addresses from + * the scatterlist into URB transfer buffer pointers, and for setting the + * URB_NO_DMA_MAP transfer flag in each of those URBs. + * + * Top I/O rates come from queuing URBs, instead of waiting for each one + * to complete before starting the next I/O. This is particularly easy + * to do with scatterlists. Just allocate and submit one URB for each DMA + * mapping entry returned, stopping on the first error or when all succeed. + * Better yet, use the usb_sg_*() calls, which do that (and more) for you. + * + * This call would normally be used when translating scatterlist requests, + * rather than usb_buffer_map(), since on some hardware (with IOMMUs) it + * may be able to coalesce mappings for improved I/O efficiency. + * + * Reverse the effect of this call with usb_buffer_unmap_sg(). + */ +int usb_buffer_map_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int nents) +{ + struct usb_bus *bus; + struct device *controller; + + if (!dev + || usb_pipecontrol (pipe) + || !(bus = dev->bus) + || !(controller = bus->controller) + || !controller->dma_mask) + return -1; + + // FIXME generic api broken like pci, can't report errors + return dma_map_sg (controller, sg, nents, + usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); +} + +/** + * usb_buffer_dmasync_sg - synchronize DMA and CPU view of scatterlist buffer(s) + * @dev: device to which the scatterlist will be mapped + * @pipe: endpoint defining the mapping direction + * @sg: the scatterlist to synchronize + * @n_hw_ents: the positive return value from usb_buffer_map_sg + * + * Use this when you are re-using a scatterlist's data buffers for + * another USB request. + */ +void usb_buffer_dmasync_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int n_hw_ents) +{ + struct usb_bus *bus; + struct device *controller; + + if (!dev + || !(bus = dev->bus) + || !(controller = bus->controller) + || !controller->dma_mask) + return; + + dma_sync_sg (controller, sg, n_hw_ents, + usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); +} + +/** + * usb_buffer_unmap_sg - free DMA mapping(s) for a scatterlist + * @dev: device to which the scatterlist will be mapped + * @pipe: endpoint defining the mapping direction + * @sg: the scatterlist to unmap + * @n_hw_ents: the positive return value from usb_buffer_map_sg + * + * Reverses the effect of usb_buffer_map_sg(). + */ +void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int n_hw_ents) +{ + struct usb_bus *bus; + struct device *controller; + + if (!dev + || !(bus = dev->bus) + || !(controller = bus->controller) + || !controller->dma_mask) + return; + + dma_unmap_sg (controller, sg, n_hw_ents, + usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); +} + + +struct bus_type usb_bus_type = { + .name = "usb", + .match = usb_device_match, + .hotplug = usb_hotplug, +}; + +#ifndef MODULE + +static int __init usb_setup_disable(char *str) +{ + nousb = 1; + return 1; +} + +/* format to disable USB on kernel command line is: nousb */ +__setup("nousb", usb_setup_disable); + +#endif + +/* + * for external read access to + */ +int STDCALL usb_disabled(void) +{ + return nousb; +} + +/* + * Init + */ +static int __init usb_init(void) +{ + if (nousb) { + info("USB support disabled\n"); + return 0; + } + + bus_register(&usb_bus_type); + usb_major_init(); + usbfs_init(); + usb_hub_init(); + + driver_register(&usb_generic_driver); + + return 0; +} + +/* + * Cleanup + */ +static void __exit usb_exit(void) +{ + /* This will matter if shutdown/reboot does exitcalls. */ + if (nousb) + return; + + driver_unregister(&usb_generic_driver); + usb_major_cleanup(); + usbfs_cleanup(); + usb_hub_cleanup(); + bus_unregister(&usb_bus_type); +} + +subsys_initcall(usb_init); +module_exit(usb_exit); + +/* + * USB may be built into the kernel or be built as modules. + * These symbols are exported for device (or host controller) + * driver modules to use. + */ +EXPORT_SYMBOL(usb_epnum_to_ep_desc); + +EXPORT_SYMBOL(usb_register); +EXPORT_SYMBOL(usb_deregister); +EXPORT_SYMBOL(usb_disabled); + +EXPORT_SYMBOL(usb_device_probe); +EXPORT_SYMBOL(usb_device_remove); + +EXPORT_SYMBOL(usb_alloc_dev); +EXPORT_SYMBOL(usb_put_dev); +EXPORT_SYMBOL(usb_get_dev); +EXPORT_SYMBOL(usb_hub_tt_clear_buffer); + +EXPORT_SYMBOL(usb_driver_claim_interface); +EXPORT_SYMBOL(usb_interface_claimed); +EXPORT_SYMBOL(usb_driver_release_interface); +EXPORT_SYMBOL(usb_match_id); +EXPORT_SYMBOL(usb_find_interface); +EXPORT_SYMBOL(usb_ifnum_to_if); + +EXPORT_SYMBOL(usb_new_device); +EXPORT_SYMBOL(usb_reset_device); +EXPORT_SYMBOL(usb_connect); +EXPORT_SYMBOL(usb_disconnect); + +EXPORT_SYMBOL(__usb_get_extra_descriptor); + +EXPORT_SYMBOL(usb_find_device); +EXPORT_SYMBOL(usb_get_current_frame_number); + +EXPORT_SYMBOL (usb_buffer_alloc); +EXPORT_SYMBOL (usb_buffer_free); + +EXPORT_SYMBOL (usb_buffer_map); +EXPORT_SYMBOL (usb_buffer_dmasync); +EXPORT_SYMBOL (usb_buffer_unmap); + +EXPORT_SYMBOL (usb_buffer_map_sg); +EXPORT_SYMBOL (usb_buffer_dmasync_sg); +EXPORT_SYMBOL (usb_buffer_unmap_sg); + +MODULE_LICENSE("GPL"); diff --git a/reactos/drivers/usb/cromwell/core/usb.h b/reactos/drivers/usb/cromwell/core/usb.h new file mode 100644 index 00000000000..52210ef7fa6 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usb.h @@ -0,0 +1,5 @@ +/* Functions local to drivers/usb/core/ */ + +extern void usb_create_driverfs_dev_files (struct usb_device *dev); +extern void usb_create_driverfs_intf_files (struct usb_interface *intf); + diff --git a/reactos/drivers/usb/cromwell/core/usbcore.a b/reactos/drivers/usb/cromwell/core/usbcore.a new file mode 100644 index 00000000000..51ee725a9dd Binary files /dev/null and b/reactos/drivers/usb/cromwell/core/usbcore.a differ diff --git a/reactos/drivers/usb/cromwell/core/usbcore.c b/reactos/drivers/usb/cromwell/core/usbcore.c new file mode 100644 index 00000000000..0c8e0c50a9a --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usbcore.c @@ -0,0 +1,16 @@ +/* + ReactOS specific functions for usbcore module + by Aleksey Bragin (aleksey@reactos.com) +*/ + +#include + + +/* + * Standard DriverEntry method. + */ +NTSTATUS STDCALL +DriverEntry(IN PVOID Context1, IN PVOID Context2) +{ + return STATUS_SUCCESS; +} diff --git a/reactos/drivers/usb/cromwell/core/usbcore.coff b/reactos/drivers/usb/cromwell/core/usbcore.coff new file mode 100644 index 00000000000..6bb45a84b3f Binary files /dev/null and b/reactos/drivers/usb/cromwell/core/usbcore.coff differ diff --git a/reactos/drivers/usb/cromwell/core/usbcore.def b/reactos/drivers/usb/cromwell/core/usbcore.def new file mode 100644 index 00000000000..cc6e7687e2d --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usbcore.def @@ -0,0 +1,29 @@ +; +; Exports definition file for usbcore.sys +; +EXPORTS +usb_init_urb@4 +usb_alloc_urb@8 +usb_free_urb@4 +usb_get_urb@4 +usb_submit_urb@8 +usb_unlink_urb@4 +usb_bus_init@4 +usb_alloc_bus@4 +usb_free_bus@4 +usb_register_bus@4 +usb_deregister_bus@4 +usb_register_root_hub@8 +usb_calc_bus_time@16 +usb_check_bandwidth@8 +usb_claim_bandwidth@16 +usb_release_bandwidth@12 +usb_hcd_giveback_urb@12 +;usb_hcd_irq@12 +usb_hc_died@4 +usb_alloc_dev@8 +usb_connect@4 +usb_put_dev@4 +usb_disabled@0 +usb_hcd_pci_probe@8 +usb_hcd_pci_remove@4 \ No newline at end of file diff --git a/reactos/drivers/usb/cromwell/core/usbcore.map b/reactos/drivers/usb/cromwell/core/usbcore.map new file mode 100644 index 00000000000..7e4bf4cdf13 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usbcore.map @@ -0,0 +1,11539 @@ + +usbcore.nostrip.sys: file format pei-i386 + +Disassembly of section .text: + +00011000 <__end__>: + 11000: 55 push %ebp + 11001: 89 e5 mov %esp,%ebp + 11003: 83 ec 08 sub $0x8,%esp + 11006: 8b 45 08 mov 0x8(%ebp),%eax + 11009: 8b 40 54 mov 0x54(%eax),%eax + 1100c: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1100f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11012: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) + 11019: 83 ec 0c sub $0xc,%esp + 1101c: ff 75 fc pushl 0xfffffffc(%ebp) + 1101f: e8 41 88 00 00 call 19865 <_my_wake_up> + 11024: 83 c4 10 add $0x10,%esp + 11027: c9 leave + 11028: c3 ret + +00011029 <_usb_start_wait_urb>: + 11029: 55 push %ebp + 1102a: 89 e5 mov %esp,%ebp + 1102c: 83 ec 18 sub $0x18,%esp + 1102f: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 11036: 8b 45 08 mov 0x8(%ebp),%eax + 11039: 8d 55 f8 lea 0xfffffff8(%ebp),%edx + 1103c: 89 50 54 mov %edx,0x54(%eax) + 1103f: 83 ec 08 sub $0x8,%esp + 11042: 6a 00 push $0x0 + 11044: ff 75 08 pushl 0x8(%ebp) + 11047: e8 57 71 00 00 call 181a3 <_usb_submit_urb@8> + 1104c: 83 c4 08 add $0x8,%esp + 1104f: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11052: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 11056: 74 19 je 11071 <_usb_start_wait_urb+0x48> + 11058: 83 ec 0c sub $0xc,%esp + 1105b: ff 75 08 pushl 0x8(%ebp) + 1105e: e8 d3 70 00 00 call 18136 <_usb_free_urb@4> + 11063: 83 c4 0c add $0xc,%esp + 11066: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11069: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1106c: e9 bd 00 00 00 jmp 1112e <_usb_start_wait_urb+0x105> + 11071: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 11075: 74 1f je 11096 <_usb_start_wait_urb+0x6d> + 11077: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 1107b: 75 19 jne 11096 <_usb_start_wait_urb+0x6d> + 1107d: 83 ec 0c sub $0xc,%esp + 11080: ff 75 0c pushl 0xc(%ebp) + 11083: e8 ec 87 00 00 call 19874 <_my_schedule_timeout> + 11088: 83 c4 10 add $0x10,%esp + 1108b: 89 45 0c mov %eax,0xc(%ebp) + 1108e: f0 83 44 24 00 00 lock addl $0x0,0x0(%esp,1) + 11094: eb db jmp 11071 <_usb_start_wait_urb+0x48> + 11096: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 1109a: 75 64 jne 11100 <_usb_start_wait_urb+0xd7> + 1109c: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 110a0: 75 5e jne 11100 <_usb_start_wait_urb+0xd7> + 110a2: 8b 45 08 mov 0x8(%ebp),%eax + 110a5: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 110a9: 74 3e je 110e9 <_usb_start_wait_urb+0xc0> + 110ab: 83 ec 04 sub $0x4,%esp + 110ae: 6a 45 push $0x45 + 110b0: 68 00 b0 01 00 push $0x1b000 + 110b5: 68 0a b0 01 00 push $0x1b00a + 110ba: e8 a1 89 00 00 call 19a60 <_DbgPrint> + 110bf: 83 c4 10 add $0x10,%esp + 110c2: ff 75 0c pushl 0xc(%ebp) + 110c5: 8b 45 08 mov 0x8(%ebp),%eax + 110c8: ff 70 1c pushl 0x1c(%eax) + 110cb: 8b 45 08 mov 0x8(%ebp),%eax + 110ce: ff 70 18 pushl 0x18(%eax) + 110d1: 68 14 b0 01 00 push $0x1b014 + 110d6: e8 85 89 00 00 call 19a60 <_DbgPrint> + 110db: 83 c4 10 add $0x10,%esp + 110de: 8b 45 08 mov 0x8(%ebp),%eax + 110e1: 8b 40 1c mov 0x1c(%eax),%eax + 110e4: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 110e7: eb 20 jmp 11109 <_usb_start_wait_urb+0xe0> + 110e9: 83 ec 0c sub $0xc,%esp + 110ec: ff 75 08 pushl 0x8(%ebp) + 110ef: e8 c6 73 00 00 call 184ba <_usb_unlink_urb@4> + 110f4: 83 c4 0c add $0xc,%esp + 110f7: c7 45 f4 92 ff ff ff movl $0xffffff92,0xfffffff4(%ebp) + 110fe: eb 09 jmp 11109 <_usb_start_wait_urb+0xe0> + 11100: 8b 45 08 mov 0x8(%ebp),%eax + 11103: 8b 40 1c mov 0x1c(%eax),%eax + 11106: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11109: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 1110d: 74 0b je 1111a <_usb_start_wait_urb+0xf1> + 1110f: 8b 45 10 mov 0x10(%ebp),%eax + 11112: 8b 55 08 mov 0x8(%ebp),%edx + 11115: 8b 52 30 mov 0x30(%edx),%edx + 11118: 89 10 mov %edx,(%eax) + 1111a: 83 ec 0c sub $0xc,%esp + 1111d: ff 75 08 pushl 0x8(%ebp) + 11120: e8 11 70 00 00 call 18136 <_usb_free_urb@4> + 11125: 83 c4 0c add $0xc,%esp + 11128: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1112b: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1112e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11131: c9 leave + 11132: c3 ret + +00011133 <_usb_internal_control_msg>: + 11133: 55 push %ebp + 11134: 89 e5 mov %esp,%ebp + 11136: 83 ec 18 sub $0x18,%esp + 11139: 83 ec 08 sub $0x8,%esp + 1113c: 6a 00 push $0x0 + 1113e: 6a 00 push $0x0 + 11140: e8 a7 6f 00 00 call 180ec <_usb_alloc_urb@8> + 11145: 83 c4 08 add $0x8,%esp + 11148: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1114b: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 1114f: 75 09 jne 1115a <_usb_internal_control_msg+0x27> + 11151: c7 45 f0 f4 ff ff ff movl $0xfffffff4,0xfffffff0(%ebp) + 11158: eb 4d jmp 111a7 <_usb_internal_control_msg+0x74> + 1115a: 6a 00 push $0x0 + 1115c: 68 00 10 01 00 push $0x11000 + 11161: ff 75 18 pushl 0x18(%ebp) + 11164: ff 75 14 pushl 0x14(%ebp) + 11167: ff 75 10 pushl 0x10(%ebp) + 1116a: ff 75 0c pushl 0xc(%ebp) + 1116d: ff 75 08 pushl 0x8(%ebp) + 11170: ff 75 fc pushl 0xfffffffc(%ebp) + 11173: e8 34 00 00 00 call 111ac <_usb_fill_control_urb> + 11178: 83 c4 20 add $0x20,%esp + 1117b: 83 ec 04 sub $0x4,%esp + 1117e: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 11181: 50 push %eax + 11182: ff 75 1c pushl 0x1c(%ebp) + 11185: ff 75 fc pushl 0xfffffffc(%ebp) + 11188: e8 9c fe ff ff call 11029 <_usb_start_wait_urb> + 1118d: 83 c4 10 add $0x10,%esp + 11190: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11193: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 11197: 79 08 jns 111a1 <_usb_internal_control_msg+0x6e> + 11199: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1119c: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1119f: eb 06 jmp 111a7 <_usb_internal_control_msg+0x74> + 111a1: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 111a4: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 111a7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 111aa: c9 leave + 111ab: c3 ret + +000111ac <_usb_fill_control_urb>: + 111ac: 55 push %ebp + 111ad: 89 e5 mov %esp,%ebp + 111af: 8b 55 08 mov 0x8(%ebp),%edx + 111b2: 8b 45 0c mov 0xc(%ebp),%eax + 111b5: 89 42 14 mov %eax,0x14(%edx) + 111b8: 8b 55 08 mov 0x8(%ebp),%edx + 111bb: 8b 45 10 mov 0x10(%ebp),%eax + 111be: 89 42 18 mov %eax,0x18(%edx) + 111c1: 8b 55 08 mov 0x8(%ebp),%edx + 111c4: 8b 45 14 mov 0x14(%ebp),%eax + 111c7: 89 42 38 mov %eax,0x38(%edx) + 111ca: 8b 55 08 mov 0x8(%ebp),%edx + 111cd: 8b 45 18 mov 0x18(%ebp),%eax + 111d0: 89 42 24 mov %eax,0x24(%edx) + 111d3: 8b 55 08 mov 0x8(%ebp),%edx + 111d6: 8b 45 1c mov 0x1c(%ebp),%eax + 111d9: 89 42 2c mov %eax,0x2c(%edx) + 111dc: 8b 55 08 mov 0x8(%ebp),%edx + 111df: 8b 45 20 mov 0x20(%ebp),%eax + 111e2: 89 42 58 mov %eax,0x58(%edx) + 111e5: 8b 55 08 mov 0x8(%ebp),%edx + 111e8: 8b 45 24 mov 0x24(%ebp),%eax + 111eb: 89 42 54 mov %eax,0x54(%edx) + 111ee: 5d pop %ebp + 111ef: c3 ret + +000111f0 <_usb_control_msg>: + 111f0: 55 push %ebp + 111f1: 89 e5 mov %esp,%ebp + 111f3: 56 push %esi + 111f4: 53 push %ebx + 111f5: 83 ec 20 sub $0x20,%esp + 111f8: 8b 45 10 mov 0x10(%ebp),%eax + 111fb: 8b 55 14 mov 0x14(%ebp),%edx + 111fe: 8b 4d 18 mov 0x18(%ebp),%ecx + 11201: 8b 5d 1c mov 0x1c(%ebp),%ebx + 11204: 8b 75 24 mov 0x24(%ebp),%esi + 11207: 88 45 f7 mov %al,0xfffffff7(%ebp) + 1120a: 88 55 f6 mov %dl,0xfffffff6(%ebp) + 1120d: 66 89 4d f4 mov %cx,0xfffffff4(%ebp) + 11211: 66 89 5d f2 mov %bx,0xfffffff2(%ebp) + 11215: 66 89 75 f0 mov %si,0xfffffff0(%ebp) + 11219: 83 ec 08 sub $0x8,%esp + 1121c: 6a 08 push $0x8 + 1121e: 6a 01 push $0x1 + 11220: e8 0b 88 00 00 call 19a30 <_ExAllocatePool@8> + 11225: 83 c4 08 add $0x8,%esp + 11228: 89 45 ec mov %eax,0xffffffec(%ebp) + 1122b: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 1122f: 75 09 jne 1123a <_usb_control_msg+0x4a> + 11231: c7 45 e4 f4 ff ff ff movl $0xfffffff4,0xffffffe4(%ebp) + 11238: eb 6a jmp 112a4 <_usb_control_msg+0xb4> + 1123a: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1123d: 8a 45 f6 mov 0xfffffff6(%ebp),%al + 11240: 88 02 mov %al,(%edx) + 11242: 8b 55 ec mov 0xffffffec(%ebp),%edx + 11245: 8a 45 f7 mov 0xfffffff7(%ebp),%al + 11248: 88 42 01 mov %al,0x1(%edx) + 1124b: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1124e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11251: 66 89 42 02 mov %ax,0x2(%edx) + 11255: 8b 55 ec mov 0xffffffec(%ebp),%edx + 11258: 66 8b 45 f2 mov 0xfffffff2(%ebp),%ax + 1125c: 66 89 42 04 mov %ax,0x4(%edx) + 11260: 8b 55 ec mov 0xffffffec(%ebp),%edx + 11263: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11266: 66 89 42 06 mov %ax,0x6(%edx) + 1126a: 83 ec 08 sub $0x8,%esp + 1126d: ff 75 28 pushl 0x28(%ebp) + 11270: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11273: 25 ff ff 00 00 and $0xffff,%eax + 11278: 50 push %eax + 11279: ff 75 20 pushl 0x20(%ebp) + 1127c: ff 75 ec pushl 0xffffffec(%ebp) + 1127f: ff 75 0c pushl 0xc(%ebp) + 11282: ff 75 08 pushl 0x8(%ebp) + 11285: e8 a9 fe ff ff call 11133 <_usb_internal_control_msg> + 1128a: 83 c4 20 add $0x20,%esp + 1128d: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11290: 83 ec 0c sub $0xc,%esp + 11293: ff 75 ec pushl 0xffffffec(%ebp) + 11296: e8 a5 87 00 00 call 19a40 <_ExFreePool@4> + 1129b: 83 c4 0c add $0xc,%esp + 1129e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 112a1: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 112a4: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 112a7: 8d 65 f8 lea 0xfffffff8(%ebp),%esp + 112aa: 5b pop %ebx + 112ab: 5e pop %esi + 112ac: 5d pop %ebp + 112ad: c3 ret + +000112ae <_usb_bulk_msg>: + 112ae: 55 push %ebp + 112af: 89 e5 mov %esp,%ebp + 112b1: 83 ec 08 sub $0x8,%esp + 112b4: 83 7d 14 00 cmpl $0x0,0x14(%ebp) + 112b8: 79 09 jns 112c3 <_usb_bulk_msg+0x15> + 112ba: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 112c1: eb 59 jmp 1131c <_usb_bulk_msg+0x6e> + 112c3: 83 ec 08 sub $0x8,%esp + 112c6: 6a 00 push $0x0 + 112c8: 6a 00 push $0x0 + 112ca: e8 1d 6e 00 00 call 180ec <_usb_alloc_urb@8> + 112cf: 83 c4 08 add $0x8,%esp + 112d2: 89 45 fc mov %eax,0xfffffffc(%ebp) + 112d5: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 112d9: 75 09 jne 112e4 <_usb_bulk_msg+0x36> + 112db: c7 45 f8 f4 ff ff ff movl $0xfffffff4,0xfffffff8(%ebp) + 112e2: eb 38 jmp 1131c <_usb_bulk_msg+0x6e> + 112e4: 83 ec 04 sub $0x4,%esp + 112e7: 6a 00 push $0x0 + 112e9: 68 00 10 01 00 push $0x11000 + 112ee: ff 75 14 pushl 0x14(%ebp) + 112f1: ff 75 10 pushl 0x10(%ebp) + 112f4: ff 75 0c pushl 0xc(%ebp) + 112f7: ff 75 08 pushl 0x8(%ebp) + 112fa: ff 75 fc pushl 0xfffffffc(%ebp) + 112fd: e8 1f 00 00 00 call 11321 <_usb_fill_bulk_urb> + 11302: 83 c4 20 add $0x20,%esp + 11305: 83 ec 04 sub $0x4,%esp + 11308: ff 75 18 pushl 0x18(%ebp) + 1130b: ff 75 1c pushl 0x1c(%ebp) + 1130e: ff 75 fc pushl 0xfffffffc(%ebp) + 11311: e8 13 fd ff ff call 11029 <_usb_start_wait_urb> + 11316: 83 c4 10 add $0x10,%esp + 11319: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1131c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1131f: c9 leave + 11320: c3 ret + +00011321 <_usb_fill_bulk_urb>: + 11321: 55 push %ebp + 11322: 89 e5 mov %esp,%ebp + 11324: 8b 55 08 mov 0x8(%ebp),%edx + 11327: 8b 45 0c mov 0xc(%ebp),%eax + 1132a: 89 42 14 mov %eax,0x14(%edx) + 1132d: 8b 55 08 mov 0x8(%ebp),%edx + 11330: 8b 45 10 mov 0x10(%ebp),%eax + 11333: 89 42 18 mov %eax,0x18(%edx) + 11336: 8b 55 08 mov 0x8(%ebp),%edx + 11339: 8b 45 14 mov 0x14(%ebp),%eax + 1133c: 89 42 24 mov %eax,0x24(%edx) + 1133f: 8b 55 08 mov 0x8(%ebp),%edx + 11342: 8b 45 18 mov 0x18(%ebp),%eax + 11345: 89 42 2c mov %eax,0x2c(%edx) + 11348: 8b 55 08 mov 0x8(%ebp),%edx + 1134b: 8b 45 1c mov 0x1c(%ebp),%eax + 1134e: 89 42 58 mov %eax,0x58(%edx) + 11351: 8b 55 08 mov 0x8(%ebp),%edx + 11354: 8b 45 20 mov 0x20(%ebp),%eax + 11357: 89 42 54 mov %eax,0x54(%edx) + 1135a: 5d pop %ebp + 1135b: c3 ret + +0001135c <_usb_get_descriptor>: + 1135c: 55 push %ebp + 1135d: 89 e5 mov %esp,%ebp + 1135f: 83 ec 18 sub $0x18,%esp + 11362: 8b 45 0c mov 0xc(%ebp),%eax + 11365: 8b 55 10 mov 0x10(%ebp),%edx + 11368: 88 45 ff mov %al,0xffffffff(%ebp) + 1136b: 88 55 fe mov %dl,0xfffffffe(%ebp) + 1136e: c7 45 f8 05 00 00 00 movl $0x5,0xfffffff8(%ebp) + 11375: 83 ec 04 sub $0x4,%esp + 11378: ff 75 18 pushl 0x18(%ebp) + 1137b: 6a 00 push $0x0 + 1137d: ff 75 14 pushl 0x14(%ebp) + 11380: e8 cb 86 00 00 call 19a50 <_memset> + 11385: 83 c4 10 add $0x10,%esp + 11388: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 1138b: ff 08 decl (%eax) + 1138d: 83 7d f8 ff cmpl $0xffffffff,0xfffffff8(%ebp) + 11391: 74 69 je 113fc <_usb_get_descriptor+0xa0> + 11393: 83 ec 0c sub $0xc,%esp + 11396: 68 f4 01 00 00 push $0x1f4 + 1139b: 8b 45 18 mov 0x18(%ebp),%eax + 1139e: 25 ff ff 00 00 and $0xffff,%eax + 113a3: 50 push %eax + 113a4: ff 75 14 pushl 0x14(%ebp) + 113a7: 6a 00 push $0x0 + 113a9: b8 00 00 00 00 mov $0x0,%eax + 113ae: 8a 45 ff mov 0xffffffff(%ebp),%al + 113b1: 89 c2 mov %eax,%edx + 113b3: c1 e2 08 shl $0x8,%edx + 113b6: b8 00 00 00 00 mov $0x0,%eax + 113bb: 8a 45 fe mov 0xfffffffe(%ebp),%al + 113be: 01 d0 add %edx,%eax + 113c0: 25 ff ff 00 00 and $0xffff,%eax + 113c5: 50 push %eax + 113c6: 68 80 00 00 00 push $0x80 + 113cb: 6a 06 push $0x6 + 113cd: 6a 00 push $0x0 + 113cf: ff 75 08 pushl 0x8(%ebp) + 113d2: e8 2a 00 00 00 call 11401 <___create_pipe> + 113d7: 83 c4 08 add $0x8,%esp + 113da: 0d 80 00 00 80 or $0x80000080,%eax + 113df: 50 push %eax + 113e0: ff 75 08 pushl 0x8(%ebp) + 113e3: e8 08 fe ff ff call 111f0 <_usb_control_msg> + 113e8: 83 c4 30 add $0x30,%esp + 113eb: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 113ee: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 113f2: 7f 08 jg 113fc <_usb_get_descriptor+0xa0> + 113f4: 83 7d f4 e0 cmpl $0xffffffe0,0xfffffff4(%ebp) + 113f8: 74 02 je 113fc <_usb_get_descriptor+0xa0> + 113fa: eb 8c jmp 11388 <_usb_get_descriptor+0x2c> + 113fc: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 113ff: c9 leave + 11400: c3 ret + +00011401 <___create_pipe>: + 11401: 55 push %ebp + 11402: 89 e5 mov %esp,%ebp + 11404: 8b 45 08 mov 0x8(%ebp),%eax + 11407: 8b 00 mov (%eax),%eax + 11409: c1 e0 08 shl $0x8,%eax + 1140c: 8b 55 0c mov 0xc(%ebp),%edx + 1140f: c1 e2 0f shl $0xf,%edx + 11412: 09 d0 or %edx,%eax + 11414: 5d pop %ebp + 11415: c3 ret + +00011416 <_usb_get_string>: + 11416: 55 push %ebp + 11417: 89 e5 mov %esp,%ebp + 11419: 83 ec 08 sub $0x8,%esp + 1141c: 8b 45 0c mov 0xc(%ebp),%eax + 1141f: 8b 55 10 mov 0x10(%ebp),%edx + 11422: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 11426: 88 55 fd mov %dl,0xfffffffd(%ebp) + 11429: 83 ec 0c sub $0xc,%esp + 1142c: 68 f4 01 00 00 push $0x1f4 + 11431: 8b 45 18 mov 0x18(%ebp),%eax + 11434: 25 ff ff 00 00 and $0xffff,%eax + 11439: 50 push %eax + 1143a: ff 75 14 pushl 0x14(%ebp) + 1143d: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 11441: 25 ff ff 00 00 and $0xffff,%eax + 11446: 50 push %eax + 11447: b8 00 00 00 00 mov $0x0,%eax + 1144c: 8a 45 fd mov 0xfffffffd(%ebp),%al + 1144f: 05 00 03 00 00 add $0x300,%eax + 11454: 25 ff ff 00 00 and $0xffff,%eax + 11459: 50 push %eax + 1145a: 68 80 00 00 00 push $0x80 + 1145f: 6a 06 push $0x6 + 11461: 6a 00 push $0x0 + 11463: ff 75 08 pushl 0x8(%ebp) + 11466: e8 96 ff ff ff call 11401 <___create_pipe> + 1146b: 83 c4 08 add $0x8,%esp + 1146e: 0d 80 00 00 80 or $0x80000080,%eax + 11473: 50 push %eax + 11474: ff 75 08 pushl 0x8(%ebp) + 11477: e8 74 fd ff ff call 111f0 <_usb_control_msg> + 1147c: 83 c4 30 add $0x30,%esp + 1147f: c9 leave + 11480: c3 ret + +00011481 <_usb_get_device_descriptor>: + 11481: 55 push %ebp + 11482: 89 e5 mov %esp,%ebp + 11484: 83 ec 08 sub $0x8,%esp + 11487: 83 ec 0c sub $0xc,%esp + 1148a: 6a 12 push $0x12 + 1148c: 8b 45 08 mov 0x8(%ebp),%eax + 1148f: 05 70 01 00 00 add $0x170,%eax + 11494: 50 push %eax + 11495: 6a 00 push $0x0 + 11497: 6a 01 push $0x1 + 11499: ff 75 08 pushl 0x8(%ebp) + 1149c: e8 bb fe ff ff call 1135c <_usb_get_descriptor> + 114a1: 83 c4 20 add $0x20,%esp + 114a4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 114a7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 114aa: c9 leave + 114ab: c3 ret + +000114ac <_usb_get_status>: + 114ac: 55 push %ebp + 114ad: 89 e5 mov %esp,%ebp + 114af: 83 ec 08 sub $0x8,%esp + 114b2: 83 ec 0c sub $0xc,%esp + 114b5: 68 f4 01 00 00 push $0x1f4 + 114ba: 6a 02 push $0x2 + 114bc: ff 75 14 pushl 0x14(%ebp) + 114bf: 8b 45 10 mov 0x10(%ebp),%eax + 114c2: 25 ff ff 00 00 and $0xffff,%eax + 114c7: 50 push %eax + 114c8: 6a 00 push $0x0 + 114ca: 8b 55 0c mov 0xc(%ebp),%edx + 114cd: b0 80 mov $0x80,%al + 114cf: 09 d0 or %edx,%eax + 114d1: 25 ff 00 00 00 and $0xff,%eax + 114d6: 50 push %eax + 114d7: 6a 00 push $0x0 + 114d9: 6a 00 push $0x0 + 114db: ff 75 08 pushl 0x8(%ebp) + 114de: e8 1e ff ff ff call 11401 <___create_pipe> + 114e3: 83 c4 08 add $0x8,%esp + 114e6: 0d 80 00 00 80 or $0x80000080,%eax + 114eb: 50 push %eax + 114ec: ff 75 08 pushl 0x8(%ebp) + 114ef: e8 fc fc ff ff call 111f0 <_usb_control_msg> + 114f4: 83 c4 30 add $0x30,%esp + 114f7: c9 leave + 114f8: c3 ret + +000114f9 <_usb_set_maxpacket>: + 114f9: 55 push %ebp + 114fa: 89 e5 mov %esp,%ebp + 114fc: 53 push %ebx + 114fd: 83 ec 1c sub $0x1c,%esp + 11500: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 11507: 8b 45 08 mov 0x8(%ebp),%eax + 1150a: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 11510: 8a 40 04 mov 0x4(%eax),%al + 11513: 25 ff 00 00 00 and $0xff,%eax + 11518: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 1151b: 0f 8e 49 01 00 00 jle 1166a <_usb_set_maxpacket+0x171> + 11521: 8b 45 08 mov 0x8(%ebp),%eax + 11524: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 1152a: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 1152d: 89 c8 mov %ecx,%eax + 1152f: c1 e0 02 shl $0x2,%eax + 11532: 01 c8 add %ecx,%eax + 11534: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 1153b: 01 d0 add %edx,%eax + 1153d: 01 c0 add %eax,%eax + 1153f: 01 c8 add %ecx,%eax + 11541: c1 e0 02 shl $0x2,%eax + 11544: 03 43 0c add 0xc(%ebx),%eax + 11547: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1154a: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 1154d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11550: 8b 50 04 mov 0x4(%eax),%edx + 11553: 89 d0 mov %edx,%eax + 11555: 01 c0 add %eax,%eax + 11557: 01 d0 add %edx,%eax + 11559: c1 e0 03 shl $0x3,%eax + 1155c: 03 01 add (%ecx),%eax + 1155e: 89 45 ec mov %eax,0xffffffec(%ebp) + 11561: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11564: 8b 40 0c mov 0xc(%eax),%eax + 11567: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 1156a: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 11571: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11574: 8a 40 04 mov 0x4(%eax),%al + 11577: 25 ff 00 00 00 and $0xff,%eax + 1157c: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax + 1157f: 0f 8e db 00 00 00 jle 11660 <_usb_set_maxpacket+0x167> + 11585: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 11588: 89 d0 mov %edx,%eax + 1158a: c1 e0 02 shl $0x2,%eax + 1158d: 01 d0 add %edx,%eax + 1158f: c1 e0 02 shl $0x2,%eax + 11592: 03 45 e8 add 0xffffffe8(%ebp),%eax + 11595: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 11598: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 1159b: 8a 40 02 mov 0x2(%eax),%al + 1159e: 25 ff 00 00 00 and $0xff,%eax + 115a3: 83 e0 0f and $0xf,%eax + 115a6: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 115a9: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 115ac: 8a 40 03 mov 0x3(%eax),%al + 115af: 25 ff 00 00 00 and $0xff,%eax + 115b4: 83 e0 03 and $0x3,%eax + 115b7: 85 c0 test %eax,%eax + 115b9: 75 2e jne 115e9 <_usb_set_maxpacket+0xf0> + 115bb: 8b 55 08 mov 0x8(%ebp),%edx + 115be: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 115c1: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 115c4: 66 8b 40 04 mov 0x4(%eax),%ax + 115c8: 25 ff ff 00 00 and $0xffff,%eax + 115cd: 89 44 8a 78 mov %eax,0x78(%edx,%ecx,4) + 115d1: 8b 55 08 mov 0x8(%ebp),%edx + 115d4: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 115d7: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 115da: 66 8b 40 04 mov 0x4(%eax),%ax + 115de: 25 ff ff 00 00 and $0xffff,%eax + 115e3: 89 44 8a 38 mov %eax,0x38(%edx,%ecx,4) + 115e7: eb 6d jmp 11656 <_usb_set_maxpacket+0x15d> + 115e9: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 115ec: 80 78 02 00 cmpb $0x0,0x2(%eax) + 115f0: 78 33 js 11625 <_usb_set_maxpacket+0x12c> + 115f2: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 115f5: 66 8b 40 04 mov 0x4(%eax),%ax + 115f9: 89 c1 mov %eax,%ecx + 115fb: 81 e1 ff ff 00 00 and $0xffff,%ecx + 11601: 8b 55 08 mov 0x8(%ebp),%edx + 11604: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11607: 3b 4c 82 78 cmp 0x78(%edx,%eax,4),%ecx + 1160b: 7e 49 jle 11656 <_usb_set_maxpacket+0x15d> + 1160d: 8b 55 08 mov 0x8(%ebp),%edx + 11610: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 11613: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 11616: 66 8b 40 04 mov 0x4(%eax),%ax + 1161a: 25 ff ff 00 00 and $0xffff,%eax + 1161f: 89 44 8a 78 mov %eax,0x78(%edx,%ecx,4) + 11623: eb 31 jmp 11656 <_usb_set_maxpacket+0x15d> + 11625: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 11628: 66 8b 40 04 mov 0x4(%eax),%ax + 1162c: 89 c1 mov %eax,%ecx + 1162e: 81 e1 ff ff 00 00 and $0xffff,%ecx + 11634: 8b 55 08 mov 0x8(%ebp),%edx + 11637: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1163a: 3b 4c 82 38 cmp 0x38(%edx,%eax,4),%ecx + 1163e: 7e 16 jle 11656 <_usb_set_maxpacket+0x15d> + 11640: 8b 55 08 mov 0x8(%ebp),%edx + 11643: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 11646: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 11649: 66 8b 40 04 mov 0x4(%eax),%ax + 1164d: 25 ff ff 00 00 and $0xffff,%eax + 11652: 89 44 8a 38 mov %eax,0x38(%edx,%ecx,4) + 11656: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 11659: ff 00 incl (%eax) + 1165b: e9 11 ff ff ff jmp 11571 <_usb_set_maxpacket+0x78> + 11660: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 11663: ff 00 incl (%eax) + 11665: e9 9d fe ff ff jmp 11507 <_usb_set_maxpacket+0xe> + 1166a: 83 c4 1c add $0x1c,%esp + 1166d: 5b pop %ebx + 1166e: 5d pop %ebp + 1166f: c3 ret + +00011670 <_usb_clear_halt>: + 11670: 55 push %ebp + 11671: 89 e5 mov %esp,%ebp + 11673: 57 push %edi + 11674: 56 push %esi + 11675: 53 push %ebx + 11676: 83 ec 0c sub $0xc,%esp + 11679: 8b 45 0c mov 0xc(%ebp),%eax + 1167c: c1 f8 0f sar $0xf,%eax + 1167f: 83 e0 0f and $0xf,%eax + 11682: 89 45 ec mov %eax,0xffffffec(%ebp) + 11685: 8b 45 0c mov 0xc(%ebp),%eax + 11688: c1 e8 07 shr $0x7,%eax + 1168b: 83 e0 01 and $0x1,%eax + 1168e: 85 c0 test %eax,%eax + 11690: 74 09 je 1169b <_usb_clear_halt+0x2b> + 11692: 8d 45 ec lea 0xffffffec(%ebp),%eax + 11695: 81 08 80 00 00 00 orl $0x80,(%eax) + 1169b: 83 ec 0c sub $0xc,%esp + 1169e: 68 f4 01 00 00 push $0x1f4 + 116a3: 6a 00 push $0x0 + 116a5: 6a 00 push $0x0 + 116a7: 8b 45 ec mov 0xffffffec(%ebp),%eax + 116aa: 25 ff ff 00 00 and $0xffff,%eax + 116af: 50 push %eax + 116b0: 6a 00 push $0x0 + 116b2: 6a 02 push $0x2 + 116b4: 6a 01 push $0x1 + 116b6: 6a 00 push $0x0 + 116b8: ff 75 08 pushl 0x8(%ebp) + 116bb: e8 41 fd ff ff call 11401 <___create_pipe> + 116c0: 83 c4 08 add $0x8,%esp + 116c3: 0d 00 00 00 80 or $0x80000000,%eax + 116c8: 50 push %eax + 116c9: ff 75 08 pushl 0x8(%ebp) + 116cc: e8 1f fb ff ff call 111f0 <_usb_control_msg> + 116d1: 83 c4 30 add $0x30,%esp + 116d4: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 116d7: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 116db: 79 0b jns 116e8 <_usb_clear_halt+0x78> + 116dd: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 116e0: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 116e3: e9 83 00 00 00 jmp 1176b <_usb_clear_halt+0xfb> + 116e8: 8b 5d 08 mov 0x8(%ebp),%ebx + 116eb: 8b 45 0c mov 0xc(%ebp),%eax + 116ee: c1 e8 07 shr $0x7,%eax + 116f1: 83 f0 01 xor $0x1,%eax + 116f4: 89 c6 mov %eax,%esi + 116f6: 83 e6 01 and $0x1,%esi + 116f9: 8b 7d 08 mov 0x8(%ebp),%edi + 116fc: 8b 45 0c mov 0xc(%ebp),%eax + 116ff: c1 e8 07 shr $0x7,%eax + 11702: 83 f0 01 xor $0x1,%eax + 11705: 89 c2 mov %eax,%edx + 11707: 83 e2 01 and $0x1,%edx + 1170a: 8b 45 0c mov 0xc(%ebp),%eax + 1170d: c1 f8 0f sar $0xf,%eax + 11710: 89 c1 mov %eax,%ecx + 11712: 83 e1 0f and $0xf,%ecx + 11715: b8 01 00 00 00 mov $0x1,%eax + 1171a: d3 e0 shl %cl,%eax + 1171c: f7 d0 not %eax + 1171e: 23 44 97 28 and 0x28(%edi,%edx,4),%eax + 11722: 89 44 b3 28 mov %eax,0x28(%ebx,%esi,4) + 11726: 8b 5d 08 mov 0x8(%ebp),%ebx + 11729: 8b 45 0c mov 0xc(%ebp),%eax + 1172c: c1 e8 07 shr $0x7,%eax + 1172f: 83 f0 01 xor $0x1,%eax + 11732: 89 c6 mov %eax,%esi + 11734: 83 e6 01 and $0x1,%esi + 11737: 8b 7d 08 mov 0x8(%ebp),%edi + 1173a: 8b 45 0c mov 0xc(%ebp),%eax + 1173d: c1 e8 07 shr $0x7,%eax + 11740: 83 f0 01 xor $0x1,%eax + 11743: 89 c2 mov %eax,%edx + 11745: 83 e2 01 and $0x1,%edx + 11748: 8b 45 0c mov 0xc(%ebp),%eax + 1174b: c1 f8 0f sar $0xf,%eax + 1174e: 89 c1 mov %eax,%ecx + 11750: 83 e1 0f and $0xf,%ecx + 11753: b8 01 00 00 00 mov $0x1,%eax + 11758: d3 e0 shl %cl,%eax + 1175a: f7 d0 not %eax + 1175c: 23 44 97 30 and 0x30(%edi,%edx,4),%eax + 11760: 89 44 b3 30 mov %eax,0x30(%ebx,%esi,4) + 11764: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 1176b: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1176e: 8d 65 f4 lea 0xfffffff4(%ebp),%esp + 11771: 5b pop %ebx + 11772: 5e pop %esi + 11773: 5f pop %edi + 11774: 5d pop %ebp + 11775: c3 ret + +00011776 <_usb_set_interface>: + 11776: 55 push %ebp + 11777: 89 e5 mov %esp,%ebp + 11779: 57 push %edi + 1177a: 56 push %esi + 1177b: 53 push %ebx + 1177c: 83 ec 3c sub $0x3c,%esp + 1177f: 8b 45 08 mov 0x8(%ebp),%eax + 11782: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 11788: 8b 40 20 mov 0x20(%eax),%eax + 1178b: 8b 40 1c mov 0x1c(%eax),%eax + 1178e: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 11791: 83 ec 08 sub $0x8,%esp + 11794: ff 75 0c pushl 0xc(%ebp) + 11797: ff 75 08 pushl 0x8(%ebp) + 1179a: e8 d6 44 00 00 call 15c75 <_usb_ifnum_to_if> + 1179f: 83 c4 10 add $0x10,%esp + 117a2: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 117a5: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 117a9: 75 0c jne 117b7 <_usb_set_interface+0x41> + 117ab: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 117b2: e9 85 02 00 00 jmp 11a3c <_usb_set_interface+0x2c6> + 117b7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 117ba: 83 78 08 01 cmpl $0x1,0x8(%eax) + 117be: 75 0c jne 117cc <_usb_set_interface+0x56> + 117c0: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) + 117c7: e9 70 02 00 00 jmp 11a3c <_usb_set_interface+0x2c6> + 117cc: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 117d0: 78 0d js 117df <_usb_set_interface+0x69> + 117d2: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 117d5: 8b 45 10 mov 0x10(%ebp),%eax + 117d8: 3b 42 08 cmp 0x8(%edx),%eax + 117db: 73 02 jae 117df <_usb_set_interface+0x69> + 117dd: eb 0c jmp 117eb <_usb_set_interface+0x75> + 117df: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 117e6: e9 51 02 00 00 jmp 11a3c <_usb_set_interface+0x2c6> + 117eb: 83 ec 0c sub $0xc,%esp + 117ee: 68 f4 01 00 00 push $0x1f4 + 117f3: 6a 00 push $0x0 + 117f5: 6a 00 push $0x0 + 117f7: 8b 45 0c mov 0xc(%ebp),%eax + 117fa: 25 ff ff 00 00 and $0xffff,%eax + 117ff: 50 push %eax + 11800: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 11803: 8b 55 10 mov 0x10(%ebp),%edx + 11806: 89 d0 mov %edx,%eax + 11808: 01 c0 add %eax,%eax + 1180a: 01 d0 add %edx,%eax + 1180c: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 11813: 8b 01 mov (%ecx),%eax + 11815: 8a 44 02 03 mov 0x3(%edx,%eax,1),%al + 11819: 25 ff 00 00 00 and $0xff,%eax + 1181e: 50 push %eax + 1181f: 6a 01 push $0x1 + 11821: 6a 0b push $0xb + 11823: 6a 00 push $0x0 + 11825: ff 75 08 pushl 0x8(%ebp) + 11828: e8 d4 fb ff ff call 11401 <___create_pipe> + 1182d: 83 c4 08 add $0x8,%esp + 11830: 0d 00 00 00 80 or $0x80000000,%eax + 11835: 50 push %eax + 11836: ff 75 08 pushl 0x8(%ebp) + 11839: e8 b2 f9 ff ff call 111f0 <_usb_control_msg> + 1183e: 83 c4 30 add $0x30,%esp + 11841: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 11844: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 11848: 79 0b jns 11855 <_usb_set_interface+0xdf> + 1184a: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1184d: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 11850: e9 e7 01 00 00 jmp 11a3c <_usb_set_interface+0x2c6> + 11855: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 11858: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1185b: 8b 50 04 mov 0x4(%eax),%edx + 1185e: 89 d0 mov %edx,%eax + 11860: 01 c0 add %eax,%eax + 11862: 01 d0 add %edx,%eax + 11864: c1 e0 03 shl $0x3,%eax + 11867: 03 01 add (%ecx),%eax + 11869: 89 45 ec mov %eax,0xffffffec(%ebp) + 1186c: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 11873: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11876: 8a 40 04 mov 0x4(%eax),%al + 11879: 25 ff 00 00 00 and $0xff,%eax + 1187e: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax + 11881: 0f 8e 96 00 00 00 jle 1191d <_usb_set_interface+0x1a7> + 11887: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 1188a: 8b 55 e8 mov 0xffffffe8(%ebp),%edx + 1188d: 89 d0 mov %edx,%eax + 1188f: c1 e0 02 shl $0x2,%eax + 11892: 01 d0 add %edx,%eax + 11894: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 1189b: 8b 41 0c mov 0xc(%ecx),%eax + 1189e: 8a 44 02 02 mov 0x2(%edx,%eax,1),%al + 118a2: 88 45 df mov %al,0xffffffdf(%ebp) + 118a5: 0f be 45 df movsbl 0xffffffdf(%ebp),%eax + 118a9: f7 d0 not %eax + 118ab: c1 e8 1f shr $0x1f,%eax + 118ae: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 118b1: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 118b5: 74 17 je 118ce <_usb_set_interface+0x158> + 118b7: 83 ec 08 sub $0x8,%esp + 118ba: b8 00 00 00 00 mov $0x0,%eax + 118bf: 8a 45 df mov 0xffffffdf(%ebp),%al + 118c2: 50 push %eax + 118c3: ff 75 08 pushl 0x8(%ebp) + 118c6: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 118c9: ff d0 call *%eax + 118cb: 83 c4 10 add $0x10,%esp + 118ce: 8d 45 df lea 0xffffffdf(%ebp),%eax + 118d1: 80 20 0f andb $0xf,(%eax) + 118d4: b8 00 00 00 00 mov $0x0,%eax + 118d9: 8a 45 df mov 0xffffffdf(%ebp),%al + 118dc: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 118df: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 118e2: c1 e0 02 shl $0x2,%eax + 118e5: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 118e8: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) + 118ec: 74 0f je 118fd <_usb_set_interface+0x187> + 118ee: 8b 55 d0 mov 0xffffffd0(%ebp),%edx + 118f1: 03 55 08 add 0x8(%ebp),%edx + 118f4: 89 55 cc mov %edx,0xffffffcc(%ebp) + 118f7: 83 45 cc 78 addl $0x78,0xffffffcc(%ebp) + 118fb: eb 0d jmp 1190a <_usb_set_interface+0x194> + 118fd: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 11900: 03 45 08 add 0x8(%ebp),%eax + 11903: 89 45 cc mov %eax,0xffffffcc(%ebp) + 11906: 83 45 cc 38 addl $0x38,0xffffffcc(%ebp) + 1190a: 8b 55 cc mov 0xffffffcc(%ebp),%edx + 1190d: c7 02 00 00 00 00 movl $0x0,(%edx) + 11913: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 11916: ff 00 incl (%eax) + 11918: e9 56 ff ff ff jmp 11873 <_usb_set_interface+0xfd> + 1191d: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 11920: 8b 45 10 mov 0x10(%ebp),%eax + 11923: 89 42 04 mov %eax,0x4(%edx) + 11926: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 11929: 8b 55 10 mov 0x10(%ebp),%edx + 1192c: 89 d0 mov %edx,%eax + 1192e: 01 c0 add %eax,%eax + 11930: 01 d0 add %edx,%eax + 11932: c1 e0 03 shl $0x3,%eax + 11935: 03 01 add (%ecx),%eax + 11937: 89 45 ec mov %eax,0xffffffec(%ebp) + 1193a: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 11941: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11944: 8a 40 04 mov 0x4(%eax),%al + 11947: 25 ff 00 00 00 and $0xff,%eax + 1194c: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax + 1194f: 0f 8e e0 00 00 00 jle 11a35 <_usb_set_interface+0x2bf> + 11955: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 11958: 8b 55 e8 mov 0xffffffe8(%ebp),%edx + 1195b: 89 d0 mov %edx,%eax + 1195d: c1 e0 02 shl $0x2,%eax + 11960: 01 d0 add %edx,%eax + 11962: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 11969: 8b 41 0c mov 0xc(%ecx),%eax + 1196c: 8a 44 02 02 mov 0x2(%edx,%eax,1),%al + 11970: 88 45 df mov %al,0xffffffdf(%ebp) + 11973: 0f be 45 df movsbl 0xffffffdf(%ebp),%eax + 11977: f7 d0 not %eax + 11979: c1 e8 1f shr $0x1f,%eax + 1197c: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 1197f: 8d 45 df lea 0xffffffdf(%ebp),%eax + 11982: 80 20 0f andb $0xf,(%eax) + 11985: 8b 5d 08 mov 0x8(%ebp),%ebx + 11988: 8b 75 d8 mov 0xffffffd8(%ebp),%esi + 1198b: 8b 7d 08 mov 0x8(%ebp),%edi + 1198e: 8b 55 d8 mov 0xffffffd8(%ebp),%edx + 11991: b9 00 00 00 00 mov $0x0,%ecx + 11996: 8a 4d df mov 0xffffffdf(%ebp),%cl + 11999: b8 01 00 00 00 mov $0x1,%eax + 1199e: d3 e0 shl %cl,%eax + 119a0: f7 d0 not %eax + 119a2: 23 44 97 28 and 0x28(%edi,%edx,4),%eax + 119a6: 89 44 b3 28 mov %eax,0x28(%ebx,%esi,4) + 119aa: b8 00 00 00 00 mov $0x0,%eax + 119af: 8a 45 df mov 0xffffffdf(%ebp),%al + 119b2: 89 45 c8 mov %eax,0xffffffc8(%ebp) + 119b5: 8b 45 c8 mov 0xffffffc8(%ebp),%eax + 119b8: c1 e0 02 shl $0x2,%eax + 119bb: 89 45 c8 mov %eax,0xffffffc8(%ebp) + 119be: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) + 119c2: 74 0f je 119d3 <_usb_set_interface+0x25d> + 119c4: 8b 55 c8 mov 0xffffffc8(%ebp),%edx + 119c7: 03 55 08 add 0x8(%ebp),%edx + 119ca: 89 55 c4 mov %edx,0xffffffc4(%ebp) + 119cd: 83 45 c4 78 addl $0x78,0xffffffc4(%ebp) + 119d1: eb 0d jmp 119e0 <_usb_set_interface+0x26a> + 119d3: 8b 45 c8 mov 0xffffffc8(%ebp),%eax + 119d6: 03 45 08 add 0x8(%ebp),%eax + 119d9: 89 45 c4 mov %eax,0xffffffc4(%ebp) + 119dc: 83 45 c4 38 addl $0x38,0xffffffc4(%ebp) + 119e0: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 119e3: 8b 55 e8 mov 0xffffffe8(%ebp),%edx + 119e6: 89 d0 mov %edx,%eax + 119e8: c1 e0 02 shl $0x2,%eax + 119eb: 01 d0 add %edx,%eax + 119ed: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 119f4: 8b 41 0c mov 0xc(%ecx),%eax + 119f7: 66 8b 44 02 04 mov 0x4(%edx,%eax,1),%ax + 119fc: 25 ff ff 00 00 and $0xffff,%eax + 11a01: 8b 55 c4 mov 0xffffffc4(%ebp),%edx + 11a04: 89 02 mov %eax,(%edx) + 11a06: 8b 5d 08 mov 0x8(%ebp),%ebx + 11a09: 8b 75 d8 mov 0xffffffd8(%ebp),%esi + 11a0c: 8b 7d 08 mov 0x8(%ebp),%edi + 11a0f: 8b 55 d8 mov 0xffffffd8(%ebp),%edx + 11a12: b9 00 00 00 00 mov $0x0,%ecx + 11a17: 8a 4d df mov 0xffffffdf(%ebp),%cl + 11a1a: b8 01 00 00 00 mov $0x1,%eax + 11a1f: d3 e0 shl %cl,%eax + 11a21: f7 d0 not %eax + 11a23: 23 44 97 30 and 0x30(%edi,%edx,4),%eax + 11a27: 89 44 b3 30 mov %eax,0x30(%ebx,%esi,4) + 11a2b: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 11a2e: ff 00 incl (%eax) + 11a30: e9 0c ff ff ff jmp 11941 <_usb_set_interface+0x1cb> + 11a35: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) + 11a3c: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 11a3f: 8d 65 f4 lea 0xfffffff4(%ebp),%esp + 11a42: 5b pop %ebx + 11a43: 5e pop %esi + 11a44: 5f pop %edi + 11a45: 5d pop %ebp + 11a46: c3 ret + +00011a47 <_usb_set_configuration>: + 11a47: 55 push %ebp + 11a48: 89 e5 mov %esp,%ebp + 11a4a: 83 ec 18 sub $0x18,%esp + 11a4d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 11a54: 8b 45 08 mov 0x8(%ebp),%eax + 11a57: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 11a5d: 8b 40 20 mov 0x20(%eax),%eax + 11a60: 8b 40 1c mov 0x1c(%eax),%eax + 11a63: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11a66: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 11a6d: 8b 45 08 mov 0x8(%ebp),%eax + 11a70: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 11a76: 25 ff 00 00 00 and $0xff,%eax + 11a7b: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 11a7e: 7e 48 jle 11ac8 <_usb_set_configuration+0x81> + 11a80: 8b 4d 08 mov 0x8(%ebp),%ecx + 11a83: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 11a86: 89 d0 mov %edx,%eax + 11a88: 01 c0 add %eax,%eax + 11a8a: 01 d0 add %edx,%eax + 11a8c: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 11a93: 8b 81 84 01 00 00 mov 0x184(%ecx),%eax + 11a99: 8a 44 02 05 mov 0x5(%edx,%eax,1),%al + 11a9d: 25 ff 00 00 00 and $0xff,%eax + 11aa2: 3b 45 0c cmp 0xc(%ebp),%eax + 11aa5: 75 1a jne 11ac1 <_usb_set_configuration+0x7a> + 11aa7: 8b 4d 08 mov 0x8(%ebp),%ecx + 11aaa: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 11aad: 89 d0 mov %edx,%eax + 11aaf: 01 c0 add %eax,%eax + 11ab1: 01 d0 add %edx,%eax + 11ab3: c1 e0 03 shl $0x3,%eax + 11ab6: 03 81 84 01 00 00 add 0x184(%ecx),%eax + 11abc: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11abf: eb 07 jmp 11ac8 <_usb_set_configuration+0x81> + 11ac1: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 11ac4: ff 00 incl (%eax) + 11ac6: eb a5 jmp 11a6d <_usb_set_configuration+0x26> + 11ac8: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 11acc: 75 06 jne 11ad4 <_usb_set_configuration+0x8d> + 11ace: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 11ad2: 75 0c jne 11ae0 <_usb_set_configuration+0x99> + 11ad4: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 11ad8: 74 12 je 11aec <_usb_set_configuration+0xa5> + 11ada: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 11ade: 75 0c jne 11aec <_usb_set_configuration+0xa5> + 11ae0: c7 45 ec ea ff ff ff movl $0xffffffea,0xffffffec(%ebp) + 11ae7: e9 f2 00 00 00 jmp 11bde <_usb_set_configuration+0x197> + 11aec: 8b 45 08 mov 0x8(%ebp),%eax + 11aef: 83 78 14 04 cmpl $0x4,0x14(%eax) + 11af3: 74 3f je 11b34 <_usb_set_configuration+0xed> + 11af5: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 11af9: 74 39 je 11b34 <_usb_set_configuration+0xed> + 11afb: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) + 11b02: 83 7d fc 0e cmpl $0xe,0xfffffffc(%ebp) + 11b06: 7f 2c jg 11b34 <_usb_set_configuration+0xed> + 11b08: 83 ec 08 sub $0x8,%esp + 11b0b: ff 75 fc pushl 0xfffffffc(%ebp) + 11b0e: ff 75 08 pushl 0x8(%ebp) + 11b11: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11b14: ff d0 call *%eax + 11b16: 83 c4 10 add $0x10,%esp + 11b19: 83 ec 08 sub $0x8,%esp + 11b1c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11b1f: 0c 80 or $0x80,%al + 11b21: 50 push %eax + 11b22: ff 75 08 pushl 0x8(%ebp) + 11b25: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11b28: ff d0 call *%eax + 11b2a: 83 c4 10 add $0x10,%esp + 11b2d: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 11b30: ff 00 incl (%eax) + 11b32: eb ce jmp 11b02 <_usb_set_configuration+0xbb> + 11b34: 8b 55 08 mov 0x8(%ebp),%edx + 11b37: 8b 45 08 mov 0x8(%ebp),%eax + 11b3a: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) + 11b41: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) + 11b48: 8b 55 08 mov 0x8(%ebp),%edx + 11b4b: 8b 45 08 mov 0x8(%ebp),%eax + 11b4e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) + 11b55: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) + 11b5c: 8b 45 08 mov 0x8(%ebp),%eax + 11b5f: c7 40 14 04 00 00 00 movl $0x4,0x14(%eax) + 11b66: 83 ec 0c sub $0xc,%esp + 11b69: 68 f4 01 00 00 push $0x1f4 + 11b6e: 6a 00 push $0x0 + 11b70: 6a 00 push $0x0 + 11b72: 6a 00 push $0x0 + 11b74: 8b 45 0c mov 0xc(%ebp),%eax + 11b77: 25 ff ff 00 00 and $0xffff,%eax + 11b7c: 50 push %eax + 11b7d: 6a 00 push $0x0 + 11b7f: 6a 09 push $0x9 + 11b81: 6a 00 push $0x0 + 11b83: ff 75 08 pushl 0x8(%ebp) + 11b86: e8 76 f8 ff ff call 11401 <___create_pipe> + 11b8b: 83 c4 08 add $0x8,%esp + 11b8e: 0d 00 00 00 80 or $0x80000000,%eax + 11b93: 50 push %eax + 11b94: ff 75 08 pushl 0x8(%ebp) + 11b97: e8 54 f6 ff ff call 111f0 <_usb_control_msg> + 11b9c: 83 c4 30 add $0x30,%esp + 11b9f: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11ba2: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 11ba6: 79 08 jns 11bb0 <_usb_set_configuration+0x169> + 11ba8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11bab: 89 45 ec mov %eax,0xffffffec(%ebp) + 11bae: eb 2e jmp 11bde <_usb_set_configuration+0x197> + 11bb0: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 11bb4: 74 0a je 11bc0 <_usb_set_configuration+0x179> + 11bb6: 8b 45 08 mov 0x8(%ebp),%eax + 11bb9: c7 40 14 05 00 00 00 movl $0x5,0x14(%eax) + 11bc0: 8b 55 08 mov 0x8(%ebp),%edx + 11bc3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11bc6: 89 82 88 01 00 00 mov %eax,0x188(%edx) + 11bcc: ff 75 08 pushl 0x8(%ebp) + 11bcf: e8 25 f9 ff ff call 114f9 <_usb_set_maxpacket> + 11bd4: 83 c4 04 add $0x4,%esp + 11bd7: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 11bde: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11be1: c9 leave + 11be2: c3 ret + +00011be3 <_usb_string>: + 11be3: 55 push %ebp + 11be4: 89 e5 mov %esp,%ebp + 11be6: 83 ec 18 sub $0x18,%esp + 11be9: 83 7d 14 00 cmpl $0x0,0x14(%ebp) + 11bed: 74 0c je 11bfb <_usb_string+0x18> + 11bef: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 11bf3: 74 06 je 11bfb <_usb_string+0x18> + 11bf5: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 11bf9: 75 0c jne 11c07 <_usb_string+0x24> + 11bfb: c7 45 e8 ea ff ff ff movl $0xffffffea,0xffffffe8(%ebp) + 11c02: e9 a7 01 00 00 jmp 11dae <_usb_string+0x1cb> + 11c07: 8b 45 10 mov 0x10(%ebp),%eax + 11c0a: c6 00 00 movb $0x0,(%eax) + 11c0d: 83 ec 08 sub $0x8,%esp + 11c10: 68 00 01 00 00 push $0x100 + 11c15: 6a 01 push $0x1 + 11c17: e8 14 7e 00 00 call 19a30 <_ExAllocatePool@8> + 11c1c: 83 c4 08 add $0x8,%esp + 11c1f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11c22: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 11c26: 75 0c jne 11c34 <_usb_string+0x51> + 11c28: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) + 11c2f: e9 7a 01 00 00 jmp 11dae <_usb_string+0x1cb> + 11c34: 8b 45 08 mov 0x8(%ebp),%eax + 11c37: 83 b8 90 01 00 00 00 cmpl $0x0,0x190(%eax) + 11c3e: 75 6e jne 11cae <_usb_string+0xcb> + 11c40: 83 ec 0c sub $0xc,%esp + 11c43: 6a 04 push $0x4 + 11c45: ff 75 fc pushl 0xfffffffc(%ebp) + 11c48: 6a 00 push $0x0 + 11c4a: 6a 00 push $0x0 + 11c4c: ff 75 08 pushl 0x8(%ebp) + 11c4f: e8 c2 f7 ff ff call 11416 <_usb_get_string> + 11c54: 83 c4 20 add $0x20,%esp + 11c57: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11c5a: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 11c5e: 79 05 jns 11c65 <_usb_string+0x82> + 11c60: e9 35 01 00 00 jmp 11d9a <_usb_string+0x1b7> + 11c65: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11c68: 80 38 03 cmpb $0x3,(%eax) + 11c6b: 77 0c ja 11c79 <_usb_string+0x96> + 11c6d: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 11c74: e9 21 01 00 00 jmp 11d9a <_usb_string+0x1b7> + 11c79: 8b 45 08 mov 0x8(%ebp),%eax + 11c7c: c7 80 90 01 00 00 ff movl $0xffffffff,0x190(%eax) + 11c83: ff ff ff + 11c86: 8b 4d 08 mov 0x8(%ebp),%ecx + 11c89: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11c8c: 83 c0 02 add $0x2,%eax + 11c8f: ba 00 00 00 00 mov $0x0,%edx + 11c94: 8a 10 mov (%eax),%dl + 11c96: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11c99: 83 c0 03 add $0x3,%eax + 11c9c: 8a 00 mov (%eax),%al + 11c9e: 25 ff 00 00 00 and $0xff,%eax + 11ca3: c1 e0 08 shl $0x8,%eax + 11ca6: 09 d0 or %edx,%eax + 11ca8: 89 81 94 01 00 00 mov %eax,0x194(%ecx) + 11cae: 83 ec 0c sub $0xc,%esp + 11cb1: 6a 02 push $0x2 + 11cb3: ff 75 fc pushl 0xfffffffc(%ebp) + 11cb6: 8b 45 0c mov 0xc(%ebp),%eax + 11cb9: 25 ff 00 00 00 and $0xff,%eax + 11cbe: 50 push %eax + 11cbf: 8b 45 08 mov 0x8(%ebp),%eax + 11cc2: 8b 80 94 01 00 00 mov 0x194(%eax),%eax + 11cc8: 25 ff ff 00 00 and $0xffff,%eax + 11ccd: 50 push %eax + 11cce: ff 75 08 pushl 0x8(%ebp) + 11cd1: e8 40 f7 ff ff call 11416 <_usb_get_string> + 11cd6: 83 c4 20 add $0x20,%esp + 11cd9: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11cdc: 83 7d f8 01 cmpl $0x1,0xfffffff8(%ebp) + 11ce0: 7f 05 jg 11ce7 <_usb_string+0x104> + 11ce2: e9 b3 00 00 00 jmp 11d9a <_usb_string+0x1b7> + 11ce7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11cea: 8a 00 mov (%eax),%al + 11cec: 25 ff 00 00 00 and $0xff,%eax + 11cf1: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11cf4: 83 ec 0c sub $0xc,%esp + 11cf7: ff 75 f4 pushl 0xfffffff4(%ebp) + 11cfa: ff 75 fc pushl 0xfffffffc(%ebp) + 11cfd: 8b 45 0c mov 0xc(%ebp),%eax + 11d00: 25 ff 00 00 00 and $0xff,%eax + 11d05: 50 push %eax + 11d06: 8b 45 08 mov 0x8(%ebp),%eax + 11d09: 8b 80 94 01 00 00 mov 0x194(%eax),%eax + 11d0f: 25 ff ff 00 00 and $0xffff,%eax + 11d14: 50 push %eax + 11d15: ff 75 08 pushl 0x8(%ebp) + 11d18: e8 f9 f6 ff ff call 11416 <_usb_get_string> + 11d1d: 83 c4 20 add $0x20,%esp + 11d20: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11d23: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 11d27: 79 02 jns 11d2b <_usb_string+0x148> + 11d29: eb 6f jmp 11d9a <_usb_string+0x1b7> + 11d2b: 8d 45 14 lea 0x14(%ebp),%eax + 11d2e: ff 08 decl (%eax) + 11d30: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 11d37: c7 45 f0 02 00 00 00 movl $0x2,0xfffffff0(%ebp) + 11d3e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11d41: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 11d44: 76 45 jbe 11d8b <_usb_string+0x1a8> + 11d46: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11d49: 3b 45 14 cmp 0x14(%ebp),%eax + 11d4c: 72 02 jb 11d50 <_usb_string+0x16d> + 11d4e: eb 3b jmp 11d8b <_usb_string+0x1a8> + 11d50: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11d53: 03 45 fc add 0xfffffffc(%ebp),%eax + 11d56: 40 inc %eax + 11d57: 80 38 00 cmpb $0x0,(%eax) + 11d5a: 74 10 je 11d6c <_usb_string+0x189> + 11d5c: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11d5f: 03 45 10 add 0x10(%ebp),%eax + 11d62: c6 00 3f movb $0x3f,(%eax) + 11d65: 8d 45 ec lea 0xffffffec(%ebp),%eax + 11d68: ff 00 incl (%eax) + 11d6a: eb 17 jmp 11d83 <_usb_string+0x1a0> + 11d6c: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11d6f: 89 c2 mov %eax,%edx + 11d71: 03 55 10 add 0x10(%ebp),%edx + 11d74: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11d77: 03 45 f0 add 0xfffffff0(%ebp),%eax + 11d7a: 8a 00 mov (%eax),%al + 11d7c: 88 02 mov %al,(%edx) + 11d7e: 8d 45 ec lea 0xffffffec(%ebp),%eax + 11d81: ff 00 incl (%eax) + 11d83: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 11d86: 83 00 02 addl $0x2,(%eax) + 11d89: eb b3 jmp 11d3e <_usb_string+0x15b> + 11d8b: 8b 45 10 mov 0x10(%ebp),%eax + 11d8e: 03 45 ec add 0xffffffec(%ebp),%eax + 11d91: c6 00 00 movb $0x0,(%eax) + 11d94: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11d97: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11d9a: 83 ec 0c sub $0xc,%esp + 11d9d: ff 75 fc pushl 0xfffffffc(%ebp) + 11da0: e8 9b 7c 00 00 call 19a40 <_ExFreePool@4> + 11da5: 83 c4 0c add $0xc,%esp + 11da8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11dab: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11dae: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11db1: c9 leave + 11db2: c3 ret + 11db3: 90 nop + 11db4: 90 nop + 11db5: 90 nop + 11db6: 90 nop + 11db7: 90 nop + 11db8: 90 nop + 11db9: 90 nop + 11dba: 90 nop + 11dbb: 90 nop + 11dbc: 90 nop + 11dbd: 90 nop + 11dbe: 90 nop + 11dbf: 90 nop + +00011dc0 <_ascii2utf>: + 11dc0: 55 push %ebp + 11dc1: 89 e5 mov %esp,%ebp + 11dc3: 83 ec 04 sub $0x4,%esp + 11dc6: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 11dcd: 8b 45 08 mov 0x8(%ebp),%eax + 11dd0: 80 38 00 cmpb $0x0,(%eax) + 11dd3: 74 33 je 11e08 <_ascii2utf+0x48> + 11dd5: 83 7d 10 01 cmpl $0x1,0x10(%ebp) + 11dd9: 7e 2d jle 11e08 <_ascii2utf+0x48> + 11ddb: 8b 45 0c mov 0xc(%ebp),%eax + 11dde: 89 c2 mov %eax,%edx + 11de0: 8b 45 08 mov 0x8(%ebp),%eax + 11de3: ff 45 08 incl 0x8(%ebp) + 11de6: 8a 00 mov (%eax),%al + 11de8: 88 02 mov %al,(%edx) + 11dea: 8d 45 0c lea 0xc(%ebp),%eax + 11ded: ff 00 incl (%eax) + 11def: 8b 45 0c mov 0xc(%ebp),%eax + 11df2: c6 00 00 movb $0x0,(%eax) + 11df5: 8d 45 0c lea 0xc(%ebp),%eax + 11df8: ff 00 incl (%eax) + 11dfa: 8d 45 10 lea 0x10(%ebp),%eax + 11dfd: 83 28 02 subl $0x2,(%eax) + 11e00: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 11e03: 83 00 02 addl $0x2,(%eax) + 11e06: eb c5 jmp 11dcd <_ascii2utf+0xd> + 11e08: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11e0b: c9 leave + 11e0c: c3 ret + +00011e0d <_rh_string>: + 11e0d: 55 push %ebp + 11e0e: 89 e5 mov %esp,%ebp + 11e10: 53 push %ebx + 11e11: 81 ec 84 00 00 00 sub $0x84,%esp + 11e17: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 11e1b: 75 38 jne 11e55 <_rh_string+0x48> + 11e1d: 8b 45 10 mov 0x10(%ebp),%eax + 11e20: c6 00 04 movb $0x4,(%eax) + 11e23: 8d 45 10 lea 0x10(%ebp),%eax + 11e26: ff 00 incl (%eax) + 11e28: 8b 45 10 mov 0x10(%ebp),%eax + 11e2b: c6 00 03 movb $0x3,(%eax) + 11e2e: 8d 45 10 lea 0x10(%ebp),%eax + 11e31: ff 00 incl (%eax) + 11e33: 8b 45 10 mov 0x10(%ebp),%eax + 11e36: c6 00 09 movb $0x9,(%eax) + 11e39: 8d 45 10 lea 0x10(%ebp),%eax + 11e3c: ff 00 incl (%eax) + 11e3e: 8b 45 10 mov 0x10(%ebp),%eax + 11e41: c6 00 04 movb $0x4,(%eax) + 11e44: 8d 45 10 lea 0x10(%ebp),%eax + 11e47: ff 00 incl (%eax) + 11e49: c7 45 84 04 00 00 00 movl $0x4,0xffffff84(%ebp) + 11e50: e9 af 00 00 00 jmp 11f04 <_rh_string+0xf7> + 11e55: 83 7d 08 01 cmpl $0x1,0x8(%ebp) + 11e59: 75 17 jne 11e72 <_rh_string+0x65> + 11e5b: 83 ec 08 sub $0x8,%esp + 11e5e: 8b 45 0c mov 0xc(%ebp),%eax + 11e61: ff 70 08 pushl 0x8(%eax) + 11e64: 8d 45 88 lea 0xffffff88(%ebp),%eax + 11e67: 50 push %eax + 11e68: e8 33 7c 00 00 call 19aa0 <_strcpy> + 11e6d: 83 c4 10 add $0x10,%esp + 11e70: eb 52 jmp 11ec4 <_rh_string+0xb7> + 11e72: 83 7d 08 02 cmpl $0x2,0x8(%ebp) + 11e76: 75 17 jne 11e8f <_rh_string+0x82> + 11e78: 83 ec 08 sub $0x8,%esp + 11e7b: 8b 45 0c mov 0xc(%ebp),%eax + 11e7e: ff 70 4c pushl 0x4c(%eax) + 11e81: 8d 45 88 lea 0xffffff88(%ebp),%eax + 11e84: 50 push %eax + 11e85: e8 16 7c 00 00 call 19aa0 <_strcpy> + 11e8a: 83 c4 10 add $0x10,%esp + 11e8d: eb 35 jmp 11ec4 <_rh_string+0xb7> + 11e8f: 83 7d 08 03 cmpl $0x3,0x8(%ebp) + 11e93: 75 26 jne 11ebb <_rh_string+0xae> + 11e95: 83 ec 0c sub $0xc,%esp + 11e98: 8b 45 0c mov 0xc(%ebp),%eax + 11e9b: ff 70 50 pushl 0x50(%eax) + 11e9e: 68 a6 b0 01 00 push $0x1b0a6 + 11ea3: 68 ab b0 01 00 push $0x1b0ab + 11ea8: 68 b0 b0 01 00 push $0x1b0b0 + 11ead: 8d 45 88 lea 0xffffff88(%ebp),%eax + 11eb0: 50 push %eax + 11eb1: e8 da 7b 00 00 call 19a90 <_sprintf> + 11eb6: 83 c4 20 add $0x20,%esp + 11eb9: eb 09 jmp 11ec4 <_rh_string+0xb7> + 11ebb: c7 45 84 00 00 00 00 movl $0x0,0xffffff84(%ebp) + 11ec2: eb 40 jmp 11f04 <_rh_string+0xf7> + 11ec4: 8b 5d 10 mov 0x10(%ebp),%ebx + 11ec7: 8d 45 88 lea 0xffffff88(%ebp),%eax + 11eca: 83 ec 0c sub $0xc,%esp + 11ecd: 50 push %eax + 11ece: e8 ad 7b 00 00 call 19a80 <_strlen> + 11ed3: 83 c4 10 add $0x10,%esp + 11ed6: 01 c0 add %eax,%eax + 11ed8: 83 c0 02 add $0x2,%eax + 11edb: 88 03 mov %al,(%ebx) + 11edd: 8b 45 10 mov 0x10(%ebp),%eax + 11ee0: 40 inc %eax + 11ee1: c6 00 03 movb $0x3,(%eax) + 11ee4: 8b 45 14 mov 0x14(%ebp),%eax + 11ee7: 83 e8 02 sub $0x2,%eax + 11eea: 50 push %eax + 11eeb: 8b 45 10 mov 0x10(%ebp),%eax + 11eee: 83 c0 02 add $0x2,%eax + 11ef1: 50 push %eax + 11ef2: 8d 45 88 lea 0xffffff88(%ebp),%eax + 11ef5: 50 push %eax + 11ef6: e8 c5 fe ff ff call 11dc0 <_ascii2utf> + 11efb: 83 c4 0c add $0xc,%esp + 11efe: 83 c0 02 add $0x2,%eax + 11f01: 89 45 84 mov %eax,0xffffff84(%ebp) + 11f04: 8b 45 84 mov 0xffffff84(%ebp),%eax + 11f07: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 11f0a: c9 leave + 11f0b: c3 ret + +00011f0c <_rh_call_control>: + 11f0c: 55 push %ebp + 11f0d: 89 e5 mov %esp,%ebp + 11f0f: 53 push %ebx + 11f10: 83 ec 24 sub $0x24,%esp + 11f13: 8b 45 0c mov 0xc(%ebp),%eax + 11f16: 8b 40 38 mov 0x38(%eax),%eax + 11f19: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11f1c: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 11f23: 8b 45 0c mov 0xc(%ebp),%eax + 11f26: 8b 40 24 mov 0x24(%eax),%eax + 11f29: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11f2c: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 11f33: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11f36: 8a 00 mov (%eax),%al + 11f38: 25 ff 00 00 00 and $0xff,%eax + 11f3d: 89 c2 mov %eax,%edx + 11f3f: c1 e2 08 shl $0x8,%edx + 11f42: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11f45: 8a 40 01 mov 0x1(%eax),%al + 11f48: 25 ff 00 00 00 and $0xff,%eax + 11f4d: 09 d0 or %edx,%eax + 11f4f: 66 89 45 f6 mov %ax,0xfffffff6(%ebp) + 11f53: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11f56: 66 8b 40 02 mov 0x2(%eax),%ax + 11f5a: 66 89 45 f4 mov %ax,0xfffffff4(%ebp) + 11f5e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11f61: 66 8b 40 04 mov 0x4(%eax),%ax + 11f65: 66 89 45 f2 mov %ax,0xfffffff2(%ebp) + 11f69: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11f6c: 66 8b 40 06 mov 0x6(%eax),%ax + 11f70: 66 89 45 f0 mov %ax,0xfffffff0(%ebp) + 11f74: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11f77: 89 c2 mov %eax,%edx + 11f79: 81 e2 ff ff 00 00 and $0xffff,%edx + 11f7f: 8b 45 0c mov 0xc(%ebp),%eax + 11f82: 3b 50 2c cmp 0x2c(%eax),%edx + 11f85: 7e 05 jle 11f8c <_rh_call_control+0x80> + 11f87: e9 49 02 00 00 jmp 121d5 <_rh_call_control+0x2c9> + 11f8c: 8b 45 0c mov 0xc(%ebp),%eax + 11f8f: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 11f96: 8b 55 0c mov 0xc(%ebp),%edx + 11f99: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11f9c: 25 ff ff 00 00 and $0xffff,%eax + 11fa1: 89 42 30 mov %eax,0x30(%edx) + 11fa4: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11fa8: 89 c2 mov %eax,%edx + 11faa: 81 e2 ff ff 00 00 and $0xffff,%edx + 11fb0: 89 55 dc mov %edx,0xffffffdc(%ebp) + 11fb3: 81 7d dc 01 01 00 00 cmpl $0x101,0xffffffdc(%ebp) + 11fba: 0f 84 1f 02 00 00 je 121df <_rh_call_control+0x2d3> + 11fc0: 81 7d dc 01 01 00 00 cmpl $0x101,0xffffffdc(%ebp) + 11fc7: 7f 42 jg 1200b <_rh_call_control+0xff> + 11fc9: 83 7d dc 05 cmpl $0x5,0xffffffdc(%ebp) + 11fcd: 0f 84 0c 02 00 00 je 121df <_rh_call_control+0x2d3> + 11fd3: 83 7d dc 05 cmpl $0x5,0xffffffdc(%ebp) + 11fd7: 7f 19 jg 11ff2 <_rh_call_control+0xe6> + 11fd9: 83 7d dc 01 cmpl $0x1,0xffffffdc(%ebp) + 11fdd: 0f 84 fc 01 00 00 je 121df <_rh_call_control+0x2d3> + 11fe3: 83 7d dc 03 cmpl $0x3,0xffffffdc(%ebp) + 11fe7: 0f 84 f2 01 00 00 je 121df <_rh_call_control+0x2d3> + 11fed: e9 9e 01 00 00 jmp 12190 <_rh_call_control+0x284> + 11ff2: 83 7d dc 09 cmpl $0x9,0xffffffdc(%ebp) + 11ff6: 0f 84 e3 01 00 00 je 121df <_rh_call_control+0x2d3> + 11ffc: 83 7d dc 0b cmpl $0xb,0xffffffdc(%ebp) + 12000: 0f 84 d9 01 00 00 je 121df <_rh_call_control+0x2d3> + 12006: e9 85 01 00 00 jmp 12190 <_rh_call_control+0x284> + 1200b: 81 7d dc 06 80 00 00 cmpl $0x8006,0xffffffdc(%ebp) + 12012: 74 77 je 1208b <_rh_call_control+0x17f> + 12014: 81 7d dc 06 80 00 00 cmpl $0x8006,0xffffffdc(%ebp) + 1201b: 7f 1b jg 12038 <_rh_call_control+0x12c> + 1201d: 81 7d dc 03 01 00 00 cmpl $0x103,0xffffffdc(%ebp) + 12024: 0f 84 b5 01 00 00 je 121df <_rh_call_control+0x2d3> + 1202a: 81 7d dc 00 80 00 00 cmpl $0x8000,0xffffffdc(%ebp) + 12031: 74 3b je 1206e <_rh_call_control+0x162> + 12033: e9 58 01 00 00 jmp 12190 <_rh_call_control+0x284> + 12038: 81 7d dc 0a 80 00 00 cmpl $0x800a,0xffffffdc(%ebp) + 1203f: 0f 84 34 01 00 00 je 12179 <_rh_call_control+0x26d> + 12045: 81 7d dc 0a 80 00 00 cmpl $0x800a,0xffffffdc(%ebp) + 1204c: 7f 0e jg 1205c <_rh_call_control+0x150> + 1204e: 81 7d dc 08 80 00 00 cmpl $0x8008,0xffffffdc(%ebp) + 12055: 74 29 je 12080 <_rh_call_control+0x174> + 12057: e9 34 01 00 00 jmp 12190 <_rh_call_control+0x284> + 1205c: 81 7d dc 00 81 00 00 cmpl $0x8100,0xffffffdc(%ebp) + 12063: 0f 84 18 01 00 00 je 12181 <_rh_call_control+0x275> + 12069: e9 22 01 00 00 jmp 12190 <_rh_call_control+0x284> + 1206e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 12071: c6 00 01 movb $0x1,(%eax) + 12074: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 12077: 40 inc %eax + 12078: c6 00 00 movb $0x0,(%eax) + 1207b: e9 5f 01 00 00 jmp 121df <_rh_call_control+0x2d3> + 12080: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 12083: c6 00 01 movb $0x1,(%eax) + 12086: e9 54 01 00 00 jmp 121df <_rh_call_control+0x2d3> + 1208b: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1208e: 25 ff ff 00 00 and $0xffff,%eax + 12093: 25 00 ff 00 00 and $0xff00,%eax + 12098: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 1209b: 81 7d e0 00 02 00 00 cmpl $0x200,0xffffffe0(%ebp) + 120a2: 74 6f je 12113 <_rh_call_control+0x207> + 120a4: 81 7d e0 00 02 00 00 cmpl $0x200,0xffffffe0(%ebp) + 120ab: 7f 0e jg 120bb <_rh_call_control+0x1af> + 120ad: 81 7d e0 00 01 00 00 cmpl $0x100,0xffffffe0(%ebp) + 120b4: 74 17 je 120cd <_rh_call_control+0x1c1> + 120b6: e9 1a 01 00 00 jmp 121d5 <_rh_call_control+0x2c9> + 120bb: 81 7d e0 00 03 00 00 cmpl $0x300,0xffffffe0(%ebp) + 120c2: 0f 84 84 00 00 00 je 1214c <_rh_call_control+0x240> + 120c8: e9 08 01 00 00 jmp 121d5 <_rh_call_control+0x2c9> + 120cd: 8b 45 08 mov 0x8(%ebp),%eax + 120d0: 8b 40 74 mov 0x74(%eax),%eax + 120d3: 8b 40 08 mov 0x8(%eax),%eax + 120d6: c1 e8 05 shr $0x5,%eax + 120d9: 83 e0 01 and $0x1,%eax + 120dc: 85 c0 test %eax,%eax + 120de: 74 09 je 120e9 <_rh_call_control+0x1dd> + 120e0: c7 45 ec 50 b0 01 00 movl $0x1b050,0xffffffec(%ebp) + 120e7: eb 1e jmp 12107 <_rh_call_control+0x1fb> + 120e9: 8b 45 08 mov 0x8(%ebp),%eax + 120ec: 8b 40 74 mov 0x74(%eax),%eax + 120ef: 8b 40 08 mov 0x8(%eax),%eax + 120f2: c1 e8 04 shr $0x4,%eax + 120f5: 83 e0 01 and $0x1,%eax + 120f8: 85 c0 test %eax,%eax + 120fa: 0f 84 d5 00 00 00 je 121d5 <_rh_call_control+0x2c9> + 12100: c7 45 ec 62 b0 01 00 movl $0x1b062,0xffffffec(%ebp) + 12107: c7 45 e4 12 00 00 00 movl $0x12,0xffffffe4(%ebp) + 1210e: e9 cc 00 00 00 jmp 121df <_rh_call_control+0x2d3> + 12113: 8b 45 08 mov 0x8(%ebp),%eax + 12116: 8b 40 74 mov 0x74(%eax),%eax + 12119: 8b 40 08 mov 0x8(%eax),%eax + 1211c: c1 e8 05 shr $0x5,%eax + 1211f: 83 e0 01 and $0x1,%eax + 12122: 85 c0 test %eax,%eax + 12124: 74 13 je 12139 <_rh_call_control+0x22d> + 12126: c7 45 ec 8d b0 01 00 movl $0x1b08d,0xffffffec(%ebp) + 1212d: c7 45 e4 19 00 00 00 movl $0x19,0xffffffe4(%ebp) + 12134: e9 a6 00 00 00 jmp 121df <_rh_call_control+0x2d3> + 12139: c7 45 ec 74 b0 01 00 movl $0x1b074,0xffffffec(%ebp) + 12140: c7 45 e4 19 00 00 00 movl $0x19,0xffffffe4(%ebp) + 12147: e9 93 00 00 00 jmp 121df <_rh_call_control+0x2d3> + 1214c: 8b 5d 0c mov 0xc(%ebp),%ebx + 1214f: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12152: 25 ff ff 00 00 and $0xffff,%eax + 12157: 50 push %eax + 12158: ff 75 e8 pushl 0xffffffe8(%ebp) + 1215b: ff 75 08 pushl 0x8(%ebp) + 1215e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12161: 25 ff ff 00 00 and $0xffff,%eax + 12166: 25 ff 00 00 00 and $0xff,%eax + 1216b: 50 push %eax + 1216c: e8 9c fc ff ff call 11e0d <_rh_string> + 12171: 83 c4 10 add $0x10,%esp + 12174: 89 43 30 mov %eax,0x30(%ebx) + 12177: eb 66 jmp 121df <_rh_call_control+0x2d3> + 12179: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1217c: c6 00 00 movb $0x0,(%eax) + 1217f: eb 5e jmp 121df <_rh_call_control+0x2d3> + 12181: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 12184: c6 00 00 movb $0x0,(%eax) + 12187: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1218a: 40 inc %eax + 1218b: c6 00 00 movb $0x0,(%eax) + 1218e: eb 4f jmp 121df <_rh_call_control+0x2d3> + 12190: 8b 5d 0c mov 0xc(%ebp),%ebx + 12193: 83 ec 08 sub $0x8,%esp + 12196: 8b 45 08 mov 0x8(%ebp),%eax + 12199: 8b 50 74 mov 0x74(%eax),%edx + 1219c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1219f: 25 ff ff 00 00 and $0xffff,%eax + 121a4: 50 push %eax + 121a5: ff 75 e8 pushl 0xffffffe8(%ebp) + 121a8: 66 8b 45 f2 mov 0xfffffff2(%ebp),%ax + 121ac: 25 ff ff 00 00 and $0xffff,%eax + 121b1: 50 push %eax + 121b2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 121b5: 25 ff ff 00 00 and $0xffff,%eax + 121ba: 50 push %eax + 121bb: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 121bf: 25 ff ff 00 00 and $0xffff,%eax + 121c4: 50 push %eax + 121c5: ff 75 08 pushl 0x8(%ebp) + 121c8: 8b 42 38 mov 0x38(%edx),%eax + 121cb: ff d0 call *%eax + 121cd: 83 c4 20 add $0x20,%esp + 121d0: 89 43 1c mov %eax,0x1c(%ebx) + 121d3: eb 0a jmp 121df <_rh_call_control+0x2d3> + 121d5: 8b 45 0c mov 0xc(%ebp),%eax + 121d8: c7 40 1c e0 ff ff ff movl $0xffffffe0,0x1c(%eax) + 121df: 8b 45 0c mov 0xc(%ebp),%eax + 121e2: 83 78 1c 00 cmpl $0x0,0x1c(%eax) + 121e6: 74 0a je 121f2 <_rh_call_control+0x2e6> + 121e8: 8b 45 0c mov 0xc(%ebp),%eax + 121eb: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) + 121f2: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 121f6: 74 31 je 12229 <_rh_call_control+0x31d> + 121f8: 8b 45 0c mov 0xc(%ebp),%eax + 121fb: 8b 40 2c mov 0x2c(%eax),%eax + 121fe: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax + 12201: 7d 09 jge 1220c <_rh_call_control+0x300> + 12203: 8b 45 0c mov 0xc(%ebp),%eax + 12206: 8b 40 2c mov 0x2c(%eax),%eax + 12209: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1220c: 8b 55 0c mov 0xc(%ebp),%edx + 1220f: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 12212: 89 42 30 mov %eax,0x30(%edx) + 12215: 83 ec 04 sub $0x4,%esp + 12218: ff 75 e4 pushl 0xffffffe4(%ebp) + 1221b: ff 75 ec pushl 0xffffffec(%ebp) + 1221e: ff 75 e8 pushl 0xffffffe8(%ebp) + 12221: e8 4a 78 00 00 call 19a70 <_memcpy> + 12226: 83 c4 10 add $0x10,%esp + 12229: 83 ec 04 sub $0x4,%esp + 1222c: 6a 00 push $0x0 + 1222e: ff 75 0c pushl 0xc(%ebp) + 12231: ff 75 08 pushl 0x8(%ebp) + 12234: e8 5d 14 00 00 call 13696 <_usb_hcd_giveback_urb@12> + 12239: 83 c4 04 add $0x4,%esp + 1223c: b8 00 00 00 00 mov $0x0,%eax + 12241: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 12244: c9 leave + 12245: c3 ret + +00012246 <_rh_status_urb>: + 12246: 55 push %ebp + 12247: 89 e5 mov %esp,%ebp + 12249: 83 ec 18 sub $0x18,%esp + 1224c: 8b 45 0c mov 0xc(%ebp),%eax + 1224f: 8b 40 14 mov 0x14(%eax),%eax + 12252: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 12258: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1225b: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 1225f: 79 04 jns 12265 <_rh_status_urb+0x1f> + 12261: 83 45 f4 07 addl $0x7,0xfffffff4(%ebp) + 12265: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12268: c1 f8 03 sar $0x3,%eax + 1226b: 40 inc %eax + 1226c: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1226f: 8b 45 08 mov 0x8(%ebp),%eax + 12272: 83 78 58 00 cmpl $0x0,0x58(%eax) + 12276: 75 16 jne 1228e <_rh_status_urb+0x48> + 12278: 8b 45 0c mov 0xc(%ebp),%eax + 1227b: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 1227f: 75 0d jne 1228e <_rh_status_urb+0x48> + 12281: 8b 45 0c mov 0xc(%ebp),%eax + 12284: 8b 40 2c mov 0x2c(%eax),%eax + 12287: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 1228a: 7c 02 jl 1228e <_rh_status_urb+0x48> + 1228c: eb 09 jmp 12297 <_rh_status_urb+0x51> + 1228e: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 12295: eb 55 jmp 122ec <_rh_status_urb+0xa6> + 12297: 83 ec 0c sub $0xc,%esp + 1229a: 8b 45 08 mov 0x8(%ebp),%eax + 1229d: 83 c0 54 add $0x54,%eax + 122a0: 50 push %eax + 122a1: e8 83 00 00 00 call 12329 <_init_timer> + 122a6: 83 c4 10 add $0x10,%esp + 122a9: 8b 45 08 mov 0x8(%ebp),%eax + 122ac: c7 40 54 5e 23 01 00 movl $0x1235e,0x54(%eax) + 122b3: 8b 55 08 mov 0x8(%ebp),%edx + 122b6: 8b 45 0c mov 0xc(%ebp),%eax + 122b9: 89 42 58 mov %eax,0x58(%edx) + 122bc: 8b 55 08 mov 0x8(%ebp),%edx + 122bf: a1 40 c2 01 00 mov 0x1c240,%eax + 122c4: 83 c0 19 add $0x19,%eax + 122c7: 89 42 5c mov %eax,0x5c(%edx) + 122ca: 83 ec 0c sub $0xc,%esp + 122cd: 8b 45 08 mov 0x8(%ebp),%eax + 122d0: 83 c0 54 add $0x54,%eax + 122d3: 50 push %eax + 122d4: e8 18 00 00 00 call 122f1 <_add_timer> + 122d9: 83 c4 10 add $0x10,%esp + 122dc: 8b 55 0c mov 0xc(%ebp),%edx + 122df: 8b 45 08 mov 0x8(%ebp),%eax + 122e2: 89 42 08 mov %eax,0x8(%edx) + 122e5: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 122ec: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 122ef: c9 leave + 122f0: c3 ret + +000122f1 <_add_timer>: + 122f1: 55 push %ebp + 122f2: 89 e5 mov %esp,%ebp + 122f4: 83 ec 04 sub $0x4,%esp + 122f7: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 122fe: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 12302: 7f 23 jg 12327 <_add_timer+0x36> + 12304: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12307: 83 3c 85 60 c1 01 00 cmpl $0x0,0x1c160(,%eax,4) + 1230e: 00 + 1230f: 75 0f jne 12320 <_add_timer+0x2f> + 12311: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12314: 8b 45 08 mov 0x8(%ebp),%eax + 12317: 89 04 95 60 c1 01 00 mov %eax,0x1c160(,%edx,4) + 1231e: eb 07 jmp 12327 <_add_timer+0x36> + 12320: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 12323: ff 00 incl (%eax) + 12325: eb d7 jmp 122fe <_add_timer+0xd> + 12327: c9 leave + 12328: c3 ret + +00012329 <_init_timer>: + 12329: 55 push %ebp + 1232a: 89 e5 mov %esp,%ebp + 1232c: 8b 55 08 mov 0x8(%ebp),%edx + 1232f: 83 c2 0c add $0xc,%edx + 12332: 8b 45 08 mov 0x8(%ebp),%eax + 12335: 83 c0 0c add $0xc,%eax + 12338: 89 02 mov %eax,(%edx) + 1233a: 8b 55 08 mov 0x8(%ebp),%edx + 1233d: 83 c2 0c add $0xc,%edx + 12340: 8b 45 08 mov 0x8(%ebp),%eax + 12343: 83 c0 0c add $0xc,%eax + 12346: 89 42 04 mov %eax,0x4(%edx) + 12349: 8b 45 08 mov 0x8(%ebp),%eax + 1234c: c7 00 00 00 00 00 movl $0x0,(%eax) + 12352: 8b 45 08 mov 0x8(%ebp),%eax + 12355: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 1235c: 5d pop %ebp + 1235d: c3 ret + +0001235e <_rh_report_status>: + 1235e: 55 push %ebp + 1235f: 89 e5 mov %esp,%ebp + 12361: 83 ec 18 sub $0x18,%esp + 12364: 8b 45 08 mov 0x8(%ebp),%eax + 12367: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1236a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1236d: c7 00 01 00 00 00 movl $0x1,(%eax) + 12373: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12376: 83 78 14 00 cmpl $0x0,0x14(%eax) + 1237a: 0f 84 c6 00 00 00 je 12446 <_rh_report_status+0xe8> + 12380: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12383: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 12387: 0f 85 b9 00 00 00 jne 12446 <_rh_report_status+0xe8> + 1238d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12390: 8b 40 14 mov 0x14(%eax),%eax + 12393: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12399: 8b 40 30 mov 0x30(%eax),%eax + 1239c: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1239f: 85 c0 test %eax,%eax + 123a1: 0f 84 9f 00 00 00 je 12446 <_rh_report_status+0xe8> + 123a7: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 123aa: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax + 123b0: 83 e0 01 and $0x1,%eax + 123b3: 85 c0 test %eax,%eax + 123b5: 75 05 jne 123bc <_rh_report_status+0x5e> + 123b7: e9 8a 00 00 00 jmp 12446 <_rh_report_status+0xe8> + 123bc: 83 ec 08 sub $0x8,%esp + 123bf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 123c2: 8b 50 74 mov 0x74(%eax),%edx + 123c5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 123c8: ff 70 24 pushl 0x24(%eax) + 123cb: ff 75 f8 pushl 0xfffffff8(%ebp) + 123ce: 8b 42 34 mov 0x34(%edx),%eax + 123d1: ff d0 call *%eax + 123d3: 83 c4 10 add $0x10,%esp + 123d6: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 123d9: c7 05 00 c0 01 00 01 movl $0x1,0x1c000 + 123e0: 00 00 00 + 123e3: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 123e7: 7e 29 jle 12412 <_rh_report_status+0xb4> + 123e9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 123ec: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) + 123f3: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 123f6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 123f9: 89 42 30 mov %eax,0x30(%edx) + 123fc: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 123ff: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 12406: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12409: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 12410: eb 1b jmp 1242d <_rh_report_status+0xcf> + 12412: 83 ec 08 sub $0x8,%esp + 12415: a1 40 c2 01 00 mov 0x1c240,%eax + 1241a: 83 c0 19 add $0x19,%eax + 1241d: 50 push %eax + 1241e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12421: 83 c0 54 add $0x54,%eax + 12424: 50 push %eax + 12425: e8 1e 00 00 00 call 12448 <_mod_timer> + 1242a: 83 c4 10 add $0x10,%esp + 1242d: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 12431: 7e 13 jle 12446 <_rh_report_status+0xe8> + 12433: 83 ec 04 sub $0x4,%esp + 12436: 6a 00 push $0x0 + 12438: ff 75 fc pushl 0xfffffffc(%ebp) + 1243b: ff 75 f8 pushl 0xfffffff8(%ebp) + 1243e: e8 53 12 00 00 call 13696 <_usb_hcd_giveback_urb@12> + 12443: 83 c4 04 add $0x4,%esp + 12446: c9 leave + 12447: c3 ret + +00012448 <_mod_timer>: + 12448: 55 push %ebp + 12449: 89 e5 mov %esp,%ebp + 1244b: 83 ec 08 sub $0x8,%esp + 1244e: 83 ec 0c sub $0xc,%esp + 12451: ff 75 08 pushl 0x8(%ebp) + 12454: e8 19 00 00 00 call 12472 <_del_timer> + 12459: 83 c4 10 add $0x10,%esp + 1245c: 8b 55 08 mov 0x8(%ebp),%edx + 1245f: 8b 45 0c mov 0xc(%ebp),%eax + 12462: 89 42 08 mov %eax,0x8(%edx) + 12465: ff 75 08 pushl 0x8(%ebp) + 12468: e8 84 fe ff ff call 122f1 <_add_timer> + 1246d: 83 c4 04 add $0x4,%esp + 12470: c9 leave + 12471: c3 ret + +00012472 <_del_timer>: + 12472: 55 push %ebp + 12473: 89 e5 mov %esp,%ebp + 12475: 83 ec 04 sub $0x4,%esp + 12478: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1247f: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 12483: 7f 26 jg 124ab <_del_timer+0x39> + 12485: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12488: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 1248f: 3b 45 08 cmp 0x8(%ebp),%eax + 12492: 75 10 jne 124a4 <_del_timer+0x32> + 12494: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12497: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) + 1249e: 00 00 00 00 + 124a2: eb 07 jmp 124ab <_del_timer+0x39> + 124a4: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 124a7: ff 00 incl (%eax) + 124a9: eb d4 jmp 1247f <_del_timer+0xd> + 124ab: c9 leave + 124ac: c3 ret + +000124ad <_rh_urb_enqueue>: + 124ad: 55 push %ebp + 124ae: 89 e5 mov %esp,%ebp + 124b0: 83 ec 18 sub $0x18,%esp + 124b3: 8b 45 0c mov 0xc(%ebp),%eax + 124b6: 8b 40 18 mov 0x18(%eax),%eax + 124b9: c1 e8 1e shr $0x1e,%eax + 124bc: 83 e0 03 and $0x3,%eax + 124bf: 83 f8 01 cmp $0x1,%eax + 124c2: 75 23 jne 124e7 <_rh_urb_enqueue+0x3a> + 124c4: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 124cb: 83 ec 08 sub $0x8,%esp + 124ce: ff 75 0c pushl 0xc(%ebp) + 124d1: ff 75 08 pushl 0x8(%ebp) + 124d4: e8 6d fd ff ff call 12246 <_rh_status_urb> + 124d9: 83 c4 10 add $0x10,%esp + 124dc: 89 45 fc mov %eax,0xfffffffc(%ebp) + 124df: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 124e2: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 124e5: eb 2e jmp 12515 <_rh_urb_enqueue+0x68> + 124e7: 8b 45 0c mov 0xc(%ebp),%eax + 124ea: 8b 40 18 mov 0x18(%eax),%eax + 124ed: c1 e8 1e shr $0x1e,%eax + 124f0: 83 e0 03 and $0x3,%eax + 124f3: 83 f8 02 cmp $0x2,%eax + 124f6: 75 16 jne 1250e <_rh_urb_enqueue+0x61> + 124f8: 83 ec 08 sub $0x8,%esp + 124fb: ff 75 0c pushl 0xc(%ebp) + 124fe: ff 75 08 pushl 0x8(%ebp) + 12501: e8 06 fa ff ff call 11f0c <_rh_call_control> + 12506: 83 c4 10 add $0x10,%esp + 12509: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1250c: eb 07 jmp 12515 <_rh_urb_enqueue+0x68> + 1250e: c7 45 f4 ea ff ff ff movl $0xffffffea,0xfffffff4(%ebp) + 12515: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12518: c9 leave + 12519: c3 ret + +0001251a <_usb_rh_status_dequeue>: + 1251a: 55 push %ebp + 1251b: 89 e5 mov %esp,%ebp + 1251d: 83 ec 08 sub $0x8,%esp + 12520: 83 ec 0c sub $0xc,%esp + 12523: 8b 45 08 mov 0x8(%ebp),%eax + 12526: 83 c0 54 add $0x54,%eax + 12529: 50 push %eax + 1252a: e8 2c 00 00 00 call 1255b <_del_timer_sync> + 1252f: 83 c4 10 add $0x10,%esp + 12532: 8b 45 08 mov 0x8(%ebp),%eax + 12535: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) + 1253c: 8b 45 0c mov 0xc(%ebp),%eax + 1253f: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 12546: 83 ec 04 sub $0x4,%esp + 12549: 6a 00 push $0x0 + 1254b: ff 75 0c pushl 0xc(%ebp) + 1254e: ff 75 08 pushl 0x8(%ebp) + 12551: e8 40 11 00 00 call 13696 <_usb_hcd_giveback_urb@12> + 12556: 83 c4 04 add $0x4,%esp + 12559: c9 leave + 1255a: c3 ret + +0001255b <_del_timer_sync>: + 1255b: 55 push %ebp + 1255c: 89 e5 mov %esp,%ebp + 1255e: 83 ec 04 sub $0x4,%esp + 12561: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 12568: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 1256c: 7f 26 jg 12594 <_del_timer_sync+0x39> + 1256e: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12571: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 12578: 3b 45 08 cmp 0x8(%ebp),%eax + 1257b: 75 10 jne 1258d <_del_timer_sync+0x32> + 1257d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12580: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) + 12587: 00 00 00 00 + 1258b: eb 07 jmp 12594 <_del_timer_sync+0x39> + 1258d: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 12590: ff 00 incl (%eax) + 12592: eb d4 jmp 12568 <_del_timer_sync+0xd> + 12594: c9 leave + 12595: c3 ret + +00012596 <_usb_bus_get>: + 12596: 55 push %ebp + 12597: 89 e5 mov %esp,%ebp + 12599: 8b 45 08 mov 0x8(%ebp),%eax + 1259c: 83 c0 48 add $0x48,%eax + 1259f: 8b 55 08 mov 0x8(%ebp),%edx + 125a2: 83 c2 48 add $0x48,%edx + 125a5: 8b 12 mov (%edx),%edx + 125a7: 42 inc %edx + 125a8: 89 10 mov %edx,(%eax) + 125aa: 5d pop %ebp + 125ab: c3 ret + +000125ac <_usb_bus_put>: + 125ac: 55 push %ebp + 125ad: 89 e5 mov %esp,%ebp + 125af: 83 ec 08 sub $0x8,%esp + 125b2: 8b 55 08 mov 0x8(%ebp),%edx + 125b5: 83 c2 48 add $0x48,%edx + 125b8: 8b 45 08 mov 0x8(%ebp),%eax + 125bb: 83 c0 48 add $0x48,%eax + 125be: 8b 00 mov (%eax),%eax + 125c0: 48 dec %eax + 125c1: 89 02 mov %eax,(%edx) + 125c3: 8b 45 08 mov 0x8(%ebp),%eax + 125c6: 83 c0 48 add $0x48,%eax + 125c9: 83 38 00 cmpl $0x0,(%eax) + 125cc: 75 0e jne 125dc <_usb_bus_put+0x30> + 125ce: 83 ec 0c sub $0xc,%esp + 125d1: ff 75 08 pushl 0x8(%ebp) + 125d4: e8 67 74 00 00 call 19a40 <_ExFreePool@4> + 125d9: 83 c4 0c add $0xc,%esp + 125dc: c9 leave + 125dd: c3 ret + +000125de <_usb_bus_init@4>: + 125de: 55 push %ebp + 125df: 89 e5 mov %esp,%ebp + 125e1: 83 ec 08 sub $0x8,%esp + 125e4: 83 ec 04 sub $0x4,%esp + 125e7: 6a 10 push $0x10 + 125e9: 6a 00 push $0x0 + 125eb: 8b 45 08 mov 0x8(%ebp),%eax + 125ee: 83 c0 10 add $0x10,%eax + 125f1: 50 push %eax + 125f2: e8 59 74 00 00 call 19a50 <_memset> + 125f7: 83 c4 10 add $0x10,%esp + 125fa: 8b 45 08 mov 0x8(%ebp),%eax + 125fd: c7 40 0c 01 00 00 00 movl $0x1,0xc(%eax) + 12604: 8b 45 08 mov 0x8(%ebp),%eax + 12607: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) + 1260e: 8b 45 08 mov 0x8(%ebp),%eax + 12611: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) + 12618: 8b 45 08 mov 0x8(%ebp),%eax + 1261b: c7 40 04 ff ff ff ff movl $0xffffffff,0x4(%eax) + 12622: 8b 45 08 mov 0x8(%ebp),%eax + 12625: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) + 1262c: 8b 45 08 mov 0x8(%ebp),%eax + 1262f: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) + 12636: 8b 45 08 mov 0x8(%ebp),%eax + 12639: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) + 12640: 8b 55 08 mov 0x8(%ebp),%edx + 12643: 83 c2 28 add $0x28,%edx + 12646: 8b 45 08 mov 0x8(%ebp),%eax + 12649: 83 c0 28 add $0x28,%eax + 1264c: 89 02 mov %eax,(%edx) + 1264e: 8b 55 08 mov 0x8(%ebp),%edx + 12651: 83 c2 28 add $0x28,%edx + 12654: 8b 45 08 mov 0x8(%ebp),%eax + 12657: 83 c0 28 add $0x28,%eax + 1265a: 89 42 04 mov %eax,0x4(%edx) + 1265d: 8b 45 08 mov 0x8(%ebp),%eax + 12660: 83 c0 48 add $0x48,%eax + 12663: c7 00 01 00 00 00 movl $0x1,(%eax) + 12669: c9 leave + 1266a: c2 04 00 ret $0x4 + +0001266d <_usb_alloc_bus@4>: + 1266d: 55 push %ebp + 1266e: 89 e5 mov %esp,%ebp + 12670: 83 ec 08 sub $0x8,%esp + 12673: 83 ec 08 sub $0x8,%esp + 12676: 6a 4c push $0x4c + 12678: 6a 01 push $0x1 + 1267a: e8 b1 73 00 00 call 19a30 <_ExAllocatePool@8> + 1267f: 83 c4 08 add $0x8,%esp + 12682: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12685: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12689: 75 09 jne 12694 <_usb_alloc_bus@4+0x27> + 1268b: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 12692: eb 1d jmp 126b1 <_usb_alloc_bus@4+0x44> + 12694: 83 ec 0c sub $0xc,%esp + 12697: ff 75 fc pushl 0xfffffffc(%ebp) + 1269a: e8 3f ff ff ff call 125de <_usb_bus_init@4> + 1269f: 83 c4 0c add $0xc,%esp + 126a2: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 126a5: 8b 55 08 mov 0x8(%ebp),%edx + 126a8: 89 50 20 mov %edx,0x20(%eax) + 126ab: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 126ae: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 126b1: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 126b4: c9 leave + 126b5: c2 04 00 ret $0x4 + +000126b8 <_usb_free_bus@4>: + 126b8: 55 push %ebp + 126b9: 89 e5 mov %esp,%ebp + 126bb: 83 ec 08 sub $0x8,%esp + 126be: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 126c2: 75 02 jne 126c6 <_usb_free_bus@4+0xe> + 126c4: eb 0e jmp 126d4 <_usb_free_bus@4+0x1c> + 126c6: 83 ec 0c sub $0xc,%esp + 126c9: ff 75 08 pushl 0x8(%ebp) + 126cc: e8 db fe ff ff call 125ac <_usb_bus_put> + 126d1: 83 c4 10 add $0x10,%esp + 126d4: c9 leave + 126d5: c2 04 00 ret $0x4 + +000126d8 <_usb_register_bus@4>: + 126d8: 55 push %ebp + 126d9: 89 e5 mov %esp,%ebp + 126db: 83 ec 08 sub $0x8,%esp + 126de: 83 ec 04 sub $0x4,%esp + 126e1: 6a 01 push $0x1 + 126e3: 6a 40 push $0x40 + 126e5: 68 10 c0 01 00 push $0x1c010 + 126ea: e8 b4 00 00 00 call 127a3 <_find_next_zero_bit> + 126ef: 83 c4 10 add $0x10,%esp + 126f2: 89 45 fc mov %eax,0xfffffffc(%ebp) + 126f5: 83 7d fc 3f cmpl $0x3f,0xfffffffc(%ebp) + 126f9: 7f 1c jg 12717 <_usb_register_bus@4+0x3f> + 126fb: 83 ec 08 sub $0x8,%esp + 126fe: 68 10 c0 01 00 push $0x1c010 + 12703: ff 75 fc pushl 0xfffffffc(%ebp) + 12706: e8 8a 00 00 00 call 12795 <_set_bit> + 1270b: 83 c4 10 add $0x10,%esp + 1270e: 8b 55 08 mov 0x8(%ebp),%edx + 12711: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12714: 89 42 04 mov %eax,0x4(%edx) + 12717: ff 75 08 pushl 0x8(%ebp) + 1271a: e8 77 fe ff ff call 12596 <_usb_bus_get> + 1271f: 83 c4 04 add $0x4,%esp + 12722: 83 ec 08 sub $0x8,%esp + 12725: 68 00 a0 01 00 push $0x1a000 + 1272a: 8b 45 08 mov 0x8(%ebp),%eax + 1272d: 83 c0 28 add $0x28,%eax + 12730: 50 push %eax + 12731: e8 1a 00 00 00 call 12750 <_list_add> + 12736: 83 c4 10 add $0x10,%esp + 12739: 83 ec 0c sub $0xc,%esp + 1273c: ff 75 08 pushl 0x8(%ebp) + 1273f: e8 07 00 00 00 call 1274b <_usbfs_add_bus> + 12744: 83 c4 10 add $0x10,%esp + 12747: c9 leave + 12748: c2 04 00 ret $0x4 + +0001274b <_usbfs_add_bus>: + 1274b: 55 push %ebp + 1274c: 89 e5 mov %esp,%ebp + 1274e: 5d pop %ebp + 1274f: c3 ret + +00012750 <_list_add>: + 12750: 55 push %ebp + 12751: 89 e5 mov %esp,%ebp + 12753: 83 ec 08 sub $0x8,%esp + 12756: 83 ec 04 sub $0x4,%esp + 12759: 8b 45 0c mov 0xc(%ebp),%eax + 1275c: ff 30 pushl (%eax) + 1275e: ff 75 0c pushl 0xc(%ebp) + 12761: ff 75 08 pushl 0x8(%ebp) + 12764: e8 05 00 00 00 call 1276e <___list_add> + 12769: 83 c4 10 add $0x10,%esp + 1276c: c9 leave + 1276d: c3 ret + +0001276e <___list_add>: + 1276e: 55 push %ebp + 1276f: 89 e5 mov %esp,%ebp + 12771: 8b 55 10 mov 0x10(%ebp),%edx + 12774: 8b 45 08 mov 0x8(%ebp),%eax + 12777: 89 42 04 mov %eax,0x4(%edx) + 1277a: 8b 55 08 mov 0x8(%ebp),%edx + 1277d: 8b 45 10 mov 0x10(%ebp),%eax + 12780: 89 02 mov %eax,(%edx) + 12782: 8b 55 08 mov 0x8(%ebp),%edx + 12785: 8b 45 0c mov 0xc(%ebp),%eax + 12788: 89 42 04 mov %eax,0x4(%edx) + 1278b: 8b 55 0c mov 0xc(%ebp),%edx + 1278e: 8b 45 08 mov 0x8(%ebp),%eax + 12791: 89 02 mov %eax,(%edx) + 12793: 5d pop %ebp + 12794: c3 ret + +00012795 <_set_bit>: + 12795: 55 push %ebp + 12796: 89 e5 mov %esp,%ebp + 12798: 8b 55 0c mov 0xc(%ebp),%edx + 1279b: 8b 45 08 mov 0x8(%ebp),%eax + 1279e: 0f ab 02 bts %eax,(%edx) + 127a1: 5d pop %ebp + 127a2: c3 ret + +000127a3 <_find_next_zero_bit>: + 127a3: 55 push %ebp + 127a4: 89 e5 mov %esp,%ebp + 127a6: 83 ec 18 sub $0x18,%esp + 127a9: 8b 45 10 mov 0x10(%ebp),%eax + 127ac: c1 f8 05 sar $0x5,%eax + 127af: c1 e0 02 shl $0x2,%eax + 127b2: 03 45 08 add 0x8(%ebp),%eax + 127b5: 89 45 fc mov %eax,0xfffffffc(%ebp) + 127b8: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 127bf: 8b 45 10 mov 0x10(%ebp),%eax + 127c2: 83 e0 1f and $0x1f,%eax + 127c5: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 127c8: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 127cc: 74 42 je 12810 <_find_next_zero_bit+0x6d> + 127ce: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 127d1: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 127d4: 8b 00 mov (%eax),%eax + 127d6: d3 e8 shr %cl,%eax + 127d8: f7 d0 not %eax + 127da: 0f bc c0 bsf %eax,%eax + 127dd: 75 05 jne 127e4 <_find_next_zero_bit+0x41> + 127df: b8 20 00 00 00 mov $0x20,%eax + 127e4: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 127e7: b8 20 00 00 00 mov $0x20,%eax + 127ec: 2b 45 f4 sub 0xfffffff4(%ebp),%eax + 127ef: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 127f2: 7e 0b jle 127ff <_find_next_zero_bit+0x5c> + 127f4: 8b 45 10 mov 0x10(%ebp),%eax + 127f7: 03 45 f8 add 0xfffffff8(%ebp),%eax + 127fa: 89 45 ec mov %eax,0xffffffec(%ebp) + 127fd: eb 43 jmp 12842 <_find_next_zero_bit+0x9f> + 127ff: b8 20 00 00 00 mov $0x20,%eax + 12804: 2b 45 f4 sub 0xfffffff4(%ebp),%eax + 12807: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1280a: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1280d: 83 00 04 addl $0x4,(%eax) + 12810: 83 ec 08 sub $0x8,%esp + 12813: 8b 55 08 mov 0x8(%ebp),%edx + 12816: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12819: 29 d0 sub %edx,%eax + 1281b: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 12822: 8b 45 0c mov 0xc(%ebp),%eax + 12825: 29 d0 sub %edx,%eax + 12827: 50 push %eax + 12828: ff 75 fc pushl 0xfffffffc(%ebp) + 1282b: e8 17 00 00 00 call 12847 <_find_first_zero_bit> + 12830: 83 c4 10 add $0x10,%esp + 12833: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12836: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12839: 03 45 10 add 0x10(%ebp),%eax + 1283c: 03 45 f0 add 0xfffffff0(%ebp),%eax + 1283f: 89 45 ec mov %eax,0xffffffec(%ebp) + 12842: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12845: c9 leave + 12846: c3 ret + +00012847 <_find_first_zero_bit>: + 12847: 55 push %ebp + 12848: 89 e5 mov %esp,%ebp + 1284a: 57 push %edi + 1284b: 53 push %ebx + 1284c: 83 ec 14 sub $0x14,%esp + 1284f: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 12853: 75 09 jne 1285e <_find_first_zero_bit+0x17> + 12855: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 1285c: eb 48 jmp 128a6 <_find_first_zero_bit+0x5f> + 1285e: 8b 45 0c mov 0xc(%ebp),%eax + 12861: 83 c0 1f add $0x1f,%eax + 12864: 89 c1 mov %eax,%ecx + 12866: c1 e9 05 shr $0x5,%ecx + 12869: 8b 7d 08 mov 0x8(%ebp),%edi + 1286c: 8b 5d 08 mov 0x8(%ebp),%ebx + 1286f: b8 ff ff ff ff mov $0xffffffff,%eax + 12874: 31 d2 xor %edx,%edx + 12876: f3 af repz scas %es:(%edi),%eax + 12878: 74 09 je 12883 <_find_first_zero_bit+0x3c> + 1287a: 33 47 fc xor 0xfffffffc(%edi),%eax + 1287d: 83 ef 04 sub $0x4,%edi + 12880: 0f bc d0 bsf %eax,%edx + 12883: 29 df sub %ebx,%edi + 12885: c1 e7 03 shl $0x3,%edi + 12888: 01 fa add %edi,%edx + 1288a: 89 c3 mov %eax,%ebx + 1288c: 89 d0 mov %edx,%eax + 1288e: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 12891: 89 c8 mov %ecx,%eax + 12893: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12896: 89 f8 mov %edi,%eax + 12898: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1289b: 89 d8 mov %ebx,%eax + 1289d: 89 45 ec mov %eax,0xffffffec(%ebp) + 128a0: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 128a3: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 128a6: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 128a9: 83 c4 14 add $0x14,%esp + 128ac: 5b pop %ebx + 128ad: 5f pop %edi + 128ae: 5d pop %ebp + 128af: c3 ret + +000128b0 <_usb_deregister_bus@4>: + 128b0: 55 push %ebp + 128b1: 89 e5 mov %esp,%ebp + 128b3: 83 ec 08 sub $0x8,%esp + 128b6: 83 ec 0c sub $0xc,%esp + 128b9: 8b 45 08 mov 0x8(%ebp),%eax + 128bc: 83 c0 28 add $0x28,%eax + 128bf: 50 push %eax + 128c0: e8 4c 00 00 00 call 12911 <_list_del> + 128c5: 83 c4 10 add $0x10,%esp + 128c8: 83 ec 0c sub $0xc,%esp + 128cb: ff 75 08 pushl 0x8(%ebp) + 128ce: e8 39 00 00 00 call 1290c <_usbfs_remove_bus> + 128d3: 83 c4 10 add $0x10,%esp + 128d6: 83 ec 08 sub $0x8,%esp + 128d9: 68 10 c0 01 00 push $0x1c010 + 128de: 8b 45 08 mov 0x8(%ebp),%eax + 128e1: ff 70 04 pushl 0x4(%eax) + 128e4: e8 15 00 00 00 call 128fe <_clear_bit> + 128e9: 83 c4 10 add $0x10,%esp + 128ec: 83 ec 0c sub $0xc,%esp + 128ef: ff 75 08 pushl 0x8(%ebp) + 128f2: e8 b5 fc ff ff call 125ac <_usb_bus_put> + 128f7: 83 c4 10 add $0x10,%esp + 128fa: c9 leave + 128fb: c2 04 00 ret $0x4 + +000128fe <_clear_bit>: + 128fe: 55 push %ebp + 128ff: 89 e5 mov %esp,%ebp + 12901: 8b 55 0c mov 0xc(%ebp),%edx + 12904: 8b 45 08 mov 0x8(%ebp),%eax + 12907: 0f b3 02 btr %eax,(%edx) + 1290a: 5d pop %ebp + 1290b: c3 ret + +0001290c <_usbfs_remove_bus>: + 1290c: 55 push %ebp + 1290d: 89 e5 mov %esp,%ebp + 1290f: 5d pop %ebp + 12910: c3 ret + +00012911 <_list_del>: + 12911: 55 push %ebp + 12912: 89 e5 mov %esp,%ebp + 12914: 83 ec 08 sub $0x8,%esp + 12917: 83 ec 08 sub $0x8,%esp + 1291a: 8b 45 08 mov 0x8(%ebp),%eax + 1291d: ff 30 pushl (%eax) + 1291f: 8b 45 08 mov 0x8(%ebp),%eax + 12922: ff 70 04 pushl 0x4(%eax) + 12925: e8 18 00 00 00 call 12942 <___list_del> + 1292a: 83 c4 10 add $0x10,%esp + 1292d: 8b 45 08 mov 0x8(%ebp),%eax + 12930: c7 00 00 00 00 00 movl $0x0,(%eax) + 12936: 8b 45 08 mov 0x8(%ebp),%eax + 12939: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) + 12940: c9 leave + 12941: c3 ret + +00012942 <___list_del>: + 12942: 55 push %ebp + 12943: 89 e5 mov %esp,%ebp + 12945: 8b 55 0c mov 0xc(%ebp),%edx + 12948: 8b 45 08 mov 0x8(%ebp),%eax + 1294b: 89 42 04 mov %eax,0x4(%edx) + 1294e: 8b 55 08 mov 0x8(%ebp),%edx + 12951: 8b 45 0c mov 0xc(%ebp),%eax + 12954: 89 02 mov %eax,(%edx) + 12956: 5d pop %ebp + 12957: c3 ret + +00012958 <_usb_register_root_hub@8>: + 12958: 55 push %ebp + 12959: 89 e5 mov %esp,%ebp + 1295b: 83 ec 08 sub $0x8,%esp + 1295e: 83 ec 04 sub $0x4,%esp + 12961: 8b 45 08 mov 0x8(%ebp),%eax + 12964: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1296a: ff 70 04 pushl 0x4(%eax) + 1296d: 68 b9 b0 01 00 push $0x1b0b9 + 12972: 8b 45 08 mov 0x8(%ebp),%eax + 12975: 05 48 01 00 00 add $0x148,%eax + 1297a: 50 push %eax + 1297b: e8 10 71 00 00 call 19a90 <_sprintf> + 12980: 83 c4 10 add $0x10,%esp + 12983: 8b 45 08 mov 0x8(%ebp),%eax + 12986: c7 40 14 03 00 00 00 movl $0x3,0x14(%eax) + 1298d: 83 ec 08 sub $0x8,%esp + 12990: ff 75 0c pushl 0xc(%ebp) + 12993: ff 75 08 pushl 0x8(%ebp) + 12996: e8 f8 41 00 00 call 16b93 <_usb_new_device> + 1299b: 83 c4 10 add $0x10,%esp + 1299e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 129a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 129a4: c9 leave + 129a5: c2 08 00 ret $0x8 + +000129a8 <_usb_calc_bus_time@16>: + 129a8: 55 push %ebp + 129a9: 89 e5 mov %esp,%ebp + 129ab: 83 ec 14 sub $0x14,%esp + 129ae: 8b 45 08 mov 0x8(%ebp),%eax + 129b1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 129b4: 83 7d f0 02 cmpl $0x2,0xfffffff0(%ebp) + 129b8: 0f 84 21 01 00 00 je 12adf <_usb_calc_bus_time@16+0x137> + 129be: 83 7d f0 02 cmpl $0x2,0xfffffff0(%ebp) + 129c2: 7f 0b jg 129cf <_usb_calc_bus_time@16+0x27> + 129c4: 83 7d f0 01 cmpl $0x1,0xfffffff0(%ebp) + 129c8: 74 14 je 129de <_usb_calc_bus_time@16+0x36> + 129ca: e9 e4 02 00 00 jmp 12cb3 <_usb_calc_bus_time@16+0x30b> + 129cf: 83 7d f0 03 cmpl $0x3,0xfffffff0(%ebp) + 129d3: 0f 84 12 02 00 00 je 12beb <_usb_calc_bus_time@16+0x243> + 129d9: e9 d5 02 00 00 jmp 12cb3 <_usb_calc_bus_time@16+0x30b> + 129de: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 129e2: 74 76 je 12a5a <_usb_calc_bus_time@16+0xb2> + 129e4: 8b 55 14 mov 0x14(%ebp),%edx + 129e7: 89 d0 mov %edx,%eax + 129e9: c1 e0 03 shl $0x3,%eax + 129ec: 29 d0 sub %edx,%eax + 129ee: c1 e0 03 shl $0x3,%eax + 129f1: 89 45 ec mov %eax,0xffffffec(%ebp) + 129f4: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 129f9: f7 6d ec imull 0xffffffec(%ebp) + 129fc: 89 d1 mov %edx,%ecx + 129fe: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12a01: c1 f8 1f sar $0x1f,%eax + 12a04: 89 ca mov %ecx,%edx + 12a06: 29 c2 sub %eax,%edx + 12a08: 89 d0 mov %edx,%eax + 12a0a: c1 e0 02 shl $0x2,%eax + 12a0d: 01 d0 add %edx,%eax + 12a0f: c1 e0 03 shl $0x3,%eax + 12a12: 01 d0 add %edx,%eax + 12a14: c1 e0 02 shl $0x2,%eax + 12a17: 01 d0 add %edx,%eax + 12a19: c1 e0 03 shl $0x3,%eax + 12a1c: 01 d0 add %edx,%eax + 12a1e: 01 c0 add %eax,%eax + 12a20: 01 d0 add %edx,%eax + 12a22: c1 e0 02 shl $0x2,%eax + 12a25: 01 d0 add %edx,%eax + 12a27: c1 e0 05 shl $0x5,%eax + 12a2a: 29 d0 sub %edx,%eax + 12a2c: 01 c0 add %eax,%eax + 12a2e: 8d 88 0d 02 20 00 lea 0x20020d(%eax),%ecx + 12a34: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12a39: f7 e9 imul %ecx + 12a3b: c1 fa 06 sar $0x6,%edx + 12a3e: 89 c8 mov %ecx,%eax + 12a40: c1 f8 1f sar $0x1f,%eax + 12a43: 29 c2 sub %eax,%edx + 12a45: 89 d0 mov %edx,%eax + 12a47: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12a4a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12a4d: 05 be 00 01 00 add $0x100be,%eax + 12a52: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12a55: e9 60 02 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> + 12a5a: 8b 55 14 mov 0x14(%ebp),%edx + 12a5d: 89 d0 mov %edx,%eax + 12a5f: c1 e0 03 shl $0x3,%eax + 12a62: 29 d0 sub %edx,%eax + 12a64: c1 e0 03 shl $0x3,%eax + 12a67: 89 45 ec mov %eax,0xffffffec(%ebp) + 12a6a: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 12a6f: f7 6d ec imull 0xffffffec(%ebp) + 12a72: 89 d1 mov %edx,%ecx + 12a74: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12a77: c1 f8 1f sar $0x1f,%eax + 12a7a: 29 c1 sub %eax,%ecx + 12a7c: 89 c8 mov %ecx,%eax + 12a7e: c1 e0 03 shl $0x3,%eax + 12a81: 01 c8 add %ecx,%eax + 12a83: c1 e0 02 shl $0x2,%eax + 12a86: 01 c8 add %ecx,%eax + 12a88: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 12a8f: 01 d0 add %edx,%eax + 12a91: 01 c0 add %eax,%eax + 12a93: 01 c8 add %ecx,%eax + 12a95: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 12a9c: 01 d0 add %edx,%eax + 12a9e: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 12aa5: 01 d0 add %edx,%eax + 12aa7: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 12aae: 01 d0 add %edx,%eax + 12ab0: c1 e0 03 shl $0x3,%eax + 12ab3: 8d 88 f4 8c 1f 00 lea 0x1f8cf4(%eax),%ecx + 12ab9: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12abe: f7 e9 imul %ecx + 12ac0: c1 fa 06 sar $0x6,%edx + 12ac3: 89 c8 mov %ecx,%eax + 12ac5: c1 f8 1f sar $0x1f,%eax + 12ac8: 29 c2 sub %eax,%edx + 12aca: 89 d0 mov %edx,%eax + 12acc: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12acf: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12ad2: 05 ed 00 01 00 add $0x100ed,%eax + 12ad7: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12ada: e9 db 01 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> + 12adf: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 12ae3: 0f 84 8e 00 00 00 je 12b77 <_usb_calc_bus_time@16+0x1cf> + 12ae9: 8b 55 14 mov 0x14(%ebp),%edx + 12aec: 89 d0 mov %edx,%eax + 12aee: c1 e0 03 shl $0x3,%eax + 12af1: 29 d0 sub %edx,%eax + 12af3: c1 e0 03 shl $0x3,%eax + 12af6: 89 45 ec mov %eax,0xffffffec(%ebp) + 12af9: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 12afe: f7 6d ec imull 0xffffffec(%ebp) + 12b01: 89 d1 mov %edx,%ecx + 12b03: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12b06: c1 f8 1f sar $0x1f,%eax + 12b09: 29 c1 sub %eax,%ecx + 12b0b: 89 c8 mov %ecx,%eax + 12b0d: c1 e0 03 shl $0x3,%eax + 12b10: 01 c8 add %ecx,%eax + 12b12: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 12b19: 01 d0 add %edx,%eax + 12b1b: 01 c0 add %eax,%eax + 12b1d: 01 c8 add %ecx,%eax + 12b1f: c1 e0 03 shl $0x3,%eax + 12b22: 01 c8 add %ecx,%eax + 12b24: c1 e0 02 shl $0x2,%eax + 12b27: 01 c8 add %ecx,%eax + 12b29: c1 e0 02 shl $0x2,%eax + 12b2c: 01 c8 add %ecx,%eax + 12b2e: c1 e0 02 shl $0x2,%eax + 12b31: 8d 88 9e f3 03 00 lea 0x3f39e(%eax),%ecx + 12b37: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12b3c: f7 e9 imul %ecx + 12b3e: c1 fa 06 sar $0x6,%edx + 12b41: 89 c8 mov %ecx,%eax + 12b43: c1 f8 1f sar $0x1f,%eax + 12b46: 29 c2 sub %eax,%edx + 12b48: 89 d0 mov %edx,%eax + 12b4a: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12b4d: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 12b51: 74 0d je 12b60 <_usb_calc_bus_time@16+0x1b8> + 12b53: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12b56: 05 4c 20 00 00 add $0x204c,%eax + 12b5b: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12b5e: eb 0c jmp 12b6c <_usb_calc_bus_time@16+0x1c4> + 12b60: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12b63: 81 c2 61 1c 00 00 add $0x1c61,%edx + 12b69: 89 55 f4 mov %edx,0xfffffff4(%ebp) + 12b6c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12b6f: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12b72: e9 43 01 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> + 12b77: 8b 55 14 mov 0x14(%ebp),%edx + 12b7a: 89 d0 mov %edx,%eax + 12b7c: c1 e0 03 shl $0x3,%eax + 12b7f: 29 d0 sub %edx,%eax + 12b81: c1 e0 03 shl $0x3,%eax + 12b84: 89 45 ec mov %eax,0xffffffec(%ebp) + 12b87: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 12b8c: f7 6d ec imull 0xffffffec(%ebp) + 12b8f: 89 d1 mov %edx,%ecx + 12b91: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12b94: c1 f8 1f sar $0x1f,%eax + 12b97: 29 c1 sub %eax,%ecx + 12b99: 89 c8 mov %ecx,%eax + 12b9b: c1 e0 03 shl $0x3,%eax + 12b9e: 01 c8 add %ecx,%eax + 12ba0: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 12ba7: 01 d0 add %edx,%eax + 12ba9: 01 c0 add %eax,%eax + 12bab: 01 c8 add %ecx,%eax + 12bad: c1 e0 03 shl $0x3,%eax + 12bb0: 01 c8 add %ecx,%eax + 12bb2: c1 e0 02 shl $0x2,%eax + 12bb5: 01 c8 add %ecx,%eax + 12bb7: c1 e0 02 shl $0x2,%eax + 12bba: 01 c8 add %ecx,%eax + 12bbc: c1 e0 02 shl $0x2,%eax + 12bbf: 8d 88 9e f3 03 00 lea 0x3f39e(%eax),%ecx + 12bc5: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12bca: f7 e9 imul %ecx + 12bcc: c1 fa 06 sar $0x6,%edx + 12bcf: 89 c8 mov %ecx,%eax + 12bd1: c1 f8 1f sar $0x1f,%eax + 12bd4: 29 c2 sub %eax,%edx + 12bd6: 89 d0 mov %edx,%eax + 12bd8: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12bdb: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12bde: 05 7b 27 00 00 add $0x277b,%eax + 12be3: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12be6: e9 cf 00 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> + 12beb: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 12bef: 74 5e je 12c4f <_usb_calc_bus_time@16+0x2a7> + 12bf1: 8b 55 14 mov 0x14(%ebp),%edx + 12bf4: 89 d0 mov %edx,%eax + 12bf6: c1 e0 03 shl $0x3,%eax + 12bf9: 29 d0 sub %edx,%eax + 12bfb: c1 e0 03 shl $0x3,%eax + 12bfe: 89 45 ec mov %eax,0xffffffec(%ebp) + 12c01: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 12c06: f7 6d ec imull 0xffffffec(%ebp) + 12c09: 89 d1 mov %edx,%ecx + 12c0b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12c0e: c1 f8 1f sar $0x1f,%eax + 12c11: 89 ca mov %ecx,%edx + 12c13: 29 c2 sub %eax,%edx + 12c15: 89 d0 mov %edx,%eax + 12c17: c1 e0 06 shl $0x6,%eax + 12c1a: 01 d0 add %edx,%eax + 12c1c: c1 e0 03 shl $0x3,%eax + 12c1f: 01 d0 add %edx,%eax + 12c21: c1 e0 02 shl $0x2,%eax + 12c24: 29 d0 sub %edx,%eax + 12c26: 8d 90 fd a8 64 00 lea 0x64a8fd(%eax),%edx + 12c2c: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12c31: f7 e2 mul %edx + 12c33: 89 d0 mov %edx,%eax + 12c35: c1 e8 06 shr $0x6,%eax + 12c38: 8d 90 8d 05 00 00 lea 0x58d(%eax),%edx + 12c3e: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12c43: f7 e2 mul %edx + 12c45: 89 d0 mov %edx,%eax + 12c47: c1 e8 06 shr $0x6,%eax + 12c4a: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12c4d: eb 5c jmp 12cab <_usb_calc_bus_time@16+0x303> + 12c4f: 8b 55 14 mov 0x14(%ebp),%edx + 12c52: 89 d0 mov %edx,%eax + 12c54: c1 e0 03 shl $0x3,%eax + 12c57: 29 d0 sub %edx,%eax + 12c59: c1 e0 03 shl $0x3,%eax + 12c5c: 89 45 ec mov %eax,0xffffffec(%ebp) + 12c5f: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 12c64: f7 6d ec imull 0xffffffec(%ebp) + 12c67: 89 d1 mov %edx,%ecx + 12c69: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12c6c: c1 f8 1f sar $0x1f,%eax + 12c6f: 89 ca mov %ecx,%edx + 12c71: 29 c2 sub %eax,%edx + 12c73: 89 d0 mov %edx,%eax + 12c75: c1 e0 06 shl $0x6,%eax + 12c78: 01 d0 add %edx,%eax + 12c7a: c1 e0 03 shl $0x3,%eax + 12c7d: 01 d0 add %edx,%eax + 12c7f: c1 e0 02 shl $0x2,%eax + 12c82: 29 d0 sub %edx,%eax + 12c84: 8d 90 fd a8 64 00 lea 0x64a8fd(%eax),%edx + 12c8a: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12c8f: f7 e2 mul %edx + 12c91: 89 d0 mov %edx,%eax + 12c93: c1 e8 06 shr $0x6,%eax + 12c96: 8d 90 72 04 00 00 lea 0x472(%eax),%edx + 12c9c: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12ca1: f7 e2 mul %edx + 12ca3: 89 d0 mov %edx,%eax + 12ca5: c1 e8 06 shr $0x6,%eax + 12ca8: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12cab: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12cae: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12cb1: eb 07 jmp 12cba <_usb_calc_bus_time@16+0x312> + 12cb3: c7 45 f8 ff ff ff ff movl $0xffffffff,0xfffffff8(%ebp) + 12cba: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12cbd: c9 leave + 12cbe: c2 10 00 ret $0x10 + +00012cc1 <_usb_check_bandwidth@8>: + 12cc1: 55 push %ebp + 12cc2: 89 e5 mov %esp,%ebp + 12cc4: 83 ec 20 sub $0x20,%esp + 12cc7: 8b 45 0c mov 0xc(%ebp),%eax + 12cca: 8b 40 18 mov 0x18(%eax),%eax + 12ccd: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12cd0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12cd3: 25 80 00 00 00 and $0x80,%eax + 12cd8: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12cdb: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12cde: c1 e8 1e shr $0x1e,%eax + 12ce1: 83 e0 03 and $0x3,%eax + 12ce4: 85 c0 test %eax,%eax + 12ce6: 0f 94 c0 sete %al + 12ce9: 25 ff 00 00 00 and $0xff,%eax + 12cee: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12cf1: 8b 45 08 mov 0x8(%ebp),%eax + 12cf4: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12cfa: 8b 40 34 mov 0x34(%eax),%eax + 12cfd: 89 45 ec mov %eax,0xffffffec(%ebp) + 12d00: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 12d04: 75 15 jne 12d1b <_usb_check_bandwidth@8+0x5a> + 12d06: 8b 55 08 mov 0x8(%ebp),%edx + 12d09: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12d0c: c1 e8 0f shr $0xf,%eax + 12d0f: 83 e0 0f and $0xf,%eax + 12d12: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax + 12d16: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 12d19: eb 13 jmp 12d2e <_usb_check_bandwidth@8+0x6d> + 12d1b: 8b 55 08 mov 0x8(%ebp),%edx + 12d1e: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12d21: c1 e8 0f shr $0xf,%eax + 12d24: 83 e0 0f and $0xf,%eax + 12d27: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax + 12d2b: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 12d2e: ff 75 e4 pushl 0xffffffe4(%ebp) + 12d31: ff 75 f0 pushl 0xfffffff0(%ebp) + 12d34: ff 75 f4 pushl 0xfffffff4(%ebp) + 12d37: 8b 45 08 mov 0x8(%ebp),%eax + 12d3a: ff 70 18 pushl 0x18(%eax) + 12d3d: e8 66 fc ff ff call 129a8 <_usb_calc_bus_time@16> + 12d42: 8d 88 f4 01 00 00 lea 0x1f4(%eax),%ecx + 12d48: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12d4d: f7 e9 imul %ecx + 12d4f: c1 fa 06 sar $0x6,%edx + 12d52: 89 c8 mov %ecx,%eax + 12d54: c1 f8 1f sar $0x1f,%eax + 12d57: 29 c2 sub %eax,%edx + 12d59: 89 d0 mov %edx,%eax + 12d5b: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12d5e: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 12d62: 74 13 je 12d77 <_usb_check_bandwidth@8+0xb6> + 12d64: 8b 45 0c mov 0xc(%ebp),%eax + 12d67: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 12d6a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12d6d: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx + 12d70: 99 cltd + 12d71: f7 79 44 idivl 0x44(%ecx) + 12d74: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12d77: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12d7a: 03 45 ec add 0xffffffec(%ebp),%eax + 12d7d: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 12d80: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12d83: c9 leave + 12d84: c2 08 00 ret $0x8 + +00012d87 <_usb_claim_bandwidth@16>: + 12d87: 55 push %ebp + 12d88: 89 e5 mov %esp,%ebp + 12d8a: 8b 45 08 mov 0x8(%ebp),%eax + 12d8d: 8b 88 bc 00 00 00 mov 0xbc(%eax),%ecx + 12d93: 8b 45 08 mov 0x8(%ebp),%eax + 12d96: 8b 90 bc 00 00 00 mov 0xbc(%eax),%edx + 12d9c: 8b 45 10 mov 0x10(%ebp),%eax + 12d9f: 03 42 34 add 0x34(%edx),%eax + 12da2: 89 41 34 mov %eax,0x34(%ecx) + 12da5: 83 7d 14 00 cmpl $0x0,0x14(%ebp) + 12da9: 74 0e je 12db9 <_usb_claim_bandwidth@16+0x32> + 12dab: 8b 45 08 mov 0x8(%ebp),%eax + 12dae: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12db4: ff 40 3c incl 0x3c(%eax) + 12db7: eb 0c jmp 12dc5 <_usb_claim_bandwidth@16+0x3e> + 12db9: 8b 45 08 mov 0x8(%ebp),%eax + 12dbc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12dc2: ff 40 38 incl 0x38(%eax) + 12dc5: 8b 55 0c mov 0xc(%ebp),%edx + 12dc8: 8b 45 10 mov 0x10(%ebp),%eax + 12dcb: 89 42 34 mov %eax,0x34(%edx) + 12dce: 5d pop %ebp + 12dcf: c2 10 00 ret $0x10 + +00012dd2 <_usb_release_bandwidth@12>: + 12dd2: 55 push %ebp + 12dd3: 89 e5 mov %esp,%ebp + 12dd5: 53 push %ebx + 12dd6: 8b 45 08 mov 0x8(%ebp),%eax + 12dd9: 8b 98 bc 00 00 00 mov 0xbc(%eax),%ebx + 12ddf: 8b 45 08 mov 0x8(%ebp),%eax + 12de2: 8b 88 bc 00 00 00 mov 0xbc(%eax),%ecx + 12de8: 8b 45 0c mov 0xc(%ebp),%eax + 12deb: 8b 50 34 mov 0x34(%eax),%edx + 12dee: 8b 41 34 mov 0x34(%ecx),%eax + 12df1: 29 d0 sub %edx,%eax + 12df3: 89 43 34 mov %eax,0x34(%ebx) + 12df6: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 12dfa: 74 0e je 12e0a <_usb_release_bandwidth@12+0x38> + 12dfc: 8b 45 08 mov 0x8(%ebp),%eax + 12dff: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12e05: ff 48 3c decl 0x3c(%eax) + 12e08: eb 0c jmp 12e16 <_usb_release_bandwidth@12+0x44> + 12e0a: 8b 45 08 mov 0x8(%ebp),%eax + 12e0d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12e13: ff 48 38 decl 0x38(%eax) + 12e16: 8b 45 0c mov 0xc(%ebp),%eax + 12e19: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) + 12e20: 5b pop %ebx + 12e21: 5d pop %ebp + 12e22: c2 0c 00 ret $0xc + +00012e25 <_hcd_alloc_dev>: + 12e25: 55 push %ebp + 12e26: 89 e5 mov %esp,%ebp + 12e28: 83 ec 18 sub $0x18,%esp + 12e2b: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 12e2f: 74 0e je 12e3f <_hcd_alloc_dev+0x1a> + 12e31: 8b 45 08 mov 0x8(%ebp),%eax + 12e34: 83 b8 98 01 00 00 00 cmpl $0x0,0x198(%eax) + 12e3b: 75 02 jne 12e3f <_hcd_alloc_dev+0x1a> + 12e3d: eb 0c jmp 12e4b <_hcd_alloc_dev+0x26> + 12e3f: c7 45 f0 ea ff ff ff movl $0xffffffea,0xfffffff0(%ebp) + 12e46: e9 e7 00 00 00 jmp 12f32 <_hcd_alloc_dev+0x10d> + 12e4b: 8b 45 08 mov 0x8(%ebp),%eax + 12e4e: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 12e55: 74 0f je 12e66 <_hcd_alloc_dev+0x41> + 12e57: 8b 45 08 mov 0x8(%ebp),%eax + 12e5a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12e60: 83 78 30 00 cmpl $0x0,0x30(%eax) + 12e64: 75 0c jne 12e72 <_hcd_alloc_dev+0x4d> + 12e66: c7 45 f0 ed ff ff ff movl $0xffffffed,0xfffffff0(%ebp) + 12e6d: e9 c0 00 00 00 jmp 12f32 <_hcd_alloc_dev+0x10d> + 12e72: 8b 45 08 mov 0x8(%ebp),%eax + 12e75: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12e7b: 8b 40 30 mov 0x30(%eax),%eax + 12e7e: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12e81: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12e84: 81 b8 e0 00 00 00 85 cmpl $0x85,0xe0(%eax) + 12e8b: 00 00 00 + 12e8e: 75 0c jne 12e9c <_hcd_alloc_dev+0x77> + 12e90: c7 45 f0 bd ff ff ff movl $0xffffffbd,0xfffffff0(%ebp) + 12e97: e9 96 00 00 00 jmp 12f32 <_hcd_alloc_dev+0x10d> + 12e9c: 83 ec 08 sub $0x8,%esp + 12e9f: 68 90 00 00 00 push $0x90 + 12ea4: 6a 01 push $0x1 + 12ea6: e8 85 6b 00 00 call 19a30 <_ExAllocatePool@8> + 12eab: 83 c4 08 add $0x8,%esp + 12eae: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12eb1: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12eb5: 75 09 jne 12ec0 <_hcd_alloc_dev+0x9b> + 12eb7: c7 45 f0 f4 ff ff ff movl $0xfffffff4,0xfffffff0(%ebp) + 12ebe: eb 72 jmp 12f32 <_hcd_alloc_dev+0x10d> + 12ec0: 83 ec 04 sub $0x4,%esp + 12ec3: 68 90 00 00 00 push $0x90 + 12ec8: 6a 00 push $0x0 + 12eca: ff 75 fc pushl 0xfffffffc(%ebp) + 12ecd: e8 7e 6b 00 00 call 19a50 <_memset> + 12ed2: 83 c4 10 add $0x10,%esp + 12ed5: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12ed8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12edb: 89 02 mov %eax,(%edx) + 12edd: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12ee0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12ee3: 89 42 04 mov %eax,0x4(%edx) + 12ee6: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12ee9: 83 c2 08 add $0x8,%edx + 12eec: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12eef: 83 c0 08 add $0x8,%eax + 12ef2: 89 02 mov %eax,(%edx) + 12ef4: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12ef7: 83 c2 08 add $0x8,%edx + 12efa: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12efd: 83 c0 08 add $0x8,%eax + 12f00: 89 42 04 mov %eax,0x4(%edx) + 12f03: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 12f0a: 83 ec 08 sub $0x8,%esp + 12f0d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f10: 83 c0 68 add $0x68,%eax + 12f13: 50 push %eax + 12f14: ff 75 fc pushl 0xfffffffc(%ebp) + 12f17: e8 34 f8 ff ff call 12750 <_list_add> + 12f1c: 83 c4 10 add $0x10,%esp + 12f1f: 8b 55 08 mov 0x8(%ebp),%edx + 12f22: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12f25: 89 82 98 01 00 00 mov %eax,0x198(%edx) + 12f2b: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 12f32: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12f35: c9 leave + 12f36: c3 ret + +00012f37 <_urb_unlink>: + 12f37: 55 push %ebp + 12f38: 89 e5 mov %esp,%ebp + 12f3a: 83 ec 08 sub $0x8,%esp + 12f3d: 8b 45 08 mov 0x8(%ebp),%eax + 12f40: 83 78 34 00 cmpl $0x0,0x34(%eax) + 12f44: 74 25 je 12f6b <_urb_unlink+0x34> + 12f46: 8b 45 08 mov 0x8(%ebp),%eax + 12f49: 8b 40 18 mov 0x18(%eax),%eax + 12f4c: c1 e8 1e shr $0x1e,%eax + 12f4f: 83 e0 03 and $0x3,%eax + 12f52: 85 c0 test %eax,%eax + 12f54: 0f 94 c0 sete %al + 12f57: 25 ff 00 00 00 and $0xff,%eax + 12f5c: 50 push %eax + 12f5d: ff 75 08 pushl 0x8(%ebp) + 12f60: 8b 45 08 mov 0x8(%ebp),%eax + 12f63: ff 70 14 pushl 0x14(%eax) + 12f66: e8 67 fe ff ff call 12dd2 <_usb_release_bandwidth@12> + 12f6b: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 12f72: 83 ec 0c sub $0xc,%esp + 12f75: 8b 45 08 mov 0x8(%ebp),%eax + 12f78: 83 c0 0c add $0xc,%eax + 12f7b: 50 push %eax + 12f7c: e8 1c 00 00 00 call 12f9d <_list_del_init> + 12f81: 83 c4 10 add $0x10,%esp + 12f84: 8b 45 08 mov 0x8(%ebp),%eax + 12f87: 8b 40 14 mov 0x14(%eax),%eax + 12f8a: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12f8d: 83 ec 0c sub $0xc,%esp + 12f90: ff 75 f8 pushl 0xfffffff8(%ebp) + 12f93: e8 23 34 00 00 call 163bb <_usb_put_dev@4> + 12f98: 83 c4 0c add $0xc,%esp + 12f9b: c9 leave + 12f9c: c3 ret + +00012f9d <_list_del_init>: + 12f9d: 55 push %ebp + 12f9e: 89 e5 mov %esp,%ebp + 12fa0: 8b 45 08 mov 0x8(%ebp),%eax + 12fa3: ff 30 pushl (%eax) + 12fa5: 8b 45 08 mov 0x8(%ebp),%eax + 12fa8: ff 70 04 pushl 0x4(%eax) + 12fab: e8 92 f9 ff ff call 12942 <___list_del> + 12fb0: 83 c4 08 add $0x8,%esp + 12fb3: 8b 55 08 mov 0x8(%ebp),%edx + 12fb6: 8b 45 08 mov 0x8(%ebp),%eax + 12fb9: 89 02 mov %eax,(%edx) + 12fbb: 8b 55 08 mov 0x8(%ebp),%edx + 12fbe: 8b 45 08 mov 0x8(%ebp),%eax + 12fc1: 89 42 04 mov %eax,0x4(%edx) + 12fc4: c9 leave + 12fc5: c3 ret + +00012fc6 <_hcd_submit_urb>: + 12fc6: 55 push %ebp + 12fc7: 89 e5 mov %esp,%ebp + 12fc9: 83 ec 18 sub $0x18,%esp + 12fcc: 8b 45 08 mov 0x8(%ebp),%eax + 12fcf: 8b 40 14 mov 0x14(%eax),%eax + 12fd2: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12fd8: 8b 40 30 mov 0x30(%eax),%eax + 12fdb: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12fde: 8b 45 08 mov 0x8(%ebp),%eax + 12fe1: 8b 40 14 mov 0x14(%eax),%eax + 12fe4: 8b 80 98 01 00 00 mov 0x198(%eax),%eax + 12fea: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12fed: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 12ff1: 74 06 je 12ff9 <_hcd_submit_urb+0x33> + 12ff3: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 12ff7: 75 0c jne 13005 <_hcd_submit_urb+0x3f> + 12ff9: c7 45 ec ed ff ff ff movl $0xffffffed,0xffffffec(%ebp) + 13000: e9 77 01 00 00 jmp 1317c <_hcd_submit_urb+0x1b6> + 13005: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 1300c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1300f: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax + 13015: 83 e0 01 and $0x1,%eax + 13018: 85 c0 test %eax,%eax + 1301a: 74 42 je 1305e <_hcd_submit_urb+0x98> + 1301c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1301f: 81 b8 e0 00 00 00 85 cmpl $0x85,0xe0(%eax) + 13026: 00 00 00 + 13029: 74 33 je 1305e <_hcd_submit_urb+0x98> + 1302b: 83 ec 0c sub $0xc,%esp + 1302e: 8b 45 08 mov 0x8(%ebp),%eax + 13031: ff 70 14 pushl 0x14(%eax) + 13034: e8 31 33 00 00 call 1636a <_usb_get_dev> + 13039: 83 c4 10 add $0x10,%esp + 1303c: 83 ec 08 sub $0x8,%esp + 1303f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13042: 83 c0 08 add $0x8,%eax + 13045: 50 push %eax + 13046: 8b 45 08 mov 0x8(%ebp),%eax + 13049: 83 c0 0c add $0xc,%eax + 1304c: 50 push %eax + 1304d: e8 2f 01 00 00 call 13181 <_list_add_tail> + 13052: 83 c4 10 add $0x10,%esp + 13055: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1305c: eb 24 jmp 13082 <_hcd_submit_urb+0xbc> + 1305e: 8b 55 08 mov 0x8(%ebp),%edx + 13061: 83 c2 0c add $0xc,%edx + 13064: 8b 45 08 mov 0x8(%ebp),%eax + 13067: 83 c0 0c add $0xc,%eax + 1306a: 89 02 mov %eax,(%edx) + 1306c: 8b 55 08 mov 0x8(%ebp),%edx + 1306f: 83 c2 0c add $0xc,%edx + 13072: 8b 45 08 mov 0x8(%ebp),%eax + 13075: 83 c0 0c add $0xc,%eax + 13078: 89 42 04 mov %eax,0x4(%edx) + 1307b: c7 45 fc 94 ff ff ff movl $0xffffff94,0xfffffffc(%ebp) + 13082: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 13086: 74 0b je 13093 <_hcd_submit_urb+0xcd> + 13088: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1308b: 89 45 ec mov %eax,0xffffffec(%ebp) + 1308e: e9 e9 00 00 00 jmp 1317c <_hcd_submit_urb+0x1b6> + 13093: 83 ec 0c sub $0xc,%esp + 13096: ff 75 08 pushl 0x8(%ebp) + 13099: e8 d2 50 00 00 call 18170 <_usb_get_urb@4> + 1309e: 83 c4 0c add $0xc,%esp + 130a1: 89 45 08 mov %eax,0x8(%ebp) + 130a4: 8b 45 08 mov 0x8(%ebp),%eax + 130a7: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 130aa: 8b 40 14 mov 0x14(%eax),%eax + 130ad: 3b 42 24 cmp 0x24(%edx),%eax + 130b0: 75 25 jne 130d7 <_hcd_submit_urb+0x111> + 130b2: 8b 55 08 mov 0x8(%ebp),%edx + 130b5: 8b 45 08 mov 0x8(%ebp),%eax + 130b8: 8b 40 20 mov 0x20(%eax),%eax + 130bb: 83 c8 04 or $0x4,%eax + 130be: 89 42 20 mov %eax,0x20(%edx) + 130c1: 83 ec 08 sub $0x8,%esp + 130c4: ff 75 08 pushl 0x8(%ebp) + 130c7: ff 75 f8 pushl 0xfffffff8(%ebp) + 130ca: e8 de f3 ff ff call 124ad <_rh_urb_enqueue> + 130cf: 83 c4 10 add $0x10,%esp + 130d2: 89 45 fc mov %eax,0xfffffffc(%ebp) + 130d5: eb 7d jmp 13154 <_hcd_submit_urb+0x18e> + 130d7: 8b 45 08 mov 0x8(%ebp),%eax + 130da: 8b 40 20 mov 0x20(%eax),%eax + 130dd: c1 e8 02 shr $0x2,%eax + 130e0: 83 e0 01 and $0x1,%eax + 130e3: 85 c0 test %eax,%eax + 130e5: 75 50 jne 13137 <_hcd_submit_urb+0x171> + 130e7: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 130ea: 8b 80 80 00 00 00 mov 0x80(%eax),%eax + 130f0: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) + 130f7: 74 3e je 13137 <_hcd_submit_urb+0x171> + 130f9: 8b 45 08 mov 0x8(%ebp),%eax + 130fc: 8b 40 18 mov 0x18(%eax),%eax + 130ff: c1 e8 1e shr $0x1e,%eax + 13102: 83 e0 03 and $0x3,%eax + 13105: 83 f8 02 cmp $0x2,%eax + 13108: 75 12 jne 1311c <_hcd_submit_urb+0x156> + 1310a: 8b 45 08 mov 0x8(%ebp),%eax + 1310d: 8b 55 08 mov 0x8(%ebp),%edx + 13110: 8b 52 38 mov 0x38(%edx),%edx + 13113: 81 e2 ff ff ff 0f and $0xfffffff,%edx + 13119: 89 50 3c mov %edx,0x3c(%eax) + 1311c: 8b 45 08 mov 0x8(%ebp),%eax + 1311f: 83 78 2c 00 cmpl $0x0,0x2c(%eax) + 13123: 74 12 je 13137 <_hcd_submit_urb+0x171> + 13125: 8b 45 08 mov 0x8(%ebp),%eax + 13128: 8b 55 08 mov 0x8(%ebp),%edx + 1312b: 8b 52 24 mov 0x24(%edx),%edx + 1312e: 81 e2 ff ff ff 0f and $0xfffffff,%edx + 13134: 89 50 28 mov %edx,0x28(%eax) + 13137: 83 ec 04 sub $0x4,%esp + 1313a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1313d: 8b 40 74 mov 0x74(%eax),%eax + 13140: ff 75 0c pushl 0xc(%ebp) + 13143: ff 75 08 pushl 0x8(%ebp) + 13146: ff 75 f8 pushl 0xfffffff8(%ebp) + 13149: 8b 40 28 mov 0x28(%eax),%eax + 1314c: ff d0 call *%eax + 1314e: 83 c4 10 add $0x10,%esp + 13151: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13154: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 13158: 74 1c je 13176 <_hcd_submit_urb+0x1b0> + 1315a: 83 ec 0c sub $0xc,%esp + 1315d: ff 75 08 pushl 0x8(%ebp) + 13160: e8 d1 4f 00 00 call 18136 <_usb_free_urb@4> + 13165: 83 c4 0c add $0xc,%esp + 13168: 83 ec 0c sub $0xc,%esp + 1316b: ff 75 08 pushl 0x8(%ebp) + 1316e: e8 c4 fd ff ff call 12f37 <_urb_unlink> + 13173: 83 c4 10 add $0x10,%esp + 13176: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13179: 89 45 ec mov %eax,0xffffffec(%ebp) + 1317c: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1317f: c9 leave + 13180: c3 ret + +00013181 <_list_add_tail>: + 13181: 55 push %ebp + 13182: 89 e5 mov %esp,%ebp + 13184: ff 75 0c pushl 0xc(%ebp) + 13187: 8b 45 0c mov 0xc(%ebp),%eax + 1318a: ff 70 04 pushl 0x4(%eax) + 1318d: ff 75 08 pushl 0x8(%ebp) + 13190: e8 d9 f5 ff ff call 1276e <___list_add> + 13195: 83 c4 0c add $0xc,%esp + 13198: c9 leave + 13199: c3 ret + +0001319a <_hcd_get_frame_number>: + 1319a: 55 push %ebp + 1319b: 89 e5 mov %esp,%ebp + 1319d: 83 ec 08 sub $0x8,%esp + 131a0: 8b 45 08 mov 0x8(%ebp),%eax + 131a3: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 131a9: 8b 40 30 mov 0x30(%eax),%eax + 131ac: 89 45 fc mov %eax,0xfffffffc(%ebp) + 131af: 83 ec 0c sub $0xc,%esp + 131b2: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 131b5: 8b 40 74 mov 0x74(%eax),%eax + 131b8: ff 75 fc pushl 0xfffffffc(%ebp) + 131bb: 8b 40 1c mov 0x1c(%eax),%eax + 131be: ff d0 call *%eax + 131c0: 83 c4 10 add $0x10,%esp + 131c3: c9 leave + 131c4: c3 ret + +000131c5 <_unlink1>: + 131c5: 55 push %ebp + 131c6: 89 e5 mov %esp,%ebp + 131c8: 83 ec 08 sub $0x8,%esp + 131cb: 8b 45 08 mov 0x8(%ebp),%eax + 131ce: 8b 40 58 mov 0x58(%eax),%eax + 131d1: 3b 45 0c cmp 0xc(%ebp),%eax + 131d4: 75 13 jne 131e9 <_unlink1+0x24> + 131d6: 83 ec 08 sub $0x8,%esp + 131d9: ff 75 0c pushl 0xc(%ebp) + 131dc: ff 75 08 pushl 0x8(%ebp) + 131df: e8 36 f3 ff ff call 1251a <_usb_rh_status_dequeue> + 131e4: 83 c4 10 add $0x10,%esp + 131e7: eb 1a jmp 13203 <_unlink1+0x3e> + 131e9: 83 ec 08 sub $0x8,%esp + 131ec: 8b 45 08 mov 0x8(%ebp),%eax + 131ef: 8b 40 74 mov 0x74(%eax),%eax + 131f2: ff 75 0c pushl 0xc(%ebp) + 131f5: ff 75 08 pushl 0x8(%ebp) + 131f8: 8b 40 2c mov 0x2c(%eax),%eax + 131fb: ff d0 call *%eax + 131fd: 83 c4 10 add $0x10,%esp + 13200: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13203: c9 leave + 13204: c3 ret + +00013205 <_unlink_complete>: + 13205: 55 push %ebp + 13206: 89 e5 mov %esp,%ebp + 13208: 83 ec 08 sub $0x8,%esp + 1320b: 8b 45 08 mov 0x8(%ebp),%eax + 1320e: 8b 40 54 mov 0x54(%eax),%eax + 13211: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13214: 8b 55 08 mov 0x8(%ebp),%edx + 13217: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1321a: 8b 40 08 mov 0x8(%eax),%eax + 1321d: 89 42 58 mov %eax,0x58(%edx) + 13220: 8b 55 08 mov 0x8(%ebp),%edx + 13223: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13226: 8b 40 0c mov 0xc(%eax),%eax + 13229: 89 42 54 mov %eax,0x54(%edx) + 1322c: 83 ec 08 sub $0x8,%esp + 1322f: 8b 45 08 mov 0x8(%ebp),%eax + 13232: ff 75 0c pushl 0xc(%ebp) + 13235: ff 75 08 pushl 0x8(%ebp) + 13238: 8b 40 58 mov 0x58(%eax),%eax + 1323b: ff d0 call *%eax + 1323d: 83 c4 10 add $0x10,%esp + 13240: 83 ec 0c sub $0xc,%esp + 13243: ff 75 fc pushl 0xfffffffc(%ebp) + 13246: e8 05 00 00 00 call 13250 <_complete> + 1324b: 83 c4 10 add $0x10,%esp + 1324e: c9 leave + 1324f: c3 ret + +00013250 <_complete>: + 13250: 55 push %ebp + 13251: 89 e5 mov %esp,%ebp + 13253: 83 ec 08 sub $0x8,%esp + 13256: 8b 45 08 mov 0x8(%ebp),%eax + 13259: ff 00 incl (%eax) + 1325b: 83 ec 0c sub $0xc,%esp + 1325e: 8b 45 08 mov 0x8(%ebp),%eax + 13261: 83 c0 04 add $0x4,%eax + 13264: 50 push %eax + 13265: e8 fb 65 00 00 call 19865 <_my_wake_up> + 1326a: 83 c4 10 add $0x10,%esp + 1326d: c9 leave + 1326e: c3 ret + +0001326f <_hcd_unlink_urb>: + 1326f: 55 push %ebp + 13270: 89 e5 mov %esp,%ebp + 13272: 83 ec 38 sub $0x38,%esp + 13275: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 1327c: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 13283: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 13287: 75 0c jne 13295 <_hcd_unlink_urb+0x26> + 13289: c7 45 d0 ea ff ff ff movl $0xffffffea,0xffffffd0(%ebp) + 13290: e9 ab 01 00 00 jmp 13440 <_hcd_unlink_urb+0x1d1> + 13295: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 1329c: c7 05 00 c0 01 00 01 movl $0x1,0x1c000 + 132a3: 00 00 00 + 132a6: 8b 45 08 mov 0x8(%ebp),%eax + 132a9: 83 78 14 00 cmpl $0x0,0x14(%eax) + 132ad: 74 0f je 132be <_hcd_unlink_urb+0x4f> + 132af: 8b 45 08 mov 0x8(%ebp),%eax + 132b2: 8b 40 14 mov 0x14(%eax),%eax + 132b5: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 132bc: 75 0c jne 132ca <_hcd_unlink_urb+0x5b> + 132be: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 132c5: e9 64 01 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> + 132ca: 8b 45 08 mov 0x8(%ebp),%eax + 132cd: 8b 40 14 mov 0x14(%eax),%eax + 132d0: 8b 80 98 01 00 00 mov 0x198(%eax),%eax + 132d6: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 132d9: 8b 45 08 mov 0x8(%ebp),%eax + 132dc: 8b 40 14 mov 0x14(%eax),%eax + 132df: 05 c0 00 00 00 add $0xc0,%eax + 132e4: 89 45 ec mov %eax,0xffffffec(%ebp) + 132e7: 8b 45 08 mov 0x8(%ebp),%eax + 132ea: 8b 40 14 mov 0x14(%eax),%eax + 132ed: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 132f3: 8b 40 30 mov 0x30(%eax),%eax + 132f6: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 132f9: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 132fd: 74 06 je 13305 <_hcd_unlink_urb+0x96> + 132ff: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 13303: 75 0c jne 13311 <_hcd_unlink_urb+0xa2> + 13305: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 1330c: e9 1d 01 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> + 13311: 8b 45 08 mov 0x8(%ebp),%eax + 13314: 83 78 08 00 cmpl $0x0,0x8(%eax) + 13318: 75 0c jne 13326 <_hcd_unlink_urb+0xb7> + 1331a: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 13321: e9 08 01 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> + 13326: 8b 45 08 mov 0x8(%ebp),%eax + 13329: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 1332d: 74 0c je 1333b <_hcd_unlink_urb+0xcc> + 1332f: c7 45 d4 f0 ff ff ff movl $0xfffffff0,0xffffffd4(%ebp) + 13336: e9 f3 00 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> + 1333b: 8b 45 08 mov 0x8(%ebp),%eax + 1333e: 8b 40 20 mov 0x20(%eax),%eax + 13341: c1 e8 03 shr $0x3,%eax + 13344: 83 e0 01 and $0x1,%eax + 13347: 85 c0 test %eax,%eax + 13349: 75 38 jne 13383 <_hcd_unlink_urb+0x114> + 1334b: c7 45 d8 00 00 00 00 movl $0x0,0xffffffd8(%ebp) + 13352: 8b 45 08 mov 0x8(%ebp),%eax + 13355: 8b 40 58 mov 0x58(%eax),%eax + 13358: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 1335b: 8b 45 08 mov 0x8(%ebp),%eax + 1335e: 8b 40 54 mov 0x54(%eax),%eax + 13361: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 13364: 8b 45 08 mov 0x8(%ebp),%eax + 13367: c7 40 58 05 32 01 00 movl $0x13205,0x58(%eax) + 1336e: 8b 55 08 mov 0x8(%ebp),%edx + 13371: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 13374: 89 42 54 mov %eax,0x54(%edx) + 13377: 8b 45 08 mov 0x8(%ebp),%eax + 1337a: c7 40 1c fe ff ff ff movl $0xfffffffe,0x1c(%eax) + 13381: eb 0a jmp 1338d <_hcd_unlink_urb+0x11e> + 13383: 8b 45 08 mov 0x8(%ebp),%eax + 13386: c7 40 1c 98 ff ff ff movl $0xffffff98,0x1c(%eax) + 1338d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13390: 8b 40 58 mov 0x58(%eax),%eax + 13393: 3b 45 08 cmp 0x8(%ebp),%eax + 13396: 75 1a jne 133b2 <_hcd_unlink_urb+0x143> + 13398: 83 ec 08 sub $0x8,%esp + 1339b: ff 75 08 pushl 0x8(%ebp) + 1339e: ff 75 f0 pushl 0xfffffff0(%ebp) + 133a1: e8 74 f1 ff ff call 1251a <_usb_rh_status_dequeue> + 133a6: 83 c4 10 add $0x10,%esp + 133a9: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) + 133b0: eb 4b jmp 133fd <_hcd_unlink_urb+0x18e> + 133b2: 83 ec 08 sub $0x8,%esp + 133b5: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 133b8: 8b 40 74 mov 0x74(%eax),%eax + 133bb: ff 75 08 pushl 0x8(%ebp) + 133be: ff 75 f0 pushl 0xfffffff0(%ebp) + 133c1: 8b 40 2c mov 0x2c(%eax),%eax + 133c4: ff d0 call *%eax + 133c6: 83 c4 10 add $0x10,%esp + 133c9: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 133cc: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) + 133d0: 74 2b je 133fd <_hcd_unlink_urb+0x18e> + 133d2: 8b 45 08 mov 0x8(%ebp),%eax + 133d5: 8b 40 20 mov 0x20(%eax),%eax + 133d8: c1 e8 03 shr $0x3,%eax + 133db: 83 e0 01 and $0x1,%eax + 133de: 85 c0 test %eax,%eax + 133e0: 75 4c jne 1342e <_hcd_unlink_urb+0x1bf> + 133e2: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 133e9: 8b 55 08 mov 0x8(%ebp),%edx + 133ec: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 133ef: 89 42 58 mov %eax,0x58(%edx) + 133f2: 8b 55 08 mov 0x8(%ebp),%edx + 133f5: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 133f8: 89 42 54 mov %eax,0x54(%edx) + 133fb: eb 31 jmp 1342e <_hcd_unlink_urb+0x1bf> + 133fd: 8b 45 08 mov 0x8(%ebp),%eax + 13400: 8b 40 20 mov 0x20(%eax),%eax + 13403: c1 e8 03 shr $0x3,%eax + 13406: 83 e0 01 and $0x1,%eax + 13409: 85 c0 test %eax,%eax + 1340b: 74 09 je 13416 <_hcd_unlink_urb+0x1a7> + 1340d: c7 45 d0 8d ff ff ff movl $0xffffff8d,0xffffffd0(%ebp) + 13414: eb 2a jmp 13440 <_hcd_unlink_urb+0x1d1> + 13416: 83 ec 0c sub $0xc,%esp + 13419: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 1341c: 50 push %eax + 1341d: e8 b6 64 00 00 call 198d8 <_my_wait_for_completion> + 13422: 83 c4 10 add $0x10,%esp + 13425: c7 45 d0 00 00 00 00 movl $0x0,0xffffffd0(%ebp) + 1342c: eb 12 jmp 13440 <_hcd_unlink_urb+0x1d1> + 1342e: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) + 13432: 74 06 je 1343a <_hcd_unlink_urb+0x1cb> + 13434: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 13438: 74 00 je 1343a <_hcd_unlink_urb+0x1cb> + 1343a: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 1343d: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 13440: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 13443: c9 leave + 13444: c3 ret + +00013445 <_hcd_endpoint_disable>: + 13445: 55 push %ebp + 13446: 89 e5 mov %esp,%ebp + 13448: 53 push %ebx + 13449: 83 ec 24 sub $0x24,%esp + 1344c: 8b 45 0c mov 0xc(%ebp),%eax + 1344f: 83 e0 0f and $0xf,%eax + 13452: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 13455: 8b 45 08 mov 0x8(%ebp),%eax + 13458: 8b 80 98 01 00 00 mov 0x198(%eax),%eax + 1345e: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13461: 8b 45 08 mov 0x8(%ebp),%eax + 13464: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1346a: 8b 40 30 mov 0x30(%eax),%eax + 1346d: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 13470: 8b 45 0c mov 0xc(%ebp),%eax + 13473: c1 e8 07 shr $0x7,%eax + 13476: 83 e0 01 and $0x1,%eax + 13479: 85 c0 test %eax,%eax + 1347b: 74 26 je 134a3 <_hcd_endpoint_disable+0x5e> + 1347d: 8b 5d 08 mov 0x8(%ebp),%ebx + 13480: 8b 55 08 mov 0x8(%ebp),%edx + 13483: 8b 4d e8 mov 0xffffffe8(%ebp),%ecx + 13486: b8 01 00 00 00 mov $0x1,%eax + 1348b: d3 e0 shl %cl,%eax + 1348d: 0b 42 30 or 0x30(%edx),%eax + 13490: 89 43 30 mov %eax,0x30(%ebx) + 13493: 8b 55 08 mov 0x8(%ebp),%edx + 13496: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13499: c7 44 82 38 00 00 00 movl $0x0,0x38(%edx,%eax,4) + 134a0: 00 + 134a1: eb 24 jmp 134c7 <_hcd_endpoint_disable+0x82> + 134a3: 8b 5d 08 mov 0x8(%ebp),%ebx + 134a6: 8b 55 08 mov 0x8(%ebp),%edx + 134a9: 8b 4d e8 mov 0xffffffe8(%ebp),%ecx + 134ac: b8 01 00 00 00 mov $0x1,%eax + 134b1: d3 e0 shl %cl,%eax + 134b3: 0b 42 34 or 0x34(%edx),%eax + 134b6: 89 43 34 mov %eax,0x34(%ebx) + 134b9: 8b 55 08 mov 0x8(%ebp),%edx + 134bc: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 134bf: c7 44 82 78 00 00 00 movl $0x0,0x78(%edx,%eax,4) + 134c6: 00 + 134c7: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 134ce: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 134d1: 83 c0 08 add $0x8,%eax + 134d4: 8b 00 mov (%eax),%eax + 134d6: 83 e8 0c sub $0xc,%eax + 134d9: 89 45 ec mov %eax,0xffffffec(%ebp) + 134dc: 8b 55 ec mov 0xffffffec(%ebp),%edx + 134df: 83 c2 0c add $0xc,%edx + 134e2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 134e5: 83 c0 08 add $0x8,%eax + 134e8: 39 c2 cmp %eax,%edx + 134ea: 0f 84 a8 00 00 00 je 13598 <_hcd_endpoint_disable+0x153> + 134f0: 8b 45 ec mov 0xffffffec(%ebp),%eax + 134f3: 8b 40 18 mov 0x18(%eax),%eax + 134f6: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 134f9: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 134fc: c1 f8 0f sar $0xf,%eax + 134ff: 83 e0 0f and $0xf,%eax + 13502: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax + 13505: 74 02 je 13509 <_hcd_endpoint_disable+0xc4> + 13507: eb 7e jmp 13587 <_hcd_endpoint_disable+0x142> + 13509: 8b 45 0c mov 0xc(%ebp),%eax + 1350c: 33 45 e4 xor 0xffffffe4(%ebp),%eax + 1350f: c1 e8 07 shr $0x7,%eax + 13512: 83 e0 01 and $0x1,%eax + 13515: 85 c0 test %eax,%eax + 13517: 74 02 je 1351b <_hcd_endpoint_disable+0xd6> + 13519: eb 6c jmp 13587 <_hcd_endpoint_disable+0x142> + 1351b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1351e: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 13522: 74 02 je 13526 <_hcd_endpoint_disable+0xe1> + 13524: eb 61 jmp 13587 <_hcd_endpoint_disable+0x142> + 13526: 83 ec 0c sub $0xc,%esp + 13529: ff 75 ec pushl 0xffffffec(%ebp) + 1352c: e8 3f 4c 00 00 call 18170 <_usb_get_urb@4> + 13531: 83 c4 0c add $0xc,%esp + 13534: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1353b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1353e: 8b 40 1c mov 0x1c(%eax),%eax + 13541: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 13544: 83 7d e4 8d cmpl $0xffffff8d,0xffffffe4(%ebp) + 13548: 75 0a jne 13554 <_hcd_endpoint_disable+0x10f> + 1354a: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1354d: c7 40 1c 94 ff ff ff movl $0xffffff94,0x1c(%eax) + 13554: 83 7d e4 8d cmpl $0xffffff8d,0xffffffe4(%ebp) + 13558: 75 1a jne 13574 <_hcd_endpoint_disable+0x12f> + 1355a: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1355d: 8b 40 18 mov 0x18(%eax),%eax + 13560: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 13563: 83 ec 08 sub $0x8,%esp + 13566: ff 75 ec pushl 0xffffffec(%ebp) + 13569: ff 75 f0 pushl 0xfffffff0(%ebp) + 1356c: e8 54 fc ff ff call 131c5 <_unlink1> + 13571: 83 c4 10 add $0x10,%esp + 13574: 83 ec 0c sub $0xc,%esp + 13577: ff 75 ec pushl 0xffffffec(%ebp) + 1357a: e8 b7 4b 00 00 call 18136 <_usb_free_urb@4> + 1357f: 83 c4 0c add $0xc,%esp + 13582: e9 e9 fe ff ff jmp 13470 <_hcd_endpoint_disable+0x2b> + 13587: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1358a: 8b 40 0c mov 0xc(%eax),%eax + 1358d: 83 e8 0c sub $0xc,%eax + 13590: 89 45 ec mov %eax,0xffffffec(%ebp) + 13593: e9 44 ff ff ff jmp 134dc <_hcd_endpoint_disable+0x97> + 13598: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1359b: 8b 40 74 mov 0x74(%eax),%eax + 1359e: 83 78 30 00 cmpl $0x0,0x30(%eax) + 135a2: 74 1a je 135be <_hcd_endpoint_disable+0x179> + 135a4: 83 ec 04 sub $0x4,%esp + 135a7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 135aa: 8b 40 74 mov 0x74(%eax),%eax + 135ad: ff 75 0c pushl 0xc(%ebp) + 135b0: ff 75 f4 pushl 0xfffffff4(%ebp) + 135b3: ff 75 f0 pushl 0xfffffff0(%ebp) + 135b6: 8b 40 30 mov 0x30(%eax),%eax + 135b9: ff d0 call *%eax + 135bb: 83 c4 10 add $0x10,%esp + 135be: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 135c1: c9 leave + 135c2: c3 ret + +000135c3 <_hcd_free_dev>: + 135c3: 55 push %ebp + 135c4: 89 e5 mov %esp,%ebp + 135c6: 83 ec 18 sub $0x18,%esp + 135c9: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 135cd: 74 0c je 135db <_hcd_free_dev+0x18> + 135cf: 8b 45 08 mov 0x8(%ebp),%eax + 135d2: 83 b8 98 01 00 00 00 cmpl $0x0,0x198(%eax) + 135d9: 75 0c jne 135e7 <_hcd_free_dev+0x24> + 135db: c7 45 f0 ea ff ff ff movl $0xffffffea,0xfffffff0(%ebp) + 135e2: e9 95 00 00 00 jmp 1367c <_hcd_free_dev+0xb9> + 135e7: 8b 45 08 mov 0x8(%ebp),%eax + 135ea: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 135f1: 74 0f je 13602 <_hcd_free_dev+0x3f> + 135f3: 8b 45 08 mov 0x8(%ebp),%eax + 135f6: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 135fc: 83 78 30 00 cmpl $0x0,0x30(%eax) + 13600: 75 09 jne 1360b <_hcd_free_dev+0x48> + 13602: c7 45 f0 ed ff ff ff movl $0xffffffed,0xfffffff0(%ebp) + 13609: eb 71 jmp 1367c <_hcd_free_dev+0xb9> + 1360b: 8b 45 08 mov 0x8(%ebp),%eax + 1360e: 8b 80 98 01 00 00 mov 0x198(%eax),%eax + 13614: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13617: 8b 45 08 mov 0x8(%ebp),%eax + 1361a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 13620: 8b 40 30 mov 0x30(%eax),%eax + 13623: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13626: 83 ec 0c sub $0xc,%esp + 13629: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1362c: 83 c0 08 add $0x8,%eax + 1362f: 50 push %eax + 13630: e8 4c 00 00 00 call 13681 <_list_empty> + 13635: 83 c4 10 add $0x10,%esp + 13638: 85 c0 test %eax,%eax + 1363a: 75 09 jne 13645 <_hcd_free_dev+0x82> + 1363c: c7 45 f0 ea ff ff ff movl $0xffffffea,0xfffffff0(%ebp) + 13643: eb 37 jmp 1367c <_hcd_free_dev+0xb9> + 13645: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 1364c: 83 ec 0c sub $0xc,%esp + 1364f: ff 75 fc pushl 0xfffffffc(%ebp) + 13652: e8 ba f2 ff ff call 12911 <_list_del> + 13657: 83 c4 10 add $0x10,%esp + 1365a: 8b 45 08 mov 0x8(%ebp),%eax + 1365d: c7 80 98 01 00 00 00 movl $0x0,0x198(%eax) + 13664: 00 00 00 + 13667: 83 ec 0c sub $0xc,%esp + 1366a: ff 75 fc pushl 0xfffffffc(%ebp) + 1366d: e8 ce 63 00 00 call 19a40 <_ExFreePool@4> + 13672: 83 c4 0c add $0xc,%esp + 13675: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 1367c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1367f: c9 leave + 13680: c3 ret + +00013681 <_list_empty>: + 13681: 55 push %ebp + 13682: 89 e5 mov %esp,%ebp + 13684: 8b 45 08 mov 0x8(%ebp),%eax + 13687: 8b 00 mov (%eax),%eax + 13689: 3b 45 08 cmp 0x8(%ebp),%eax + 1368c: 0f 94 c0 sete %al + 1368f: 25 ff 00 00 00 and $0xff,%eax + 13694: 5d pop %ebp + 13695: c3 ret + +00013696 <_usb_hcd_giveback_urb@12>: + 13696: 55 push %ebp + 13697: 89 e5 mov %esp,%ebp + 13699: 83 ec 08 sub $0x8,%esp + 1369c: 83 ec 0c sub $0xc,%esp + 1369f: ff 75 0c pushl 0xc(%ebp) + 136a2: e8 90 f8 ff ff call 12f37 <_urb_unlink> + 136a7: 83 c4 10 add $0x10,%esp + 136aa: 8b 45 0c mov 0xc(%ebp),%eax + 136ad: 8b 40 20 mov 0x20(%eax),%eax + 136b0: c1 e8 02 shr $0x2,%eax + 136b3: 83 e0 01 and $0x1,%eax + 136b6: 85 c0 test %eax,%eax + 136b8: 75 00 jne 136ba <_usb_hcd_giveback_urb@12+0x24> + 136ba: 83 ec 08 sub $0x8,%esp + 136bd: 8b 45 0c mov 0xc(%ebp),%eax + 136c0: ff 75 10 pushl 0x10(%ebp) + 136c3: ff 75 0c pushl 0xc(%ebp) + 136c6: 8b 40 58 mov 0x58(%eax),%eax + 136c9: ff d0 call *%eax + 136cb: 83 c4 10 add $0x10,%esp + 136ce: 83 ec 0c sub $0xc,%esp + 136d1: ff 75 0c pushl 0xc(%ebp) + 136d4: e8 5d 4a 00 00 call 18136 <_usb_free_urb@4> + 136d9: 83 c4 0c add $0xc,%esp + 136dc: c9 leave + 136dd: c2 0c 00 ret $0xc + +000136e0 <_usb_hcd_irq>: + 136e0: 55 push %ebp + 136e1: 89 e5 mov %esp,%ebp + 136e3: 83 ec 18 sub $0x18,%esp + 136e6: 8b 45 0c mov 0xc(%ebp),%eax + 136e9: 89 45 fc mov %eax,0xfffffffc(%ebp) + 136ec: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 136ef: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax + 136f5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 136f8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 136fb: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax) + 13702: 75 09 jne 1370d <_usb_hcd_irq+0x2d> + 13704: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 1370b: eb 46 jmp 13753 <_usb_hcd_irq+0x73> + 1370d: 83 ec 08 sub $0x8,%esp + 13710: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13713: 8b 40 74 mov 0x74(%eax),%eax + 13716: ff 75 10 pushl 0x10(%ebp) + 13719: ff 75 fc pushl 0xfffffffc(%ebp) + 1371c: 8b 40 04 mov 0x4(%eax),%eax + 1371f: ff d0 call *%eax + 13721: 83 c4 10 add $0x10,%esp + 13724: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13727: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax + 1372d: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 13730: 74 1a je 1374c <_usb_hcd_irq+0x6c> + 13732: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13735: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax) + 1373c: 75 0e jne 1374c <_usb_hcd_irq+0x6c> + 1373e: 83 ec 0c sub $0xc,%esp + 13741: ff 75 fc pushl 0xfffffffc(%ebp) + 13744: e8 31 00 00 00 call 1377a <_usb_hc_died@4> + 13749: 83 c4 0c add $0xc,%esp + 1374c: c7 45 f4 01 00 00 00 movl $0x1,0xfffffff4(%ebp) + 13753: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13756: c9 leave + 13757: c3 ret + +00013758 <_hcd_panic>: + 13758: 55 push %ebp + 13759: 89 e5 mov %esp,%ebp + 1375b: 83 ec 08 sub $0x8,%esp + 1375e: 8b 45 08 mov 0x8(%ebp),%eax + 13761: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13764: 83 ec 0c sub $0xc,%esp + 13767: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1376a: 8b 40 74 mov 0x74(%eax),%eax + 1376d: ff 75 fc pushl 0xfffffffc(%ebp) + 13770: 8b 40 18 mov 0x18(%eax),%eax + 13773: ff d0 call *%eax + 13775: 83 c4 10 add $0x10,%esp + 13778: c9 leave + 13779: c3 ret + +0001377a <_usb_hc_died@4>: + 1377a: 55 push %ebp + 1377b: 89 e5 mov %esp,%ebp + 1377d: 83 ec 18 sub $0x18,%esp + 13780: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 13787: 8b 45 08 mov 0x8(%ebp),%eax + 1378a: 83 c0 68 add $0x68,%eax + 1378d: 8b 00 mov (%eax),%eax + 1378f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13792: 8b 45 08 mov 0x8(%ebp),%eax + 13795: 83 c0 68 add $0x68,%eax + 13798: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 1379b: 74 4c je 137e9 <_usb_hc_died@4+0x6f> + 1379d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 137a0: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 137a3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 137a6: 83 c0 08 add $0x8,%eax + 137a9: 8b 00 mov (%eax),%eax + 137ab: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 137ae: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 137b1: 83 c0 08 add $0x8,%eax + 137b4: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 137b7: 74 26 je 137df <_usb_hc_died@4+0x65> + 137b9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 137bc: 83 e8 0c sub $0xc,%eax + 137bf: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 137c2: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 137c5: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 137c9: 75 0a jne 137d5 <_usb_hc_died@4+0x5b> + 137cb: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 137ce: c7 40 1c 94 ff ff ff movl $0xffffff94,0x1c(%eax) + 137d5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 137d8: 8b 00 mov (%eax),%eax + 137da: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 137dd: eb cf jmp 137ae <_usb_hc_died@4+0x34> + 137df: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 137e2: 8b 00 mov (%eax),%eax + 137e4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 137e7: eb a9 jmp 13792 <_usb_hc_died@4+0x18> + 137e9: 8b 45 08 mov 0x8(%ebp),%eax + 137ec: 8b 40 58 mov 0x58(%eax),%eax + 137ef: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 137f2: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 137f6: 74 0a je 13802 <_usb_hc_died@4+0x88> + 137f8: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 137fb: c7 40 1c 94 ff ff ff movl $0xffffff94,0x1c(%eax) + 13802: 8b 45 08 mov 0x8(%ebp),%eax + 13805: 83 c0 70 add $0x70,%eax + 13808: c7 00 58 37 01 00 movl $0x13758,(%eax) + 1380e: 83 ec 0c sub $0xc,%esp + 13811: 8b 45 08 mov 0x8(%ebp),%eax + 13814: 83 c0 70 add $0x70,%eax + 13817: 50 push %eax + 13818: e8 07 00 00 00 call 13824 <_schedule_work> + 1381d: 83 c4 10 add $0x10,%esp + 13820: c9 leave + 13821: c2 04 00 ret $0x4 + +00013824 <_schedule_work>: + 13824: 55 push %ebp + 13825: 89 e5 mov %esp,%ebp + 13827: 5d pop %ebp + 13828: c3 ret + 13829: 90 nop + 1382a: 90 nop + 1382b: 90 nop + 1382c: 90 nop + 1382d: 90 nop + 1382e: 90 nop + 1382f: 90 nop + +00013830 <_usb_hcd_pci_probe@8>: + 13830: 55 push %ebp + 13831: 89 e5 mov %esp,%ebp + 13833: 83 ec 38 sub $0x38,%esp + 13836: e8 ea 3a 00 00 call 17325 <_usb_disabled@0> + 1383b: 85 c0 test %eax,%eax + 1383d: 74 0c je 1384b <_usb_hcd_pci_probe@8+0x1b> + 1383f: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 13846: e9 16 04 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 1384b: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 1384f: 74 0d je 1385e <_usb_hcd_pci_probe@8+0x2e> + 13851: 8b 45 0c mov 0xc(%ebp),%eax + 13854: 8b 40 18 mov 0x18(%eax),%eax + 13857: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1385a: 85 c0 test %eax,%eax + 1385c: 75 0c jne 1386a <_usb_hcd_pci_probe@8+0x3a> + 1385e: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 13865: e9 f7 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 1386a: 83 ec 0c sub $0xc,%esp + 1386d: ff 75 08 pushl 0x8(%ebp) + 13870: e8 7b 04 00 00 call 13cf0 <_pci_enable_device> + 13875: 83 c4 10 add $0x10,%esp + 13878: 85 c0 test %eax,%eax + 1387a: 79 0c jns 13888 <_usb_hcd_pci_probe@8+0x58> + 1387c: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 13883: e9 d9 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 13888: 8b 45 08 mov 0x8(%ebp),%eax + 1388b: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 1388f: 75 0c jne 1389d <_usb_hcd_pci_probe@8+0x6d> + 13891: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 13898: e9 c4 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 1389d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 138a0: 8b 40 08 mov 0x8(%eax),%eax + 138a3: 83 e0 01 and $0x1,%eax + 138a6: 85 c0 test %eax,%eax + 138a8: 0f 84 ec 00 00 00 je 1399a <_usb_hcd_pci_probe@8+0x16a> + 138ae: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 138b5: 83 ec 08 sub $0x8,%esp + 138b8: 6a 00 push $0x0 + 138ba: ff 75 08 pushl 0x8(%ebp) + 138bd: e8 1c 04 00 00 call 13cde <_pci_resource_start> + 138c2: 83 c4 10 add $0x10,%esp + 138c5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 138c8: 83 ec 08 sub $0x8,%esp + 138cb: 6a 00 push $0x0 + 138cd: ff 75 08 pushl 0x8(%ebp) + 138d0: e8 ff 03 00 00 call 13cd4 <_pci_resource_len> + 138d5: 83 c4 10 add $0x10,%esp + 138d8: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 138db: 83 ec 04 sub $0x4,%esp + 138de: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 138e1: ff 30 pushl (%eax) + 138e3: ff 75 f4 pushl 0xfffffff4(%ebp) + 138e6: ff 75 f8 pushl 0xfffffff8(%ebp) + 138e9: e8 dc 03 00 00 call 13cca <_request_mem_region> + 138ee: 83 c4 10 add $0x10,%esp + 138f1: 85 c0 test %eax,%eax + 138f3: 75 38 jne 1392d <_usb_hcd_pci_probe@8+0xfd> + 138f5: 83 ec 04 sub $0x4,%esp + 138f8: 6a 5c push $0x5c + 138fa: 68 c0 b0 01 00 push $0x1b0c0 + 138ff: 68 ca b0 01 00 push $0x1b0ca + 13904: e8 57 61 00 00 call 19a60 <_DbgPrint> + 13909: 83 c4 10 add $0x10,%esp + 1390c: 83 ec 08 sub $0x8,%esp + 1390f: 68 c0 b0 01 00 push $0x1b0c0 + 13914: 68 d4 b0 01 00 push $0x1b0d4 + 13919: e8 42 61 00 00 call 19a60 <_DbgPrint> + 1391e: 83 c4 10 add $0x10,%esp + 13921: c7 45 d4 f0 ff ff ff movl $0xfffffff0,0xffffffd4(%ebp) + 13928: e9 34 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 1392d: 83 ec 08 sub $0x8,%esp + 13930: ff 75 f4 pushl 0xfffffff4(%ebp) + 13933: ff 75 f8 pushl 0xfffffff8(%ebp) + 13936: e8 87 03 00 00 call 13cc2 <_ioremap_nocache> + 1393b: 83 c4 10 add $0x10,%esp + 1393e: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 13941: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 13945: 0f 85 13 01 00 00 jne 13a5e <_usb_hcd_pci_probe@8+0x22e> + 1394b: 83 ec 04 sub $0x4,%esp + 1394e: 6a 61 push $0x61 + 13950: 68 c0 b0 01 00 push $0x1b0c0 + 13955: 68 ca b0 01 00 push $0x1b0ca + 1395a: e8 01 61 00 00 call 19a60 <_DbgPrint> + 1395f: 83 c4 10 add $0x10,%esp + 13962: 83 ec 08 sub $0x8,%esp + 13965: 68 c0 b0 01 00 push $0x1b0c0 + 1396a: 68 f8 b0 01 00 push $0x1b0f8 + 1396f: e8 ec 60 00 00 call 19a60 <_DbgPrint> + 13974: 83 c4 10 add $0x10,%esp + 13977: c7 45 e8 f2 ff ff ff movl $0xfffffff2,0xffffffe8(%ebp) + 1397e: 83 ec 08 sub $0x8,%esp + 13981: ff 75 f4 pushl 0xfffffff4(%ebp) + 13984: ff 75 f8 pushl 0xfffffff8(%ebp) + 13987: e8 2c 03 00 00 call 13cb8 <_release_mem_region> + 1398c: 83 c4 10 add $0x10,%esp + 1398f: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13992: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 13995: e9 c7 02 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 1399a: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 139a1: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 139a8: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 139af: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 139b3: 79 65 jns 13a1a <_usb_hcd_pci_probe@8+0x1ea> + 139b5: 83 ec 08 sub $0x8,%esp + 139b8: ff 75 e4 pushl 0xffffffe4(%ebp) + 139bb: ff 75 08 pushl 0x8(%ebp) + 139be: e8 e3 02 00 00 call 13ca6 <_pci_resource_flags> + 139c3: 83 c4 10 add $0x10,%esp + 139c6: 83 e0 01 and $0x1,%eax + 139c9: 85 c0 test %eax,%eax + 139cb: 75 02 jne 139cf <_usb_hcd_pci_probe@8+0x19f> + 139cd: eb 44 jmp 13a13 <_usb_hcd_pci_probe@8+0x1e3> + 139cf: 83 ec 08 sub $0x8,%esp + 139d2: ff 75 e4 pushl 0xffffffe4(%ebp) + 139d5: ff 75 08 pushl 0x8(%ebp) + 139d8: e8 01 03 00 00 call 13cde <_pci_resource_start> + 139dd: 83 c4 10 add $0x10,%esp + 139e0: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 139e3: 83 ec 08 sub $0x8,%esp + 139e6: ff 75 e4 pushl 0xffffffe4(%ebp) + 139e9: ff 75 08 pushl 0x8(%ebp) + 139ec: e8 e3 02 00 00 call 13cd4 <_pci_resource_len> + 139f1: 83 c4 10 add $0x10,%esp + 139f4: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 139f7: 83 ec 04 sub $0x4,%esp + 139fa: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 139fd: ff 30 pushl (%eax) + 139ff: ff 75 f4 pushl 0xfffffff4(%ebp) + 13a02: ff 75 f8 pushl 0xfffffff8(%ebp) + 13a05: e8 92 02 00 00 call 13c9c <_request_region> + 13a0a: 83 c4 10 add $0x10,%esp + 13a0d: 85 c0 test %eax,%eax + 13a0f: 74 02 je 13a13 <_usb_hcd_pci_probe@8+0x1e3> + 13a11: eb 07 jmp 13a1a <_usb_hcd_pci_probe@8+0x1ea> + 13a13: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 13a16: ff 00 incl (%eax) + 13a18: eb 95 jmp 139af <_usb_hcd_pci_probe@8+0x17f> + 13a1a: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 13a1e: 75 38 jne 13a58 <_usb_hcd_pci_probe@8+0x228> + 13a20: 83 ec 04 sub $0x4,%esp + 13a23: 6a 76 push $0x76 + 13a25: 68 c0 b0 01 00 push $0x1b0c0 + 13a2a: 68 ca b0 01 00 push $0x1b0ca + 13a2f: e8 2c 60 00 00 call 19a60 <_DbgPrint> + 13a34: 83 c4 10 add $0x10,%esp + 13a37: 83 ec 08 sub $0x8,%esp + 13a3a: 68 c0 b0 01 00 push $0x1b0c0 + 13a3f: 68 18 b1 01 00 push $0x1b118 + 13a44: e8 17 60 00 00 call 19a60 <_DbgPrint> + 13a49: 83 c4 10 add $0x10,%esp + 13a4c: c7 45 d4 f0 ff ff ff movl $0xfffffff0,0xffffffd4(%ebp) + 13a53: e9 09 02 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 13a58: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13a5b: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 13a5e: 83 ec 0c sub $0xc,%esp + 13a61: ff 75 08 pushl 0x8(%ebp) + 13a64: e8 29 02 00 00 call 13c92 <_pci_set_master> + 13a69: 83 c4 10 add $0x10,%esp + 13a6c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13a6f: 8b 40 20 mov 0x20(%eax),%eax + 13a72: ff d0 call *%eax + 13a74: 89 45 ec mov %eax,0xffffffec(%ebp) + 13a77: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 13a7b: 75 72 jne 13aef <_usb_hcd_pci_probe@8+0x2bf> + 13a7d: 83 ec 04 sub $0x4,%esp + 13a80: 68 83 00 00 00 push $0x83 + 13a85: 68 c0 b0 01 00 push $0x1b0c0 + 13a8a: 68 ca b0 01 00 push $0x1b0ca + 13a8f: e8 cc 5f 00 00 call 19a60 <_DbgPrint> + 13a94: 83 c4 10 add $0x10,%esp + 13a97: 83 ec 08 sub $0x8,%esp + 13a9a: 68 c0 b0 01 00 push $0x1b0c0 + 13a9f: 68 3b b1 01 00 push $0x1b13b + 13aa4: e8 b7 5f 00 00 call 19a60 <_DbgPrint> + 13aa9: 83 c4 10 add $0x10,%esp + 13aac: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) + 13ab3: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13ab6: 8b 40 08 mov 0x8(%eax),%eax + 13ab9: 83 e0 01 and $0x1,%eax + 13abc: 85 c0 test %eax,%eax + 13abe: 74 13 je 13ad3 <_usb_hcd_pci_probe@8+0x2a3> + 13ac0: 83 ec 0c sub $0xc,%esp + 13ac3: ff 75 f0 pushl 0xfffffff0(%ebp) + 13ac6: e8 bd 01 00 00 call 13c88 <_iounmap> + 13acb: 83 c4 10 add $0x10,%esp + 13ace: e9 ab fe ff ff jmp 1397e <_usb_hcd_pci_probe@8+0x14e> + 13ad3: 83 ec 08 sub $0x8,%esp + 13ad6: ff 75 f4 pushl 0xfffffff4(%ebp) + 13ad9: ff 75 f8 pushl 0xfffffff8(%ebp) + 13adc: e8 9d 01 00 00 call 13c7e <_release_region> + 13ae1: 83 c4 10 add $0x10,%esp + 13ae4: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13ae7: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 13aea: e9 72 01 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 13aef: 83 ec 08 sub $0x8,%esp + 13af2: ff 75 ec pushl 0xffffffec(%ebp) + 13af5: ff 75 08 pushl 0x8(%ebp) + 13af8: e8 6b 01 00 00 call 13c68 <_pci_set_drvdata> + 13afd: 83 c4 10 add $0x10,%esp + 13b00: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b03: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b06: 89 42 74 mov %eax,0x74(%edx) + 13b09: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b0c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b0f: 8b 00 mov (%eax),%eax + 13b11: 89 42 50 mov %eax,0x50(%edx) + 13b14: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b17: 8b 45 08 mov 0x8(%ebp),%eax + 13b1a: 89 82 84 00 00 00 mov %eax,0x84(%edx) + 13b20: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b23: 8b 45 08 mov 0x8(%ebp),%eax + 13b26: 8b 40 10 mov 0x10(%eax),%eax + 13b29: 89 42 08 mov %eax,0x8(%edx) + 13b2c: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b2f: 8b 45 08 mov 0x8(%ebp),%eax + 13b32: 83 c0 14 add $0x14,%eax + 13b35: 89 42 4c mov %eax,0x4c(%edx) + 13b38: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b3b: 8b 45 08 mov 0x8(%ebp),%eax + 13b3e: 83 c0 14 add $0x14,%eax + 13b41: 89 02 mov %eax,(%edx) + 13b43: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b46: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13b49: 8b 00 mov (%eax),%eax + 13b4b: 89 82 80 00 00 00 mov %eax,0x80(%edx) + 13b51: 83 ec 0c sub $0xc,%esp + 13b54: ff 75 ec pushl 0xffffffec(%ebp) + 13b57: e8 c4 49 00 00 call 18520 <_hcd_buffer_create> + 13b5c: 83 c4 10 add $0x10,%esp + 13b5f: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 13b62: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 13b66: 74 16 je 13b7e <_usb_hcd_pci_probe@8+0x34e> + 13b68: 83 ec 0c sub $0xc,%esp + 13b6b: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b6e: ff 75 ec pushl 0xffffffec(%ebp) + 13b71: 8b 40 24 mov 0x24(%eax),%eax + 13b74: ff d0 call *%eax + 13b76: 83 c4 10 add $0x10,%esp + 13b79: e9 35 ff ff ff jmp 13ab3 <_usb_hcd_pci_probe@8+0x283> + 13b7e: 83 ec 04 sub $0x4,%esp + 13b81: 8b 45 08 mov 0x8(%ebp),%eax + 13b84: ff 70 0c pushl 0xc(%eax) + 13b87: 68 54 b1 01 00 push $0x1b154 + 13b8c: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 13b8f: 50 push %eax + 13b90: e8 fb 5e 00 00 call 19a90 <_sprintf> + 13b95: 83 c4 10 add $0x10,%esp + 13b98: 83 ec 0c sub $0xc,%esp + 13b9b: ff 75 ec pushl 0xffffffec(%ebp) + 13b9e: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13ba1: ff 70 50 pushl 0x50(%eax) + 13ba4: 6a 00 push $0x0 + 13ba6: 68 e0 36 01 00 push $0x136e0 + 13bab: 8b 45 08 mov 0x8(%ebp),%eax + 13bae: ff 70 0c pushl 0xc(%eax) + 13bb1: e8 e0 5d 00 00 call 19996 <_my_request_irq> + 13bb6: 83 c4 20 add $0x20,%esp + 13bb9: 85 c0 test %eax,%eax + 13bbb: 74 09 je 13bc6 <_usb_hcd_pci_probe@8+0x396> + 13bbd: c7 45 e8 f0 ff ff ff movl $0xfffffff0,0xffffffe8(%ebp) + 13bc4: eb a2 jmp 13b68 <_usb_hcd_pci_probe@8+0x338> + 13bc6: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13bc9: 8b 45 08 mov 0x8(%ebp),%eax + 13bcc: 8b 40 0c mov 0xc(%eax),%eax + 13bcf: 89 42 78 mov %eax,0x78(%edx) + 13bd2: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13bd5: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13bd8: 89 42 7c mov %eax,0x7c(%edx) + 13bdb: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13bde: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 13be1: 89 82 88 00 00 00 mov %eax,0x88(%edx) + 13be7: 83 ec 0c sub $0xc,%esp + 13bea: ff 75 ec pushl 0xffffffec(%ebp) + 13bed: e8 ec e9 ff ff call 125de <_usb_bus_init@4> + 13bf2: 83 c4 0c add $0xc,%esp + 13bf5: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13bf8: c7 40 20 20 a0 01 00 movl $0x1a020,0x20(%eax) + 13bff: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13c02: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13c05: 89 42 30 mov %eax,0x30(%edx) + 13c08: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13c0b: 83 c2 68 add $0x68,%edx + 13c0e: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13c11: 83 c0 68 add $0x68,%eax + 13c14: 89 02 mov %eax,(%edx) + 13c16: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13c19: 83 c2 68 add $0x68,%edx + 13c1c: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13c1f: 83 c0 68 add $0x68,%eax + 13c22: 89 42 04 mov %eax,0x4(%edx) + 13c25: 83 ec 0c sub $0xc,%esp + 13c28: ff 75 ec pushl 0xffffffec(%ebp) + 13c2b: e8 a8 ea ff ff call 126d8 <_usb_register_bus@4> + 13c30: 83 c4 0c add $0xc,%esp + 13c33: 83 ec 0c sub $0xc,%esp + 13c36: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c39: ff 75 ec pushl 0xffffffec(%ebp) + 13c3c: 8b 40 0c mov 0xc(%eax),%eax + 13c3f: ff d0 call *%eax + 13c41: 83 c4 10 add $0x10,%esp + 13c44: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 13c47: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 13c4b: 79 0e jns 13c5b <_usb_hcd_pci_probe@8+0x42b> + 13c4d: 83 ec 0c sub $0xc,%esp + 13c50: ff 75 08 pushl 0x8(%ebp) + 13c53: e8 a2 00 00 00 call 13cfa <_usb_hcd_pci_remove@4> + 13c58: 83 c4 0c add $0xc,%esp + 13c5b: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13c5e: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 13c61: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 13c64: c9 leave + 13c65: c2 08 00 ret $0x8 + +00013c68 <_pci_set_drvdata>: + 13c68: 55 push %ebp + 13c69: 89 e5 mov %esp,%ebp + 13c6b: 8b 45 08 mov 0x8(%ebp),%eax + 13c6e: 8b 55 0c mov 0xc(%ebp),%edx + 13c71: 89 90 e4 00 00 00 mov %edx,0xe4(%eax) + 13c77: b8 00 00 00 00 mov $0x0,%eax + 13c7c: 5d pop %ebp + 13c7d: c3 ret + +00013c7e <_release_region>: + 13c7e: 55 push %ebp + 13c7f: 89 e5 mov %esp,%ebp + 13c81: b8 00 00 00 00 mov $0x0,%eax + 13c86: 5d pop %ebp + 13c87: c3 ret + +00013c88 <_iounmap>: + 13c88: 55 push %ebp + 13c89: 89 e5 mov %esp,%ebp + 13c8b: b8 00 00 00 00 mov $0x0,%eax + 13c90: 5d pop %ebp + 13c91: c3 ret + +00013c92 <_pci_set_master>: + 13c92: 55 push %ebp + 13c93: 89 e5 mov %esp,%ebp + 13c95: b8 00 00 00 00 mov $0x0,%eax + 13c9a: 5d pop %ebp + 13c9b: c3 ret + +00013c9c <_request_region>: + 13c9c: 55 push %ebp + 13c9d: 89 e5 mov %esp,%ebp + 13c9f: b8 00 00 00 00 mov $0x0,%eax + 13ca4: 5d pop %ebp + 13ca5: c3 ret + +00013ca6 <_pci_resource_flags>: + 13ca6: 55 push %ebp + 13ca7: 89 e5 mov %esp,%ebp + 13ca9: 8b 55 08 mov 0x8(%ebp),%edx + 13cac: 8b 45 0c mov 0xc(%ebp),%eax + 13caf: 8b 84 82 d4 00 00 00 mov 0xd4(%edx,%eax,4),%eax + 13cb6: 5d pop %ebp + 13cb7: c3 ret + +00013cb8 <_release_mem_region>: + 13cb8: 55 push %ebp + 13cb9: 89 e5 mov %esp,%ebp + 13cbb: b8 00 00 00 00 mov $0x0,%eax + 13cc0: 5d pop %ebp + 13cc1: c3 ret + +00013cc2 <_ioremap_nocache>: + 13cc2: 55 push %ebp + 13cc3: 89 e5 mov %esp,%ebp + 13cc5: 8b 45 08 mov 0x8(%ebp),%eax + 13cc8: 5d pop %ebp + 13cc9: c3 ret + +00013cca <_request_mem_region>: + 13cca: 55 push %ebp + 13ccb: 89 e5 mov %esp,%ebp + 13ccd: b8 01 00 00 00 mov $0x1,%eax + 13cd2: 5d pop %ebp + 13cd3: c3 ret + +00013cd4 <_pci_resource_len>: + 13cd4: 55 push %ebp + 13cd5: 89 e5 mov %esp,%ebp + 13cd7: b8 00 00 00 00 mov $0x0,%eax + 13cdc: 5d pop %ebp + 13cdd: c3 ret + +00013cde <_pci_resource_start>: + 13cde: 55 push %ebp + 13cdf: 89 e5 mov %esp,%ebp + 13ce1: 8b 55 08 mov 0x8(%ebp),%edx + 13ce4: 8b 45 0c mov 0xc(%ebp),%eax + 13ce7: 8b 84 82 c4 00 00 00 mov 0xc4(%edx,%eax,4),%eax + 13cee: 5d pop %ebp + 13cef: c3 ret + +00013cf0 <_pci_enable_device>: + 13cf0: 55 push %ebp + 13cf1: 89 e5 mov %esp,%ebp + 13cf3: b8 00 00 00 00 mov $0x0,%eax + 13cf8: 5d pop %ebp + 13cf9: c3 ret + +00013cfa <_usb_hcd_pci_remove@4>: + 13cfa: 55 push %ebp + 13cfb: 89 e5 mov %esp,%ebp + 13cfd: 83 ec 08 sub $0x8,%esp + 13d00: 83 ec 0c sub $0xc,%esp + 13d03: ff 75 08 pushl 0x8(%ebp) + 13d06: e8 22 01 00 00 call 13e2d <_pci_get_drvdata> + 13d0b: 83 c4 10 add $0x10,%esp + 13d0e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13d11: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 13d15: 75 05 jne 13d1c <_usb_hcd_pci_remove@4+0x22> + 13d17: e9 0d 01 00 00 jmp 13e29 <_usb_hcd_pci_remove@4+0x12f> + 13d1c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d1f: 8b 40 24 mov 0x24(%eax),%eax + 13d22: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13d25: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d28: c7 80 e0 00 00 00 85 movl $0x85,0xe0(%eax) + 13d2f: 00 00 00 + 13d32: 83 ec 0c sub $0xc,%esp + 13d35: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 13d38: 50 push %eax + 13d39: e8 d3 28 00 00 call 16611 <_usb_disconnect> + 13d3e: 83 c4 10 add $0x10,%esp + 13d41: 83 ec 0c sub $0xc,%esp + 13d44: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d47: 8b 40 74 mov 0x74(%eax),%eax + 13d4a: ff 75 fc pushl 0xfffffffc(%ebp) + 13d4d: 8b 40 18 mov 0x18(%eax),%eax + 13d50: ff d0 call *%eax + 13d52: 83 c4 10 add $0x10,%esp + 13d55: 83 ec 0c sub $0xc,%esp + 13d58: ff 75 fc pushl 0xfffffffc(%ebp) + 13d5b: e8 ca 47 00 00 call 1852a <_hcd_buffer_destroy> + 13d60: 83 c4 10 add $0x10,%esp + 13d63: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d66: c7 80 e0 00 00 00 00 movl $0x0,0xe0(%eax) + 13d6d: 00 00 00 + 13d70: 6a 00 push $0x0 + 13d72: ff 75 08 pushl 0x8(%ebp) + 13d75: e8 ee fe ff ff call 13c68 <_pci_set_drvdata> + 13d7a: 83 c4 08 add $0x8,%esp + 13d7d: 83 ec 08 sub $0x8,%esp + 13d80: ff 75 fc pushl 0xfffffffc(%ebp) + 13d83: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d86: ff 70 78 pushl 0x78(%eax) + 13d89: e8 86 5c 00 00 call 19a14 <_my_free_irq> + 13d8e: 83 c4 10 add $0x10,%esp + 13d91: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d94: 8b 40 74 mov 0x74(%eax),%eax + 13d97: 8b 40 08 mov 0x8(%eax),%eax + 13d9a: 83 e0 01 and $0x1,%eax + 13d9d: 85 c0 test %eax,%eax + 13d9f: 74 34 je 13dd5 <_usb_hcd_pci_remove@4+0xdb> + 13da1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13da4: ff 70 7c pushl 0x7c(%eax) + 13da7: e8 dc fe ff ff call 13c88 <_iounmap> + 13dac: 83 c4 04 add $0x4,%esp + 13daf: 6a 00 push $0x0 + 13db1: ff 75 08 pushl 0x8(%ebp) + 13db4: e8 1b ff ff ff call 13cd4 <_pci_resource_len> + 13db9: 83 c4 08 add $0x8,%esp + 13dbc: 50 push %eax + 13dbd: 6a 00 push $0x0 + 13dbf: ff 75 08 pushl 0x8(%ebp) + 13dc2: e8 17 ff ff ff call 13cde <_pci_resource_start> + 13dc7: 83 c4 08 add $0x8,%esp + 13dca: 50 push %eax + 13dcb: e8 e8 fe ff ff call 13cb8 <_release_mem_region> + 13dd0: 83 c4 08 add $0x8,%esp + 13dd3: eb 32 jmp 13e07 <_usb_hcd_pci_remove@4+0x10d> + 13dd5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13dd8: ff b0 88 00 00 00 pushl 0x88(%eax) + 13dde: ff 75 08 pushl 0x8(%ebp) + 13de1: e8 ee fe ff ff call 13cd4 <_pci_resource_len> + 13de6: 83 c4 08 add $0x8,%esp + 13de9: 50 push %eax + 13dea: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13ded: ff b0 88 00 00 00 pushl 0x88(%eax) + 13df3: ff 75 08 pushl 0x8(%ebp) + 13df6: e8 e3 fe ff ff call 13cde <_pci_resource_start> + 13dfb: 83 c4 08 add $0x8,%esp + 13dfe: 50 push %eax + 13dff: e8 7a fe ff ff call 13c7e <_release_region> + 13e04: 83 c4 08 add $0x8,%esp + 13e07: 83 ec 0c sub $0xc,%esp + 13e0a: ff 75 fc pushl 0xfffffffc(%ebp) + 13e0d: e8 9e ea ff ff call 128b0 <_usb_deregister_bus@4> + 13e12: 83 c4 0c add $0xc,%esp + 13e15: 83 ec 0c sub $0xc,%esp + 13e18: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13e1b: 8b 40 74 mov 0x74(%eax),%eax + 13e1e: ff 75 fc pushl 0xfffffffc(%ebp) + 13e21: 8b 40 24 mov 0x24(%eax),%eax + 13e24: ff d0 call *%eax + 13e26: 83 c4 10 add $0x10,%esp + 13e29: c9 leave + 13e2a: c2 04 00 ret $0x4 + +00013e2d <_pci_get_drvdata>: + 13e2d: 55 push %ebp + 13e2e: 89 e5 mov %esp,%ebp + 13e30: 8b 45 08 mov 0x8(%ebp),%eax + 13e33: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax + 13e39: 5d pop %ebp + 13e3a: c3 ret + 13e3b: 90 nop + 13e3c: 90 nop + 13e3d: 90 nop + 13e3e: 90 nop + 13e3f: 90 nop + +00013e40 <_get_hub_descriptor>: + 13e40: 55 push %ebp + 13e41: 89 e5 mov %esp,%ebp + 13e43: 83 ec 08 sub $0x8,%esp + 13e46: 83 ec 0c sub $0xc,%esp + 13e49: 68 f4 01 00 00 push $0x1f4 + 13e4e: 8b 45 10 mov 0x10(%ebp),%eax + 13e51: 25 ff ff 00 00 and $0xffff,%eax + 13e56: 50 push %eax + 13e57: ff 75 0c pushl 0xc(%ebp) + 13e5a: 6a 00 push $0x0 + 13e5c: 68 00 29 00 00 push $0x2900 + 13e61: 68 a0 00 00 00 push $0xa0 + 13e66: 6a 06 push $0x6 + 13e68: 6a 00 push $0x0 + 13e6a: ff 75 08 pushl 0x8(%ebp) + 13e6d: e8 16 00 00 00 call 13e88 <___create_pipe> + 13e72: 83 c4 08 add $0x8,%esp + 13e75: 0d 80 00 00 80 or $0x80000080,%eax + 13e7a: 50 push %eax + 13e7b: ff 75 08 pushl 0x8(%ebp) + 13e7e: e8 6d d3 ff ff call 111f0 <_usb_control_msg> + 13e83: 83 c4 30 add $0x30,%esp + 13e86: c9 leave + 13e87: c3 ret + +00013e88 <___create_pipe>: + 13e88: 55 push %ebp + 13e89: 89 e5 mov %esp,%ebp + 13e8b: 8b 45 08 mov 0x8(%ebp),%eax + 13e8e: 8b 00 mov (%eax),%eax + 13e90: c1 e0 08 shl $0x8,%eax + 13e93: 8b 55 0c mov 0xc(%ebp),%edx + 13e96: c1 e2 0f shl $0xf,%edx + 13e99: 09 d0 or %edx,%eax + 13e9b: 5d pop %ebp + 13e9c: c3 ret + +00013e9d <_clear_hub_feature>: + 13e9d: 55 push %ebp + 13e9e: 89 e5 mov %esp,%ebp + 13ea0: 83 ec 08 sub $0x8,%esp + 13ea3: 83 ec 0c sub $0xc,%esp + 13ea6: 6a 64 push $0x64 + 13ea8: 6a 00 push $0x0 + 13eaa: 6a 00 push $0x0 + 13eac: 6a 00 push $0x0 + 13eae: 8b 45 0c mov 0xc(%ebp),%eax + 13eb1: 25 ff ff 00 00 and $0xffff,%eax + 13eb6: 50 push %eax + 13eb7: 6a 20 push $0x20 + 13eb9: 6a 01 push $0x1 + 13ebb: 6a 00 push $0x0 + 13ebd: ff 75 08 pushl 0x8(%ebp) + 13ec0: e8 c3 ff ff ff call 13e88 <___create_pipe> + 13ec5: 83 c4 08 add $0x8,%esp + 13ec8: 0d 00 00 00 80 or $0x80000000,%eax + 13ecd: 50 push %eax + 13ece: ff 75 08 pushl 0x8(%ebp) + 13ed1: e8 1a d3 ff ff call 111f0 <_usb_control_msg> + 13ed6: 83 c4 30 add $0x30,%esp + 13ed9: c9 leave + 13eda: c3 ret + +00013edb <_clear_port_feature>: + 13edb: 55 push %ebp + 13edc: 89 e5 mov %esp,%ebp + 13ede: 83 ec 08 sub $0x8,%esp + 13ee1: 83 ec 0c sub $0xc,%esp + 13ee4: 6a 64 push $0x64 + 13ee6: 6a 00 push $0x0 + 13ee8: 6a 00 push $0x0 + 13eea: 8b 45 0c mov 0xc(%ebp),%eax + 13eed: 25 ff ff 00 00 and $0xffff,%eax + 13ef2: 50 push %eax + 13ef3: 8b 45 10 mov 0x10(%ebp),%eax + 13ef6: 25 ff ff 00 00 and $0xffff,%eax + 13efb: 50 push %eax + 13efc: 6a 23 push $0x23 + 13efe: 6a 01 push $0x1 + 13f00: 6a 00 push $0x0 + 13f02: ff 75 08 pushl 0x8(%ebp) + 13f05: e8 7e ff ff ff call 13e88 <___create_pipe> + 13f0a: 83 c4 08 add $0x8,%esp + 13f0d: 0d 00 00 00 80 or $0x80000000,%eax + 13f12: 50 push %eax + 13f13: ff 75 08 pushl 0x8(%ebp) + 13f16: e8 d5 d2 ff ff call 111f0 <_usb_control_msg> + 13f1b: 83 c4 30 add $0x30,%esp + 13f1e: c9 leave + 13f1f: c3 ret + +00013f20 <_set_port_feature>: + 13f20: 55 push %ebp + 13f21: 89 e5 mov %esp,%ebp + 13f23: 83 ec 08 sub $0x8,%esp + 13f26: 83 ec 0c sub $0xc,%esp + 13f29: 6a 64 push $0x64 + 13f2b: 6a 00 push $0x0 + 13f2d: 6a 00 push $0x0 + 13f2f: 8b 45 0c mov 0xc(%ebp),%eax + 13f32: 25 ff ff 00 00 and $0xffff,%eax + 13f37: 50 push %eax + 13f38: 8b 45 10 mov 0x10(%ebp),%eax + 13f3b: 25 ff ff 00 00 and $0xffff,%eax + 13f40: 50 push %eax + 13f41: 6a 23 push $0x23 + 13f43: 6a 03 push $0x3 + 13f45: 6a 00 push $0x0 + 13f47: ff 75 08 pushl 0x8(%ebp) + 13f4a: e8 39 ff ff ff call 13e88 <___create_pipe> + 13f4f: 83 c4 08 add $0x8,%esp + 13f52: 0d 00 00 00 80 or $0x80000000,%eax + 13f57: 50 push %eax + 13f58: ff 75 08 pushl 0x8(%ebp) + 13f5b: e8 90 d2 ff ff call 111f0 <_usb_control_msg> + 13f60: 83 c4 30 add $0x30,%esp + 13f63: c9 leave + 13f64: c3 ret + +00013f65 <_get_hub_status>: + 13f65: 55 push %ebp + 13f66: 89 e5 mov %esp,%ebp + 13f68: 83 ec 08 sub $0x8,%esp + 13f6b: 83 ec 0c sub $0xc,%esp + 13f6e: 68 f4 01 00 00 push $0x1f4 + 13f73: 6a 04 push $0x4 + 13f75: ff 75 0c pushl 0xc(%ebp) + 13f78: 6a 00 push $0x0 + 13f7a: 6a 00 push $0x0 + 13f7c: 68 a0 00 00 00 push $0xa0 + 13f81: 6a 00 push $0x0 + 13f83: 6a 00 push $0x0 + 13f85: ff 75 08 pushl 0x8(%ebp) + 13f88: e8 fb fe ff ff call 13e88 <___create_pipe> + 13f8d: 83 c4 08 add $0x8,%esp + 13f90: 0d 80 00 00 80 or $0x80000080,%eax + 13f95: 50 push %eax + 13f96: ff 75 08 pushl 0x8(%ebp) + 13f99: e8 52 d2 ff ff call 111f0 <_usb_control_msg> + 13f9e: 83 c4 30 add $0x30,%esp + 13fa1: c9 leave + 13fa2: c3 ret + +00013fa3 <_get_port_status>: + 13fa3: 55 push %ebp + 13fa4: 89 e5 mov %esp,%ebp + 13fa6: 83 ec 08 sub $0x8,%esp + 13fa9: 83 ec 0c sub $0xc,%esp + 13fac: 68 f4 01 00 00 push $0x1f4 + 13fb1: 6a 04 push $0x4 + 13fb3: ff 75 10 pushl 0x10(%ebp) + 13fb6: 8b 45 0c mov 0xc(%ebp),%eax + 13fb9: 25 ff ff 00 00 and $0xffff,%eax + 13fbe: 50 push %eax + 13fbf: 6a 00 push $0x0 + 13fc1: 68 a3 00 00 00 push $0xa3 + 13fc6: 6a 00 push $0x0 + 13fc8: 6a 00 push $0x0 + 13fca: ff 75 08 pushl 0x8(%ebp) + 13fcd: e8 b6 fe ff ff call 13e88 <___create_pipe> + 13fd2: 83 c4 08 add $0x8,%esp + 13fd5: 0d 80 00 00 80 or $0x80000080,%eax + 13fda: 50 push %eax + 13fdb: ff 75 08 pushl 0x8(%ebp) + 13fde: e8 0d d2 ff ff call 111f0 <_usb_control_msg> + 13fe3: 83 c4 30 add $0x30,%esp + 13fe6: c9 leave + 13fe7: c3 ret + +00013fe8 <_hub_irq>: + 13fe8: 55 push %ebp + 13fe9: 89 e5 mov %esp,%ebp + 13feb: 83 ec 18 sub $0x18,%esp + 13fee: 8b 45 08 mov 0x8(%ebp),%eax + 13ff1: 8b 40 54 mov 0x54(%eax),%eax + 13ff4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13ff7: 8b 45 08 mov 0x8(%ebp),%eax + 13ffa: 8b 40 1c mov 0x1c(%eax),%eax + 13ffd: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14000: 83 7d f0 98 cmpl $0xffffff98,0xfffffff0(%ebp) + 14004: 0f 84 ad 00 00 00 je 140b7 <_hub_irq+0xcf> + 1400a: 83 7d f0 98 cmpl $0xffffff98,0xfffffff0(%ebp) + 1400e: 7f 0c jg 1401c <_hub_irq+0x34> + 14010: 83 7d f0 94 cmpl $0xffffff94,0xfffffff0(%ebp) + 14014: 0f 84 9d 00 00 00 je 140b7 <_hub_irq+0xcf> + 1401a: eb 10 jmp 1402c <_hub_irq+0x44> + 1401c: 83 7d f0 fe cmpl $0xfffffffe,0xfffffff0(%ebp) + 14020: 0f 84 91 00 00 00 je 140b7 <_hub_irq+0xcf> + 14026: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 1402a: 74 21 je 1404d <_hub_irq+0x65> + 1402c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1402f: ff 40 18 incl 0x18(%eax) + 14032: 83 78 18 09 cmpl $0x9,0x18(%eax) + 14036: 7e 63 jle 1409b <_hub_irq+0xb3> + 14038: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1403b: 83 78 14 00 cmpl $0x0,0x14(%eax) + 1403f: 75 5a jne 1409b <_hub_irq+0xb3> + 14041: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14044: 8b 55 08 mov 0x8(%ebp),%edx + 14047: 8b 52 1c mov 0x1c(%edx),%edx + 1404a: 89 50 14 mov %edx,0x14(%eax) + 1404d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14050: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 14057: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1405e: 83 ec 0c sub $0xc,%esp + 14061: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14064: 83 c0 24 add $0x24,%eax + 14067: 50 push %eax + 14068: e8 91 00 00 00 call 140fe <_list_empty> + 1406d: 83 c4 10 add $0x10,%esp + 14070: 85 c0 test %eax,%eax + 14072: 74 27 je 1409b <_hub_irq+0xb3> + 14074: 83 ec 08 sub $0x8,%esp + 14077: 68 40 a0 01 00 push $0x1a040 + 1407c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1407f: 83 c0 24 add $0x24,%eax + 14082: 50 push %eax + 14083: e8 31 00 00 00 call 140b9 <_list_add> + 14088: 83 c4 10 add $0x10,%esp + 1408b: 83 ec 0c sub $0xc,%esp + 1408e: 68 50 c0 01 00 push $0x1c050 + 14093: e8 cd 57 00 00 call 19865 <_my_wake_up> + 14098: 83 c4 10 add $0x10,%esp + 1409b: 83 ec 08 sub $0x8,%esp + 1409e: 6a 00 push $0x0 + 140a0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 140a3: ff 70 04 pushl 0x4(%eax) + 140a6: e8 f8 40 00 00 call 181a3 <_usb_submit_urb@8> + 140ab: 83 c4 08 add $0x8,%esp + 140ae: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 140b1: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 140b5: 74 00 je 140b7 <_hub_irq+0xcf> + 140b7: c9 leave + 140b8: c3 ret + +000140b9 <_list_add>: + 140b9: 55 push %ebp + 140ba: 89 e5 mov %esp,%ebp + 140bc: 83 ec 08 sub $0x8,%esp + 140bf: 83 ec 04 sub $0x4,%esp + 140c2: 8b 45 0c mov 0xc(%ebp),%eax + 140c5: ff 30 pushl (%eax) + 140c7: ff 75 0c pushl 0xc(%ebp) + 140ca: ff 75 08 pushl 0x8(%ebp) + 140cd: e8 05 00 00 00 call 140d7 <___list_add> + 140d2: 83 c4 10 add $0x10,%esp + 140d5: c9 leave + 140d6: c3 ret + +000140d7 <___list_add>: + 140d7: 55 push %ebp + 140d8: 89 e5 mov %esp,%ebp + 140da: 8b 55 10 mov 0x10(%ebp),%edx + 140dd: 8b 45 08 mov 0x8(%ebp),%eax + 140e0: 89 42 04 mov %eax,0x4(%edx) + 140e3: 8b 55 08 mov 0x8(%ebp),%edx + 140e6: 8b 45 10 mov 0x10(%ebp),%eax + 140e9: 89 02 mov %eax,(%edx) + 140eb: 8b 55 08 mov 0x8(%ebp),%edx + 140ee: 8b 45 0c mov 0xc(%ebp),%eax + 140f1: 89 42 04 mov %eax,0x4(%edx) + 140f4: 8b 55 0c mov 0xc(%ebp),%edx + 140f7: 8b 45 08 mov 0x8(%ebp),%eax + 140fa: 89 02 mov %eax,(%edx) + 140fc: 5d pop %ebp + 140fd: c3 ret + +000140fe <_list_empty>: + 140fe: 55 push %ebp + 140ff: 89 e5 mov %esp,%ebp + 14101: 8b 45 08 mov 0x8(%ebp),%eax + 14104: 8b 00 mov (%eax),%eax + 14106: 3b 45 08 cmp 0x8(%ebp),%eax + 14109: 0f 94 c0 sete %al + 1410c: 25 ff 00 00 00 and $0xff,%eax + 14111: 5d pop %ebp + 14112: c3 ret + +00014113 <_hub_tt_kevent>: + 14113: 55 push %ebp + 14114: 89 e5 mov %esp,%ebp + 14116: 83 ec 28 sub $0x28,%esp + 14119: 8b 45 08 mov 0x8(%ebp),%eax + 1411c: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1411f: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14126: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14129: 83 c0 40 add $0x40,%eax + 1412c: 50 push %eax + 1412d: e8 cc ff ff ff call 140fe <_list_empty> + 14132: 83 c4 04 add $0x4,%esp + 14135: 85 c0 test %eax,%eax + 14137: 75 7a jne 141b3 <_hub_tt_kevent+0xa0> + 14139: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1413c: 8b 40 40 mov 0x40(%eax),%eax + 1413f: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14142: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14145: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14148: 83 ec 0c sub $0xc,%esp + 1414b: ff 75 f0 pushl 0xfffffff0(%ebp) + 1414e: e8 b9 00 00 00 call 1420c <_list_del> + 14153: 83 c4 10 add $0x10,%esp + 14156: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14159: 8b 00 mov (%eax),%eax + 1415b: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14161: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 14164: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 14167: 2d c0 00 00 00 sub $0xc0,%eax + 1416c: 89 45 ec mov %eax,0xffffffec(%ebp) + 1416f: 83 ec 04 sub $0x4,%esp + 14172: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14175: 8b 40 08 mov 0x8(%eax),%eax + 14178: 25 ff ff 00 00 and $0xffff,%eax + 1417d: 50 push %eax + 1417e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14181: 66 8b 40 0c mov 0xc(%eax),%ax + 14185: 25 ff ff 00 00 and $0xffff,%eax + 1418a: 50 push %eax + 1418b: ff 75 ec pushl 0xffffffec(%ebp) + 1418e: e8 22 00 00 00 call 141b5 <_hub_clear_tt_buffer> + 14193: 83 c4 10 add $0x10,%esp + 14196: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 14199: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 141a0: 83 ec 0c sub $0xc,%esp + 141a3: ff 75 f0 pushl 0xfffffff0(%ebp) + 141a6: e8 95 58 00 00 call 19a40 <_ExFreePool@4> + 141ab: 83 c4 0c add $0xc,%esp + 141ae: e9 73 ff ff ff jmp 14126 <_hub_tt_kevent+0x13> + 141b3: c9 leave + 141b4: c3 ret + +000141b5 <_hub_clear_tt_buffer>: + 141b5: 55 push %ebp + 141b6: 89 e5 mov %esp,%ebp + 141b8: 83 ec 08 sub $0x8,%esp + 141bb: 8b 45 0c mov 0xc(%ebp),%eax + 141be: 8b 55 10 mov 0x10(%ebp),%edx + 141c1: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 141c5: 66 89 55 fc mov %dx,0xfffffffc(%ebp) + 141c9: 83 ec 0c sub $0xc,%esp + 141cc: 6a 64 push $0x64 + 141ce: 6a 00 push $0x0 + 141d0: 6a 00 push $0x0 + 141d2: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141d5: 25 ff ff 00 00 and $0xffff,%eax + 141da: 50 push %eax + 141db: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 141df: 25 ff ff 00 00 and $0xffff,%eax + 141e4: 50 push %eax + 141e5: 68 83 00 00 00 push $0x83 + 141ea: 6a 08 push $0x8 + 141ec: 6a 00 push $0x0 + 141ee: ff 75 08 pushl 0x8(%ebp) + 141f1: e8 92 fc ff ff call 13e88 <___create_pipe> + 141f6: 83 c4 08 add $0x8,%esp + 141f9: 0d 80 00 00 80 or $0x80000080,%eax + 141fe: 50 push %eax + 141ff: ff 75 08 pushl 0x8(%ebp) + 14202: e8 e9 cf ff ff call 111f0 <_usb_control_msg> + 14207: 83 c4 30 add $0x30,%esp + 1420a: c9 leave + 1420b: c3 ret + +0001420c <_list_del>: + 1420c: 55 push %ebp + 1420d: 89 e5 mov %esp,%ebp + 1420f: 83 ec 08 sub $0x8,%esp + 14212: 83 ec 08 sub $0x8,%esp + 14215: 8b 45 08 mov 0x8(%ebp),%eax + 14218: ff 30 pushl (%eax) + 1421a: 8b 45 08 mov 0x8(%ebp),%eax + 1421d: ff 70 04 pushl 0x4(%eax) + 14220: e8 18 00 00 00 call 1423d <___list_del> + 14225: 83 c4 10 add $0x10,%esp + 14228: 8b 45 08 mov 0x8(%ebp),%eax + 1422b: c7 00 00 00 00 00 movl $0x0,(%eax) + 14231: 8b 45 08 mov 0x8(%ebp),%eax + 14234: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) + 1423b: c9 leave + 1423c: c3 ret + +0001423d <___list_del>: + 1423d: 55 push %ebp + 1423e: 89 e5 mov %esp,%ebp + 14240: 8b 55 0c mov 0xc(%ebp),%edx + 14243: 8b 45 08 mov 0x8(%ebp),%eax + 14246: 89 42 04 mov %eax,0x4(%edx) + 14249: 8b 55 08 mov 0x8(%ebp),%edx + 1424c: 8b 45 0c mov 0xc(%ebp),%eax + 1424f: 89 02 mov %eax,(%edx) + 14251: 5d pop %ebp + 14252: c3 ret + +00014253 <_usb_hub_tt_clear_buffer>: + 14253: 55 push %ebp + 14254: 89 e5 mov %esp,%ebp + 14256: 83 ec 28 sub $0x28,%esp + 14259: 8b 45 08 mov 0x8(%ebp),%eax + 1425c: 8b 40 1c mov 0x1c(%eax),%eax + 1425f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14262: 83 ec 08 sub $0x8,%esp + 14265: 6a 10 push $0x10 + 14267: 6a 01 push $0x1 + 14269: e8 c2 57 00 00 call 19a30 <_ExAllocatePool@8> + 1426e: 83 c4 08 add $0x8,%esp + 14271: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14274: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14277: 85 c0 test %eax,%eax + 14279: 75 05 jne 14280 <_usb_hub_tt_clear_buffer+0x2d> + 1427b: e9 d3 00 00 00 jmp 14353 <_usb_hub_tt_clear_buffer+0x100> + 14280: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14283: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14286: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14289: 83 78 04 00 cmpl $0x0,0x4(%eax) + 1428d: 74 0b je 1429a <_usb_hub_tt_clear_buffer+0x47> + 1428f: 8b 45 08 mov 0x8(%ebp),%eax + 14292: 8b 40 20 mov 0x20(%eax),%eax + 14295: 89 45 ec mov %eax,0xffffffec(%ebp) + 14298: eb 07 jmp 142a1 <_usb_hub_tt_clear_buffer+0x4e> + 1429a: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) + 142a1: 8b 45 ec mov 0xffffffec(%ebp),%eax + 142a4: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 142a7: 89 42 08 mov %eax,0x8(%edx) + 142aa: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 142ad: 8b 45 0c mov 0xc(%ebp),%eax + 142b0: c1 f8 0f sar $0xf,%eax + 142b3: 83 e0 0f and $0xf,%eax + 142b6: 66 89 42 0c mov %ax,0xc(%edx) + 142ba: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 142bd: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 142c0: 8b 45 08 mov 0x8(%ebp),%eax + 142c3: 8b 00 mov (%eax),%eax + 142c5: c1 e0 04 shl $0x4,%eax + 142c8: 66 0b 42 0c or 0xc(%edx),%ax + 142cc: 66 89 41 0c mov %ax,0xc(%ecx) + 142d0: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 142d3: 89 55 e8 mov %edx,0xffffffe8(%ebp) + 142d6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 142d9: 66 8b 40 0c mov 0xc(%eax),%ax + 142dd: 25 ff ff 00 00 and $0xffff,%eax + 142e2: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 142e5: 8b 45 0c mov 0xc(%ebp),%eax + 142e8: c1 f8 1e sar $0x1e,%eax + 142eb: 83 e0 03 and $0x3,%eax + 142ee: 83 f8 02 cmp $0x2,%eax + 142f1: 74 07 je 142fa <_usb_hub_tt_clear_buffer+0xa7> + 142f3: 81 4d e4 00 10 00 00 orl $0x1000,0xffffffe4(%ebp) + 142fa: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 142fd: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 14300: 66 89 50 0c mov %dx,0xc(%eax) + 14304: 8b 45 0c mov 0xc(%ebp),%eax + 14307: c1 e8 07 shr $0x7,%eax + 1430a: 83 e0 01 and $0x1,%eax + 1430d: 85 c0 test %eax,%eax + 1430f: 74 14 je 14325 <_usb_hub_tt_clear_buffer+0xd2> + 14311: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14314: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 14317: 66 8b 52 0c mov 0xc(%edx),%dx + 1431b: 81 ca 00 80 ff ff or $0xffff8000,%edx + 14321: 66 89 50 0c mov %dx,0xc(%eax) + 14325: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1432c: 83 ec 08 sub $0x8,%esp + 1432f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14332: 83 c0 0c add $0xc,%eax + 14335: 50 push %eax + 14336: ff 75 f4 pushl 0xfffffff4(%ebp) + 14339: e8 1c 00 00 00 call 1435a <_list_add_tail> + 1433e: 83 c4 10 add $0x10,%esp + 14341: 83 ec 0c sub $0xc,%esp + 14344: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14347: 83 c0 14 add $0x14,%eax + 1434a: 50 push %eax + 1434b: e8 05 00 00 00 call 14355 <_schedule_work> + 14350: 83 c4 10 add $0x10,%esp + 14353: c9 leave + 14354: c3 ret + +00014355 <_schedule_work>: + 14355: 55 push %ebp + 14356: 89 e5 mov %esp,%ebp + 14358: 5d pop %ebp + 14359: c3 ret + +0001435a <_list_add_tail>: + 1435a: 55 push %ebp + 1435b: 89 e5 mov %esp,%ebp + 1435d: ff 75 0c pushl 0xc(%ebp) + 14360: 8b 45 0c mov 0xc(%ebp),%eax + 14363: ff 70 04 pushl 0x4(%eax) + 14366: ff 75 08 pushl 0x8(%ebp) + 14369: e8 69 fd ff ff call 140d7 <___list_add> + 1436e: 83 c4 0c add $0xc,%esp + 14371: c9 leave + 14372: c3 ret + +00014373 <_hub_power_on>: + 14373: 55 push %ebp + 14374: 89 e5 mov %esp,%ebp + 14376: 83 ec 18 sub $0x18,%esp + 14379: 8b 45 08 mov 0x8(%ebp),%eax + 1437c: 8b 00 mov (%eax),%eax + 1437e: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14384: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14387: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1438a: 2d c0 00 00 00 sub $0xc0,%eax + 1438f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14392: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14399: 8b 45 08 mov 0x8(%ebp),%eax + 1439c: 8b 40 2c mov 0x2c(%eax),%eax + 1439f: 8a 40 02 mov 0x2(%eax),%al + 143a2: 25 ff 00 00 00 and $0xff,%eax + 143a7: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 143aa: 7e 1c jle 143c8 <_hub_power_on+0x55> + 143ac: 83 ec 04 sub $0x4,%esp + 143af: 6a 08 push $0x8 + 143b1: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 143b4: 40 inc %eax + 143b5: 50 push %eax + 143b6: ff 75 fc pushl 0xfffffffc(%ebp) + 143b9: e8 62 fb ff ff call 13f20 <_set_port_feature> + 143be: 83 c4 10 add $0x10,%esp + 143c1: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 143c4: ff 00 incl (%eax) + 143c6: eb d1 jmp 14399 <_hub_power_on+0x26> + 143c8: 83 ec 0c sub $0xc,%esp + 143cb: 8b 45 08 mov 0x8(%ebp),%eax + 143ce: 8b 40 2c mov 0x2c(%eax),%eax + 143d1: 8a 40 05 mov 0x5(%eax),%al + 143d4: 25 ff 00 00 00 and $0xff,%eax + 143d9: 01 c0 add %eax,%eax + 143db: 50 push %eax + 143dc: e8 cf 50 00 00 call 194b0 <_wait_ms> + 143e1: 83 c4 10 add $0x10,%esp + 143e4: c9 leave + 143e5: c3 ret + +000143e6 <_hub_hub_status>: + 143e6: 55 push %ebp + 143e7: 89 e5 mov %esp,%ebp + 143e9: 83 ec 08 sub $0x8,%esp + 143ec: 8b 45 08 mov 0x8(%ebp),%eax + 143ef: 8b 00 mov (%eax),%eax + 143f1: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 143f7: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 143fa: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 143fd: 2d c0 00 00 00 sub $0xc0,%eax + 14402: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14405: 83 ec 08 sub $0x8,%esp + 14408: 8b 45 08 mov 0x8(%ebp),%eax + 1440b: ff 70 10 pushl 0x10(%eax) + 1440e: ff 75 fc pushl 0xfffffffc(%ebp) + 14411: e8 4f fb ff ff call 13f65 <_get_hub_status> + 14416: 83 c4 10 add $0x10,%esp + 14419: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1441c: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 14420: 79 02 jns 14424 <_hub_hub_status+0x3e> + 14422: eb 26 jmp 1444a <_hub_hub_status+0x64> + 14424: 8b 55 0c mov 0xc(%ebp),%edx + 14427: 8b 45 08 mov 0x8(%ebp),%eax + 1442a: 8b 40 10 mov 0x10(%eax),%eax + 1442d: 66 8b 00 mov (%eax),%ax + 14430: 66 89 02 mov %ax,(%edx) + 14433: 8b 55 10 mov 0x10(%ebp),%edx + 14436: 8b 45 08 mov 0x8(%ebp),%eax + 14439: 8b 40 10 mov 0x10(%eax),%eax + 1443c: 66 8b 40 02 mov 0x2(%eax),%ax + 14440: 66 89 02 mov %ax,(%edx) + 14443: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1444a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1444d: c9 leave + 1444e: c3 ret + +0001444f <_hub_configure>: + 1444f: 55 push %ebp + 14450: 89 e5 mov %esp,%ebp + 14452: 53 push %ebx + 14453: 83 ec 74 sub $0x74,%esp + 14456: 8b 45 08 mov 0x8(%ebp),%eax + 14459: 8b 00 mov (%eax),%eax + 1445b: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14461: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14464: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14467: 2d c0 00 00 00 sub $0xc0,%eax + 1446c: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1446f: 8b 5d 08 mov 0x8(%ebp),%ebx + 14472: 8b 45 08 mov 0x8(%ebp),%eax + 14475: 83 c0 0c add $0xc,%eax + 14478: 50 push %eax + 14479: 6a 00 push $0x0 + 1447b: 6a 03 push $0x3 + 1447d: ff 75 f4 pushl 0xfffffff4(%ebp) + 14480: e8 dd 2b 00 00 call 17062 <_usb_buffer_alloc> + 14485: 83 c4 10 add $0x10,%esp + 14488: 89 43 08 mov %eax,0x8(%ebx) + 1448b: 8b 45 08 mov 0x8(%ebp),%eax + 1448e: 83 78 08 00 cmpl $0x0,0x8(%eax) + 14492: 75 13 jne 144a7 <_hub_configure+0x58> + 14494: c7 45 dc 58 b1 01 00 movl $0x1b158,0xffffffdc(%ebp) + 1449b: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 144a2: e9 88 03 00 00 jmp 1482f <_hub_configure+0x3e0> + 144a7: 8b 5d 08 mov 0x8(%ebp),%ebx + 144aa: 83 ec 08 sub $0x8,%esp + 144ad: 6a 04 push $0x4 + 144af: 6a 01 push $0x1 + 144b1: e8 7a 55 00 00 call 19a30 <_ExAllocatePool@8> + 144b6: 83 c4 08 add $0x8,%esp + 144b9: 89 43 10 mov %eax,0x10(%ebx) + 144bc: 8b 45 08 mov 0x8(%ebp),%eax + 144bf: 83 78 10 00 cmpl $0x0,0x10(%eax) + 144c3: 75 13 jne 144d8 <_hub_configure+0x89> + 144c5: c7 45 dc 78 b1 01 00 movl $0x1b178,0xffffffdc(%ebp) + 144cc: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 144d3: e9 57 03 00 00 jmp 1482f <_hub_configure+0x3e0> + 144d8: 8b 5d 08 mov 0x8(%ebp),%ebx + 144db: 83 ec 08 sub $0x8,%esp + 144de: 6a 0d push $0xd + 144e0: 6a 01 push $0x1 + 144e2: e8 49 55 00 00 call 19a30 <_ExAllocatePool@8> + 144e7: 83 c4 08 add $0x8,%esp + 144ea: 89 43 2c mov %eax,0x2c(%ebx) + 144ed: 8b 45 08 mov 0x8(%ebp),%eax + 144f0: 83 78 2c 00 cmpl $0x0,0x2c(%eax) + 144f4: 75 13 jne 14509 <_hub_configure+0xba> + 144f6: c7 45 dc 98 b1 01 00 movl $0x1b198,0xffffffdc(%ebp) + 144fd: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 14504: e9 26 03 00 00 jmp 1482f <_hub_configure+0x3e0> + 14509: 83 ec 04 sub $0x4,%esp + 1450c: 6a 0d push $0xd + 1450e: 8b 45 08 mov 0x8(%ebp),%eax + 14511: ff 70 2c pushl 0x2c(%eax) + 14514: ff 75 f4 pushl 0xfffffff4(%ebp) + 14517: e8 24 f9 ff ff call 13e40 <_get_hub_descriptor> + 1451c: 83 c4 10 add $0x10,%esp + 1451f: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 14522: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 14526: 79 0c jns 14534 <_hub_configure+0xe5> + 14528: c7 45 dc b5 b1 01 00 movl $0x1b1b5,0xffffffdc(%ebp) + 1452f: e9 fb 02 00 00 jmp 1482f <_hub_configure+0x3e0> + 14534: 8b 45 08 mov 0x8(%ebp),%eax + 14537: 8b 40 2c mov 0x2c(%eax),%eax + 1453a: 80 78 02 10 cmpb $0x10,0x2(%eax) + 1453e: 76 13 jbe 14553 <_hub_configure+0x104> + 14540: c7 45 dc cf b1 01 00 movl $0x1b1cf,0xffffffdc(%ebp) + 14547: c7 45 e0 ed ff ff ff movl $0xffffffed,0xffffffe0(%ebp) + 1454e: e9 dc 02 00 00 jmp 1482f <_hub_configure+0x3e0> + 14553: 83 ec 0c sub $0xc,%esp + 14556: ff 75 f4 pushl 0xfffffff4(%ebp) + 14559: e8 49 03 00 00 call 148a7 <_hubdev> + 1455e: 83 c4 10 add $0x10,%esp + 14561: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14564: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 14567: 8b 45 08 mov 0x8(%ebp),%eax + 1456a: 8b 40 2c mov 0x2c(%eax),%eax + 1456d: 8a 40 02 mov 0x2(%eax),%al + 14570: 25 ff 00 00 00 and $0xff,%eax + 14575: 89 82 ac 01 00 00 mov %eax,0x1ac(%edx) + 1457b: 8b 45 08 mov 0x8(%ebp),%eax + 1457e: 8b 40 2c mov 0x2c(%eax),%eax + 14581: 66 8b 40 03 mov 0x3(%eax),%ax + 14585: 25 ff ff 00 00 and $0xffff,%eax + 1458a: c1 e8 02 shr $0x2,%eax + 1458d: 83 e0 01 and $0x1,%eax + 14590: 85 c0 test %eax,%eax + 14592: 0f 84 b5 00 00 00 je 1464d <_hub_configure+0x1fe> + 14598: c7 45 d8 00 00 00 00 movl $0x0,0xffffffd8(%ebp) + 1459f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 145a2: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 145a8: 3b 45 d8 cmp 0xffffffd8(%ebp),%eax + 145ab: 0f 8e 88 00 00 00 jle 14639 <_hub_configure+0x1ea> + 145b1: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 145b4: 03 45 d8 add 0xffffffd8(%ebp),%eax + 145b7: 83 e8 40 sub $0x40,%eax + 145ba: 89 45 b0 mov %eax,0xffffffb0(%ebp) + 145bd: 8b 45 08 mov 0x8(%ebp),%eax + 145c0: 8b 40 2c mov 0x2c(%eax),%eax + 145c3: 89 45 a8 mov %eax,0xffffffa8(%ebp) + 145c6: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 145c9: 40 inc %eax + 145ca: 89 45 a4 mov %eax,0xffffffa4(%ebp) + 145cd: 83 7d a4 00 cmpl $0x0,0xffffffa4(%ebp) + 145d1: 79 04 jns 145d7 <_hub_configure+0x188> + 145d3: 83 45 a4 07 addl $0x7,0xffffffa4(%ebp) + 145d7: 8b 45 a4 mov 0xffffffa4(%ebp),%eax + 145da: c1 f8 03 sar $0x3,%eax + 145dd: 8b 4d a8 mov 0xffffffa8(%ebp),%ecx + 145e0: ba 00 00 00 00 mov $0x0,%edx + 145e5: 8a 54 08 07 mov 0x7(%eax,%ecx,1),%dl + 145e9: 89 55 a0 mov %edx,0xffffffa0(%ebp) + 145ec: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 145ef: 40 inc %eax + 145f0: 89 45 9c mov %eax,0xffffff9c(%ebp) + 145f3: 8b 55 9c mov 0xffffff9c(%ebp),%edx + 145f6: 89 55 98 mov %edx,0xffffff98(%ebp) + 145f9: 83 7d 98 00 cmpl $0x0,0xffffff98(%ebp) + 145fd: 79 04 jns 14603 <_hub_configure+0x1b4> + 145ff: 83 45 98 07 addl $0x7,0xffffff98(%ebp) + 14603: 8b 45 98 mov 0xffffff98(%ebp),%eax + 14606: c1 f8 03 sar $0x3,%eax + 14609: c1 e0 03 shl $0x3,%eax + 1460c: 8b 4d 9c mov 0xffffff9c(%ebp),%ecx + 1460f: 29 c1 sub %eax,%ecx + 14611: 8b 45 a0 mov 0xffffffa0(%ebp),%eax + 14614: d3 f8 sar %cl,%eax + 14616: 83 e0 01 and $0x1,%eax + 14619: 85 c0 test %eax,%eax + 1461b: 74 06 je 14623 <_hub_configure+0x1d4> + 1461d: c6 45 af 46 movb $0x46,0xffffffaf(%ebp) + 14621: eb 04 jmp 14627 <_hub_configure+0x1d8> + 14623: c6 45 af 52 movb $0x52,0xffffffaf(%ebp) + 14627: 8a 4d af mov 0xffffffaf(%ebp),%cl + 1462a: 8b 45 b0 mov 0xffffffb0(%ebp),%eax + 1462d: 88 08 mov %cl,(%eax) + 1462f: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 14632: ff 00 incl (%eax) + 14634: e9 66 ff ff ff jmp 1459f <_hub_configure+0x150> + 14639: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1463c: 8d 55 f8 lea 0xfffffff8(%ebp),%edx + 1463f: 03 90 ac 01 00 00 add 0x1ac(%eax),%edx + 14645: 89 d0 mov %edx,%eax + 14647: 83 e8 40 sub $0x40,%eax + 1464a: c6 00 00 movb $0x0,(%eax) + 1464d: 8b 55 08 mov 0x8(%ebp),%edx + 14650: 83 c2 40 add $0x40,%edx + 14653: 8b 45 08 mov 0x8(%ebp),%eax + 14656: 83 c0 40 add $0x40,%eax + 14659: 89 02 mov %eax,(%edx) + 1465b: 8b 55 08 mov 0x8(%ebp),%edx + 1465e: 83 c2 40 add $0x40,%edx + 14661: 8b 45 08 mov 0x8(%ebp),%eax + 14664: 83 c0 40 add $0x40,%eax + 14667: 89 42 04 mov %eax,0x4(%edx) + 1466a: 8b 45 08 mov 0x8(%ebp),%eax + 1466d: 83 c0 48 add $0x48,%eax + 14670: c7 00 13 41 01 00 movl $0x14113,(%eax) + 14676: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14679: b9 00 00 00 00 mov $0x0,%ecx + 1467e: 8a 88 76 01 00 00 mov 0x176(%eax),%cl + 14684: 89 4d 94 mov %ecx,0xffffff94(%ebp) + 14687: 83 7d 94 01 cmpl $0x1,0xffffff94(%ebp) + 1468b: 74 08 je 14695 <_hub_configure+0x246> + 1468d: 83 7d 94 02 cmpl $0x2,0xffffff94(%ebp) + 14691: 74 0d je 146a0 <_hub_configure+0x251> + 14693: eb 1e jmp 146b3 <_hub_configure+0x264> + 14695: 8b 55 08 mov 0x8(%ebp),%edx + 14698: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1469b: 89 42 34 mov %eax,0x34(%edx) + 1469e: eb 13 jmp 146b3 <_hub_configure+0x264> + 146a0: 8b 45 08 mov 0x8(%ebp),%eax + 146a3: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 146a6: 89 50 34 mov %edx,0x34(%eax) + 146a9: 8b 45 08 mov 0x8(%ebp),%eax + 146ac: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) + 146b3: 8b 45 08 mov 0x8(%ebp),%eax + 146b6: 8b 40 2c mov 0x2c(%eax),%eax + 146b9: 66 8b 40 03 mov 0x3(%eax),%ax + 146bd: 25 ff ff 00 00 and $0xffff,%eax + 146c2: 83 e0 60 and $0x60,%eax + 146c5: 85 c0 test %eax,%eax + 146c7: 74 02 je 146cb <_hub_configure+0x27c> + 146c9: eb 00 jmp 146cb <_hub_configure+0x27c> + 146cb: 83 ec 04 sub $0x4,%esp + 146ce: 8d 45 ec lea 0xffffffec(%ebp),%eax + 146d1: 50 push %eax + 146d2: 8d 45 ee lea 0xffffffee(%ebp),%eax + 146d5: 50 push %eax + 146d6: ff 75 08 pushl 0x8(%ebp) + 146d9: e8 08 fd ff ff call 143e6 <_hub_hub_status> + 146de: 83 c4 10 add $0x10,%esp + 146e1: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 146e4: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 146e8: 79 0c jns 146f6 <_hub_configure+0x2a7> + 146ea: c7 45 dc e7 b1 01 00 movl $0x1b1e7,0xffffffdc(%ebp) + 146f1: e9 39 01 00 00 jmp 1482f <_hub_configure+0x3e0> + 146f6: 8b 45 0c mov 0xc(%ebp),%eax + 146f9: 8a 40 02 mov 0x2(%eax),%al + 146fc: 25 ff 00 00 00 and $0xff,%eax + 14701: 50 push %eax + 14702: ff 75 f4 pushl 0xfffffff4(%ebp) + 14705: e8 7e f7 ff ff call 13e88 <___create_pipe> + 1470a: 83 c4 08 add $0x8,%esp + 1470d: 0d 80 00 00 40 or $0x40000080,%eax + 14712: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 14715: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 14718: c1 e8 07 shr $0x7,%eax + 1471b: 83 e0 01 and $0x1,%eax + 1471e: 85 c0 test %eax,%eax + 14720: 75 15 jne 14737 <_hub_configure+0x2e8> + 14722: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 14725: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 14728: c1 e8 0f shr $0xf,%eax + 1472b: 83 e0 0f and $0xf,%eax + 1472e: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax + 14732: 89 45 90 mov %eax,0xffffff90(%ebp) + 14735: eb 13 jmp 1474a <_hub_configure+0x2fb> + 14737: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 1473a: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1473d: c1 e8 0f shr $0xf,%eax + 14740: 83 e0 0f and $0xf,%eax + 14743: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax + 14747: 89 45 90 mov %eax,0xffffff90(%ebp) + 1474a: 8b 45 90 mov 0xffffff90(%ebp),%eax + 1474d: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 14750: 83 7d e4 03 cmpl $0x3,0xffffffe4(%ebp) + 14754: 76 07 jbe 1475d <_hub_configure+0x30e> + 14756: c7 45 e4 03 00 00 00 movl $0x3,0xffffffe4(%ebp) + 1475d: 8b 5d 08 mov 0x8(%ebp),%ebx + 14760: 83 ec 08 sub $0x8,%esp + 14763: 6a 00 push $0x0 + 14765: 6a 00 push $0x0 + 14767: e8 80 39 00 00 call 180ec <_usb_alloc_urb@8> + 1476c: 83 c4 08 add $0x8,%esp + 1476f: 89 43 04 mov %eax,0x4(%ebx) + 14772: 8b 45 08 mov 0x8(%ebp),%eax + 14775: 83 78 04 00 cmpl $0x0,0x4(%eax) + 14779: 75 13 jne 1478e <_hub_configure+0x33f> + 1477b: c7 45 dc fc b1 01 00 movl $0x1b1fc,0xffffffdc(%ebp) + 14782: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 14789: e9 a1 00 00 00 jmp 1482f <_hub_configure+0x3e0> + 1478e: 8b 45 0c mov 0xc(%ebp),%eax + 14791: 8a 40 06 mov 0x6(%eax),%al + 14794: 25 ff 00 00 00 and $0xff,%eax + 14799: 50 push %eax + 1479a: ff 75 08 pushl 0x8(%ebp) + 1479d: 68 e8 3f 01 00 push $0x13fe8 + 147a2: ff 75 e4 pushl 0xffffffe4(%ebp) + 147a5: 8b 45 08 mov 0x8(%ebp),%eax + 147a8: ff 70 08 pushl 0x8(%eax) + 147ab: ff 75 e8 pushl 0xffffffe8(%ebp) + 147ae: ff 75 f4 pushl 0xfffffff4(%ebp) + 147b1: 8b 45 08 mov 0x8(%ebp),%eax + 147b4: ff 70 04 pushl 0x4(%eax) + 147b7: e8 81 00 00 00 call 1483d <_usb_fill_int_urb> + 147bc: 83 c4 20 add $0x20,%esp + 147bf: 8b 45 08 mov 0x8(%ebp),%eax + 147c2: 8b 50 04 mov 0x4(%eax),%edx + 147c5: 8b 45 08 mov 0x8(%ebp),%eax + 147c8: 8b 40 0c mov 0xc(%eax),%eax + 147cb: 89 42 28 mov %eax,0x28(%edx) + 147ce: 8b 45 08 mov 0x8(%ebp),%eax + 147d1: 8b 50 04 mov 0x4(%eax),%edx + 147d4: 8b 45 08 mov 0x8(%ebp),%eax + 147d7: 8b 40 04 mov 0x4(%eax),%eax + 147da: 8b 40 20 mov 0x20(%eax),%eax + 147dd: 83 c8 04 or $0x4,%eax + 147e0: 89 42 20 mov %eax,0x20(%edx) + 147e3: 83 ec 08 sub $0x8,%esp + 147e6: 6a 00 push $0x0 + 147e8: 8b 45 08 mov 0x8(%ebp),%eax + 147eb: ff 70 04 pushl 0x4(%eax) + 147ee: e8 b0 39 00 00 call 181a3 <_usb_submit_urb@8> + 147f3: 83 c4 08 add $0x8,%esp + 147f6: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 147f9: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 147fd: 74 09 je 14808 <_hub_configure+0x3b9> + 147ff: c7 45 dc 1c b2 01 00 movl $0x1b21c,0xffffffdc(%ebp) + 14806: eb 27 jmp 1482f <_hub_configure+0x3e0> + 14808: 83 ec 0c sub $0xc,%esp + 1480b: 68 50 c0 01 00 push $0x1c050 + 14810: e8 50 50 00 00 call 19865 <_my_wake_up> + 14815: 83 c4 10 add $0x10,%esp + 14818: 83 ec 0c sub $0xc,%esp + 1481b: ff 75 08 pushl 0x8(%ebp) + 1481e: e8 50 fb ff ff call 14373 <_hub_power_on> + 14823: 83 c4 10 add $0x10,%esp + 14826: c7 45 b4 00 00 00 00 movl $0x0,0xffffffb4(%ebp) + 1482d: eb 06 jmp 14835 <_hub_configure+0x3e6> + 1482f: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 14832: 89 45 b4 mov %eax,0xffffffb4(%ebp) + 14835: 8b 45 b4 mov 0xffffffb4(%ebp),%eax + 14838: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 1483b: c9 leave + 1483c: c3 ret + +0001483d <_usb_fill_int_urb>: + 1483d: 55 push %ebp + 1483e: 89 e5 mov %esp,%ebp + 14840: 8b 55 08 mov 0x8(%ebp),%edx + 14843: 8b 45 0c mov 0xc(%ebp),%eax + 14846: 89 42 14 mov %eax,0x14(%edx) + 14849: 8b 55 08 mov 0x8(%ebp),%edx + 1484c: 8b 45 10 mov 0x10(%ebp),%eax + 1484f: 89 42 18 mov %eax,0x18(%edx) + 14852: 8b 55 08 mov 0x8(%ebp),%edx + 14855: 8b 45 14 mov 0x14(%ebp),%eax + 14858: 89 42 24 mov %eax,0x24(%edx) + 1485b: 8b 55 08 mov 0x8(%ebp),%edx + 1485e: 8b 45 18 mov 0x18(%ebp),%eax + 14861: 89 42 2c mov %eax,0x2c(%edx) + 14864: 8b 55 08 mov 0x8(%ebp),%edx + 14867: 8b 45 1c mov 0x1c(%ebp),%eax + 1486a: 89 42 58 mov %eax,0x58(%edx) + 1486d: 8b 55 08 mov 0x8(%ebp),%edx + 14870: 8b 45 20 mov 0x20(%ebp),%eax + 14873: 89 42 54 mov %eax,0x54(%edx) + 14876: 8b 45 0c mov 0xc(%ebp),%eax + 14879: 83 78 18 03 cmpl $0x3,0x18(%eax) + 1487d: 75 13 jne 14892 <_usb_fill_int_urb+0x55> + 1487f: 8b 55 08 mov 0x8(%ebp),%edx + 14882: 8b 4d 24 mov 0x24(%ebp),%ecx + 14885: 49 dec %ecx + 14886: b8 01 00 00 00 mov $0x1,%eax + 1488b: d3 e0 shl %cl,%eax + 1488d: 89 42 48 mov %eax,0x48(%edx) + 14890: eb 09 jmp 1489b <_usb_fill_int_urb+0x5e> + 14892: 8b 55 08 mov 0x8(%ebp),%edx + 14895: 8b 45 24 mov 0x24(%ebp),%eax + 14898: 89 42 48 mov %eax,0x48(%edx) + 1489b: 8b 45 08 mov 0x8(%ebp),%eax + 1489e: c7 40 40 ff ff ff ff movl $0xffffffff,0x40(%eax) + 148a5: 5d pop %ebp + 148a6: c3 ret + +000148a7 <_hubdev>: + 148a7: 55 push %ebp + 148a8: 89 e5 mov %esp,%ebp + 148aa: 8b 45 08 mov 0x8(%ebp),%eax + 148ad: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 148b3: 8b 40 0c mov 0xc(%eax),%eax + 148b6: 83 c0 18 add $0x18,%eax + 148b9: 5d pop %ebp + 148ba: c3 ret + +000148bb <_hub_disconnect>: + 148bb: 55 push %ebp + 148bc: 89 e5 mov %esp,%ebp + 148be: 83 ec 18 sub $0x18,%esp + 148c1: 83 ec 0c sub $0xc,%esp + 148c4: ff 75 08 pushl 0x8(%ebp) + 148c7: e8 66 01 00 00 call 14a32 <_usb_get_intfdata> + 148cc: 83 c4 10 add $0x10,%esp + 148cf: 89 45 fc mov %eax,0xfffffffc(%ebp) + 148d2: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 148d6: 75 05 jne 148dd <_hub_disconnect+0x22> + 148d8: e9 3f 01 00 00 jmp 14a1c <_hub_disconnect+0x161> + 148dd: 83 ec 08 sub $0x8,%esp + 148e0: 6a 00 push $0x0 + 148e2: ff 75 08 pushl 0x8(%ebp) + 148e5: e8 34 01 00 00 call 14a1e <_usb_set_intfdata> + 148ea: 83 c4 10 add $0x10,%esp + 148ed: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 148f4: 83 ec 0c sub $0xc,%esp + 148f7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 148fa: 83 c0 24 add $0x24,%eax + 148fd: 50 push %eax + 148fe: e8 09 f9 ff ff call 1420c <_list_del> + 14903: 83 c4 10 add $0x10,%esp + 14906: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14909: 83 c2 24 add $0x24,%edx + 1490c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1490f: 83 c0 24 add $0x24,%eax + 14912: 89 02 mov %eax,(%edx) + 14914: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14917: 83 c2 24 add $0x24,%edx + 1491a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1491d: 83 c0 24 add $0x24,%eax + 14920: 89 42 04 mov %eax,0x4(%edx) + 14923: 83 ec 0c sub $0xc,%esp + 14926: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14929: 83 c0 1c add $0x1c,%eax + 1492c: 50 push %eax + 1492d: e8 da f8 ff ff call 1420c <_list_del> + 14932: 83 c4 10 add $0x10,%esp + 14935: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14938: 83 c2 1c add $0x1c,%edx + 1493b: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1493e: 83 c0 1c add $0x1c,%eax + 14941: 89 02 mov %eax,(%edx) + 14943: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14946: 83 c2 1c add $0x1c,%edx + 14949: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1494c: 83 c0 1c add $0x1c,%eax + 1494f: 89 42 04 mov %eax,0x4(%edx) + 14952: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14955: 83 78 04 00 cmpl $0x0,0x4(%eax) + 14959: 74 2c je 14987 <_hub_disconnect+0xcc> + 1495b: 83 ec 0c sub $0xc,%esp + 1495e: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14961: ff 70 04 pushl 0x4(%eax) + 14964: e8 51 3b 00 00 call 184ba <_usb_unlink_urb@4> + 14969: 83 c4 0c add $0xc,%esp + 1496c: 83 ec 0c sub $0xc,%esp + 1496f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14972: ff 70 04 pushl 0x4(%eax) + 14975: e8 bc 37 00 00 call 18136 <_usb_free_urb@4> + 1497a: 83 c4 0c add $0xc,%esp + 1497d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14980: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) + 14987: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1498a: 83 78 2c 00 cmpl $0x0,0x2c(%eax) + 1498e: 74 1b je 149ab <_hub_disconnect+0xf0> + 14990: 83 ec 0c sub $0xc,%esp + 14993: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14996: ff 70 2c pushl 0x2c(%eax) + 14999: e8 a2 50 00 00 call 19a40 <_ExFreePool@4> + 1499e: 83 c4 0c add $0xc,%esp + 149a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149a4: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) + 149ab: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149ae: 83 78 10 00 cmpl $0x0,0x10(%eax) + 149b2: 74 1b je 149cf <_hub_disconnect+0x114> + 149b4: 83 ec 0c sub $0xc,%esp + 149b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149ba: ff 70 10 pushl 0x10(%eax) + 149bd: e8 7e 50 00 00 call 19a40 <_ExFreePool@4> + 149c2: 83 c4 0c add $0xc,%esp + 149c5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149c8: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 149cf: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149d2: 83 78 08 00 cmpl $0x0,0x8(%eax) + 149d6: 74 36 je 14a0e <_hub_disconnect+0x153> + 149d8: 8b 45 08 mov 0x8(%ebp),%eax + 149db: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 149e1: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 149e4: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 149e7: 81 ea c0 00 00 00 sub $0xc0,%edx + 149ed: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149f0: ff 70 0c pushl 0xc(%eax) + 149f3: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149f6: ff 70 08 pushl 0x8(%eax) + 149f9: 6a 03 push $0x3 + 149fb: 52 push %edx + 149fc: e8 d1 26 00 00 call 170d2 <_usb_buffer_free> + 14a01: 83 c4 10 add $0x10,%esp + 14a04: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14a07: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 14a0e: 83 ec 0c sub $0xc,%esp + 14a11: ff 75 fc pushl 0xfffffffc(%ebp) + 14a14: e8 27 50 00 00 call 19a40 <_ExFreePool@4> + 14a19: 83 c4 0c add $0xc,%esp + 14a1c: c9 leave + 14a1d: c3 ret + +00014a1e <_usb_set_intfdata>: + 14a1e: 55 push %ebp + 14a1f: 89 e5 mov %esp,%ebp + 14a21: 8b 55 08 mov 0x8(%ebp),%edx + 14a24: 83 c2 18 add $0x18,%edx + 14a27: 8b 45 0c mov 0xc(%ebp),%eax + 14a2a: 89 82 9c 00 00 00 mov %eax,0x9c(%edx) + 14a30: 5d pop %ebp + 14a31: c3 ret + +00014a32 <_usb_get_intfdata>: + 14a32: 55 push %ebp + 14a33: 89 e5 mov %esp,%ebp + 14a35: 8b 45 08 mov 0x8(%ebp),%eax + 14a38: 83 c0 18 add $0x18,%eax + 14a3b: 8b 80 9c 00 00 00 mov 0x9c(%eax),%eax + 14a41: 5d pop %ebp + 14a42: c3 ret + +00014a43 <_hub_probe>: + 14a43: 55 push %ebp + 14a44: 89 e5 mov %esp,%ebp + 14a46: 83 ec 28 sub $0x28,%esp + 14a49: 8b 4d 08 mov 0x8(%ebp),%ecx + 14a4c: 8b 45 08 mov 0x8(%ebp),%eax + 14a4f: 8b 50 04 mov 0x4(%eax),%edx + 14a52: 89 d0 mov %edx,%eax + 14a54: 01 c0 add %eax,%eax + 14a56: 01 d0 add %edx,%eax + 14a58: c1 e0 03 shl $0x3,%eax + 14a5b: 03 01 add (%ecx),%eax + 14a5d: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14a60: 8b 45 08 mov 0x8(%ebp),%eax + 14a63: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14a69: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 14a6c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 14a6f: 2d c0 00 00 00 sub $0xc0,%eax + 14a74: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14a77: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14a7a: 80 78 06 00 cmpb $0x0,0x6(%eax) + 14a7e: 74 15 je 14a95 <_hub_probe+0x52> + 14a80: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14a83: 80 78 06 01 cmpb $0x1,0x6(%eax) + 14a87: 74 0c je 14a95 <_hub_probe+0x52> + 14a89: c7 45 e4 fb ff ff ff movl $0xfffffffb,0xffffffe4(%ebp) + 14a90: e9 22 01 00 00 jmp 14bb7 <_hub_probe+0x174> + 14a95: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14a98: 80 78 04 01 cmpb $0x1,0x4(%eax) + 14a9c: 74 02 je 14aa0 <_hub_probe+0x5d> + 14a9e: eb e9 jmp 14a89 <_hub_probe+0x46> + 14aa0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14aa3: 8b 40 0c mov 0xc(%eax),%eax + 14aa6: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14aa9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14aac: 80 78 02 00 cmpb $0x0,0x2(%eax) + 14ab0: 78 02 js 14ab4 <_hub_probe+0x71> + 14ab2: eb d5 jmp 14a89 <_hub_probe+0x46> + 14ab4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14ab7: 8a 40 03 mov 0x3(%eax),%al + 14aba: 25 ff 00 00 00 and $0xff,%eax + 14abf: 83 e0 03 and $0x3,%eax + 14ac2: 83 f8 03 cmp $0x3,%eax + 14ac5: 74 02 je 14ac9 <_hub_probe+0x86> + 14ac7: eb c0 jmp 14a89 <_hub_probe+0x46> + 14ac9: 83 ec 08 sub $0x8,%esp + 14acc: 6a 4c push $0x4c + 14ace: 6a 01 push $0x1 + 14ad0: e8 5b 4f 00 00 call 19a30 <_ExAllocatePool@8> + 14ad5: 83 c4 08 add $0x8,%esp + 14ad8: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14adb: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 14adf: 75 0c jne 14aed <_hub_probe+0xaa> + 14ae1: c7 45 e4 f4 ff ff ff movl $0xfffffff4,0xffffffe4(%ebp) + 14ae8: e9 ca 00 00 00 jmp 14bb7 <_hub_probe+0x174> + 14aed: 83 ec 04 sub $0x4,%esp + 14af0: 6a 4c push $0x4c + 14af2: 6a 00 push $0x0 + 14af4: ff 75 f0 pushl 0xfffffff0(%ebp) + 14af7: e8 54 4f 00 00 call 19a50 <_memset> + 14afc: 83 c4 10 add $0x10,%esp + 14aff: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14b02: 83 c2 24 add $0x24,%edx + 14b05: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14b08: 83 c0 24 add $0x24,%eax + 14b0b: 89 02 mov %eax,(%edx) + 14b0d: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14b10: 83 c2 24 add $0x24,%edx + 14b13: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14b16: 83 c0 24 add $0x24,%eax + 14b19: 89 42 04 mov %eax,0x4(%edx) + 14b1c: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14b1f: 8b 45 08 mov 0x8(%ebp),%eax + 14b22: 89 02 mov %eax,(%edx) + 14b24: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 14b2b: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14b2e: 83 c2 1c add $0x1c,%edx + 14b31: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14b34: 83 c0 1c add $0x1c,%eax + 14b37: 89 02 mov %eax,(%edx) + 14b39: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14b3c: 83 c2 1c add $0x1c,%edx + 14b3f: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14b42: 83 c0 1c add $0x1c,%eax + 14b45: 89 42 04 mov %eax,0x4(%edx) + 14b48: 83 ec 08 sub $0x8,%esp + 14b4b: 68 48 a0 01 00 push $0x1a048 + 14b50: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14b53: 83 c0 1c add $0x1c,%eax + 14b56: 50 push %eax + 14b57: e8 5d f5 ff ff call 140b9 <_list_add> + 14b5c: 83 c4 10 add $0x10,%esp + 14b5f: ff 75 f0 pushl 0xfffffff0(%ebp) + 14b62: ff 75 08 pushl 0x8(%ebp) + 14b65: e8 b4 fe ff ff call 14a1e <_usb_set_intfdata> + 14b6a: 83 c4 08 add $0x8,%esp + 14b6d: 83 ec 08 sub $0x8,%esp + 14b70: ff 75 f8 pushl 0xfffffff8(%ebp) + 14b73: ff 75 f0 pushl 0xfffffff0(%ebp) + 14b76: e8 d4 f8 ff ff call 1444f <_hub_configure> + 14b7b: 83 c4 10 add $0x10,%esp + 14b7e: 85 c0 test %eax,%eax + 14b80: 78 20 js 14ba2 <_hub_probe+0x15f> + 14b82: 83 ec 08 sub $0x8,%esp + 14b85: 68 37 b2 01 00 push $0x1b237 + 14b8a: 8b 45 08 mov 0x8(%ebp),%eax + 14b8d: 83 c0 18 add $0x18,%eax + 14b90: 50 push %eax + 14b91: e8 0a 4f 00 00 call 19aa0 <_strcpy> + 14b96: 83 c4 10 add $0x10,%esp + 14b99: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 14ba0: eb 15 jmp 14bb7 <_hub_probe+0x174> + 14ba2: 83 ec 0c sub $0xc,%esp + 14ba5: ff 75 08 pushl 0x8(%ebp) + 14ba8: e8 0e fd ff ff call 148bb <_hub_disconnect> + 14bad: 83 c4 10 add $0x10,%esp + 14bb0: c7 45 e4 ed ff ff ff movl $0xffffffed,0xffffffe4(%ebp) + 14bb7: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 14bba: c9 leave + 14bbb: c3 ret + +00014bbc <_hub_ioctl>: + 14bbc: 55 push %ebp + 14bbd: 89 e5 mov %esp,%ebp + 14bbf: 53 push %ebx + 14bc0: 83 ec 14 sub $0x14,%esp + 14bc3: 8b 45 08 mov 0x8(%ebp),%eax + 14bc6: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14bcc: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14bcf: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14bd2: 2d c0 00 00 00 sub $0xc0,%eax + 14bd7: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14bda: 8b 45 0c mov 0xc(%ebp),%eax + 14bdd: 3d d2 04 00 00 cmp $0x4d2,%eax + 14be2: 74 05 je 14be9 <_hub_ioctl+0x2d> + 14be4: e9 8a 00 00 00 jmp 14c73 <_hub_ioctl+0xb7> + 14be9: 8b 45 10 mov 0x10(%ebp),%eax + 14bec: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14bef: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 14bf6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14bf9: 83 38 00 cmpl $0x0,(%eax) + 14bfc: 7f 0b jg 14c09 <_hub_ioctl+0x4d> + 14bfe: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14c01: c7 00 00 00 00 00 movl $0x0,(%eax) + 14c07: eb 5f jmp 14c68 <_hub_ioctl+0xac> + 14c09: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14c0c: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 14c0f: 8b 92 ac 01 00 00 mov 0x1ac(%edx),%edx + 14c15: 89 10 mov %edx,(%eax) + 14c17: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 14c1e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14c21: 8b 00 mov (%eax),%eax + 14c23: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 14c26: 7e 40 jle 14c68 <_hub_ioctl+0xac> + 14c28: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 14c2b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 14c2e: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) + 14c35: 00 + 14c36: 75 10 jne 14c48 <_hub_ioctl+0x8c> + 14c38: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 14c3b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 14c3e: c7 44 82 04 00 00 00 movl $0x0,0x4(%edx,%eax,4) + 14c45: 00 + 14c46: eb 19 jmp 14c61 <_hub_ioctl+0xa5> + 14c48: 8b 5d f4 mov 0xfffffff4(%ebp),%ebx + 14c4b: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 14c4e: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 14c51: 8b 45 ec mov 0xffffffec(%ebp),%eax + 14c54: 8b 84 82 b0 01 00 00 mov 0x1b0(%edx,%eax,4),%eax + 14c5b: 8b 00 mov (%eax),%eax + 14c5d: 89 44 8b 04 mov %eax,0x4(%ebx,%ecx,4) + 14c61: 8d 45 ec lea 0xffffffec(%ebp),%eax + 14c64: ff 00 incl (%eax) + 14c66: eb b6 jmp 14c1e <_hub_ioctl+0x62> + 14c68: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14c6b: 8b 00 mov (%eax),%eax + 14c6d: 40 inc %eax + 14c6e: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 14c71: eb 07 jmp 14c7a <_hub_ioctl+0xbe> + 14c73: c7 45 e8 da ff ff ff movl $0xffffffda,0xffffffe8(%ebp) + 14c7a: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 14c7d: 83 c4 14 add $0x14,%esp + 14c80: 5b pop %ebx + 14c81: 5d pop %ebp + 14c82: c3 ret + +00014c83 <_hub_reset>: + 14c83: 55 push %ebp + 14c84: 89 e5 mov %esp,%ebp + 14c86: 83 ec 18 sub $0x18,%esp + 14c89: 8b 45 08 mov 0x8(%ebp),%eax + 14c8c: 8b 00 mov (%eax),%eax + 14c8e: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14c94: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14c97: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14c9a: 2d c0 00 00 00 sub $0xc0,%eax + 14c9f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14ca2: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14ca9: 8b 45 08 mov 0x8(%ebp),%eax + 14cac: 8b 40 2c mov 0x2c(%eax),%eax + 14caf: 8a 40 02 mov 0x2(%eax),%al + 14cb2: 25 ff 00 00 00 and $0xff,%eax + 14cb7: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 14cba: 7e 31 jle 14ced <_hub_reset+0x6a> + 14cbc: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14cbf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14cc2: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) + 14cc9: 00 + 14cca: 74 1a je 14ce6 <_hub_reset+0x63> + 14ccc: 83 ec 0c sub $0xc,%esp + 14ccf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14cd2: c1 e0 02 shl $0x2,%eax + 14cd5: 03 45 fc add 0xfffffffc(%ebp),%eax + 14cd8: 05 b0 01 00 00 add $0x1b0,%eax + 14cdd: 50 push %eax + 14cde: e8 2e 19 00 00 call 16611 <_usb_disconnect> + 14ce3: 83 c4 10 add $0x10,%esp + 14ce6: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 14ce9: ff 00 incl (%eax) + 14ceb: eb bc jmp 14ca9 <_hub_reset+0x26> + 14ced: 8b 45 08 mov 0x8(%ebp),%eax + 14cf0: 83 78 04 00 cmpl $0x0,0x4(%eax) + 14cf4: 74 13 je 14d09 <_hub_reset+0x86> + 14cf6: 83 ec 0c sub $0xc,%esp + 14cf9: 8b 45 08 mov 0x8(%ebp),%eax + 14cfc: ff 70 04 pushl 0x4(%eax) + 14cff: e8 b6 37 00 00 call 184ba <_usb_unlink_urb@4> + 14d04: 83 c4 0c add $0xc,%esp + 14d07: eb 09 jmp 14d12 <_hub_reset+0x8f> + 14d09: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 14d10: eb 5c jmp 14d6e <_hub_reset+0xeb> + 14d12: 83 ec 0c sub $0xc,%esp + 14d15: ff 75 fc pushl 0xfffffffc(%ebp) + 14d18: e8 a3 0d 00 00 call 15ac0 <_usb_reset_device> + 14d1d: 83 c4 10 add $0x10,%esp + 14d20: 85 c0 test %eax,%eax + 14d22: 74 09 je 14d2d <_hub_reset+0xaa> + 14d24: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 14d2b: eb 41 jmp 14d6e <_hub_reset+0xeb> + 14d2d: 8b 45 08 mov 0x8(%ebp),%eax + 14d30: 8b 50 04 mov 0x4(%eax),%edx + 14d33: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14d36: 89 42 14 mov %eax,0x14(%edx) + 14d39: 83 ec 08 sub $0x8,%esp + 14d3c: 6a 00 push $0x0 + 14d3e: 8b 45 08 mov 0x8(%ebp),%eax + 14d41: ff 70 04 pushl 0x4(%eax) + 14d44: e8 5a 34 00 00 call 181a3 <_usb_submit_urb@8> + 14d49: 83 c4 08 add $0x8,%esp + 14d4c: 85 c0 test %eax,%eax + 14d4e: 74 09 je 14d59 <_hub_reset+0xd6> + 14d50: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 14d57: eb 15 jmp 14d6e <_hub_reset+0xeb> + 14d59: 83 ec 0c sub $0xc,%esp + 14d5c: ff 75 08 pushl 0x8(%ebp) + 14d5f: e8 0f f6 ff ff call 14373 <_hub_power_on> + 14d64: 83 c4 10 add $0x10,%esp + 14d67: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 14d6e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14d71: c9 leave + 14d72: c3 ret + +00014d73 <_hub_start_disconnect>: + 14d73: 55 push %ebp + 14d74: 89 e5 mov %esp,%ebp + 14d76: 83 ec 08 sub $0x8,%esp + 14d79: 8b 45 08 mov 0x8(%ebp),%eax + 14d7c: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14d82: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14d85: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 14d89: 74 4a je 14dd5 <_hub_start_disconnect+0x62> + 14d8b: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14d92: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14d95: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 14d9b: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 14d9e: 7e 35 jle 14dd5 <_hub_start_disconnect+0x62> + 14da0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14da3: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 14da6: 8b 84 90 b0 01 00 00 mov 0x1b0(%eax,%edx,4),%eax + 14dad: 3b 45 08 cmp 0x8(%ebp),%eax + 14db0: 75 1c jne 14dce <_hub_start_disconnect+0x5b> + 14db2: 83 ec 0c sub $0xc,%esp + 14db5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14db8: c1 e0 02 shl $0x2,%eax + 14dbb: 03 45 fc add 0xfffffffc(%ebp),%eax + 14dbe: 05 b0 01 00 00 add $0x1b0,%eax + 14dc3: 50 push %eax + 14dc4: e8 48 18 00 00 call 16611 <_usb_disconnect> + 14dc9: 83 c4 10 add $0x10,%esp + 14dcc: eb 07 jmp 14dd5 <_hub_start_disconnect+0x62> + 14dce: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 14dd1: ff 00 incl (%eax) + 14dd3: eb bd jmp 14d92 <_hub_start_disconnect+0x1f> + 14dd5: c9 leave + 14dd6: c3 ret + +00014dd7 <_hub_port_status>: + 14dd7: 55 push %ebp + 14dd8: 89 e5 mov %esp,%ebp + 14dda: 83 ec 08 sub $0x8,%esp + 14ddd: 8b 45 08 mov 0x8(%ebp),%eax + 14de0: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 14de6: ff 70 0c pushl 0xc(%eax) + 14de9: e8 44 fc ff ff call 14a32 <_usb_get_intfdata> + 14dee: 83 c4 04 add $0x4,%esp + 14df1: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14df4: 83 ec 04 sub $0x4,%esp + 14df7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14dfa: ff 70 10 pushl 0x10(%eax) + 14dfd: 8b 45 0c mov 0xc(%ebp),%eax + 14e00: 40 inc %eax + 14e01: 50 push %eax + 14e02: ff 75 08 pushl 0x8(%ebp) + 14e05: e8 99 f1 ff ff call 13fa3 <_get_port_status> + 14e0a: 83 c4 10 add $0x10,%esp + 14e0d: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14e10: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 14e14: 79 02 jns 14e18 <_hub_port_status+0x41> + 14e16: eb 26 jmp 14e3e <_hub_port_status+0x67> + 14e18: 8b 55 10 mov 0x10(%ebp),%edx + 14e1b: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14e1e: 8b 40 10 mov 0x10(%eax),%eax + 14e21: 66 8b 00 mov (%eax),%ax + 14e24: 66 89 02 mov %ax,(%edx) + 14e27: 8b 55 14 mov 0x14(%ebp),%edx + 14e2a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14e2d: 8b 40 10 mov 0x10(%eax),%eax + 14e30: 66 8b 40 02 mov 0x2(%eax),%ax + 14e34: 66 89 02 mov %ax,(%edx) + 14e37: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14e3e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14e41: c9 leave + 14e42: c3 ret + +00014e43 <_hub_port_wait_reset>: + 14e43: 55 push %ebp + 14e44: 89 e5 mov %esp,%ebp + 14e46: 83 ec 18 sub $0x18,%esp + 14e49: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14e50: 81 7d fc f3 01 00 00 cmpl $0x1f3,0xfffffffc(%ebp) + 14e57: 0f 8f 00 01 00 00 jg 14f5d <_hub_port_wait_reset+0x11a> + 14e5d: 83 ec 0c sub $0xc,%esp + 14e60: ff 75 14 pushl 0x14(%ebp) + 14e63: e8 48 46 00 00 call 194b0 <_wait_ms> + 14e68: 83 c4 10 add $0x10,%esp + 14e6b: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 14e6e: 50 push %eax + 14e6f: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 14e72: 50 push %eax + 14e73: ff 75 0c pushl 0xc(%ebp) + 14e76: ff 75 08 pushl 0x8(%ebp) + 14e79: e8 59 ff ff ff call 14dd7 <_hub_port_status> + 14e7e: 83 c4 10 add $0x10,%esp + 14e81: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14e84: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 14e88: 79 0c jns 14e96 <_hub_port_wait_reset+0x53> + 14e8a: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) + 14e91: e9 ce 00 00 00 jmp 14f64 <_hub_port_wait_reset+0x121> + 14e96: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 14e9a: 25 ff ff 00 00 and $0xffff,%eax + 14e9f: 83 e0 01 and $0x1,%eax + 14ea2: 85 c0 test %eax,%eax + 14ea4: 75 0c jne 14eb2 <_hub_port_wait_reset+0x6f> + 14ea6: c7 45 f0 01 00 00 00 movl $0x1,0xfffffff0(%ebp) + 14ead: e9 b2 00 00 00 jmp 14f64 <_hub_port_wait_reset+0x121> + 14eb2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14eb5: 25 ff ff 00 00 and $0xffff,%eax + 14eba: 83 e0 01 and $0x1,%eax + 14ebd: 85 c0 test %eax,%eax + 14ebf: 74 0c je 14ecd <_hub_port_wait_reset+0x8a> + 14ec1: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) + 14ec8: e9 97 00 00 00 jmp 14f64 <_hub_port_wait_reset+0x121> + 14ecd: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 14ed1: 25 ff ff 00 00 and $0xffff,%eax + 14ed6: c1 e8 04 shr $0x4,%eax + 14ed9: 83 e0 01 and $0x1,%eax + 14edc: 85 c0 test %eax,%eax + 14ede: 75 63 jne 14f43 <_hub_port_wait_reset+0x100> + 14ee0: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 14ee4: 25 ff ff 00 00 and $0xffff,%eax + 14ee9: d1 e8 shr %eax + 14eeb: 83 e0 01 and $0x1,%eax + 14eee: 85 c0 test %eax,%eax + 14ef0: 74 51 je 14f43 <_hub_port_wait_reset+0x100> + 14ef2: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 14ef6: 25 ff ff 00 00 and $0xffff,%eax + 14efb: c1 e8 0a shr $0xa,%eax + 14efe: 83 e0 01 and $0x1,%eax + 14f01: 85 c0 test %eax,%eax + 14f03: 74 0c je 14f11 <_hub_port_wait_reset+0xce> + 14f05: 8b 45 10 mov 0x10(%ebp),%eax + 14f08: c7 40 18 03 00 00 00 movl $0x3,0x18(%eax) + 14f0f: eb 29 jmp 14f3a <_hub_port_wait_reset+0xf7> + 14f11: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 14f15: 25 ff ff 00 00 and $0xffff,%eax + 14f1a: c1 e8 09 shr $0x9,%eax + 14f1d: 83 e0 01 and $0x1,%eax + 14f20: 85 c0 test %eax,%eax + 14f22: 74 0c je 14f30 <_hub_port_wait_reset+0xed> + 14f24: 8b 45 10 mov 0x10(%ebp),%eax + 14f27: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) + 14f2e: eb 0a jmp 14f3a <_hub_port_wait_reset+0xf7> + 14f30: 8b 45 10 mov 0x10(%ebp),%eax + 14f33: c7 40 18 02 00 00 00 movl $0x2,0x18(%eax) + 14f3a: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 14f41: eb 21 jmp 14f64 <_hub_port_wait_reset+0x121> + 14f43: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 14f47: 7e 07 jle 14f50 <_hub_port_wait_reset+0x10d> + 14f49: c7 45 14 c8 00 00 00 movl $0xc8,0x14(%ebp) + 14f50: 8b 55 14 mov 0x14(%ebp),%edx + 14f53: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14f56: 01 10 add %edx,(%eax) + 14f58: e9 f3 fe ff ff jmp 14e50 <_hub_port_wait_reset+0xd> + 14f5d: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) + 14f64: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14f67: c9 leave + 14f68: c3 ret + +00014f69 <_hub_port_reset>: + 14f69: 55 push %ebp + 14f6a: 89 e5 mov %esp,%ebp + 14f6c: 83 ec 18 sub $0x18,%esp + 14f6f: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14f76: 83 7d fc 04 cmpl $0x4,0xfffffffc(%ebp) + 14f7a: 0f 8f 85 00 00 00 jg 15005 <_hub_port_reset+0x9c> + 14f80: 83 ec 04 sub $0x4,%esp + 14f83: 6a 04 push $0x4 + 14f85: 8b 45 0c mov 0xc(%ebp),%eax + 14f88: 40 inc %eax + 14f89: 50 push %eax + 14f8a: ff 75 08 pushl 0x8(%ebp) + 14f8d: e8 8e ef ff ff call 13f20 <_set_port_feature> + 14f92: 83 c4 10 add $0x10,%esp + 14f95: ff 75 14 pushl 0x14(%ebp) + 14f98: ff 75 10 pushl 0x10(%ebp) + 14f9b: ff 75 0c pushl 0xc(%ebp) + 14f9e: ff 75 08 pushl 0x8(%ebp) + 14fa1: e8 9d fe ff ff call 14e43 <_hub_port_wait_reset> + 14fa6: 83 c4 10 add $0x10,%esp + 14fa9: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14fac: 83 7d f8 ff cmpl $0xffffffff,0xfffffff8(%ebp) + 14fb0: 74 42 je 14ff4 <_hub_port_reset+0x8b> + 14fb2: 83 ec 04 sub $0x4,%esp + 14fb5: 6a 14 push $0x14 + 14fb7: 8b 45 0c mov 0xc(%ebp),%eax + 14fba: 40 inc %eax + 14fbb: 50 push %eax + 14fbc: ff 75 08 pushl 0x8(%ebp) + 14fbf: e8 17 ef ff ff call 13edb <_clear_port_feature> + 14fc4: 83 c4 10 add $0x10,%esp + 14fc7: 8b 45 10 mov 0x10(%ebp),%eax + 14fca: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14fcd: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 14fd1: 74 09 je 14fdc <_hub_port_reset+0x73> + 14fd3: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 14fda: eb 07 jmp 14fe3 <_hub_port_reset+0x7a> + 14fdc: c7 45 ec 03 00 00 00 movl $0x3,0xffffffec(%ebp) + 14fe3: 8b 45 ec mov 0xffffffec(%ebp),%eax + 14fe6: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14fe9: 89 42 14 mov %eax,0x14(%edx) + 14fec: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14fef: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14ff2: eb 18 jmp 1500c <_hub_port_reset+0xa3> + 14ff4: c7 45 14 c8 00 00 00 movl $0xc8,0x14(%ebp) + 14ffb: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14ffe: ff 00 incl (%eax) + 15000: e9 71 ff ff ff jmp 14f76 <_hub_port_reset+0xd> + 15005: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 1500c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1500f: c9 leave + 15010: c3 ret + +00015011 <_hub_port_disable>: + 15011: 55 push %ebp + 15012: 89 e5 mov %esp,%ebp + 15014: 83 ec 08 sub $0x8,%esp + 15017: 83 ec 04 sub $0x4,%esp + 1501a: 6a 01 push $0x1 + 1501c: 8b 45 0c mov 0xc(%ebp),%eax + 1501f: 40 inc %eax + 15020: 50 push %eax + 15021: ff 75 08 pushl 0x8(%ebp) + 15024: e8 b2 ee ff ff call 13edb <_clear_port_feature> + 15029: 83 c4 10 add $0x10,%esp + 1502c: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1502f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15032: c9 leave + 15033: c3 ret + +00015034 <_hub_port_debounce>: + 15034: 55 push %ebp + 15035: 89 e5 mov %esp,%ebp + 15037: 83 ec 28 sub $0x28,%esp + 1503a: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 15041: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 15048: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1504f: 81 7d f8 8f 01 00 00 cmpl $0x18f,0xfffffff8(%ebp) + 15056: 0f 8f a0 00 00 00 jg 150fc <_hub_port_debounce+0xc8> + 1505c: 83 ec 0c sub $0xc,%esp + 1505f: 6a 19 push $0x19 + 15061: e8 4a 44 00 00 call 194b0 <_wait_ms> + 15066: 83 c4 10 add $0x10,%esp + 15069: 8d 45 f2 lea 0xfffffff2(%ebp),%eax + 1506c: 50 push %eax + 1506d: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 15070: 50 push %eax + 15071: ff 75 0c pushl 0xc(%ebp) + 15074: ff 75 08 pushl 0x8(%ebp) + 15077: e8 5b fd ff ff call 14dd7 <_hub_port_status> + 1507c: 83 c4 10 add $0x10,%esp + 1507f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15082: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 15086: 79 0c jns 15094 <_hub_port_debounce+0x60> + 15088: c7 45 e8 ff ff ff ff movl $0xffffffff,0xffffffe8(%ebp) + 1508f: e9 8d 00 00 00 jmp 15121 <_hub_port_debounce+0xed> + 15094: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15097: 25 ff ff 00 00 and $0xffff,%eax + 1509c: 83 e0 01 and $0x1,%eax + 1509f: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 150a2: 75 13 jne 150b7 <_hub_port_debounce+0x83> + 150a4: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 150a8: 74 14 je 150be <_hub_port_debounce+0x8a> + 150aa: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 150ad: ff 00 incl (%eax) + 150af: 83 7d f4 04 cmpl $0x4,0xfffffff4(%ebp) + 150b3: 75 09 jne 150be <_hub_port_debounce+0x8a> + 150b5: eb 45 jmp 150fc <_hub_port_debounce+0xc8> + 150b7: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 150be: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 150c1: 25 ff ff 00 00 and $0xffff,%eax + 150c6: 83 e0 01 and $0x1,%eax + 150c9: 89 45 ec mov %eax,0xffffffec(%ebp) + 150cc: 66 8b 45 f2 mov 0xfffffff2(%ebp),%ax + 150d0: 25 ff ff 00 00 and $0xffff,%eax + 150d5: 83 e0 01 and $0x1,%eax + 150d8: 85 c0 test %eax,%eax + 150da: 74 15 je 150f1 <_hub_port_debounce+0xbd> + 150dc: 83 ec 04 sub $0x4,%esp + 150df: 6a 10 push $0x10 + 150e1: 8b 45 0c mov 0xc(%ebp),%eax + 150e4: 40 inc %eax + 150e5: 50 push %eax + 150e6: ff 75 08 pushl 0x8(%ebp) + 150e9: e8 ed ed ff ff call 13edb <_clear_port_feature> + 150ee: 83 c4 10 add $0x10,%esp + 150f1: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 150f4: 83 00 19 addl $0x19,(%eax) + 150f7: e9 53 ff ff ff jmp 1504f <_hub_port_debounce+0x1b> + 150fc: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 150ff: 25 ff ff 00 00 and $0xffff,%eax + 15104: 83 e0 01 and $0x1,%eax + 15107: 85 c0 test %eax,%eax + 15109: 74 09 je 15114 <_hub_port_debounce+0xe0> + 1510b: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 15112: eb 07 jmp 1511b <_hub_port_debounce+0xe7> + 15114: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 1511b: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1511e: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 15121: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 15124: c9 leave + 15125: c3 ret + +00015126 <_hub_port_connect_change>: + 15126: 55 push %ebp + 15127: 89 e5 mov %esp,%ebp + 15129: 83 ec 28 sub $0x28,%esp + 1512c: 8b 45 10 mov 0x10(%ebp),%eax + 1512f: 8b 55 14 mov 0x14(%ebp),%edx + 15132: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 15136: 66 89 55 fc mov %dx,0xfffffffc(%ebp) + 1513a: 8b 45 08 mov 0x8(%ebp),%eax + 1513d: 8b 00 mov (%eax),%eax + 1513f: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 15145: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15148: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1514b: 2d c0 00 00 00 sub $0xc0,%eax + 15150: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15153: c7 45 f0 0a 00 00 00 movl $0xa,0xfffffff0(%ebp) + 1515a: 83 ec 04 sub $0x4,%esp + 1515d: 6a 10 push $0x10 + 1515f: 8b 45 0c mov 0xc(%ebp),%eax + 15162: 40 inc %eax + 15163: 50 push %eax + 15164: ff 75 f8 pushl 0xfffffff8(%ebp) + 15167: e8 6f ed ff ff call 13edb <_clear_port_feature> + 1516c: 83 c4 10 add $0x10,%esp + 1516f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 15172: 8b 45 0c mov 0xc(%ebp),%eax + 15175: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) + 1517c: 00 + 1517d: 74 1a je 15199 <_hub_port_connect_change+0x73> + 1517f: 83 ec 0c sub $0xc,%esp + 15182: 8b 45 0c mov 0xc(%ebp),%eax + 15185: c1 e0 02 shl $0x2,%eax + 15188: 03 45 f8 add 0xfffffff8(%ebp),%eax + 1518b: 05 b0 01 00 00 add $0x1b0,%eax + 15190: 50 push %eax + 15191: e8 7b 14 00 00 call 16611 <_usb_disconnect> + 15196: 83 c4 10 add $0x10,%esp + 15199: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 1519d: 25 ff ff 00 00 and $0xffff,%eax + 151a2: 83 e0 01 and $0x1,%eax + 151a5: 85 c0 test %eax,%eax + 151a7: 75 2c jne 151d5 <_hub_port_connect_change+0xaf> + 151a9: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 151ad: 25 ff ff 00 00 and $0xffff,%eax + 151b2: d1 e8 shr %eax + 151b4: 83 e0 01 and $0x1,%eax + 151b7: 85 c0 test %eax,%eax + 151b9: 0f 84 08 02 00 00 je 153c7 <_hub_port_connect_change+0x2a1> + 151bf: 83 ec 08 sub $0x8,%esp + 151c2: ff 75 0c pushl 0xc(%ebp) + 151c5: ff 75 f8 pushl 0xfffffff8(%ebp) + 151c8: e8 44 fe ff ff call 15011 <_hub_port_disable> + 151cd: 83 c4 10 add $0x10,%esp + 151d0: e9 f2 01 00 00 jmp 153c7 <_hub_port_connect_change+0x2a1> + 151d5: 83 ec 08 sub $0x8,%esp + 151d8: ff 75 0c pushl 0xc(%ebp) + 151db: ff 75 f8 pushl 0xfffffff8(%ebp) + 151de: e8 51 fe ff ff call 15034 <_hub_port_debounce> + 151e3: 83 c4 10 add $0x10,%esp + 151e6: 85 c0 test %eax,%eax + 151e8: 74 16 je 15200 <_hub_port_connect_change+0xda> + 151ea: 83 ec 08 sub $0x8,%esp + 151ed: ff 75 0c pushl 0xc(%ebp) + 151f0: ff 75 f8 pushl 0xfffffff8(%ebp) + 151f3: e8 19 fe ff ff call 15011 <_hub_port_disable> + 151f8: 83 c4 10 add $0x10,%esp + 151fb: e9 c7 01 00 00 jmp 153c7 <_hub_port_connect_change+0x2a1> + 15200: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 15204: 25 ff ff 00 00 and $0xffff,%eax + 15209: c1 e8 09 shr $0x9,%eax + 1520c: 83 e0 01 and $0x1,%eax + 1520f: 85 c0 test %eax,%eax + 15211: 74 07 je 1521a <_hub_port_connect_change+0xf4> + 15213: c7 45 f0 c8 00 00 00 movl $0xc8,0xfffffff0(%ebp) + 1521a: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 15221: 83 7d ec 01 cmpl $0x1,0xffffffec(%ebp) + 15225: 0f 8f 7a 01 00 00 jg 153a5 <_hub_port_connect_change+0x27f> + 1522b: 83 ec 08 sub $0x8,%esp + 1522e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15231: ff b0 bc 00 00 00 pushl 0xbc(%eax) + 15237: ff 75 f8 pushl 0xfffffff8(%ebp) + 1523a: e8 3a 10 00 00 call 16279 <_usb_alloc_dev@8> + 1523f: 83 c4 08 add $0x8,%esp + 15242: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15245: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 15249: 75 05 jne 15250 <_hub_port_connect_change+0x12a> + 1524b: e9 55 01 00 00 jmp 153a5 <_hub_port_connect_change+0x27f> + 15250: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 15253: 8b 55 0c mov 0xc(%ebp),%edx + 15256: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15259: 89 84 91 b0 01 00 00 mov %eax,0x1b0(%ecx,%edx,4) + 15260: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15263: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax) + 1526a: ff 75 f0 pushl 0xfffffff0(%ebp) + 1526d: ff 75 f4 pushl 0xfffffff4(%ebp) + 15270: ff 75 0c pushl 0xc(%ebp) + 15273: ff 75 f8 pushl 0xfffffff8(%ebp) + 15276: e8 ee fc ff ff call 14f69 <_hub_port_reset> + 1527b: 83 c4 10 add $0x10,%esp + 1527e: 85 c0 test %eax,%eax + 15280: 74 13 je 15295 <_hub_port_connect_change+0x16f> + 15282: 83 ec 0c sub $0xc,%esp + 15285: ff 75 f4 pushl 0xfffffff4(%ebp) + 15288: e8 2e 11 00 00 call 163bb <_usb_put_dev@4> + 1528d: 83 c4 0c add $0xc,%esp + 15290: e9 10 01 00 00 jmp 153a5 <_hub_port_connect_change+0x27f> + 15295: 83 ec 0c sub $0xc,%esp + 15298: ff 75 f4 pushl 0xfffffff4(%ebp) + 1529b: e8 16 15 00 00 call 167b6 <_usb_connect@4> + 152a0: 83 c4 0c add $0xc,%esp + 152a3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 152a6: 83 78 1c 00 cmpl $0x0,0x1c(%eax) + 152aa: 74 1a je 152c6 <_hub_port_connect_change+0x1a0> + 152ac: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 152af: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 152b2: 8b 40 1c mov 0x1c(%eax),%eax + 152b5: 89 42 1c mov %eax,0x1c(%edx) + 152b8: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 152bb: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 152be: 8b 40 20 mov 0x20(%eax),%eax + 152c1: 89 42 20 mov %eax,0x20(%edx) + 152c4: eb 28 jmp 152ee <_hub_port_connect_change+0x1c8> + 152c6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 152c9: 83 78 18 03 cmpl $0x3,0x18(%eax) + 152cd: 74 1f je 152ee <_hub_port_connect_change+0x1c8> + 152cf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 152d2: 83 78 18 03 cmpl $0x3,0x18(%eax) + 152d6: 75 16 jne 152ee <_hub_port_connect_change+0x1c8> + 152d8: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 152db: 8b 45 08 mov 0x8(%ebp),%eax + 152de: 83 c0 34 add $0x34,%eax + 152e1: 89 42 1c mov %eax,0x1c(%edx) + 152e4: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 152e7: 8b 45 0c mov 0xc(%ebp),%eax + 152ea: 40 inc %eax + 152eb: 89 42 20 mov %eax,0x20(%edx) + 152ee: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 152f1: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 152f7: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 152fa: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 152fd: 80 78 04 30 cmpb $0x30,0x4(%eax) + 15301: 74 2a je 1532d <_hub_port_connect_change+0x207> + 15303: 83 ec 0c sub $0xc,%esp + 15306: 8b 45 0c mov 0xc(%ebp),%eax + 15309: 40 inc %eax + 1530a: 50 push %eax + 1530b: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1530e: 83 c0 04 add $0x4,%eax + 15311: 50 push %eax + 15312: 68 3b b2 01 00 push $0x1b23b + 15317: 6a 10 push $0x10 + 15319: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1531c: 83 c0 04 add $0x4,%eax + 1531f: 50 push %eax + 15320: e8 9b 47 00 00 call 19ac0 <__snprintf> + 15325: 83 c4 20 add $0x20,%esp + 15328: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1532b: eb 1e jmp 1534b <_hub_port_connect_change+0x225> + 1532d: 8b 45 0c mov 0xc(%ebp),%eax + 15330: 40 inc %eax + 15331: 50 push %eax + 15332: 68 41 b2 01 00 push $0x1b241 + 15337: 6a 10 push $0x10 + 15339: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1533c: 83 c0 04 add $0x4,%eax + 1533f: 50 push %eax + 15340: e8 7b 47 00 00 call 19ac0 <__snprintf> + 15345: 83 c4 10 add $0x10,%esp + 15348: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1534b: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 1534e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15351: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 15357: 8b 80 60 01 00 00 mov 0x160(%eax),%eax + 1535d: 8b 80 a0 00 00 00 mov 0xa0(%eax),%eax + 15363: 89 82 60 01 00 00 mov %eax,0x160(%edx) + 15369: 83 ec 08 sub $0x8,%esp + 1536c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1536f: 05 c0 00 00 00 add $0xc0,%eax + 15374: 50 push %eax + 15375: ff 75 f4 pushl 0xfffffff4(%ebp) + 15378: e8 16 18 00 00 call 16b93 <_usb_new_device> + 1537d: 83 c4 10 add $0x10,%esp + 15380: 85 c0 test %eax,%eax + 15382: 75 02 jne 15386 <_hub_port_connect_change+0x260> + 15384: eb 41 jmp 153c7 <_hub_port_connect_change+0x2a1> + 15386: 83 ec 0c sub $0xc,%esp + 15389: ff 75 f4 pushl 0xfffffff4(%ebp) + 1538c: e8 2a 10 00 00 call 163bb <_usb_put_dev@4> + 15391: 83 c4 0c add $0xc,%esp + 15394: c7 45 f0 c8 00 00 00 movl $0xc8,0xfffffff0(%ebp) + 1539b: 8d 45 ec lea 0xffffffec(%ebp),%eax + 1539e: ff 00 incl (%eax) + 153a0: e9 7c fe ff ff jmp 15221 <_hub_port_connect_change+0xfb> + 153a5: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 153a8: 8b 45 0c mov 0xc(%ebp),%eax + 153ab: c7 84 82 b0 01 00 00 movl $0x0,0x1b0(%edx,%eax,4) + 153b2: 00 00 00 00 + 153b6: 83 ec 08 sub $0x8,%esp + 153b9: ff 75 0c pushl 0xc(%ebp) + 153bc: ff 75 f8 pushl 0xfffffff8(%ebp) + 153bf: e8 4d fc ff ff call 15011 <_hub_port_disable> + 153c4: 83 c4 10 add $0x10,%esp + 153c7: c9 leave + 153c8: c3 ret + +000153c9 <_hub_events>: + 153c9: 55 push %ebp + 153ca: 89 e5 mov %esp,%ebp + 153cc: 83 ec 28 sub $0x28,%esp + 153cf: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) + 153d6: 83 7d dc 04 cmpl $0x4,0xffffffdc(%ebp) + 153da: 0f 8f 9c 02 00 00 jg 1567c <_hub_events+0x2b3> + 153e0: 8d 45 dc lea 0xffffffdc(%ebp),%eax + 153e3: ff 00 incl (%eax) + 153e5: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 153ec: 68 40 a0 01 00 push $0x1a040 + 153f1: e8 08 ed ff ff call 140fe <_list_empty> + 153f6: 83 c4 04 add $0x4,%esp + 153f9: 85 c0 test %eax,%eax + 153fb: 74 05 je 15402 <_hub_events+0x39> + 153fd: e9 7a 02 00 00 jmp 1567c <_hub_events+0x2b3> + 15402: a1 40 a0 01 00 mov 0x1a040,%eax + 15407: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1540a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1540d: 83 e8 24 sub $0x24,%eax + 15410: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 15413: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15416: 8b 00 mov (%eax),%eax + 15418: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 1541e: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 15421: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 15424: 2d c0 00 00 00 sub $0xc0,%eax + 15429: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1542c: 83 ec 0c sub $0xc,%esp + 1542f: ff 75 f8 pushl 0xfffffff8(%ebp) + 15432: e8 47 02 00 00 call 1567e <_list_del_init> + 15437: 83 c4 10 add $0x10,%esp + 1543a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1543d: 83 78 14 00 cmpl $0x0,0x14(%eax) + 15441: 74 39 je 1547c <_hub_events+0xb3> + 15443: 83 ec 0c sub $0xc,%esp + 15446: ff 75 f0 pushl 0xfffffff0(%ebp) + 15449: e8 35 f8 ff ff call 14c83 <_hub_reset> + 1544e: 83 c4 10 add $0x10,%esp + 15451: 85 c0 test %eax,%eax + 15453: 74 13 je 15468 <_hub_events+0x9f> + 15455: 83 ec 0c sub $0xc,%esp + 15458: ff 75 f4 pushl 0xfffffff4(%ebp) + 1545b: e8 13 f9 ff ff call 14d73 <_hub_start_disconnect> + 15460: 83 c4 10 add $0x10,%esp + 15463: e9 6e ff ff ff jmp 153d6 <_hub_events+0xd> + 15468: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1546b: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 15472: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15475: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 1547c: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 15483: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15486: 8b 40 2c mov 0x2c(%eax),%eax + 15489: 8a 40 02 mov 0x2(%eax),%al + 1548c: 25 ff 00 00 00 and $0xff,%eax + 15491: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax + 15494: 0f 8e 5c 01 00 00 jle 155f6 <_hub_events+0x22d> + 1549a: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 1549d: 50 push %eax + 1549e: 8d 45 ea lea 0xffffffea(%ebp),%eax + 154a1: 50 push %eax + 154a2: ff 75 e4 pushl 0xffffffe4(%ebp) + 154a5: ff 75 f4 pushl 0xfffffff4(%ebp) + 154a8: e8 2a f9 ff ff call 14dd7 <_hub_port_status> + 154ad: 83 c4 10 add $0x10,%esp + 154b0: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 154b3: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 154b7: 79 05 jns 154be <_hub_events+0xf5> + 154b9: e9 2e 01 00 00 jmp 155ec <_hub_events+0x223> + 154be: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 154c1: 25 ff ff 00 00 and $0xffff,%eax + 154c6: 83 e0 01 and $0x1,%eax + 154c9: 85 c0 test %eax,%eax + 154cb: 74 23 je 154f0 <_hub_events+0x127> + 154cd: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 154d0: 25 ff ff 00 00 and $0xffff,%eax + 154d5: 50 push %eax + 154d6: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 154da: 25 ff ff 00 00 and $0xffff,%eax + 154df: 50 push %eax + 154e0: ff 75 e4 pushl 0xffffffe4(%ebp) + 154e3: ff 75 f0 pushl 0xfffffff0(%ebp) + 154e6: e8 3b fc ff ff call 15126 <_hub_port_connect_change> + 154eb: 83 c4 10 add $0x10,%esp + 154ee: eb 79 jmp 15569 <_hub_events+0x1a0> + 154f0: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 154f3: 25 ff ff 00 00 and $0xffff,%eax + 154f8: d1 e8 shr %eax + 154fa: 83 e0 01 and $0x1,%eax + 154fd: 85 c0 test %eax,%eax + 154ff: 74 68 je 15569 <_hub_events+0x1a0> + 15501: 83 ec 04 sub $0x4,%esp + 15504: 6a 11 push $0x11 + 15506: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 15509: 40 inc %eax + 1550a: 50 push %eax + 1550b: ff 75 f4 pushl 0xfffffff4(%ebp) + 1550e: e8 c8 e9 ff ff call 13edb <_clear_port_feature> + 15513: 83 c4 10 add $0x10,%esp + 15516: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 1551a: 25 ff ff 00 00 and $0xffff,%eax + 1551f: d1 e8 shr %eax + 15521: 83 e0 01 and $0x1,%eax + 15524: 85 c0 test %eax,%eax + 15526: 75 41 jne 15569 <_hub_events+0x1a0> + 15528: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 1552c: 25 ff ff 00 00 and $0xffff,%eax + 15531: 83 e0 01 and $0x1,%eax + 15534: 85 c0 test %eax,%eax + 15536: 74 31 je 15569 <_hub_events+0x1a0> + 15538: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 1553b: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1553e: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) + 15545: 00 + 15546: 74 21 je 15569 <_hub_events+0x1a0> + 15548: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1554b: 25 ff ff 00 00 and $0xffff,%eax + 15550: 50 push %eax + 15551: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 15555: 25 ff ff 00 00 and $0xffff,%eax + 1555a: 50 push %eax + 1555b: ff 75 e4 pushl 0xffffffe4(%ebp) + 1555e: ff 75 f0 pushl 0xfffffff0(%ebp) + 15561: e8 c0 fb ff ff call 15126 <_hub_port_connect_change> + 15566: 83 c4 10 add $0x10,%esp + 15569: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1556c: 25 ff ff 00 00 and $0xffff,%eax + 15571: c1 e8 02 shr $0x2,%eax + 15574: 83 e0 01 and $0x1,%eax + 15577: 85 c0 test %eax,%eax + 15579: 74 15 je 15590 <_hub_events+0x1c7> + 1557b: 83 ec 04 sub $0x4,%esp + 1557e: 6a 12 push $0x12 + 15580: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 15583: 40 inc %eax + 15584: 50 push %eax + 15585: ff 75 f4 pushl 0xfffffff4(%ebp) + 15588: e8 4e e9 ff ff call 13edb <_clear_port_feature> + 1558d: 83 c4 10 add $0x10,%esp + 15590: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 15593: 25 ff ff 00 00 and $0xffff,%eax + 15598: c1 e8 03 shr $0x3,%eax + 1559b: 83 e0 01 and $0x1,%eax + 1559e: 85 c0 test %eax,%eax + 155a0: 74 23 je 155c5 <_hub_events+0x1fc> + 155a2: 83 ec 04 sub $0x4,%esp + 155a5: 6a 13 push $0x13 + 155a7: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 155aa: 40 inc %eax + 155ab: 50 push %eax + 155ac: ff 75 f4 pushl 0xfffffff4(%ebp) + 155af: e8 27 e9 ff ff call 13edb <_clear_port_feature> + 155b4: 83 c4 10 add $0x10,%esp + 155b7: 83 ec 0c sub $0xc,%esp + 155ba: ff 75 f0 pushl 0xfffffff0(%ebp) + 155bd: e8 b1 ed ff ff call 14373 <_hub_power_on> + 155c2: 83 c4 10 add $0x10,%esp + 155c5: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 155c8: 25 ff ff 00 00 and $0xffff,%eax + 155cd: c1 e8 04 shr $0x4,%eax + 155d0: 83 e0 01 and $0x1,%eax + 155d3: 85 c0 test %eax,%eax + 155d5: 74 15 je 155ec <_hub_events+0x223> + 155d7: 83 ec 04 sub $0x4,%esp + 155da: 6a 14 push $0x14 + 155dc: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 155df: 40 inc %eax + 155e0: 50 push %eax + 155e1: ff 75 f4 pushl 0xfffffff4(%ebp) + 155e4: e8 f2 e8 ff ff call 13edb <_clear_port_feature> + 155e9: 83 c4 10 add $0x10,%esp + 155ec: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 155ef: ff 00 incl (%eax) + 155f1: e9 8d fe ff ff jmp 15483 <_hub_events+0xba> + 155f6: 83 ec 04 sub $0x4,%esp + 155f9: 8d 45 ec lea 0xffffffec(%ebp),%eax + 155fc: 50 push %eax + 155fd: 8d 45 ee lea 0xffffffee(%ebp),%eax + 15600: 50 push %eax + 15601: ff 75 f0 pushl 0xfffffff0(%ebp) + 15604: e8 dd ed ff ff call 143e6 <_hub_hub_status> + 15609: 83 c4 10 add $0x10,%esp + 1560c: 85 c0 test %eax,%eax + 1560e: 79 05 jns 15615 <_hub_events+0x24c> + 15610: e9 c1 fd ff ff jmp 153d6 <_hub_events+0xd> + 15615: 8b 45 ec mov 0xffffffec(%ebp),%eax + 15618: 25 ff ff 00 00 and $0xffff,%eax + 1561d: 83 e0 01 and $0x1,%eax + 15620: 85 c0 test %eax,%eax + 15622: 74 10 je 15634 <_hub_events+0x26b> + 15624: 83 ec 08 sub $0x8,%esp + 15627: 6a 00 push $0x0 + 15629: ff 75 f4 pushl 0xfffffff4(%ebp) + 1562c: e8 6c e8 ff ff call 13e9d <_clear_hub_feature> + 15631: 83 c4 10 add $0x10,%esp + 15634: 8b 45 ec mov 0xffffffec(%ebp),%eax + 15637: 25 ff ff 00 00 and $0xffff,%eax + 1563c: d1 e8 shr %eax + 1563e: 83 e0 01 and $0x1,%eax + 15641: 85 c0 test %eax,%eax + 15643: 0f 84 8d fd ff ff je 153d6 <_hub_events+0xd> + 15649: 83 ec 0c sub $0xc,%esp + 1564c: 68 f4 01 00 00 push $0x1f4 + 15651: e8 5a 3e 00 00 call 194b0 <_wait_ms> + 15656: 83 c4 10 add $0x10,%esp + 15659: 83 ec 08 sub $0x8,%esp + 1565c: 6a 01 push $0x1 + 1565e: ff 75 f4 pushl 0xfffffff4(%ebp) + 15661: e8 37 e8 ff ff call 13e9d <_clear_hub_feature> + 15666: 83 c4 10 add $0x10,%esp + 15669: 83 ec 0c sub $0xc,%esp + 1566c: ff 75 f0 pushl 0xfffffff0(%ebp) + 1566f: e8 ff ec ff ff call 14373 <_hub_power_on> + 15674: 83 c4 10 add $0x10,%esp + 15677: e9 5a fd ff ff jmp 153d6 <_hub_events+0xd> + 1567c: c9 leave + 1567d: c3 ret + +0001567e <_list_del_init>: + 1567e: 55 push %ebp + 1567f: 89 e5 mov %esp,%ebp + 15681: 8b 45 08 mov 0x8(%ebp),%eax + 15684: ff 30 pushl (%eax) + 15686: 8b 45 08 mov 0x8(%ebp),%eax + 15689: ff 70 04 pushl 0x4(%eax) + 1568c: e8 ac eb ff ff call 1423d <___list_del> + 15691: 83 c4 08 add $0x8,%esp + 15694: 8b 55 08 mov 0x8(%ebp),%edx + 15697: 8b 45 08 mov 0x8(%ebp),%eax + 1569a: 89 02 mov %eax,(%edx) + 1569c: 8b 55 08 mov 0x8(%ebp),%edx + 1569f: 8b 45 08 mov 0x8(%ebp),%eax + 156a2: 89 42 04 mov %eax,0x4(%edx) + 156a5: c9 leave + 156a6: c3 ret + +000156a7 <_hub_thread>: + 156a7: 55 push %ebp + 156a8: 89 e5 mov %esp,%ebp + 156aa: 83 ec 08 sub $0x8,%esp + 156ad: e8 17 fd ff ff call 153c9 <_hub_events> + 156b2: b8 00 00 00 00 mov $0x0,%eax + 156b7: c9 leave + 156b8: c3 ret + +000156b9 <_usb_hub_init>: + 156b9: 55 push %ebp + 156ba: 89 e5 mov %esp,%ebp + 156bc: 83 ec 08 sub $0x8,%esp + 156bf: 83 ec 0c sub $0xc,%esp + 156c2: 68 a0 a0 01 00 push $0x1a0a0 + 156c7: e8 26 05 00 00 call 15bf2 <_usb_register> + 156cc: 83 c4 10 add $0x10,%esp + 156cf: 85 c0 test %eax,%eax + 156d1: 79 09 jns 156dc <_usb_hub_init+0x23> + 156d3: c7 45 f8 ff ff ff ff movl $0xffffffff,0xfffffff8(%ebp) + 156da: eb 45 jmp 15721 <_usb_hub_init+0x68> + 156dc: 83 ec 04 sub $0x4,%esp + 156df: 6a 00 push $0x0 + 156e1: 6a 00 push $0x0 + 156e3: 68 a7 56 01 00 push $0x156a7 + 156e8: e8 03 40 00 00 call 196f0 <_my_kernel_thread> + 156ed: 83 c4 10 add $0x10,%esp + 156f0: 89 45 fc mov %eax,0xfffffffc(%ebp) + 156f3: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 156f7: 78 11 js 1570a <_usb_hub_init+0x51> + 156f9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 156fc: a3 30 c0 01 00 mov %eax,0x1c030 + 15701: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 15708: eb 17 jmp 15721 <_usb_hub_init+0x68> + 1570a: 83 ec 0c sub $0xc,%esp + 1570d: 68 a0 a0 01 00 push $0x1a0a0 + 15712: e8 54 05 00 00 call 15c6b <_usb_deregister> + 15717: 83 c4 10 add $0x10,%esp + 1571a: c7 45 f8 ff ff ff ff movl $0xffffffff,0xfffffff8(%ebp) + 15721: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15724: c9 leave + 15725: c3 ret + +00015726 <_usb_hub_cleanup>: + 15726: 55 push %ebp + 15727: 89 e5 mov %esp,%ebp + 15729: 83 ec 08 sub $0x8,%esp + 1572c: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 15733: 83 ec 0c sub $0xc,%esp + 15736: 68 60 c0 01 00 push $0x1c060 + 1573b: e8 98 41 00 00 call 198d8 <_my_wait_for_completion> + 15740: 83 c4 10 add $0x10,%esp + 15743: 83 ec 0c sub $0xc,%esp + 15746: 68 a0 a0 01 00 push $0x1a0a0 + 1574b: e8 1b 05 00 00 call 15c6b <_usb_deregister> + 15750: 83 c4 10 add $0x10,%esp + 15753: c9 leave + 15754: c3 ret + +00015755 <_usb_physical_reset_device>: + 15755: 55 push %ebp + 15756: 89 e5 mov %esp,%ebp + 15758: 53 push %ebx + 15759: 83 ec 24 sub $0x24,%esp + 1575c: 8b 45 08 mov 0x8(%ebp),%eax + 1575f: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 15765: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15768: c7 45 e8 ff ff ff ff movl $0xffffffff,0xffffffe8(%ebp) + 1576f: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 15773: 75 0c jne 15781 <_usb_physical_reset_device+0x2c> + 15775: c7 45 dc ea ff ff ff movl $0xffffffea,0xffffffdc(%ebp) + 1577c: e9 29 03 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 15781: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 15788: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1578b: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 15791: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 15794: 7e 21 jle 157b7 <_usb_physical_reset_device+0x62> + 15796: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15799: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 1579c: 8b 84 90 b0 01 00 00 mov 0x1b0(%eax,%edx,4),%eax + 157a3: 3b 45 08 cmp 0x8(%ebp),%eax + 157a6: 75 08 jne 157b0 <_usb_physical_reset_device+0x5b> + 157a8: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 157ab: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 157ae: eb 07 jmp 157b7 <_usb_physical_reset_device+0x62> + 157b0: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 157b3: ff 00 incl (%eax) + 157b5: eb d1 jmp 15788 <_usb_physical_reset_device+0x33> + 157b7: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 157bb: 79 0c jns 157c9 <_usb_physical_reset_device+0x74> + 157bd: c7 45 dc fe ff ff ff movl $0xfffffffe,0xffffffdc(%ebp) + 157c4: e9 e1 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 157c9: 83 ec 08 sub $0x8,%esp + 157cc: 6a 12 push $0x12 + 157ce: 6a 01 push $0x1 + 157d0: e8 5b 42 00 00 call 19a30 <_ExAllocatePool@8> + 157d5: 83 c4 08 add $0x8,%esp + 157d8: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 157db: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 157df: 75 0c jne 157ed <_usb_physical_reset_device+0x98> + 157e1: c7 45 dc f4 ff ff ff movl $0xfffffff4,0xffffffdc(%ebp) + 157e8: e9 bd 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 157ed: 6a 0a push $0xa + 157ef: ff 75 08 pushl 0x8(%ebp) + 157f2: ff 75 e8 pushl 0xffffffe8(%ebp) + 157f5: ff 75 f8 pushl 0xfffffff8(%ebp) + 157f8: e8 6c f7 ff ff call 14f69 <_hub_port_reset> + 157fd: 83 c4 10 add $0x10,%esp + 15800: 85 c0 test %eax,%eax + 15802: 74 2b je 1582f <_usb_physical_reset_device+0xda> + 15804: 83 ec 08 sub $0x8,%esp + 15807: ff 75 e8 pushl 0xffffffe8(%ebp) + 1580a: ff 75 f8 pushl 0xfffffff8(%ebp) + 1580d: e8 ff f7 ff ff call 15011 <_hub_port_disable> + 15812: 83 c4 10 add $0x10,%esp + 15815: 83 ec 0c sub $0xc,%esp + 15818: ff 75 f4 pushl 0xfffffff4(%ebp) + 1581b: e8 20 42 00 00 call 19a40 <_ExFreePool@4> + 15820: 83 c4 0c add $0xc,%esp + 15823: c7 45 dc ed ff ff ff movl $0xffffffed,0xffffffdc(%ebp) + 1582a: e9 7b 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 1582f: 83 ec 0c sub $0xc,%esp + 15832: ff 75 08 pushl 0x8(%ebp) + 15835: e8 53 11 00 00 call 1698d <_usb_set_address> + 1583a: 83 c4 10 add $0x10,%esp + 1583d: 89 45 ec mov %eax,0xffffffec(%ebp) + 15840: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 15844: 79 2a jns 15870 <_usb_physical_reset_device+0x11b> + 15846: 83 ec 08 sub $0x8,%esp + 15849: ff 75 e8 pushl 0xffffffe8(%ebp) + 1584c: ff 75 f8 pushl 0xfffffff8(%ebp) + 1584f: e8 bd f7 ff ff call 15011 <_hub_port_disable> + 15854: 83 c4 10 add $0x10,%esp + 15857: 83 ec 0c sub $0xc,%esp + 1585a: ff 75 f4 pushl 0xfffffff4(%ebp) + 1585d: e8 de 41 00 00 call 19a40 <_ExFreePool@4> + 15862: 83 c4 0c add $0xc,%esp + 15865: 8b 45 ec mov 0xffffffec(%ebp),%eax + 15868: 89 45 dc mov %eax,0xffffffdc(%ebp) + 1586b: e9 3a 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 15870: 83 ec 0c sub $0xc,%esp + 15873: 6a 0a push $0xa + 15875: e8 36 3c 00 00 call 194b0 <_wait_ms> + 1587a: 83 c4 10 add $0x10,%esp + 1587d: 83 ec 0c sub $0xc,%esp + 15880: 6a 12 push $0x12 + 15882: ff 75 f4 pushl 0xfffffff4(%ebp) + 15885: 6a 00 push $0x0 + 15887: 6a 01 push $0x1 + 15889: ff 75 08 pushl 0x8(%ebp) + 1588c: e8 cb ba ff ff call 1135c <_usb_get_descriptor> + 15891: 83 c4 20 add $0x20,%esp + 15894: 89 45 ec mov %eax,0xffffffec(%ebp) + 15897: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 1589b: 79 19 jns 158b6 <_usb_physical_reset_device+0x161> + 1589d: 83 ec 0c sub $0xc,%esp + 158a0: ff 75 f4 pushl 0xfffffff4(%ebp) + 158a3: e8 98 41 00 00 call 19a40 <_ExFreePool@4> + 158a8: 83 c4 0c add $0xc,%esp + 158ab: 8b 45 ec mov 0xffffffec(%ebp),%eax + 158ae: 89 45 dc mov %eax,0xffffffdc(%ebp) + 158b1: e9 f4 01 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 158b6: 83 ec 04 sub $0x4,%esp + 158b9: 6a 12 push $0x12 + 158bb: ff 75 f4 pushl 0xfffffff4(%ebp) + 158be: 8b 45 08 mov 0x8(%ebp),%eax + 158c1: 05 70 01 00 00 add $0x170,%eax + 158c6: 50 push %eax + 158c7: e8 e4 41 00 00 call 19ab0 <_RtlCompareMemory@12> + 158cc: 83 c4 04 add $0x4,%esp + 158cf: 85 c0 test %eax,%eax + 158d1: 0f 84 e8 00 00 00 je 159bf <_usb_physical_reset_device+0x26a> + 158d7: 83 ec 0c sub $0xc,%esp + 158da: ff 75 f4 pushl 0xfffffff4(%ebp) + 158dd: e8 5e 41 00 00 call 19a40 <_ExFreePool@4> + 158e2: 83 c4 0c add $0xc,%esp + 158e5: 83 ec 0c sub $0xc,%esp + 158e8: ff 75 08 pushl 0x8(%ebp) + 158eb: e8 05 23 00 00 call 17bf5 <_usb_destroy_configuration> + 158f0: 83 c4 10 add $0x10,%esp + 158f3: 83 ec 0c sub $0xc,%esp + 158f6: ff 75 08 pushl 0x8(%ebp) + 158f9: e8 83 bb ff ff call 11481 <_usb_get_device_descriptor> + 158fe: 83 c4 10 add $0x10,%esp + 15901: 89 45 ec mov %eax,0xffffffec(%ebp) + 15904: 83 7d ec 11 cmpl $0x11,0xffffffec(%ebp) + 15908: 77 32 ja 1593c <_usb_physical_reset_device+0x1e7> + 1590a: 83 ec 08 sub $0x8,%esp + 1590d: 8b 45 08 mov 0x8(%ebp),%eax + 15910: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 15916: 83 c0 10 add $0x10,%eax + 15919: 50 push %eax + 1591a: 8b 45 08 mov 0x8(%ebp),%eax + 1591d: ff 30 pushl (%eax) + 1591f: e8 8e 01 00 00 call 15ab2 <_clear_bit> + 15924: 83 c4 10 add $0x10,%esp + 15927: 8b 45 08 mov 0x8(%ebp),%eax + 1592a: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 15930: c7 45 dc fb ff ff ff movl $0xfffffffb,0xffffffdc(%ebp) + 15937: e9 6e 01 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 1593c: 83 ec 0c sub $0xc,%esp + 1593f: ff 75 08 pushl 0x8(%ebp) + 15942: e8 d1 24 00 00 call 17e18 <_usb_get_configuration> + 15947: 83 c4 10 add $0x10,%esp + 1594a: 89 45 ec mov %eax,0xffffffec(%ebp) + 1594d: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 15951: 79 40 jns 15993 <_usb_physical_reset_device+0x23e> + 15953: 83 ec 0c sub $0xc,%esp + 15956: ff 75 08 pushl 0x8(%ebp) + 15959: e8 97 22 00 00 call 17bf5 <_usb_destroy_configuration> + 1595e: 83 c4 10 add $0x10,%esp + 15961: 83 ec 08 sub $0x8,%esp + 15964: 8b 45 08 mov 0x8(%ebp),%eax + 15967: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1596d: 83 c0 10 add $0x10,%eax + 15970: 50 push %eax + 15971: 8b 45 08 mov 0x8(%ebp),%eax + 15974: ff 30 pushl (%eax) + 15976: e8 37 01 00 00 call 15ab2 <_clear_bit> + 1597b: 83 c4 10 add $0x10,%esp + 1597e: 8b 45 08 mov 0x8(%ebp),%eax + 15981: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 15987: c7 45 dc 01 00 00 00 movl $0x1,0xffffffdc(%ebp) + 1598e: e9 17 01 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 15993: 8b 45 08 mov 0x8(%ebp),%eax + 15996: 8b 55 08 mov 0x8(%ebp),%edx + 15999: 8b 92 84 01 00 00 mov 0x184(%edx),%edx + 1599f: 89 90 88 01 00 00 mov %edx,0x188(%eax) + 159a5: 83 ec 0c sub $0xc,%esp + 159a8: ff 75 08 pushl 0x8(%ebp) + 159ab: e8 49 bb ff ff call 114f9 <_usb_set_maxpacket> + 159b0: 83 c4 10 add $0x10,%esp + 159b3: c7 45 dc 01 00 00 00 movl $0x1,0xffffffdc(%ebp) + 159ba: e9 eb 00 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 159bf: 83 ec 0c sub $0xc,%esp + 159c2: ff 75 f4 pushl 0xfffffff4(%ebp) + 159c5: e8 76 40 00 00 call 19a40 <_ExFreePool@4> + 159ca: 83 c4 0c add $0xc,%esp + 159cd: 83 ec 08 sub $0x8,%esp + 159d0: 8b 45 08 mov 0x8(%ebp),%eax + 159d3: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 159d9: 8a 40 05 mov 0x5(%eax),%al + 159dc: 25 ff 00 00 00 and $0xff,%eax + 159e1: 50 push %eax + 159e2: ff 75 08 pushl 0x8(%ebp) + 159e5: e8 5d c0 ff ff call 11a47 <_usb_set_configuration> + 159ea: 83 c4 10 add $0x10,%esp + 159ed: 89 45 ec mov %eax,0xffffffec(%ebp) + 159f0: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 159f4: 79 0b jns 15a01 <_usb_physical_reset_device+0x2ac> + 159f6: 8b 45 ec mov 0xffffffec(%ebp),%eax + 159f9: 89 45 dc mov %eax,0xffffffdc(%ebp) + 159fc: e9 a9 00 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 15a01: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 15a08: 8b 45 08 mov 0x8(%ebp),%eax + 15a0b: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 15a11: 8a 40 04 mov 0x4(%eax),%al + 15a14: 25 ff 00 00 00 and $0xff,%eax + 15a19: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 15a1c: 0f 8e 81 00 00 00 jle 15aa3 <_usb_physical_reset_device+0x34e> + 15a22: 8b 45 08 mov 0x8(%ebp),%eax + 15a25: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15a2b: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 15a2e: 89 c8 mov %ecx,%eax + 15a30: c1 e0 02 shl $0x2,%eax + 15a33: 01 c8 add %ecx,%eax + 15a35: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15a3c: 01 d0 add %edx,%eax + 15a3e: 01 c0 add %eax,%eax + 15a40: 01 c8 add %ecx,%eax + 15a42: c1 e0 02 shl $0x2,%eax + 15a45: 03 43 0c add 0xc(%ebx),%eax + 15a48: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 15a4b: 8b 4d e4 mov 0xffffffe4(%ebp),%ecx + 15a4e: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 15a51: 8b 50 04 mov 0x4(%eax),%edx + 15a54: 89 d0 mov %edx,%eax + 15a56: 01 c0 add %eax,%eax + 15a58: 01 d0 add %edx,%eax + 15a5a: c1 e0 03 shl $0x3,%eax + 15a5d: 03 01 add (%ecx),%eax + 15a5f: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 15a62: 83 ec 04 sub $0x4,%esp + 15a65: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 15a68: 8a 40 03 mov 0x3(%eax),%al + 15a6b: 25 ff 00 00 00 and $0xff,%eax + 15a70: 50 push %eax + 15a71: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 15a74: 8a 40 02 mov 0x2(%eax),%al + 15a77: 25 ff 00 00 00 and $0xff,%eax + 15a7c: 50 push %eax + 15a7d: ff 75 08 pushl 0x8(%ebp) + 15a80: e8 f1 bc ff ff call 11776 <_usb_set_interface> + 15a85: 83 c4 10 add $0x10,%esp + 15a88: 89 45 ec mov %eax,0xffffffec(%ebp) + 15a8b: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 15a8f: 79 08 jns 15a99 <_usb_physical_reset_device+0x344> + 15a91: 8b 45 ec mov 0xffffffec(%ebp),%eax + 15a94: 89 45 dc mov %eax,0xffffffdc(%ebp) + 15a97: eb 11 jmp 15aaa <_usb_physical_reset_device+0x355> + 15a99: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 15a9c: ff 00 incl (%eax) + 15a9e: e9 65 ff ff ff jmp 15a08 <_usb_physical_reset_device+0x2b3> + 15aa3: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) + 15aaa: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 15aad: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 15ab0: c9 leave + 15ab1: c3 ret + +00015ab2 <_clear_bit>: + 15ab2: 55 push %ebp + 15ab3: 89 e5 mov %esp,%ebp + 15ab5: 8b 55 0c mov 0xc(%ebp),%edx + 15ab8: 8b 45 08 mov 0x8(%ebp),%eax + 15abb: 0f b3 02 btr %eax,(%edx) + 15abe: 5d pop %ebp + 15abf: c3 ret + +00015ac0 <_usb_reset_device>: + 15ac0: 55 push %ebp + 15ac1: 89 e5 mov %esp,%ebp + 15ac3: 83 ec 08 sub $0x8,%esp + 15ac6: 83 ec 0c sub $0xc,%esp + 15ac9: ff 75 08 pushl 0x8(%ebp) + 15acc: e8 84 fc ff ff call 15755 <_usb_physical_reset_device> + 15ad1: 83 c4 10 add $0x10,%esp + 15ad4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15ad7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15ada: c9 leave + 15adb: c3 ret + 15adc: 90 nop + 15add: 90 nop + 15ade: 90 nop + 15adf: 90 nop + +00015ae0 <_generic_probe>: + 15ae0: 55 push %ebp + 15ae1: 89 e5 mov %esp,%ebp + 15ae3: b8 00 00 00 00 mov $0x0,%eax + 15ae8: 5d pop %ebp + 15ae9: c3 ret + +00015aea <_generic_remove>: + 15aea: 55 push %ebp + 15aeb: 89 e5 mov %esp,%ebp + 15aed: b8 00 00 00 00 mov $0x0,%eax + 15af2: 5d pop %ebp + 15af3: c3 ret + +00015af4 <_usb_device_probe>: + 15af4: 55 push %ebp + 15af5: 89 e5 mov %esp,%ebp + 15af7: 83 ec 18 sub $0x18,%esp + 15afa: 8b 45 08 mov 0x8(%ebp),%eax + 15afd: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15b00: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15b03: 83 e8 18 sub $0x18,%eax + 15b06: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15b09: 8b 45 08 mov 0x8(%ebp),%eax + 15b0c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 15b12: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15b15: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15b18: 83 e8 18 sub $0x18,%eax + 15b1b: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15b1e: c7 45 f0 ed ff ff ff movl $0xffffffed,0xfffffff0(%ebp) + 15b25: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15b28: 83 78 08 00 cmpl $0x0,0x8(%eax) + 15b2c: 75 08 jne 15b36 <_usb_device_probe+0x42> + 15b2e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15b31: 89 45 ec mov %eax,0xffffffec(%ebp) + 15b34: eb 49 jmp 15b7f <_usb_device_probe+0x8b> + 15b36: 83 ec 08 sub $0x8,%esp + 15b39: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15b3c: ff 70 14 pushl 0x14(%eax) + 15b3f: ff 75 fc pushl 0xfffffffc(%ebp) + 15b42: e8 0d 04 00 00 call 15f54 <_usb_match_id> + 15b47: 83 c4 10 add $0x10,%esp + 15b4a: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15b4d: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 15b51: 74 17 je 15b6a <_usb_device_probe+0x76> + 15b53: 83 ec 08 sub $0x8,%esp + 15b56: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15b59: ff 75 f4 pushl 0xfffffff4(%ebp) + 15b5c: ff 75 fc pushl 0xfffffffc(%ebp) + 15b5f: 8b 40 08 mov 0x8(%eax),%eax + 15b62: ff d0 call *%eax + 15b64: 83 c4 10 add $0x10,%esp + 15b67: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 15b6a: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 15b6e: 75 09 jne 15b79 <_usb_device_probe+0x85> + 15b70: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 15b73: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15b76: 89 42 10 mov %eax,0x10(%edx) + 15b79: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15b7c: 89 45 ec mov %eax,0xffffffec(%ebp) + 15b7f: 8b 45 ec mov 0xffffffec(%ebp),%eax + 15b82: c9 leave + 15b83: c3 ret + +00015b84 <_usb_device_remove>: + 15b84: 55 push %ebp + 15b85: 89 e5 mov %esp,%ebp + 15b87: 83 ec 18 sub $0x18,%esp + 15b8a: 8b 45 08 mov 0x8(%ebp),%eax + 15b8d: 83 e8 18 sub $0x18,%eax + 15b90: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15b93: 8b 45 08 mov 0x8(%ebp),%eax + 15b96: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 15b9c: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15b9f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15ba2: 83 e8 18 sub $0x18,%eax + 15ba5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15ba8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15bab: 83 78 10 00 cmpl $0x0,0x10(%eax) + 15baf: 74 20 je 15bd1 <_usb_device_remove+0x4d> + 15bb1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15bb4: 8b 40 10 mov 0x10(%eax),%eax + 15bb7: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 15bbb: 74 14 je 15bd1 <_usb_device_remove+0x4d> + 15bbd: 83 ec 0c sub $0xc,%esp + 15bc0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15bc3: 8b 40 10 mov 0x10(%eax),%eax + 15bc6: ff 75 fc pushl 0xfffffffc(%ebp) + 15bc9: 8b 40 0c mov 0xc(%eax),%eax + 15bcc: ff d0 call *%eax + 15bce: 83 c4 10 add $0x10,%esp + 15bd1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15bd4: 83 78 10 00 cmpl $0x0,0x10(%eax) + 15bd8: 74 11 je 15beb <_usb_device_remove+0x67> + 15bda: 83 ec 08 sub $0x8,%esp + 15bdd: ff 75 fc pushl 0xfffffffc(%ebp) + 15be0: ff 75 f8 pushl 0xfffffff8(%ebp) + 15be3: e8 3f 03 00 00 call 15f27 <_usb_driver_release_interface> + 15be8: 83 c4 10 add $0x10,%esp + 15beb: b8 00 00 00 00 mov $0x0,%eax + 15bf0: c9 leave + 15bf1: c3 ret + +00015bf2 <_usb_register>: + 15bf2: 55 push %ebp + 15bf3: 89 e5 mov %esp,%ebp + 15bf5: 83 ec 08 sub $0x8,%esp + 15bf8: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 15bff: 83 3d 30 c1 01 00 00 cmpl $0x0,0x1c130 + 15c06: 74 09 je 15c11 <_usb_register+0x1f> + 15c08: c7 45 f8 ed ff ff ff movl $0xffffffed,0xfffffff8(%ebp) + 15c0f: eb 50 jmp 15c61 <_usb_register+0x6f> + 15c11: 8b 55 08 mov 0x8(%ebp),%edx + 15c14: 8b 45 08 mov 0x8(%ebp),%eax + 15c17: 8b 40 04 mov 0x4(%eax),%eax + 15c1a: 89 42 18 mov %eax,0x18(%edx) + 15c1d: 8b 45 08 mov 0x8(%ebp),%eax + 15c20: c7 40 1c f8 a0 01 00 movl $0x1a0f8,0x1c(%eax) + 15c27: 8b 45 08 mov 0x8(%ebp),%eax + 15c2a: c7 40 20 f4 5a 01 00 movl $0x15af4,0x20(%eax) + 15c31: 8b 45 08 mov 0x8(%ebp),%eax + 15c34: c7 40 24 84 5b 01 00 movl $0x15b84,0x24(%eax) + 15c3b: 83 ec 0c sub $0xc,%esp + 15c3e: 8b 45 08 mov 0x8(%ebp),%eax + 15c41: 83 c0 18 add $0x18,%eax + 15c44: 50 push %eax + 15c45: e8 92 3b 00 00 call 197dc <_my_driver_register> + 15c4a: 83 c4 10 add $0x10,%esp + 15c4d: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15c50: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 15c54: 75 05 jne 15c5b <_usb_register+0x69> + 15c56: e8 0b 00 00 00 call 15c66 <_usbfs_update_special> + 15c5b: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15c5e: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15c61: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15c64: c9 leave + 15c65: c3 ret + +00015c66 <_usbfs_update_special>: + 15c66: 55 push %ebp + 15c67: 89 e5 mov %esp,%ebp + 15c69: 5d pop %ebp + 15c6a: c3 ret + +00015c6b <_usb_deregister>: + 15c6b: 55 push %ebp + 15c6c: 89 e5 mov %esp,%ebp + 15c6e: e8 f3 ff ff ff call 15c66 <_usbfs_update_special> + 15c73: 5d pop %ebp + 15c74: c3 ret + +00015c75 <_usb_ifnum_to_if>: + 15c75: 55 push %ebp + 15c76: 89 e5 mov %esp,%ebp + 15c78: 53 push %ebx + 15c79: 83 ec 08 sub $0x8,%esp + 15c7c: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 15c83: 8b 45 08 mov 0x8(%ebp),%eax + 15c86: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 15c8c: 8a 40 04 mov 0x4(%eax),%al + 15c8f: 25 ff 00 00 00 and $0xff,%eax + 15c94: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 15c97: 7e 6f jle 15d08 <_usb_ifnum_to_if+0x93> + 15c99: 8b 45 08 mov 0x8(%ebp),%eax + 15c9c: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15ca2: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 15ca5: 89 c8 mov %ecx,%eax + 15ca7: c1 e0 02 shl $0x2,%eax + 15caa: 01 c8 add %ecx,%eax + 15cac: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15cb3: 01 d0 add %edx,%eax + 15cb5: 01 c0 add %eax,%eax + 15cb7: 01 c8 add %ecx,%eax + 15cb9: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15cc0: 8b 43 0c mov 0xc(%ebx),%eax + 15cc3: 8b 04 02 mov (%edx,%eax,1),%eax + 15cc6: 8a 40 02 mov 0x2(%eax),%al + 15cc9: 25 ff 00 00 00 and $0xff,%eax + 15cce: 3b 45 0c cmp 0xc(%ebp),%eax + 15cd1: 75 2b jne 15cfe <_usb_ifnum_to_if+0x89> + 15cd3: 8b 45 08 mov 0x8(%ebp),%eax + 15cd6: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15cdc: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 15cdf: 89 c8 mov %ecx,%eax + 15ce1: c1 e0 02 shl $0x2,%eax + 15ce4: 01 c8 add %ecx,%eax + 15ce6: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15ced: 01 d0 add %edx,%eax + 15cef: 01 c0 add %eax,%eax + 15cf1: 01 c8 add %ecx,%eax + 15cf3: c1 e0 02 shl $0x2,%eax + 15cf6: 03 43 0c add 0xc(%ebx),%eax + 15cf9: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15cfc: eb 11 jmp 15d0f <_usb_ifnum_to_if+0x9a> + 15cfe: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 15d01: ff 00 incl (%eax) + 15d03: e9 7b ff ff ff jmp 15c83 <_usb_ifnum_to_if+0xe> + 15d08: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 15d0f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15d12: 83 c4 08 add $0x8,%esp + 15d15: 5b pop %ebx + 15d16: 5d pop %ebp + 15d17: c3 ret + +00015d18 <_usb_epnum_to_ep_desc>: + 15d18: 55 push %ebp + 15d19: 89 e5 mov %esp,%ebp + 15d1b: 56 push %esi + 15d1c: 53 push %ebx + 15d1d: 83 ec 10 sub $0x10,%esp + 15d20: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 15d27: 8b 45 08 mov 0x8(%ebp),%eax + 15d2a: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 15d30: 8a 40 04 mov 0x4(%eax),%al + 15d33: 25 ff 00 00 00 and $0xff,%eax + 15d38: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 15d3b: 0f 8e 65 01 00 00 jle 15ea6 <_usb_epnum_to_ep_desc+0x18e> + 15d41: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 15d48: 8b 45 08 mov 0x8(%ebp),%eax + 15d4b: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15d51: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 15d54: 89 c8 mov %ecx,%eax + 15d56: c1 e0 02 shl $0x2,%eax + 15d59: 01 c8 add %ecx,%eax + 15d5b: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15d62: 01 d0 add %edx,%eax + 15d64: 01 c0 add %eax,%eax + 15d66: 01 c8 add %ecx,%eax + 15d68: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 15d6f: 8b 53 0c mov 0xc(%ebx),%edx + 15d72: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15d75: 3b 44 11 08 cmp 0x8(%ecx,%edx,1),%eax + 15d79: 0f 83 1d 01 00 00 jae 15e9c <_usb_epnum_to_ep_desc+0x184> + 15d7f: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 15d86: 8b 45 08 mov 0x8(%ebp),%eax + 15d89: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15d8f: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 15d92: 89 c8 mov %ecx,%eax + 15d94: c1 e0 02 shl $0x2,%eax + 15d97: 01 c8 add %ecx,%eax + 15d99: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15da0: 01 d0 add %edx,%eax + 15da2: 01 c0 add %eax,%eax + 15da4: 01 c8 add %ecx,%eax + 15da6: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 15dad: 8b 5b 0c mov 0xc(%ebx),%ebx + 15db0: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 15db3: 89 d0 mov %edx,%eax + 15db5: 01 c0 add %eax,%eax + 15db7: 01 d0 add %edx,%eax + 15db9: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 15dc0: 8b 04 19 mov (%ecx,%ebx,1),%eax + 15dc3: 8a 44 02 04 mov 0x4(%edx,%eax,1),%al + 15dc7: 25 ff 00 00 00 and $0xff,%eax + 15dcc: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 15dcf: 0f 8e bd 00 00 00 jle 15e92 <_usb_epnum_to_ep_desc+0x17a> + 15dd5: 8b 45 08 mov 0x8(%ebp),%eax + 15dd8: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15dde: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 15de1: 89 c8 mov %ecx,%eax + 15de3: c1 e0 02 shl $0x2,%eax + 15de6: 01 c8 add %ecx,%eax + 15de8: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15def: 01 d0 add %edx,%eax + 15df1: 01 c0 add %eax,%eax + 15df3: 01 c8 add %ecx,%eax + 15df5: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 15dfc: 8b 5b 0c mov 0xc(%ebx),%ebx + 15dff: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 15e02: 89 d0 mov %edx,%eax + 15e04: 01 c0 add %eax,%eax + 15e06: 01 d0 add %edx,%eax + 15e08: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi + 15e0f: 8b 0c 19 mov (%ecx,%ebx,1),%ecx + 15e12: 8b 55 ec mov 0xffffffec(%ebp),%edx + 15e15: 89 d0 mov %edx,%eax + 15e17: c1 e0 02 shl $0x2,%eax + 15e1a: 01 d0 add %edx,%eax + 15e1c: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15e23: 8b 44 0e 0c mov 0xc(%esi,%ecx,1),%eax + 15e27: 8a 44 02 02 mov 0x2(%edx,%eax,1),%al + 15e2b: 25 ff 00 00 00 and $0xff,%eax + 15e30: 3b 45 0c cmp 0xc(%ebp),%eax + 15e33: 75 53 jne 15e88 <_usb_epnum_to_ep_desc+0x170> + 15e35: 8b 45 08 mov 0x8(%ebp),%eax + 15e38: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15e3e: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 15e41: 89 c8 mov %ecx,%eax + 15e43: c1 e0 02 shl $0x2,%eax + 15e46: 01 c8 add %ecx,%eax + 15e48: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15e4f: 01 d0 add %edx,%eax + 15e51: 01 c0 add %eax,%eax + 15e53: 01 c8 add %ecx,%eax + 15e55: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 15e5c: 8b 5b 0c mov 0xc(%ebx),%ebx + 15e5f: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 15e62: 89 d0 mov %edx,%eax + 15e64: 01 c0 add %eax,%eax + 15e66: 01 d0 add %edx,%eax + 15e68: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi + 15e6f: 8b 0c 19 mov (%ecx,%ebx,1),%ecx + 15e72: 8b 55 ec mov 0xffffffec(%ebp),%edx + 15e75: 89 d0 mov %edx,%eax + 15e77: c1 e0 02 shl $0x2,%eax + 15e7a: 01 d0 add %edx,%eax + 15e7c: c1 e0 02 shl $0x2,%eax + 15e7f: 03 44 0e 0c add 0xc(%esi,%ecx,1),%eax + 15e83: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 15e86: eb 25 jmp 15ead <_usb_epnum_to_ep_desc+0x195> + 15e88: 8d 45 ec lea 0xffffffec(%ebp),%eax + 15e8b: ff 00 incl (%eax) + 15e8d: e9 f4 fe ff ff jmp 15d86 <_usb_epnum_to_ep_desc+0x6e> + 15e92: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 15e95: ff 00 incl (%eax) + 15e97: e9 ac fe ff ff jmp 15d48 <_usb_epnum_to_ep_desc+0x30> + 15e9c: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 15e9f: ff 00 incl (%eax) + 15ea1: e9 81 fe ff ff jmp 15d27 <_usb_epnum_to_ep_desc+0xf> + 15ea6: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 15ead: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 15eb0: 83 c4 10 add $0x10,%esp + 15eb3: 5b pop %ebx + 15eb4: 5e pop %esi + 15eb5: 5d pop %ebp + 15eb6: c3 ret + +00015eb7 <_usb_driver_claim_interface>: + 15eb7: 55 push %ebp + 15eb8: 89 e5 mov %esp,%ebp + 15eba: 83 ec 08 sub $0x8,%esp + 15ebd: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 15ec1: 74 22 je 15ee5 <_usb_driver_claim_interface+0x2e> + 15ec3: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 15ec7: 75 02 jne 15ecb <_usb_driver_claim_interface+0x14> + 15ec9: eb 1a jmp 15ee5 <_usb_driver_claim_interface+0x2e> + 15ecb: 8b 55 0c mov 0xc(%ebp),%edx + 15ece: 8b 45 08 mov 0x8(%ebp),%eax + 15ed1: 89 42 10 mov %eax,0x10(%edx) + 15ed4: 83 ec 08 sub $0x8,%esp + 15ed7: ff 75 10 pushl 0x10(%ebp) + 15eda: ff 75 0c pushl 0xc(%ebp) + 15edd: e8 05 00 00 00 call 15ee7 <_usb_set_intfdata> + 15ee2: 83 c4 10 add $0x10,%esp + 15ee5: c9 leave + 15ee6: c3 ret + +00015ee7 <_usb_set_intfdata>: + 15ee7: 55 push %ebp + 15ee8: 89 e5 mov %esp,%ebp + 15eea: 8b 55 08 mov 0x8(%ebp),%edx + 15eed: 83 c2 18 add $0x18,%edx + 15ef0: 8b 45 0c mov 0xc(%ebp),%eax + 15ef3: 89 82 9c 00 00 00 mov %eax,0x9c(%edx) + 15ef9: 5d pop %ebp + 15efa: c3 ret + +00015efb <_usb_interface_claimed>: + 15efb: 55 push %ebp + 15efc: 89 e5 mov %esp,%ebp + 15efe: 83 ec 04 sub $0x4,%esp + 15f01: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 15f05: 75 09 jne 15f10 <_usb_interface_claimed+0x15> + 15f07: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 15f0e: eb 12 jmp 15f22 <_usb_interface_claimed+0x27> + 15f10: 8b 45 08 mov 0x8(%ebp),%eax + 15f13: 83 78 10 00 cmpl $0x0,0x10(%eax) + 15f17: 0f 95 c0 setne %al + 15f1a: 25 ff 00 00 00 and $0xff,%eax + 15f1f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15f22: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15f25: c9 leave + 15f26: c3 ret + +00015f27 <_usb_driver_release_interface>: + 15f27: 55 push %ebp + 15f28: 89 e5 mov %esp,%ebp + 15f2a: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 15f2e: 74 22 je 15f52 <_usb_driver_release_interface+0x2b> + 15f30: 8b 45 0c mov 0xc(%ebp),%eax + 15f33: 8b 40 10 mov 0x10(%eax),%eax + 15f36: 3b 45 08 cmp 0x8(%ebp),%eax + 15f39: 75 17 jne 15f52 <_usb_driver_release_interface+0x2b> + 15f3b: 8b 45 0c mov 0xc(%ebp),%eax + 15f3e: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 15f45: 6a 00 push $0x0 + 15f47: ff 75 0c pushl 0xc(%ebp) + 15f4a: e8 98 ff ff ff call 15ee7 <_usb_set_intfdata> + 15f4f: 83 c4 08 add $0x8,%esp + 15f52: c9 leave + 15f53: c3 ret + +00015f54 <_usb_match_id>: + 15f54: 55 push %ebp + 15f55: 89 e5 mov %esp,%ebp + 15f57: 83 ec 10 sub $0x10,%esp + 15f5a: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 15f5e: 75 0c jne 15f6c <_usb_match_id+0x18> + 15f60: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 15f67: e9 0f 02 00 00 jmp 1617b <_usb_match_id+0x227> + 15f6c: 8b 4d 08 mov 0x8(%ebp),%ecx + 15f6f: 8b 45 08 mov 0x8(%ebp),%eax + 15f72: 8b 50 04 mov 0x4(%eax),%edx + 15f75: 89 d0 mov %edx,%eax + 15f77: 01 c0 add %eax,%eax + 15f79: 01 d0 add %edx,%eax + 15f7b: c1 e0 03 shl $0x3,%eax + 15f7e: 03 01 add (%ecx),%eax + 15f80: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15f83: 8b 45 08 mov 0x8(%ebp),%eax + 15f86: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 15f8c: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15f8f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15f92: 2d c0 00 00 00 sub $0xc0,%eax + 15f97: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15f9a: 8b 45 0c mov 0xc(%ebp),%eax + 15f9d: 66 83 78 02 00 cmpw $0x0,0x2(%eax) + 15fa2: 75 20 jne 15fc4 <_usb_match_id+0x70> + 15fa4: 8b 45 0c mov 0xc(%ebp),%eax + 15fa7: 80 78 0a 00 cmpb $0x0,0xa(%eax) + 15fab: 75 17 jne 15fc4 <_usb_match_id+0x70> + 15fad: 8b 45 0c mov 0xc(%ebp),%eax + 15fb0: 80 78 0d 00 cmpb $0x0,0xd(%eax) + 15fb4: 75 0e jne 15fc4 <_usb_match_id+0x70> + 15fb6: 8b 45 0c mov 0xc(%ebp),%eax + 15fb9: 83 78 10 00 cmpl $0x0,0x10(%eax) + 15fbd: 75 05 jne 15fc4 <_usb_match_id+0x70> + 15fbf: e9 b0 01 00 00 jmp 16174 <_usb_match_id+0x220> + 15fc4: 8b 45 0c mov 0xc(%ebp),%eax + 15fc7: 66 8b 00 mov (%eax),%ax + 15fca: 25 ff ff 00 00 and $0xffff,%eax + 15fcf: 83 e0 01 and $0x1,%eax + 15fd2: 85 c0 test %eax,%eax + 15fd4: 74 18 je 15fee <_usb_match_id+0x9a> + 15fd6: 8b 45 0c mov 0xc(%ebp),%eax + 15fd9: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 15fdc: 66 8b 40 02 mov 0x2(%eax),%ax + 15fe0: 66 3b 82 78 01 00 00 cmp 0x178(%edx),%ax + 15fe7: 74 05 je 15fee <_usb_match_id+0x9a> + 15fe9: e9 7b 01 00 00 jmp 16169 <_usb_match_id+0x215> + 15fee: 8b 45 0c mov 0xc(%ebp),%eax + 15ff1: 66 8b 00 mov (%eax),%ax + 15ff4: 25 ff ff 00 00 and $0xffff,%eax + 15ff9: d1 e8 shr %eax + 15ffb: 83 e0 01 and $0x1,%eax + 15ffe: 85 c0 test %eax,%eax + 16000: 74 18 je 1601a <_usb_match_id+0xc6> + 16002: 8b 45 0c mov 0xc(%ebp),%eax + 16005: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 16008: 66 8b 40 04 mov 0x4(%eax),%ax + 1600c: 66 3b 82 7a 01 00 00 cmp 0x17a(%edx),%ax + 16013: 74 05 je 1601a <_usb_match_id+0xc6> + 16015: e9 4f 01 00 00 jmp 16169 <_usb_match_id+0x215> + 1601a: 8b 45 0c mov 0xc(%ebp),%eax + 1601d: 66 8b 00 mov (%eax),%ax + 16020: 25 ff ff 00 00 and $0xffff,%eax + 16025: c1 e8 02 shr $0x2,%eax + 16028: 83 e0 01 and $0x1,%eax + 1602b: 85 c0 test %eax,%eax + 1602d: 74 18 je 16047 <_usb_match_id+0xf3> + 1602f: 8b 45 0c mov 0xc(%ebp),%eax + 16032: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 16035: 66 8b 40 06 mov 0x6(%eax),%ax + 16039: 66 3b 82 7c 01 00 00 cmp 0x17c(%edx),%ax + 16040: 76 05 jbe 16047 <_usb_match_id+0xf3> + 16042: e9 22 01 00 00 jmp 16169 <_usb_match_id+0x215> + 16047: 8b 45 0c mov 0xc(%ebp),%eax + 1604a: 66 8b 00 mov (%eax),%ax + 1604d: 25 ff ff 00 00 and $0xffff,%eax + 16052: c1 e8 03 shr $0x3,%eax + 16055: 83 e0 01 and $0x1,%eax + 16058: 85 c0 test %eax,%eax + 1605a: 74 18 je 16074 <_usb_match_id+0x120> + 1605c: 8b 45 0c mov 0xc(%ebp),%eax + 1605f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 16062: 66 8b 40 08 mov 0x8(%eax),%ax + 16066: 66 3b 82 7c 01 00 00 cmp 0x17c(%edx),%ax + 1606d: 73 05 jae 16074 <_usb_match_id+0x120> + 1606f: e9 f5 00 00 00 jmp 16169 <_usb_match_id+0x215> + 16074: 8b 45 0c mov 0xc(%ebp),%eax + 16077: 66 8b 00 mov (%eax),%ax + 1607a: 25 ff ff 00 00 and $0xffff,%eax + 1607f: c1 e8 04 shr $0x4,%eax + 16082: 83 e0 01 and $0x1,%eax + 16085: 85 c0 test %eax,%eax + 16087: 74 16 je 1609f <_usb_match_id+0x14b> + 16089: 8b 45 0c mov 0xc(%ebp),%eax + 1608c: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 1608f: 8a 40 0a mov 0xa(%eax),%al + 16092: 3a 82 74 01 00 00 cmp 0x174(%edx),%al + 16098: 74 05 je 1609f <_usb_match_id+0x14b> + 1609a: e9 ca 00 00 00 jmp 16169 <_usb_match_id+0x215> + 1609f: 8b 45 0c mov 0xc(%ebp),%eax + 160a2: 66 8b 00 mov (%eax),%ax + 160a5: 25 ff ff 00 00 and $0xffff,%eax + 160aa: c1 e8 05 shr $0x5,%eax + 160ad: 83 e0 01 and $0x1,%eax + 160b0: 85 c0 test %eax,%eax + 160b2: 74 16 je 160ca <_usb_match_id+0x176> + 160b4: 8b 45 0c mov 0xc(%ebp),%eax + 160b7: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 160ba: 8a 40 0b mov 0xb(%eax),%al + 160bd: 3a 82 75 01 00 00 cmp 0x175(%edx),%al + 160c3: 74 05 je 160ca <_usb_match_id+0x176> + 160c5: e9 9f 00 00 00 jmp 16169 <_usb_match_id+0x215> + 160ca: 8b 45 0c mov 0xc(%ebp),%eax + 160cd: 66 8b 00 mov (%eax),%ax + 160d0: 25 ff ff 00 00 and $0xffff,%eax + 160d5: c1 e8 06 shr $0x6,%eax + 160d8: 83 e0 01 and $0x1,%eax + 160db: 85 c0 test %eax,%eax + 160dd: 74 13 je 160f2 <_usb_match_id+0x19e> + 160df: 8b 45 0c mov 0xc(%ebp),%eax + 160e2: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 160e5: 8a 40 0c mov 0xc(%eax),%al + 160e8: 3a 82 76 01 00 00 cmp 0x176(%edx),%al + 160ee: 74 02 je 160f2 <_usb_match_id+0x19e> + 160f0: eb 77 jmp 16169 <_usb_match_id+0x215> + 160f2: 8b 45 0c mov 0xc(%ebp),%eax + 160f5: 66 8b 00 mov (%eax),%ax + 160f8: 25 ff ff 00 00 and $0xffff,%eax + 160fd: c1 e8 07 shr $0x7,%eax + 16100: 83 e0 01 and $0x1,%eax + 16103: 85 c0 test %eax,%eax + 16105: 74 10 je 16117 <_usb_match_id+0x1c3> + 16107: 8b 45 0c mov 0xc(%ebp),%eax + 1610a: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1610d: 8a 40 0d mov 0xd(%eax),%al + 16110: 3a 42 05 cmp 0x5(%edx),%al + 16113: 74 02 je 16117 <_usb_match_id+0x1c3> + 16115: eb 52 jmp 16169 <_usb_match_id+0x215> + 16117: 8b 45 0c mov 0xc(%ebp),%eax + 1611a: 66 8b 00 mov (%eax),%ax + 1611d: 25 ff ff 00 00 and $0xffff,%eax + 16122: c1 e8 08 shr $0x8,%eax + 16125: 83 e0 01 and $0x1,%eax + 16128: 85 c0 test %eax,%eax + 1612a: 74 10 je 1613c <_usb_match_id+0x1e8> + 1612c: 8b 45 0c mov 0xc(%ebp),%eax + 1612f: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 16132: 8a 40 0e mov 0xe(%eax),%al + 16135: 3a 42 06 cmp 0x6(%edx),%al + 16138: 74 02 je 1613c <_usb_match_id+0x1e8> + 1613a: eb 2d jmp 16169 <_usb_match_id+0x215> + 1613c: 8b 45 0c mov 0xc(%ebp),%eax + 1613f: 66 8b 00 mov (%eax),%ax + 16142: 25 ff ff 00 00 and $0xffff,%eax + 16147: c1 e8 09 shr $0x9,%eax + 1614a: 83 e0 01 and $0x1,%eax + 1614d: 85 c0 test %eax,%eax + 1614f: 74 10 je 16161 <_usb_match_id+0x20d> + 16151: 8b 45 0c mov 0xc(%ebp),%eax + 16154: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 16157: 8a 40 0f mov 0xf(%eax),%al + 1615a: 3a 42 07 cmp 0x7(%edx),%al + 1615d: 74 02 je 16161 <_usb_match_id+0x20d> + 1615f: eb 08 jmp 16169 <_usb_match_id+0x215> + 16161: 8b 45 0c mov 0xc(%ebp),%eax + 16164: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 16167: eb 12 jmp 1617b <_usb_match_id+0x227> + 16169: 8d 45 0c lea 0xc(%ebp),%eax + 1616c: 83 00 14 addl $0x14,(%eax) + 1616f: e9 26 fe ff ff jmp 15f9a <_usb_match_id+0x46> + 16174: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 1617b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1617e: c9 leave + 1617f: c3 ret + +00016180 <_usb_find_interface>: + 16180: 55 push %ebp + 16181: 89 e5 mov %esp,%ebp + 16183: 83 ec 14 sub $0x14,%esp + 16186: 8b 45 08 mov 0x8(%ebp),%eax + 16189: 83 c0 28 add $0x28,%eax + 1618c: 8b 00 mov (%eax),%eax + 1618e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16191: 8b 45 08 mov 0x8(%ebp),%eax + 16194: 83 c0 28 add $0x28,%eax + 16197: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 1619a: 74 59 je 161f5 <_usb_find_interface+0x75> + 1619c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1619f: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 161a2: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 161a5: 2d a4 00 00 00 sub $0xa4,%eax + 161aa: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 161ad: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 161b0: 81 b8 98 00 00 00 e0 cmpl $0x1a0e0,0x98(%eax) + 161b7: a0 01 00 + 161ba: 75 02 jne 161be <_usb_find_interface+0x3e> + 161bc: eb 2d jmp 161eb <_usb_find_interface+0x6b> + 161be: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 161c1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 161c4: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 161c7: 83 e8 18 sub $0x18,%eax + 161ca: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 161cd: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 161d0: 83 78 14 ff cmpl $0xffffffff,0x14(%eax) + 161d4: 75 02 jne 161d8 <_usb_find_interface+0x58> + 161d6: eb 13 jmp 161eb <_usb_find_interface+0x6b> + 161d8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 161db: 8b 40 14 mov 0x14(%eax),%eax + 161de: 3b 45 0c cmp 0xc(%ebp),%eax + 161e1: 75 08 jne 161eb <_usb_find_interface+0x6b> + 161e3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 161e6: 89 45 ec mov %eax,0xffffffec(%ebp) + 161e9: eb 11 jmp 161fc <_usb_find_interface+0x7c> + 161eb: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 161ee: 8b 00 mov (%eax),%eax + 161f0: 89 45 fc mov %eax,0xfffffffc(%ebp) + 161f3: eb 9c jmp 16191 <_usb_find_interface+0x11> + 161f5: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 161fc: 8b 45 ec mov 0xffffffec(%ebp),%eax + 161ff: c9 leave + 16200: c3 ret + +00016201 <_usb_device_match>: + 16201: 55 push %ebp + 16202: 89 e5 mov %esp,%ebp + 16204: 83 ec 14 sub $0x14,%esp + 16207: 81 7d 0c e0 a0 01 00 cmpl $0x1a0e0,0xc(%ebp) + 1620e: 75 09 jne 16219 <_usb_device_match+0x18> + 16210: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 16217: eb 51 jmp 1626a <_usb_device_match+0x69> + 16219: 8b 45 08 mov 0x8(%ebp),%eax + 1621c: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1621f: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 16222: 83 e8 18 sub $0x18,%eax + 16225: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16228: 8b 45 0c mov 0xc(%ebp),%eax + 1622b: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1622e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 16231: 83 e8 18 sub $0x18,%eax + 16234: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16237: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1623a: 8b 40 14 mov 0x14(%eax),%eax + 1623d: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16240: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16243: ff 70 14 pushl 0x14(%eax) + 16246: ff 75 fc pushl 0xfffffffc(%ebp) + 16249: e8 06 fd ff ff call 15f54 <_usb_match_id> + 1624e: 83 c4 08 add $0x8,%esp + 16251: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16254: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 16258: 74 09 je 16263 <_usb_device_match+0x62> + 1625a: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) + 16261: eb 07 jmp 1626a <_usb_device_match+0x69> + 16263: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 1626a: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1626d: c9 leave + 1626e: c3 ret + +0001626f <_usb_hotplug>: + 1626f: 55 push %ebp + 16270: 89 e5 mov %esp,%ebp + 16272: b8 ed ff ff ff mov $0xffffffed,%eax + 16277: 5d pop %ebp + 16278: c3 ret + +00016279 <_usb_alloc_dev@8>: + 16279: 55 push %ebp + 1627a: 89 e5 mov %esp,%ebp + 1627c: 83 ec 08 sub $0x8,%esp + 1627f: 83 ec 08 sub $0x8,%esp + 16282: 68 f0 01 00 00 push $0x1f0 + 16287: 6a 01 push $0x1 + 16289: e8 a2 37 00 00 call 19a30 <_ExAllocatePool@8> + 1628e: 83 c4 08 add $0x8,%esp + 16291: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16294: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 16298: 75 0c jne 162a6 <_usb_alloc_dev@8+0x2d> + 1629a: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 162a1: e9 bd 00 00 00 jmp 16363 <_usb_alloc_dev@8+0xea> + 162a6: 83 ec 04 sub $0x4,%esp + 162a9: 68 f0 01 00 00 push $0x1f0 + 162ae: 6a 00 push $0x0 + 162b0: ff 75 fc pushl 0xfffffffc(%ebp) + 162b3: e8 98 37 00 00 call 19a50 <_memset> + 162b8: 83 c4 10 add $0x10,%esp + 162bb: 83 ec 0c sub $0xc,%esp + 162be: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 162c1: 05 c0 00 00 00 add $0xc0,%eax + 162c6: 50 push %eax + 162c7: e8 94 35 00 00 call 19860 <_my_device_initialize> + 162cc: 83 c4 10 add $0x10,%esp + 162cf: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 162d2: c7 40 14 01 00 00 00 movl $0x1,0x14(%eax) + 162d9: 83 ec 0c sub $0xc,%esp + 162dc: ff 75 0c pushl 0xc(%ebp) + 162df: e8 b2 c2 ff ff call 12596 <_usb_bus_get> + 162e4: 83 c4 10 add $0x10,%esp + 162e7: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 162eb: 75 07 jne 162f4 <_usb_alloc_dev@8+0x7b> + 162ed: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 162f0: c6 40 04 30 movb $0x30,0x4(%eax) + 162f4: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 162f7: 8b 45 0c mov 0xc(%ebp),%eax + 162fa: 89 82 bc 00 00 00 mov %eax,0xbc(%edx) + 16300: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 16303: 8b 45 08 mov 0x8(%ebp),%eax + 16306: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) + 1630c: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1630f: 81 c2 9c 01 00 00 add $0x19c,%edx + 16315: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16318: 05 9c 01 00 00 add $0x19c,%eax + 1631d: 89 02 mov %eax,(%edx) + 1631f: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 16322: 81 c2 9c 01 00 00 add $0x19c,%edx + 16328: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1632b: 05 9c 01 00 00 add $0x19c,%eax + 16330: 89 42 04 mov %eax,0x4(%edx) + 16333: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16336: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1633c: 8b 40 20 mov 0x20(%eax),%eax + 1633f: 83 38 00 cmpl $0x0,(%eax) + 16342: 74 19 je 1635d <_usb_alloc_dev@8+0xe4> + 16344: 83 ec 0c sub $0xc,%esp + 16347: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1634a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16350: 8b 40 20 mov 0x20(%eax),%eax + 16353: ff 75 fc pushl 0xfffffffc(%ebp) + 16356: 8b 00 mov (%eax),%eax + 16358: ff d0 call *%eax + 1635a: 83 c4 10 add $0x10,%esp + 1635d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16360: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16363: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16366: c9 leave + 16367: c2 08 00 ret $0x8 + +0001636a <_usb_get_dev>: + 1636a: 55 push %ebp + 1636b: 89 e5 mov %esp,%ebp + 1636d: 83 ec 18 sub $0x18,%esp + 16370: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 16374: 75 09 jne 1637f <_usb_get_dev+0x15> + 16376: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 1637d: eb 37 jmp 163b6 <_usb_get_dev+0x4c> + 1637f: 83 ec 0c sub $0xc,%esp + 16382: 8b 45 08 mov 0x8(%ebp),%eax + 16385: 05 c0 00 00 00 add $0xc0,%eax + 1638a: 50 push %eax + 1638b: e8 c6 34 00 00 call 19856 <_my_get_device> + 16390: 83 c4 10 add $0x10,%esp + 16393: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16396: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 1639a: 74 13 je 163af <_usb_get_dev+0x45> + 1639c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1639f: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 163a2: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 163a5: 2d c0 00 00 00 sub $0xc0,%eax + 163aa: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 163ad: eb 07 jmp 163b6 <_usb_get_dev+0x4c> + 163af: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 163b6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 163b9: c9 leave + 163ba: c3 ret + +000163bb <_usb_put_dev@4>: + 163bb: 55 push %ebp + 163bc: 89 e5 mov %esp,%ebp + 163be: 5d pop %ebp + 163bf: c2 04 00 ret $0x4 + +000163c2 <_usb_release_dev>: + 163c2: 55 push %ebp + 163c3: 89 e5 mov %esp,%ebp + 163c5: 83 ec 08 sub $0x8,%esp + 163c8: 8b 45 08 mov 0x8(%ebp),%eax + 163cb: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 163ce: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 163d1: 2d c0 00 00 00 sub $0xc0,%eax + 163d6: 89 45 fc mov %eax,0xfffffffc(%ebp) + 163d9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 163dc: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 163e3: 74 3b je 16420 <_usb_release_dev+0x5e> + 163e5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 163e8: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 163ee: 83 78 20 00 cmpl $0x0,0x20(%eax) + 163f2: 74 2c je 16420 <_usb_release_dev+0x5e> + 163f4: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 163f7: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 163fd: 8b 40 20 mov 0x20(%eax),%eax + 16400: 83 78 04 00 cmpl $0x0,0x4(%eax) + 16404: 74 1a je 16420 <_usb_release_dev+0x5e> + 16406: 83 ec 0c sub $0xc,%esp + 16409: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1640c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16412: 8b 40 20 mov 0x20(%eax),%eax + 16415: ff 75 fc pushl 0xfffffffc(%ebp) + 16418: 8b 40 04 mov 0x4(%eax),%eax + 1641b: ff d0 call *%eax + 1641d: 83 c4 10 add $0x10,%esp + 16420: 83 ec 0c sub $0xc,%esp + 16423: ff 75 fc pushl 0xfffffffc(%ebp) + 16426: e8 ca 17 00 00 call 17bf5 <_usb_destroy_configuration> + 1642b: 83 c4 10 add $0x10,%esp + 1642e: 83 ec 0c sub $0xc,%esp + 16431: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16434: ff b0 bc 00 00 00 pushl 0xbc(%eax) + 1643a: e8 6d c1 ff ff call 125ac <_usb_bus_put> + 1643f: 83 c4 10 add $0x10,%esp + 16442: 83 ec 0c sub $0xc,%esp + 16445: ff 75 fc pushl 0xfffffffc(%ebp) + 16448: e8 f3 35 00 00 call 19a40 <_ExFreePool@4> + 1644d: 83 c4 0c add $0xc,%esp + 16450: c9 leave + 16451: c3 ret + +00016452 <_match_device>: + 16452: 55 push %ebp + 16453: 89 e5 mov %esp,%ebp + 16455: 83 ec 18 sub $0x18,%esp + 16458: 8b 45 0c mov 0xc(%ebp),%eax + 1645b: 8b 55 10 mov 0x10(%ebp),%edx + 1645e: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 16462: 66 89 55 fc mov %dx,0xfffffffc(%ebp) + 16466: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1646d: 8b 45 08 mov 0x8(%ebp),%eax + 16470: 66 8b 80 78 01 00 00 mov 0x178(%eax),%ax + 16477: 66 3b 45 fe cmp 0xfffffffe(%ebp),%ax + 1647b: 75 23 jne 164a0 <_match_device+0x4e> + 1647d: 8b 45 08 mov 0x8(%ebp),%eax + 16480: 66 8b 80 7a 01 00 00 mov 0x17a(%eax),%ax + 16487: 66 3b 45 fc cmp 0xfffffffc(%ebp),%ax + 1648b: 75 13 jne 164a0 <_match_device+0x4e> + 1648d: 83 ec 0c sub $0xc,%esp + 16490: ff 75 08 pushl 0x8(%ebp) + 16493: e8 d2 fe ff ff call 1636a <_usb_get_dev> + 16498: 83 c4 10 add $0x10,%esp + 1649b: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1649e: eb 62 jmp 16502 <_match_device+0xb0> + 164a0: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 164a7: 8b 45 08 mov 0x8(%ebp),%eax + 164aa: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 164b0: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 164b3: 7e 4d jle 16502 <_match_device+0xb0> + 164b5: 8b 55 08 mov 0x8(%ebp),%edx + 164b8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 164bb: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) + 164c2: 00 + 164c3: 74 36 je 164fb <_match_device+0xa9> + 164c5: 83 ec 04 sub $0x4,%esp + 164c8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 164cb: 25 ff ff 00 00 and $0xffff,%eax + 164d0: 50 push %eax + 164d1: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 164d5: 25 ff ff 00 00 and $0xffff,%eax + 164da: 50 push %eax + 164db: 8b 55 08 mov 0x8(%ebp),%edx + 164de: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 164e1: ff b4 82 b0 01 00 00 pushl 0x1b0(%edx,%eax,4) + 164e8: e8 65 ff ff ff call 16452 <_match_device> + 164ed: 83 c4 10 add $0x10,%esp + 164f0: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 164f3: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 164f7: 74 02 je 164fb <_match_device+0xa9> + 164f9: eb 07 jmp 16502 <_match_device+0xb0> + 164fb: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 164fe: ff 00 incl (%eax) + 16500: eb a5 jmp 164a7 <_match_device+0x55> + 16502: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16505: c9 leave + 16506: c3 ret + +00016507 <_usb_find_device>: + 16507: 55 push %ebp + 16508: 89 e5 mov %esp,%ebp + 1650a: 83 ec 18 sub $0x18,%esp + 1650d: 8b 45 08 mov 0x8(%ebp),%eax + 16510: 8b 55 0c mov 0xc(%ebp),%edx + 16513: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 16517: 66 89 55 fc mov %dx,0xfffffffc(%ebp) + 1651b: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 16522: a1 00 a0 01 00 mov 0x1a000,%eax + 16527: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1652a: 81 7d f8 00 a0 01 00 cmpl $0x1a000,0xfffffff8(%ebp) + 16531: 74 48 je 1657b <_usb_find_device+0x74> + 16533: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16536: 89 45 ec mov %eax,0xffffffec(%ebp) + 16539: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1653c: 83 e8 28 sub $0x28,%eax + 1653f: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16542: 83 ec 04 sub $0x4,%esp + 16545: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16548: 25 ff ff 00 00 and $0xffff,%eax + 1654d: 50 push %eax + 1654e: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 16552: 25 ff ff 00 00 and $0xffff,%eax + 16557: 50 push %eax + 16558: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1655b: ff 70 24 pushl 0x24(%eax) + 1655e: e8 ef fe ff ff call 16452 <_match_device> + 16563: 83 c4 10 add $0x10,%esp + 16566: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 16569: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 1656d: 74 02 je 16571 <_usb_find_device+0x6a> + 1656f: eb 0a jmp 1657b <_usb_find_device+0x74> + 16571: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16574: 8b 00 mov (%eax),%eax + 16576: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16579: eb af jmp 1652a <_usb_find_device+0x23> + 1657b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1657e: c9 leave + 1657f: c3 ret + +00016580 <_usb_get_current_frame_number>: + 16580: 55 push %ebp + 16581: 89 e5 mov %esp,%ebp + 16583: 83 ec 08 sub $0x8,%esp + 16586: 83 ec 0c sub $0xc,%esp + 16589: 8b 45 08 mov 0x8(%ebp),%eax + 1658c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16592: 8b 40 20 mov 0x20(%eax),%eax + 16595: ff 75 08 pushl 0x8(%ebp) + 16598: 8b 40 08 mov 0x8(%eax),%eax + 1659b: ff d0 call *%eax + 1659d: 83 c4 10 add $0x10,%esp + 165a0: c9 leave + 165a1: c3 ret + +000165a2 <___usb_get_extra_descriptor>: + 165a2: 55 push %ebp + 165a3: 89 e5 mov %esp,%ebp + 165a5: 83 ec 0c sub $0xc,%esp + 165a8: 8b 45 10 mov 0x10(%ebp),%eax + 165ab: 88 45 ff mov %al,0xffffffff(%ebp) + 165ae: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) + 165b2: 76 51 jbe 16605 <___usb_get_extra_descriptor+0x63> + 165b4: 8b 45 08 mov 0x8(%ebp),%eax + 165b7: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 165ba: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 165bd: 80 38 01 cmpb $0x1,(%eax) + 165c0: 77 09 ja 165cb <___usb_get_extra_descriptor+0x29> + 165c2: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 165c9: eb 41 jmp 1660c <___usb_get_extra_descriptor+0x6a> + 165cb: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 165ce: 8a 40 01 mov 0x1(%eax),%al + 165d1: 3a 45 ff cmp 0xffffffff(%ebp),%al + 165d4: 75 11 jne 165e7 <___usb_get_extra_descriptor+0x45> + 165d6: 8b 55 14 mov 0x14(%ebp),%edx + 165d9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 165dc: 89 02 mov %eax,(%edx) + 165de: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 165e5: eb 25 jmp 1660c <___usb_get_extra_descriptor+0x6a> + 165e7: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 165ea: 8a 00 mov (%eax),%al + 165ec: 25 ff 00 00 00 and $0xff,%eax + 165f1: 01 45 08 add %eax,0x8(%ebp) + 165f4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 165f7: ba 00 00 00 00 mov $0x0,%edx + 165fc: 8a 10 mov (%eax),%dl + 165fe: 8d 45 0c lea 0xc(%ebp),%eax + 16601: 29 10 sub %edx,(%eax) + 16603: eb a9 jmp 165ae <___usb_get_extra_descriptor+0xc> + 16605: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 1660c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1660f: c9 leave + 16610: c3 ret + +00016611 <_usb_disconnect>: + 16611: 55 push %ebp + 16612: 89 e5 mov %esp,%ebp + 16614: 53 push %ebx + 16615: 83 ec 14 sub $0x14,%esp + 16618: 8b 45 08 mov 0x8(%ebp),%eax + 1661b: 8b 00 mov (%eax),%eax + 1661d: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16620: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16624: 75 05 jne 1662b <_usb_disconnect+0x1a> + 16626: e9 73 01 00 00 jmp 1679e <_usb_disconnect+0x18d> + 1662b: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1662e: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16634: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16637: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 1663b: 75 05 jne 16642 <_usb_disconnect+0x31> + 1663d: e9 5c 01 00 00 jmp 1679e <_usb_disconnect+0x18d> + 16642: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 16645: 8b 40 20 mov 0x20(%eax),%eax + 16648: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1664b: 8b 45 08 mov 0x8(%ebp),%eax + 1664e: c7 00 00 00 00 00 movl $0x0,(%eax) + 16654: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16657: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 1665e: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 16665: 83 7d ec 0f cmpl $0xf,0xffffffec(%ebp) + 16669: 7f 2e jg 16699 <_usb_disconnect+0x88> + 1666b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1666e: c1 e0 02 shl $0x2,%eax + 16671: 03 45 f8 add 0xfffffff8(%ebp),%eax + 16674: 05 b0 01 00 00 add $0x1b0,%eax + 16679: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 1667c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1667f: 83 38 00 cmpl $0x0,(%eax) + 16682: 74 0e je 16692 <_usb_disconnect+0x81> + 16684: 83 ec 0c sub $0xc,%esp + 16687: ff 75 e8 pushl 0xffffffe8(%ebp) + 1668a: e8 82 ff ff ff call 16611 <_usb_disconnect> + 1668f: 83 c4 10 add $0x10,%esp + 16692: 8d 45 ec lea 0xffffffec(%ebp),%eax + 16695: ff 00 incl (%eax) + 16697: eb cc jmp 16665 <_usb_disconnect+0x54> + 16699: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1669c: 83 b8 88 01 00 00 00 cmpl $0x0,0x188(%eax) + 166a3: 74 5f je 16704 <_usb_disconnect+0xf3> + 166a5: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 166ac: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 166af: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 166b5: 8a 40 04 mov 0x4(%eax),%al + 166b8: 25 ff 00 00 00 and $0xff,%eax + 166bd: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 166c0: 7e 42 jle 16704 <_usb_disconnect+0xf3> + 166c2: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 166c5: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 166cb: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 166ce: 89 c8 mov %ecx,%eax + 166d0: c1 e0 02 shl $0x2,%eax + 166d3: 01 c8 add %ecx,%eax + 166d5: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 166dc: 01 d0 add %edx,%eax + 166de: 01 c0 add %eax,%eax + 166e0: 01 c8 add %ecx,%eax + 166e2: c1 e0 02 shl $0x2,%eax + 166e5: 03 43 0c add 0xc(%ebx),%eax + 166e8: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 166eb: 83 ec 0c sub $0xc,%esp + 166ee: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 166f1: 83 c0 18 add $0x18,%eax + 166f4: 50 push %eax + 166f5: e8 1d 31 00 00 call 19817 <_my_device_unregister> + 166fa: 83 c4 10 add $0x10,%esp + 166fd: 8d 45 ec lea 0xffffffec(%ebp),%eax + 16700: ff 00 incl (%eax) + 16702: eb a8 jmp 166ac <_usb_disconnect+0x9b> + 16704: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 16707: 83 78 1c 00 cmpl $0x0,0x1c(%eax) + 1670b: 74 42 je 1674f <_usb_disconnect+0x13e> + 1670d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 16710: 8b 40 1c mov 0x1c(%eax),%eax + 16713: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 16716: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 1671d: 83 7d ec 0e cmpl $0xe,0xffffffec(%ebp) + 16721: 7f 2c jg 1674f <_usb_disconnect+0x13e> + 16723: 83 ec 08 sub $0x8,%esp + 16726: ff 75 ec pushl 0xffffffec(%ebp) + 16729: ff 75 f8 pushl 0xfffffff8(%ebp) + 1672c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1672f: ff d0 call *%eax + 16731: 83 c4 10 add $0x10,%esp + 16734: 83 ec 08 sub $0x8,%esp + 16737: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1673a: 0c 80 or $0x80,%al + 1673c: 50 push %eax + 1673d: ff 75 f8 pushl 0xfffffff8(%ebp) + 16740: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16743: ff d0 call *%eax + 16745: 83 c4 10 add $0x10,%esp + 16748: 8d 45 ec lea 0xffffffec(%ebp),%eax + 1674b: ff 00 incl (%eax) + 1674d: eb ce jmp 1671d <_usb_disconnect+0x10c> + 1674f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16752: 83 38 00 cmpl $0x0,(%eax) + 16755: 7e 2b jle 16782 <_usb_disconnect+0x171> + 16757: 83 ec 08 sub $0x8,%esp + 1675a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1675d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16763: 83 c0 10 add $0x10,%eax + 16766: 50 push %eax + 16767: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1676a: ff 30 pushl (%eax) + 1676c: e8 37 00 00 00 call 167a8 <_clear_bit> + 16771: 83 c4 10 add $0x10,%esp + 16774: 83 ec 0c sub $0xc,%esp + 16777: ff 75 f8 pushl 0xfffffff8(%ebp) + 1677a: e8 24 00 00 00 call 167a3 <_usbfs_remove_device> + 1677f: 83 c4 10 add $0x10,%esp + 16782: 83 ec 0c sub $0xc,%esp + 16785: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16788: 05 c0 00 00 00 add $0xc0,%eax + 1678d: 50 push %eax + 1678e: e8 84 30 00 00 call 19817 <_my_device_unregister> + 16793: 83 c4 10 add $0x10,%esp + 16796: ff 75 f8 pushl 0xfffffff8(%ebp) + 16799: e8 1d fc ff ff call 163bb <_usb_put_dev@4> + 1679e: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 167a1: c9 leave + 167a2: c3 ret + +000167a3 <_usbfs_remove_device>: + 167a3: 55 push %ebp + 167a4: 89 e5 mov %esp,%ebp + 167a6: 5d pop %ebp + 167a7: c3 ret + +000167a8 <_clear_bit>: + 167a8: 55 push %ebp + 167a9: 89 e5 mov %esp,%ebp + 167ab: 8b 55 0c mov 0xc(%ebp),%edx + 167ae: 8b 45 08 mov 0x8(%ebp),%eax + 167b1: 0f b3 02 btr %eax,(%edx) + 167b4: 5d pop %ebp + 167b5: c3 ret + +000167b6 <_usb_connect@4>: + 167b6: 55 push %ebp + 167b7: 89 e5 mov %esp,%ebp + 167b9: 83 ec 18 sub $0x18,%esp + 167bc: 8b 45 08 mov 0x8(%ebp),%eax + 167bf: c6 80 77 01 00 00 08 movb $0x8,0x177(%eax) + 167c6: 83 ec 04 sub $0x4,%esp + 167c9: 8b 45 08 mov 0x8(%ebp),%eax + 167cc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 167d2: ff 70 0c pushl 0xc(%eax) + 167d5: 68 80 00 00 00 push $0x80 + 167da: 8b 45 08 mov 0x8(%ebp),%eax + 167dd: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 167e3: 83 c0 10 add $0x10,%eax + 167e6: 50 push %eax + 167e7: e8 94 00 00 00 call 16880 <_find_next_zero_bit> + 167ec: 83 c4 10 add $0x10,%esp + 167ef: 89 45 fc mov %eax,0xfffffffc(%ebp) + 167f2: 83 7d fc 7f cmpl $0x7f,0xfffffffc(%ebp) + 167f6: 7e 22 jle 1681a <_usb_connect@4+0x64> + 167f8: 83 ec 04 sub $0x4,%esp + 167fb: 6a 01 push $0x1 + 167fd: 68 80 00 00 00 push $0x80 + 16802: 8b 45 08 mov 0x8(%ebp),%eax + 16805: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1680b: 83 c0 10 add $0x10,%eax + 1680e: 50 push %eax + 1680f: e8 6c 00 00 00 call 16880 <_find_next_zero_bit> + 16814: 83 c4 10 add $0x10,%esp + 16817: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1681a: 8b 45 08 mov 0x8(%ebp),%eax + 1681d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16823: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16826: 83 7d fc 7e cmpl $0x7e,0xfffffffc(%ebp) + 1682a: 7f 09 jg 16835 <_usb_connect@4+0x7f> + 1682c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1682f: 40 inc %eax + 16830: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16833: eb 07 jmp 1683c <_usb_connect@4+0x86> + 16835: c7 45 f4 01 00 00 00 movl $0x1,0xfffffff4(%ebp) + 1683c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1683f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 16842: 89 42 0c mov %eax,0xc(%edx) + 16845: 83 7d fc 7f cmpl $0x7f,0xfffffffc(%ebp) + 16849: 7f 23 jg 1686e <_usb_connect@4+0xb8> + 1684b: 83 ec 08 sub $0x8,%esp + 1684e: 8b 45 08 mov 0x8(%ebp),%eax + 16851: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16857: 83 c0 10 add $0x10,%eax + 1685a: 50 push %eax + 1685b: ff 75 fc pushl 0xfffffffc(%ebp) + 1685e: e8 0f 00 00 00 call 16872 <_set_bit> + 16863: 83 c4 10 add $0x10,%esp + 16866: 8b 55 08 mov 0x8(%ebp),%edx + 16869: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1686c: 89 02 mov %eax,(%edx) + 1686e: c9 leave + 1686f: c2 04 00 ret $0x4 + +00016872 <_set_bit>: + 16872: 55 push %ebp + 16873: 89 e5 mov %esp,%ebp + 16875: 8b 55 0c mov 0xc(%ebp),%edx + 16878: 8b 45 08 mov 0x8(%ebp),%eax + 1687b: 0f ab 02 bts %eax,(%edx) + 1687e: 5d pop %ebp + 1687f: c3 ret + +00016880 <_find_next_zero_bit>: + 16880: 55 push %ebp + 16881: 89 e5 mov %esp,%ebp + 16883: 83 ec 18 sub $0x18,%esp + 16886: 8b 45 10 mov 0x10(%ebp),%eax + 16889: c1 f8 05 sar $0x5,%eax + 1688c: c1 e0 02 shl $0x2,%eax + 1688f: 03 45 08 add 0x8(%ebp),%eax + 16892: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16895: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1689c: 8b 45 10 mov 0x10(%ebp),%eax + 1689f: 83 e0 1f and $0x1f,%eax + 168a2: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 168a5: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 168a9: 74 42 je 168ed <_find_next_zero_bit+0x6d> + 168ab: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 168ae: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 168b1: 8b 00 mov (%eax),%eax + 168b3: d3 e8 shr %cl,%eax + 168b5: f7 d0 not %eax + 168b7: 0f bc c0 bsf %eax,%eax + 168ba: 75 05 jne 168c1 <_find_next_zero_bit+0x41> + 168bc: b8 20 00 00 00 mov $0x20,%eax + 168c1: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 168c4: b8 20 00 00 00 mov $0x20,%eax + 168c9: 2b 45 f4 sub 0xfffffff4(%ebp),%eax + 168cc: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 168cf: 7e 0b jle 168dc <_find_next_zero_bit+0x5c> + 168d1: 8b 45 10 mov 0x10(%ebp),%eax + 168d4: 03 45 f8 add 0xfffffff8(%ebp),%eax + 168d7: 89 45 ec mov %eax,0xffffffec(%ebp) + 168da: eb 43 jmp 1691f <_find_next_zero_bit+0x9f> + 168dc: b8 20 00 00 00 mov $0x20,%eax + 168e1: 2b 45 f4 sub 0xfffffff4(%ebp),%eax + 168e4: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 168e7: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 168ea: 83 00 04 addl $0x4,(%eax) + 168ed: 83 ec 08 sub $0x8,%esp + 168f0: 8b 55 08 mov 0x8(%ebp),%edx + 168f3: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 168f6: 29 d0 sub %edx,%eax + 168f8: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 168ff: 8b 45 0c mov 0xc(%ebp),%eax + 16902: 29 d0 sub %edx,%eax + 16904: 50 push %eax + 16905: ff 75 fc pushl 0xfffffffc(%ebp) + 16908: e8 17 00 00 00 call 16924 <_find_first_zero_bit> + 1690d: 83 c4 10 add $0x10,%esp + 16910: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 16913: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16916: 03 45 10 add 0x10(%ebp),%eax + 16919: 03 45 f0 add 0xfffffff0(%ebp),%eax + 1691c: 89 45 ec mov %eax,0xffffffec(%ebp) + 1691f: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16922: c9 leave + 16923: c3 ret + +00016924 <_find_first_zero_bit>: + 16924: 55 push %ebp + 16925: 89 e5 mov %esp,%ebp + 16927: 57 push %edi + 16928: 53 push %ebx + 16929: 83 ec 14 sub $0x14,%esp + 1692c: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 16930: 75 09 jne 1693b <_find_first_zero_bit+0x17> + 16932: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 16939: eb 48 jmp 16983 <_find_first_zero_bit+0x5f> + 1693b: 8b 45 0c mov 0xc(%ebp),%eax + 1693e: 83 c0 1f add $0x1f,%eax + 16941: 89 c1 mov %eax,%ecx + 16943: c1 e9 05 shr $0x5,%ecx + 16946: 8b 7d 08 mov 0x8(%ebp),%edi + 16949: 8b 5d 08 mov 0x8(%ebp),%ebx + 1694c: b8 ff ff ff ff mov $0xffffffff,%eax + 16951: 31 d2 xor %edx,%edx + 16953: f3 af repz scas %es:(%edi),%eax + 16955: 74 09 je 16960 <_find_first_zero_bit+0x3c> + 16957: 33 47 fc xor 0xfffffffc(%edi),%eax + 1695a: 83 ef 04 sub $0x4,%edi + 1695d: 0f bc d0 bsf %eax,%edx + 16960: 29 df sub %ebx,%edi + 16962: c1 e7 03 shl $0x3,%edi + 16965: 01 fa add %edi,%edx + 16967: 89 c3 mov %eax,%ebx + 16969: 89 d0 mov %edx,%eax + 1696b: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 1696e: 89 c8 mov %ecx,%eax + 16970: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16973: 89 f8 mov %edi,%eax + 16975: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 16978: 89 d8 mov %ebx,%eax + 1697a: 89 45 ec mov %eax,0xffffffec(%ebp) + 1697d: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16980: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 16983: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 16986: 83 c4 14 add $0x14,%esp + 16989: 5b pop %ebx + 1698a: 5f pop %edi + 1698b: 5d pop %ebp + 1698c: c3 ret + +0001698d <_usb_set_address>: + 1698d: 55 push %ebp + 1698e: 89 e5 mov %esp,%ebp + 16990: 83 ec 08 sub $0x8,%esp + 16993: 8b 45 08 mov 0x8(%ebp),%eax + 16996: 83 38 00 cmpl $0x0,(%eax) + 16999: 75 09 jne 169a4 <_usb_set_address+0x17> + 1699b: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 169a2: eb 61 jmp 16a05 <_usb_set_address+0x78> + 169a4: 8b 45 08 mov 0x8(%ebp),%eax + 169a7: 83 78 14 03 cmpl $0x3,0x14(%eax) + 169ab: 74 12 je 169bf <_usb_set_address+0x32> + 169ad: 8b 45 08 mov 0x8(%ebp),%eax + 169b0: 83 78 14 04 cmpl $0x4,0x14(%eax) + 169b4: 74 09 je 169bf <_usb_set_address+0x32> + 169b6: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 169bd: eb 46 jmp 16a05 <_usb_set_address+0x78> + 169bf: 83 ec 0c sub $0xc,%esp + 169c2: 68 f4 01 00 00 push $0x1f4 + 169c7: 6a 00 push $0x0 + 169c9: 6a 00 push $0x0 + 169cb: 6a 00 push $0x0 + 169cd: 8b 45 08 mov 0x8(%ebp),%eax + 169d0: 8b 00 mov (%eax),%eax + 169d2: 25 ff ff 00 00 and $0xffff,%eax + 169d7: 50 push %eax + 169d8: 6a 00 push $0x0 + 169da: 6a 05 push $0x5 + 169dc: 68 00 00 00 80 push $0x80000000 + 169e1: ff 75 08 pushl 0x8(%ebp) + 169e4: e8 07 a8 ff ff call 111f0 <_usb_control_msg> + 169e9: 83 c4 30 add $0x30,%esp + 169ec: 89 45 fc mov %eax,0xfffffffc(%ebp) + 169ef: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 169f3: 75 0a jne 169ff <_usb_set_address+0x72> + 169f5: 8b 45 08 mov 0x8(%ebp),%eax + 169f8: c7 40 14 04 00 00 00 movl $0x4,0x14(%eax) + 169ff: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16a02: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16a05: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16a08: c9 leave + 16a09: c3 ret + +00016a0a <_set_device_description>: + 16a0a: 55 push %ebp + 16a0b: 89 e5 mov %esp,%ebp + 16a0d: 83 ec 28 sub $0x28,%esp + 16a10: 8b 45 08 mov 0x8(%ebp),%eax + 16a13: 8a 80 7e 01 00 00 mov 0x17e(%eax),%al + 16a19: 25 ff 00 00 00 and $0xff,%eax + 16a1e: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16a21: 8b 45 08 mov 0x8(%ebp),%eax + 16a24: 8a 80 7f 01 00 00 mov 0x17f(%eax),%al + 16a2a: 25 ff 00 00 00 and $0xff,%eax + 16a2f: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16a32: 8b 45 08 mov 0x8(%ebp),%eax + 16a35: 66 8b 80 78 01 00 00 mov 0x178(%eax),%ax + 16a3c: 25 ff ff 00 00 and $0xffff,%eax + 16a41: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 16a44: 8b 45 08 mov 0x8(%ebp),%eax + 16a47: 66 8b 80 7a 01 00 00 mov 0x17a(%eax),%ax + 16a4e: 25 ff ff 00 00 and $0xffff,%eax + 16a53: 89 45 ec mov %eax,0xffffffec(%ebp) + 16a56: ff 75 ec pushl 0xffffffec(%ebp) + 16a59: ff 75 f0 pushl 0xfffffff0(%ebp) + 16a5c: 68 4c b2 01 00 push $0x1b24c + 16a61: 8b 45 08 mov 0x8(%ebp),%eax + 16a64: 05 c0 00 00 00 add $0xc0,%eax + 16a69: 50 push %eax + 16a6a: e8 21 30 00 00 call 19a90 <_sprintf> + 16a6f: 83 c4 10 add $0x10,%esp + 16a72: 83 ec 08 sub $0x8,%esp + 16a75: 68 00 02 00 00 push $0x200 + 16a7a: 6a 01 push $0x1 + 16a7c: e8 af 2f 00 00 call 19a30 <_ExAllocatePool@8> + 16a81: 83 c4 08 add $0x8,%esp + 16a84: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16a87: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 16a8b: 75 05 jne 16a92 <_set_device_description+0x88> + 16a8d: e9 ff 00 00 00 jmp 16b91 <_set_device_description+0x187> + 16a92: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16a95: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 16a98: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16a9b: 05 00 01 00 00 add $0x100,%eax + 16aa0: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 16aa3: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 16aa7: 74 1c je 16ac5 <_set_device_description+0xbb> + 16aa9: 68 00 01 00 00 push $0x100 + 16aae: ff 75 e4 pushl 0xffffffe4(%ebp) + 16ab1: ff 75 f4 pushl 0xfffffff4(%ebp) + 16ab4: ff 75 08 pushl 0x8(%ebp) + 16ab7: e8 27 b1 ff ff call 11be3 <_usb_string> + 16abc: 83 c4 10 add $0x10,%esp + 16abf: 85 c0 test %eax,%eax + 16ac1: 7e 02 jle 16ac5 <_set_device_description+0xbb> + 16ac3: eb 07 jmp 16acc <_set_device_description+0xc2> + 16ac5: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 16acc: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16ad0: 74 1c je 16aee <_set_device_description+0xe4> + 16ad2: 68 00 01 00 00 push $0x100 + 16ad7: ff 75 e8 pushl 0xffffffe8(%ebp) + 16ada: ff 75 f8 pushl 0xfffffff8(%ebp) + 16add: ff 75 08 pushl 0x8(%ebp) + 16ae0: e8 fe b0 ff ff call 11be3 <_usb_string> + 16ae5: 83 c4 10 add $0x10,%esp + 16ae8: 85 c0 test %eax,%eax + 16aea: 7e 02 jle 16aee <_set_device_description+0xe4> + 16aec: eb 07 jmp 16af5 <_set_device_description+0xeb> + 16aee: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 16af5: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 16af9: 74 2c je 16b27 <_set_device_description+0x11d> + 16afb: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 16aff: 74 26 je 16b27 <_set_device_description+0x11d> + 16b01: 83 ec 0c sub $0xc,%esp + 16b04: ff 75 e8 pushl 0xffffffe8(%ebp) + 16b07: ff 75 e4 pushl 0xffffffe4(%ebp) + 16b0a: 68 61 b2 01 00 push $0x1b261 + 16b0f: 68 80 00 00 00 push $0x80 + 16b14: 8b 45 08 mov 0x8(%ebp),%eax + 16b17: 05 c0 00 00 00 add $0xc0,%eax + 16b1c: 50 push %eax + 16b1d: e8 9e 2f 00 00 call 19ac0 <__snprintf> + 16b22: 83 c4 20 add $0x20,%esp + 16b25: eb 5c jmp 16b83 <_set_device_description+0x179> + 16b27: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 16b2b: 74 29 je 16b56 <_set_device_description+0x14c> + 16b2d: 83 ec 08 sub $0x8,%esp + 16b30: ff 75 ec pushl 0xffffffec(%ebp) + 16b33: ff 75 f0 pushl 0xfffffff0(%ebp) + 16b36: ff 75 e4 pushl 0xffffffe4(%ebp) + 16b39: 68 69 b2 01 00 push $0x1b269 + 16b3e: 68 80 00 00 00 push $0x80 + 16b43: 8b 45 08 mov 0x8(%ebp),%eax + 16b46: 05 c0 00 00 00 add $0xc0,%eax + 16b4b: 50 push %eax + 16b4c: e8 6f 2f 00 00 call 19ac0 <__snprintf> + 16b51: 83 c4 20 add $0x20,%esp + 16b54: eb 2d jmp 16b83 <_set_device_description+0x179> + 16b56: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 16b5a: 74 27 je 16b83 <_set_device_description+0x179> + 16b5c: 83 ec 08 sub $0x8,%esp + 16b5f: ff 75 e8 pushl 0xffffffe8(%ebp) + 16b62: ff 75 ec pushl 0xffffffec(%ebp) + 16b65: ff 75 f0 pushl 0xfffffff0(%ebp) + 16b68: 68 83 b2 01 00 push $0x1b283 + 16b6d: 68 80 00 00 00 push $0x80 + 16b72: 8b 45 08 mov 0x8(%ebp),%eax + 16b75: 05 c0 00 00 00 add $0xc0,%eax + 16b7a: 50 push %eax + 16b7b: e8 40 2f 00 00 call 19ac0 <__snprintf> + 16b80: 83 c4 20 add $0x20,%esp + 16b83: 83 ec 0c sub $0xc,%esp + 16b86: ff 75 fc pushl 0xfffffffc(%ebp) + 16b89: e8 b2 2e 00 00 call 19a40 <_ExFreePool@4> + 16b8e: 83 c4 0c add $0xc,%esp + 16b91: c9 leave + 16b92: c3 ret + +00016b93 <_usb_new_device>: + 16b93: 55 push %ebp + 16b94: 89 e5 mov %esp,%ebp + 16b96: 53 push %ebx + 16b97: 83 ec 24 sub $0x24,%esp + 16b9a: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 16ba1: c7 05 e4 a0 01 00 f8 movl $0x1a0f8,0x1a0e4 + 16ba8: a0 01 00 + 16bab: 8b 55 08 mov 0x8(%ebp),%edx + 16bae: 8b 45 0c mov 0xc(%ebp),%eax + 16bb1: 89 82 60 01 00 00 mov %eax,0x160(%edx) + 16bb7: 8b 45 08 mov 0x8(%ebp),%eax + 16bba: c7 80 58 01 00 00 e0 movl $0x1a0e0,0x158(%eax) + 16bc1: a0 01 00 + 16bc4: 8b 45 08 mov 0x8(%ebp),%eax + 16bc7: c7 80 40 01 00 00 f8 movl $0x1a0f8,0x140(%eax) + 16bce: a0 01 00 + 16bd1: 8b 45 08 mov 0x8(%ebp),%eax + 16bd4: c7 80 6c 01 00 00 c2 movl $0x163c2,0x16c(%eax) + 16bdb: 63 01 00 + 16bde: 8b 45 08 mov 0x8(%ebp),%eax + 16be1: c7 80 5c 01 00 00 70 movl $0x1c070,0x15c(%eax) + 16be8: c0 01 00 + 16beb: 83 ec 0c sub $0xc,%esp + 16bee: ff 75 08 pushl 0x8(%ebp) + 16bf1: e8 74 f7 ff ff call 1636a <_usb_get_dev> + 16bf6: 83 c4 10 add $0x10,%esp + 16bf9: 8b 45 08 mov 0x8(%ebp),%eax + 16bfc: 80 b8 48 01 00 00 00 cmpb $0x0,0x148(%eax) + 16c03: 75 29 jne 16c2e <_usb_new_device+0x9b> + 16c05: 8b 45 08 mov 0x8(%ebp),%eax + 16c08: 83 c0 04 add $0x4,%eax + 16c0b: 50 push %eax + 16c0c: 8b 45 08 mov 0x8(%ebp),%eax + 16c0f: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16c15: ff 70 04 pushl 0x4(%eax) + 16c18: 68 9d b2 01 00 push $0x1b29d + 16c1d: 8b 45 08 mov 0x8(%ebp),%eax + 16c20: 05 48 01 00 00 add $0x148,%eax + 16c25: 50 push %eax + 16c26: e8 65 2e 00 00 call 19a90 <_sprintf> + 16c2b: 83 c4 10 add $0x10,%esp + 16c2e: 8b 55 08 mov 0x8(%ebp),%edx + 16c31: 8b 45 0c mov 0xc(%ebp),%eax + 16c34: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 16c3a: 89 82 44 01 00 00 mov %eax,0x144(%edx) + 16c40: 8b 45 08 mov 0x8(%ebp),%eax + 16c43: 8b 40 18 mov 0x18(%eax),%eax + 16c46: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 16c49: 83 7d e0 01 cmpl $0x1,0xffffffe0(%ebp) + 16c4d: 72 20 jb 16c6f <_usb_new_device+0xdc> + 16c4f: 83 7d e0 02 cmpl $0x2,0xffffffe0(%ebp) + 16c53: 76 11 jbe 16c66 <_usb_new_device+0xd3> + 16c55: 83 7d e0 03 cmpl $0x3,0xffffffe0(%ebp) + 16c59: 74 02 je 16c5d <_usb_new_device+0xca> + 16c5b: eb 12 jmp 16c6f <_usb_new_device+0xdc> + 16c5d: c7 45 f4 40 00 00 00 movl $0x40,0xfffffff4(%ebp) + 16c64: eb 15 jmp 16c7b <_usb_new_device+0xe8> + 16c66: c7 45 f4 08 00 00 00 movl $0x8,0xfffffff4(%ebp) + 16c6d: eb 0c jmp 16c7b <_usb_new_device+0xe8> + 16c6f: c7 45 e4 ea ff ff ff movl $0xffffffea,0xffffffe4(%ebp) + 16c76: e9 da 03 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16c7b: 8b 55 08 mov 0x8(%ebp),%edx + 16c7e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 16c81: 89 42 38 mov %eax,0x38(%edx) + 16c84: 8b 55 08 mov 0x8(%ebp),%edx + 16c87: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 16c8a: 89 42 78 mov %eax,0x78(%edx) + 16c8d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 16c94: 83 7d f4 01 cmpl $0x1,0xfffffff4(%ebp) + 16c98: 0f 8f c8 00 00 00 jg 16d66 <_usb_new_device+0x1d3> + 16c9e: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 16ca5: 83 7d f0 01 cmpl $0x1,0xfffffff0(%ebp) + 16ca9: 7f 30 jg 16cdb <_usb_new_device+0x148> + 16cab: 83 ec 0c sub $0xc,%esp + 16cae: ff 75 08 pushl 0x8(%ebp) + 16cb1: e8 d7 fc ff ff call 1698d <_usb_set_address> + 16cb6: 83 c4 10 add $0x10,%esp + 16cb9: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16cbc: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16cc0: 78 02 js 16cc4 <_usb_new_device+0x131> + 16cc2: eb 17 jmp 16cdb <_usb_new_device+0x148> + 16cc4: 83 ec 0c sub $0xc,%esp + 16cc7: 68 c8 00 00 00 push $0xc8 + 16ccc: e8 df 27 00 00 call 194b0 <_wait_ms> + 16cd1: 83 c4 10 add $0x10,%esp + 16cd4: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 16cd7: ff 00 incl (%eax) + 16cd9: eb ca jmp 16ca5 <_usb_new_device+0x112> + 16cdb: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16cdf: 79 39 jns 16d1a <_usb_new_device+0x187> + 16ce1: 8b 45 08 mov 0x8(%ebp),%eax + 16ce4: c7 40 14 03 00 00 00 movl $0x3,0x14(%eax) + 16ceb: 8b 45 08 mov 0x8(%ebp),%eax + 16cee: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16cf4: 83 c0 10 add $0x10,%eax + 16cf7: 50 push %eax + 16cf8: 8b 45 08 mov 0x8(%ebp),%eax + 16cfb: ff 30 pushl (%eax) + 16cfd: e8 a6 fa ff ff call 167a8 <_clear_bit> + 16d02: 83 c4 08 add $0x8,%esp + 16d05: 8b 45 08 mov 0x8(%ebp),%eax + 16d08: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 16d0e: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 16d15: e9 3b 03 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16d1a: 83 ec 0c sub $0xc,%esp + 16d1d: 6a 0a push $0xa + 16d1f: e8 8c 27 00 00 call 194b0 <_wait_ms> + 16d24: 83 c4 10 add $0x10,%esp + 16d27: 83 ec 0c sub $0xc,%esp + 16d2a: 6a 08 push $0x8 + 16d2c: 8b 45 08 mov 0x8(%ebp),%eax + 16d2f: 05 70 01 00 00 add $0x170,%eax + 16d34: 50 push %eax + 16d35: 6a 00 push $0x0 + 16d37: 6a 01 push $0x1 + 16d39: ff 75 08 pushl 0x8(%ebp) + 16d3c: e8 1b a6 ff ff call 1135c <_usb_get_descriptor> + 16d41: 83 c4 20 add $0x20,%esp + 16d44: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16d47: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) + 16d4b: 7e 02 jle 16d4f <_usb_new_device+0x1bc> + 16d4d: eb 17 jmp 16d66 <_usb_new_device+0x1d3> + 16d4f: 83 ec 0c sub $0xc,%esp + 16d52: 6a 64 push $0x64 + 16d54: e8 57 27 00 00 call 194b0 <_wait_ms> + 16d59: 83 c4 10 add $0x10,%esp + 16d5c: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 16d5f: ff 00 incl (%eax) + 16d61: e9 2e ff ff ff jmp 16c94 <_usb_new_device+0x101> + 16d66: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) + 16d6a: 7f 2f jg 16d9b <_usb_new_device+0x208> + 16d6c: 8b 45 08 mov 0x8(%ebp),%eax + 16d6f: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16d75: 83 c0 10 add $0x10,%eax + 16d78: 50 push %eax + 16d79: 8b 45 08 mov 0x8(%ebp),%eax + 16d7c: ff 30 pushl (%eax) + 16d7e: e8 25 fa ff ff call 167a8 <_clear_bit> + 16d83: 83 c4 08 add $0x8,%esp + 16d86: 8b 45 08 mov 0x8(%ebp),%eax + 16d89: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 16d8f: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 16d96: e9 ba 02 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16d9b: 8b 45 08 mov 0x8(%ebp),%eax + 16d9e: 83 78 18 02 cmpl $0x2,0x18(%eax) + 16da2: 75 28 jne 16dcc <_usb_new_device+0x239> + 16da4: 8b 55 08 mov 0x8(%ebp),%edx + 16da7: 8b 45 08 mov 0x8(%ebp),%eax + 16daa: 8a 80 77 01 00 00 mov 0x177(%eax),%al + 16db0: 25 ff 00 00 00 and $0xff,%eax + 16db5: 89 42 38 mov %eax,0x38(%edx) + 16db8: 8b 55 08 mov 0x8(%ebp),%edx + 16dbb: 8b 45 08 mov 0x8(%ebp),%eax + 16dbe: 8a 80 77 01 00 00 mov 0x177(%eax),%al + 16dc4: 25 ff 00 00 00 and $0xff,%eax + 16dc9: 89 42 78 mov %eax,0x78(%edx) + 16dcc: 83 ec 0c sub $0xc,%esp + 16dcf: ff 75 08 pushl 0x8(%ebp) + 16dd2: e8 aa a6 ff ff call 11481 <_usb_get_device_descriptor> + 16dd7: 83 c4 10 add $0x10,%esp + 16dda: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16ddd: 83 7d f8 11 cmpl $0x11,0xfffffff8(%ebp) + 16de1: 7f 2f jg 16e12 <_usb_new_device+0x27f> + 16de3: 8b 45 08 mov 0x8(%ebp),%eax + 16de6: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16dec: 83 c0 10 add $0x10,%eax + 16def: 50 push %eax + 16df0: 8b 45 08 mov 0x8(%ebp),%eax + 16df3: ff 30 pushl (%eax) + 16df5: e8 ae f9 ff ff call 167a8 <_clear_bit> + 16dfa: 83 c4 08 add $0x8,%esp + 16dfd: 8b 45 08 mov 0x8(%ebp),%eax + 16e00: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 16e06: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 16e0d: e9 43 02 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16e12: 83 ec 0c sub $0xc,%esp + 16e15: ff 75 08 pushl 0x8(%ebp) + 16e18: e8 fb 0f 00 00 call 17e18 <_usb_get_configuration> + 16e1d: 83 c4 10 add $0x10,%esp + 16e20: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16e23: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16e27: 79 2f jns 16e58 <_usb_new_device+0x2c5> + 16e29: 8b 45 08 mov 0x8(%ebp),%eax + 16e2c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16e32: 83 c0 10 add $0x10,%eax + 16e35: 50 push %eax + 16e36: 8b 45 08 mov 0x8(%ebp),%eax + 16e39: ff 30 pushl (%eax) + 16e3b: e8 68 f9 ff ff call 167a8 <_clear_bit> + 16e40: 83 c4 08 add $0x8,%esp + 16e43: 8b 45 08 mov 0x8(%ebp),%eax + 16e46: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 16e4c: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 16e53: e9 fd 01 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16e58: 83 ec 08 sub $0x8,%esp + 16e5b: 8b 45 08 mov 0x8(%ebp),%eax + 16e5e: 8b 80 84 01 00 00 mov 0x184(%eax),%eax + 16e64: 8a 40 05 mov 0x5(%eax),%al + 16e67: 25 ff 00 00 00 and $0xff,%eax + 16e6c: 50 push %eax + 16e6d: ff 75 08 pushl 0x8(%ebp) + 16e70: e8 d2 ab ff ff call 11a47 <_usb_set_configuration> + 16e75: 83 c4 10 add $0x10,%esp + 16e78: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16e7b: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16e7f: 74 2f je 16eb0 <_usb_new_device+0x31d> + 16e81: 8b 45 08 mov 0x8(%ebp),%eax + 16e84: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16e8a: 83 c0 10 add $0x10,%eax + 16e8d: 50 push %eax + 16e8e: 8b 45 08 mov 0x8(%ebp),%eax + 16e91: ff 30 pushl (%eax) + 16e93: e8 10 f9 ff ff call 167a8 <_clear_bit> + 16e98: 83 c4 08 add $0x8,%esp + 16e9b: 8b 45 08 mov 0x8(%ebp),%eax + 16e9e: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 16ea4: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 16eab: e9 a5 01 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16eb0: 83 ec 0c sub $0xc,%esp + 16eb3: ff 75 08 pushl 0x8(%ebp) + 16eb6: e8 4f fb ff ff call 16a0a <_set_device_description> + 16ebb: 83 c4 10 add $0x10,%esp + 16ebe: 83 ec 0c sub $0xc,%esp + 16ec1: 8b 45 08 mov 0x8(%ebp),%eax + 16ec4: 05 c0 00 00 00 add $0xc0,%eax + 16ec9: 50 push %eax + 16eca: e8 3b 28 00 00 call 1970a <_my_device_add> + 16ecf: 83 c4 10 add $0x10,%esp + 16ed2: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16ed5: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16ed9: 74 0b je 16ee6 <_usb_new_device+0x353> + 16edb: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16ede: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 16ee1: e9 6f 01 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16ee6: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 16eed: 8b 45 08 mov 0x8(%ebp),%eax + 16ef0: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 16ef6: 8a 40 04 mov 0x4(%eax),%al + 16ef9: 25 ff 00 00 00 and $0xff,%eax + 16efe: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 16f01: 0f 8e 39 01 00 00 jle 17040 <_usb_new_device+0x4ad> + 16f07: 8b 45 08 mov 0x8(%ebp),%eax + 16f0a: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 16f10: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 16f13: 89 c8 mov %ecx,%eax + 16f15: c1 e0 02 shl $0x2,%eax + 16f18: 01 c8 add %ecx,%eax + 16f1a: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 16f21: 01 d0 add %edx,%eax + 16f23: 01 c0 add %eax,%eax + 16f25: 01 c8 add %ecx,%eax + 16f27: c1 e0 02 shl $0x2,%eax + 16f2a: 03 43 0c add 0xc(%ebx),%eax + 16f2d: 89 45 ec mov %eax,0xffffffec(%ebp) + 16f30: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 16f33: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16f36: 8b 50 04 mov 0x4(%eax),%edx + 16f39: 89 d0 mov %edx,%eax + 16f3b: 01 c0 add %eax,%eax + 16f3d: 01 d0 add %edx,%eax + 16f3f: c1 e0 03 shl $0x3,%eax + 16f42: 03 01 add (%ecx),%eax + 16f44: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 16f47: 8b 55 ec mov 0xffffffec(%ebp),%edx + 16f4a: 8b 45 08 mov 0x8(%ebp),%eax + 16f4d: 05 c0 00 00 00 add $0xc0,%eax + 16f52: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) + 16f58: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16f5b: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax) + 16f62: 00 00 00 + 16f65: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16f68: c7 80 98 00 00 00 f8 movl $0x1a0f8,0x98(%eax) + 16f6f: a0 01 00 + 16f72: 8b 55 ec mov 0xffffffec(%ebp),%edx + 16f75: 8b 45 0c mov 0xc(%ebp),%eax + 16f78: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 16f7e: 89 82 9c 00 00 00 mov %eax,0x9c(%edx) + 16f84: 83 ec 0c sub $0xc,%esp + 16f87: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16f8a: 8a 40 02 mov 0x2(%eax),%al + 16f8d: 25 ff 00 00 00 and $0xff,%eax + 16f92: 50 push %eax + 16f93: 8b 45 08 mov 0x8(%ebp),%eax + 16f96: 83 c0 04 add $0x4,%eax + 16f99: 50 push %eax + 16f9a: 8b 45 08 mov 0x8(%ebp),%eax + 16f9d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16fa3: ff 70 04 pushl 0x4(%eax) + 16fa6: 68 a3 b2 01 00 push $0x1b2a3 + 16fab: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16fae: 05 a0 00 00 00 add $0xa0,%eax + 16fb3: 50 push %eax + 16fb4: e8 d7 2a 00 00 call 19a90 <_sprintf> + 16fb9: 83 c4 20 add $0x20,%esp + 16fbc: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16fbf: 80 78 08 00 cmpb $0x0,0x8(%eax) + 16fc3: 74 29 je 16fee <_usb_new_device+0x45b> + 16fc5: 68 80 00 00 00 push $0x80 + 16fca: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16fcd: 83 c0 18 add $0x18,%eax + 16fd0: 50 push %eax + 16fd1: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16fd4: 8a 40 08 mov 0x8(%eax),%al + 16fd7: 25 ff 00 00 00 and $0xff,%eax + 16fdc: 50 push %eax + 16fdd: ff 75 08 pushl 0x8(%ebp) + 16fe0: e8 fe ab ff ff call 11be3 <_usb_string> + 16fe5: 83 c4 10 add $0x10,%esp + 16fe8: 85 c0 test %eax,%eax + 16fea: 7e 02 jle 16fee <_usb_new_device+0x45b> + 16fec: eb 36 jmp 17024 <_usb_new_device+0x491> + 16fee: 83 ec 0c sub $0xc,%esp + 16ff1: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16ff4: 8a 40 02 mov 0x2(%eax),%al + 16ff7: 25 ff 00 00 00 and $0xff,%eax + 16ffc: 50 push %eax + 16ffd: 8b 45 08 mov 0x8(%ebp),%eax + 17000: 83 c0 04 add $0x4,%eax + 17003: 50 push %eax + 17004: 8b 45 08 mov 0x8(%ebp),%eax + 17007: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1700d: ff 70 08 pushl 0x8(%eax) + 17010: 68 ac b2 01 00 push $0x1b2ac + 17015: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17018: 83 c0 18 add $0x18,%eax + 1701b: 50 push %eax + 1701c: e8 6f 2a 00 00 call 19a90 <_sprintf> + 17021: 83 c4 20 add $0x20,%esp + 17024: 83 ec 0c sub $0xc,%esp + 17027: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1702a: 83 c0 18 add $0x18,%eax + 1702d: 50 push %eax + 1702e: e8 d7 26 00 00 call 1970a <_my_device_add> + 17033: 83 c4 10 add $0x10,%esp + 17036: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 17039: ff 00 incl (%eax) + 1703b: e9 ad fe ff ff jmp 16eed <_usb_new_device+0x35a> + 17040: 83 ec 0c sub $0xc,%esp + 17043: ff 75 08 pushl 0x8(%ebp) + 17046: e8 12 00 00 00 call 1705d <_usbfs_add_device> + 1704b: 83 c4 10 add $0x10,%esp + 1704e: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 17055: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17058: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 1705b: c9 leave + 1705c: c3 ret + +0001705d <_usbfs_add_device>: + 1705d: 55 push %ebp + 1705e: 89 e5 mov %esp,%ebp + 17060: 5d pop %ebp + 17061: c3 ret + +00017062 <_usb_buffer_alloc>: + 17062: 55 push %ebp + 17063: 89 e5 mov %esp,%ebp + 17065: 83 ec 08 sub $0x8,%esp + 17068: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 1706c: 74 2d je 1709b <_usb_buffer_alloc+0x39> + 1706e: 8b 45 08 mov 0x8(%ebp),%eax + 17071: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 17078: 74 21 je 1709b <_usb_buffer_alloc+0x39> + 1707a: 8b 45 08 mov 0x8(%ebp),%eax + 1707d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17083: 83 78 20 00 cmpl $0x0,0x20(%eax) + 17087: 74 12 je 1709b <_usb_buffer_alloc+0x39> + 17089: 8b 45 08 mov 0x8(%ebp),%eax + 1708c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17092: 8b 40 20 mov 0x20(%eax),%eax + 17095: 83 78 14 00 cmpl $0x0,0x14(%eax) + 17099: 75 09 jne 170a4 <_usb_buffer_alloc+0x42> + 1709b: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 170a2: eb 29 jmp 170cd <_usb_buffer_alloc+0x6b> + 170a4: 8b 45 08 mov 0x8(%ebp),%eax + 170a7: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 170ad: 8b 50 20 mov 0x20(%eax),%edx + 170b0: ff 75 14 pushl 0x14(%ebp) + 170b3: ff 75 10 pushl 0x10(%ebp) + 170b6: ff 75 0c pushl 0xc(%ebp) + 170b9: 8b 45 08 mov 0x8(%ebp),%eax + 170bc: ff b0 bc 00 00 00 pushl 0xbc(%eax) + 170c2: 8b 42 14 mov 0x14(%edx),%eax + 170c5: ff d0 call *%eax + 170c7: 83 c4 10 add $0x10,%esp + 170ca: 89 45 fc mov %eax,0xfffffffc(%ebp) + 170cd: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 170d0: c9 leave + 170d1: c3 ret + +000170d2 <_usb_buffer_free>: + 170d2: 55 push %ebp + 170d3: 89 e5 mov %esp,%ebp + 170d5: 83 ec 08 sub $0x8,%esp + 170d8: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 170dc: 74 55 je 17133 <_usb_buffer_free+0x61> + 170de: 8b 45 08 mov 0x8(%ebp),%eax + 170e1: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 170e8: 74 49 je 17133 <_usb_buffer_free+0x61> + 170ea: 8b 45 08 mov 0x8(%ebp),%eax + 170ed: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 170f3: 83 78 20 00 cmpl $0x0,0x20(%eax) + 170f7: 74 3a je 17133 <_usb_buffer_free+0x61> + 170f9: 8b 45 08 mov 0x8(%ebp),%eax + 170fc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17102: 8b 40 20 mov 0x20(%eax),%eax + 17105: 83 78 18 00 cmpl $0x0,0x18(%eax) + 17109: 75 02 jne 1710d <_usb_buffer_free+0x3b> + 1710b: eb 26 jmp 17133 <_usb_buffer_free+0x61> + 1710d: 8b 45 08 mov 0x8(%ebp),%eax + 17110: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17116: 8b 50 20 mov 0x20(%eax),%edx + 17119: ff 75 14 pushl 0x14(%ebp) + 1711c: ff 75 10 pushl 0x10(%ebp) + 1711f: ff 75 0c pushl 0xc(%ebp) + 17122: 8b 45 08 mov 0x8(%ebp),%eax + 17125: ff b0 bc 00 00 00 pushl 0xbc(%eax) + 1712b: 8b 42 18 mov 0x18(%edx),%eax + 1712e: ff d0 call *%eax + 17130: 83 c4 10 add $0x10,%esp + 17133: c9 leave + 17134: c3 ret + +00017135 <_usb_buffer_map>: + 17135: 55 push %ebp + 17136: 89 e5 mov %esp,%ebp + 17138: 83 ec 0c sub $0xc,%esp + 1713b: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 1713f: 74 39 je 1717a <_usb_buffer_map+0x45> + 17141: 8b 45 08 mov 0x8(%ebp),%eax + 17144: 8b 40 18 mov 0x18(%eax),%eax + 17147: c1 e8 1e shr $0x1e,%eax + 1714a: 83 e0 03 and $0x3,%eax + 1714d: 83 f8 02 cmp $0x2,%eax + 17150: 74 28 je 1717a <_usb_buffer_map+0x45> + 17152: 8b 45 08 mov 0x8(%ebp),%eax + 17155: 83 78 14 00 cmpl $0x0,0x14(%eax) + 17159: 74 1f je 1717a <_usb_buffer_map+0x45> + 1715b: 8b 45 08 mov 0x8(%ebp),%eax + 1715e: 8b 40 14 mov 0x14(%eax),%eax + 17161: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17167: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1716a: 85 c0 test %eax,%eax + 1716c: 74 0c je 1717a <_usb_buffer_map+0x45> + 1716e: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 17171: 8b 00 mov (%eax),%eax + 17173: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17176: 85 c0 test %eax,%eax + 17178: 75 09 jne 17183 <_usb_buffer_map+0x4e> + 1717a: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 17181: eb 3f jmp 171c2 <_usb_buffer_map+0x8d> + 17183: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17186: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) + 1718d: 74 14 je 171a3 <_usb_buffer_map+0x6e> + 1718f: 8b 45 08 mov 0x8(%ebp),%eax + 17192: 8b 55 08 mov 0x8(%ebp),%edx + 17195: 8b 52 24 mov 0x24(%edx),%edx + 17198: 81 e2 ff ff ff 0f and $0xfffffff,%edx + 1719e: 89 50 28 mov %edx,0x28(%eax) + 171a1: eb 0a jmp 171ad <_usb_buffer_map+0x78> + 171a3: 8b 45 08 mov 0x8(%ebp),%eax + 171a6: c7 40 28 ff ff ff ff movl $0xffffffff,0x28(%eax) + 171ad: 8b 55 08 mov 0x8(%ebp),%edx + 171b0: 8b 45 08 mov 0x8(%ebp),%eax + 171b3: 8b 40 20 mov 0x20(%eax),%eax + 171b6: 83 c8 04 or $0x4,%eax + 171b9: 89 42 20 mov %eax,0x20(%edx) + 171bc: 8b 45 08 mov 0x8(%ebp),%eax + 171bf: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 171c2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 171c5: c9 leave + 171c6: c3 ret + +000171c7 <_usb_buffer_dmasync>: + 171c7: 55 push %ebp + 171c8: 89 e5 mov %esp,%ebp + 171ca: 83 ec 08 sub $0x8,%esp + 171cd: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 171d1: 74 3a je 1720d <_usb_buffer_dmasync+0x46> + 171d3: 8b 45 08 mov 0x8(%ebp),%eax + 171d6: 8b 40 20 mov 0x20(%eax),%eax + 171d9: c1 e8 02 shr $0x2,%eax + 171dc: 83 e0 01 and $0x1,%eax + 171df: 85 c0 test %eax,%eax + 171e1: 74 2a je 1720d <_usb_buffer_dmasync+0x46> + 171e3: 8b 45 08 mov 0x8(%ebp),%eax + 171e6: 83 78 14 00 cmpl $0x0,0x14(%eax) + 171ea: 74 21 je 1720d <_usb_buffer_dmasync+0x46> + 171ec: 8b 45 08 mov 0x8(%ebp),%eax + 171ef: 8b 40 14 mov 0x14(%eax),%eax + 171f2: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 171f8: 89 45 fc mov %eax,0xfffffffc(%ebp) + 171fb: 85 c0 test %eax,%eax + 171fd: 74 0e je 1720d <_usb_buffer_dmasync+0x46> + 171ff: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 17202: 8b 00 mov (%eax),%eax + 17204: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17207: 85 c0 test %eax,%eax + 17209: 75 02 jne 1720d <_usb_buffer_dmasync+0x46> + 1720b: eb 00 jmp 1720d <_usb_buffer_dmasync+0x46> + 1720d: c9 leave + 1720e: c3 ret + +0001720f <_usb_buffer_unmap>: + 1720f: 55 push %ebp + 17210: 89 e5 mov %esp,%ebp + 17212: 83 ec 08 sub $0x8,%esp + 17215: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 17219: 74 49 je 17264 <_usb_buffer_unmap+0x55> + 1721b: 8b 45 08 mov 0x8(%ebp),%eax + 1721e: 8b 40 20 mov 0x20(%eax),%eax + 17221: c1 e8 02 shr $0x2,%eax + 17224: 83 e0 01 and $0x1,%eax + 17227: 85 c0 test %eax,%eax + 17229: 74 39 je 17264 <_usb_buffer_unmap+0x55> + 1722b: 8b 45 08 mov 0x8(%ebp),%eax + 1722e: 83 78 14 00 cmpl $0x0,0x14(%eax) + 17232: 74 30 je 17264 <_usb_buffer_unmap+0x55> + 17234: 8b 45 08 mov 0x8(%ebp),%eax + 17237: 8b 40 14 mov 0x14(%eax),%eax + 1723a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17240: 89 45 fc mov %eax,0xfffffffc(%ebp) + 17243: 85 c0 test %eax,%eax + 17245: 74 1d je 17264 <_usb_buffer_unmap+0x55> + 17247: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1724a: 8b 00 mov (%eax),%eax + 1724c: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1724f: 85 c0 test %eax,%eax + 17251: 75 02 jne 17255 <_usb_buffer_unmap+0x46> + 17253: eb 0f jmp 17264 <_usb_buffer_unmap+0x55> + 17255: 8b 45 08 mov 0x8(%ebp),%eax + 17258: 8b 55 08 mov 0x8(%ebp),%edx + 1725b: 8b 52 20 mov 0x20(%edx),%edx + 1725e: 83 e2 fb and $0xfffffffb,%edx + 17261: 89 50 20 mov %edx,0x20(%eax) + 17264: c9 leave + 17265: c3 ret + +00017266 <_usb_buffer_map_sg>: + 17266: 55 push %ebp + 17267: 89 e5 mov %esp,%ebp + 17269: 83 ec 0c sub $0xc,%esp + 1726c: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 17270: 74 36 je 172a8 <_usb_buffer_map_sg+0x42> + 17272: 8b 45 0c mov 0xc(%ebp),%eax + 17275: c1 e8 1e shr $0x1e,%eax + 17278: 83 e0 03 and $0x3,%eax + 1727b: 83 f8 02 cmp $0x2,%eax + 1727e: 74 28 je 172a8 <_usb_buffer_map_sg+0x42> + 17280: 8b 45 08 mov 0x8(%ebp),%eax + 17283: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17289: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1728c: 85 c0 test %eax,%eax + 1728e: 74 18 je 172a8 <_usb_buffer_map_sg+0x42> + 17290: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 17293: 8b 00 mov (%eax),%eax + 17295: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17298: 85 c0 test %eax,%eax + 1729a: 74 0c je 172a8 <_usb_buffer_map_sg+0x42> + 1729c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1729f: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) + 172a6: 75 09 jne 172b1 <_usb_buffer_map_sg+0x4b> + 172a8: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 172af: eb 07 jmp 172b8 <_usb_buffer_map_sg+0x52> + 172b1: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 172b8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 172bb: c9 leave + 172bc: c3 ret + +000172bd <_usb_buffer_dmasync_sg>: + 172bd: 55 push %ebp + 172be: 89 e5 mov %esp,%ebp + 172c0: 83 ec 08 sub $0x8,%esp + 172c3: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 172c7: 74 1c je 172e5 <_usb_buffer_dmasync_sg+0x28> + 172c9: 8b 45 08 mov 0x8(%ebp),%eax + 172cc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 172d2: 89 45 fc mov %eax,0xfffffffc(%ebp) + 172d5: 85 c0 test %eax,%eax + 172d7: 74 0c je 172e5 <_usb_buffer_dmasync_sg+0x28> + 172d9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 172dc: 8b 00 mov (%eax),%eax + 172de: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 172e1: 85 c0 test %eax,%eax + 172e3: 74 00 je 172e5 <_usb_buffer_dmasync_sg+0x28> + 172e5: c9 leave + 172e6: c3 ret + +000172e7 <_usb_buffer_unmap_sg>: + 172e7: 55 push %ebp + 172e8: 89 e5 mov %esp,%ebp + 172ea: 83 ec 08 sub $0x8,%esp + 172ed: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 172f1: 74 1c je 1730f <_usb_buffer_unmap_sg+0x28> + 172f3: 8b 45 08 mov 0x8(%ebp),%eax + 172f6: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 172fc: 89 45 fc mov %eax,0xfffffffc(%ebp) + 172ff: 85 c0 test %eax,%eax + 17301: 74 0c je 1730f <_usb_buffer_unmap_sg+0x28> + 17303: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 17306: 8b 00 mov (%eax),%eax + 17308: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1730b: 85 c0 test %eax,%eax + 1730d: 74 00 je 1730f <_usb_buffer_unmap_sg+0x28> + 1730f: c9 leave + 17310: c3 ret + +00017311 <_usb_setup_disable>: + 17311: 55 push %ebp + 17312: 89 e5 mov %esp,%ebp + 17314: c7 05 30 c1 01 00 01 movl $0x1,0x1c130 + 1731b: 00 00 00 + 1731e: b8 01 00 00 00 mov $0x1,%eax + 17323: 5d pop %ebp + 17324: c3 ret + +00017325 <_usb_disabled@0>: + 17325: 55 push %ebp + 17326: 89 e5 mov %esp,%ebp + 17328: a1 30 c1 01 00 mov 0x1c130,%eax + 1732d: 5d pop %ebp + 1732e: c3 ret + +0001732f <_usb_init>: + 1732f: 55 push %ebp + 17330: 89 e5 mov %esp,%ebp + 17332: 83 ec 08 sub $0x8,%esp + 17335: 83 3d 30 c1 01 00 00 cmpl $0x0,0x1c130 + 1733c: 74 09 je 17347 <_usb_init+0x18> + 1733e: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 17345: eb 26 jmp 1736d <_usb_init+0x3e> + 17347: e8 30 00 00 00 call 1737c <_usb_major_init> + 1734c: e8 21 00 00 00 call 17372 <_usbfs_init> + 17351: e8 63 e3 ff ff call 156b9 <_usb_hub_init> + 17356: 83 ec 0c sub $0xc,%esp + 17359: 68 e0 a0 01 00 push $0x1a0e0 + 1735e: e8 79 24 00 00 call 197dc <_my_driver_register> + 17363: 83 c4 10 add $0x10,%esp + 17366: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1736d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 17370: c9 leave + 17371: c3 ret + +00017372 <_usbfs_init>: + 17372: 55 push %ebp + 17373: 89 e5 mov %esp,%ebp + 17375: b8 00 00 00 00 mov $0x0,%eax + 1737a: 5d pop %ebp + 1737b: c3 ret + +0001737c <_usb_major_init>: + 1737c: 55 push %ebp + 1737d: 89 e5 mov %esp,%ebp + 1737f: b8 00 00 00 00 mov $0x0,%eax + 17384: 5d pop %ebp + 17385: c3 ret + +00017386 <_usb_exit>: + 17386: 55 push %ebp + 17387: 89 e5 mov %esp,%ebp + 17389: 83 ec 08 sub $0x8,%esp + 1738c: 83 3d 30 c1 01 00 00 cmpl $0x0,0x1c130 + 17393: 74 02 je 17397 <_usb_exit+0x11> + 17395: eb 0f jmp 173a6 <_usb_exit+0x20> + 17397: e8 11 00 00 00 call 173ad <_usb_major_cleanup> + 1739c: e8 07 00 00 00 call 173a8 <_usbfs_cleanup> + 173a1: e8 80 e3 ff ff call 15726 <_usb_hub_cleanup> + 173a6: c9 leave + 173a7: c3 ret + +000173a8 <_usbfs_cleanup>: + 173a8: 55 push %ebp + 173a9: 89 e5 mov %esp,%ebp + 173ab: 5d pop %ebp + 173ac: c3 ret + +000173ad <_usb_major_cleanup>: + 173ad: 55 push %ebp + 173ae: 89 e5 mov %esp,%ebp + 173b0: 5d pop %ebp + 173b1: c3 ret + +000173b2 <_subsys_usb_init>: + 173b2: 55 push %ebp + 173b3: 89 e5 mov %esp,%ebp + 173b5: 83 ec 08 sub $0x8,%esp + 173b8: e8 72 ff ff ff call 1732f <_usb_init> + 173bd: c9 leave + 173be: c3 ret + +000173bf <_module_exit_usb_exit>: + 173bf: 55 push %ebp + 173c0: 89 e5 mov %esp,%ebp + 173c2: 83 ec 08 sub $0x8,%esp + 173c5: e8 bc ff ff ff call 17386 <_usb_exit> + 173ca: c9 leave + 173cb: c3 ret + 173cc: 90 nop + 173cd: 90 nop + 173ce: 90 nop + 173cf: 90 nop + +000173d0 <_usb_parse_endpoint>: + 173d0: 55 push %ebp + 173d1: 89 e5 mov %esp,%ebp + 173d3: 53 push %ebx + 173d4: 83 ec 24 sub $0x24,%esp + 173d7: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 173de: 8b 45 0c mov 0xc(%ebp),%eax + 173e1: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 173e4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 173e7: 8a 00 mov (%eax),%al + 173e9: 25 ff 00 00 00 and $0xff,%eax + 173ee: 3b 45 10 cmp 0x10(%ebp),%eax + 173f1: 7e 0c jle 173ff <_usb_parse_endpoint+0x2f> + 173f3: c7 45 e4 ff ff ff ff movl $0xffffffff,0xffffffe4(%ebp) + 173fa: e9 7c 01 00 00 jmp 1757b <_usb_parse_endpoint+0x1ab> + 173ff: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17402: 80 78 01 05 cmpb $0x5,0x1(%eax) + 17406: 74 0b je 17413 <_usb_parse_endpoint+0x43> + 17408: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1740b: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1740e: e9 68 01 00 00 jmp 1757b <_usb_parse_endpoint+0x1ab> + 17413: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17416: 80 38 09 cmpb $0x9,(%eax) + 17419: 75 15 jne 17430 <_usb_parse_endpoint+0x60> + 1741b: 83 ec 04 sub $0x4,%esp + 1741e: 6a 09 push $0x9 + 17420: ff 75 0c pushl 0xc(%ebp) + 17423: ff 75 08 pushl 0x8(%ebp) + 17426: e8 45 26 00 00 call 19a70 <_memcpy> + 1742b: 83 c4 10 add $0x10,%esp + 1742e: eb 13 jmp 17443 <_usb_parse_endpoint+0x73> + 17430: 83 ec 04 sub $0x4,%esp + 17433: 6a 07 push $0x7 + 17435: ff 75 0c pushl 0xc(%ebp) + 17438: ff 75 08 pushl 0x8(%ebp) + 1743b: e8 30 26 00 00 call 19a70 <_memcpy> + 17440: 83 c4 10 add $0x10,%esp + 17443: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17446: ba 00 00 00 00 mov $0x0,%edx + 1744b: 8a 10 mov (%eax),%dl + 1744d: 8d 45 0c lea 0xc(%ebp),%eax + 17450: 01 10 add %edx,(%eax) + 17452: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17455: ba 00 00 00 00 mov $0x0,%edx + 1745a: 8a 10 mov (%eax),%dl + 1745c: 8d 45 10 lea 0x10(%ebp),%eax + 1745f: 29 10 sub %edx,(%eax) + 17461: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17464: ba 00 00 00 00 mov $0x0,%edx + 17469: 8a 10 mov (%eax),%dl + 1746b: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 1746e: 01 10 add %edx,(%eax) + 17470: 8b 45 0c mov 0xc(%ebp),%eax + 17473: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 17476: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 1747d: 83 7d 10 01 cmpl $0x1,0x10(%ebp) + 17481: 76 72 jbe 174f5 <_usb_parse_endpoint+0x125> + 17483: 8b 45 0c mov 0xc(%ebp),%eax + 17486: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17489: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1748c: 80 38 01 cmpb $0x1,(%eax) + 1748f: 77 0c ja 1749d <_usb_parse_endpoint+0xcd> + 17491: c7 45 e4 ff ff ff ff movl $0xffffffff,0xffffffe4(%ebp) + 17498: e9 de 00 00 00 jmp 1757b <_usb_parse_endpoint+0x1ab> + 1749d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174a0: 80 78 01 05 cmpb $0x5,0x1(%eax) + 174a4: 74 4f je 174f5 <_usb_parse_endpoint+0x125> + 174a6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174a9: 80 78 01 04 cmpb $0x4,0x1(%eax) + 174ad: 74 46 je 174f5 <_usb_parse_endpoint+0x125> + 174af: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174b2: 80 78 01 02 cmpb $0x2,0x1(%eax) + 174b6: 74 3d je 174f5 <_usb_parse_endpoint+0x125> + 174b8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174bb: 80 78 01 01 cmpb $0x1,0x1(%eax) + 174bf: 74 34 je 174f5 <_usb_parse_endpoint+0x125> + 174c1: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 174c4: ff 00 incl (%eax) + 174c6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174c9: ba 00 00 00 00 mov $0x0,%edx + 174ce: 8a 10 mov (%eax),%dl + 174d0: 8d 45 0c lea 0xc(%ebp),%eax + 174d3: 01 10 add %edx,(%eax) + 174d5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174d8: ba 00 00 00 00 mov $0x0,%edx + 174dd: 8a 10 mov (%eax),%dl + 174df: 8d 45 10 lea 0x10(%ebp),%eax + 174e2: 29 10 sub %edx,(%eax) + 174e4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174e7: ba 00 00 00 00 mov $0x0,%edx + 174ec: 8a 10 mov (%eax),%dl + 174ee: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 174f1: 01 10 add %edx,(%eax) + 174f3: eb 88 jmp 1747d <_usb_parse_endpoint+0xad> + 174f5: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 174f8: 8b 55 0c mov 0xc(%ebp),%edx + 174fb: 29 c2 sub %eax,%edx + 174fd: 89 d0 mov %edx,%eax + 174ff: 89 45 ec mov %eax,0xffffffec(%ebp) + 17502: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 17506: 75 1c jne 17524 <_usb_parse_endpoint+0x154> + 17508: 8b 45 08 mov 0x8(%ebp),%eax + 1750b: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 17512: 8b 45 08 mov 0x8(%ebp),%eax + 17515: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 1751c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1751f: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17522: eb 57 jmp 1757b <_usb_parse_endpoint+0x1ab> + 17524: 8b 5d 08 mov 0x8(%ebp),%ebx + 17527: 83 ec 08 sub $0x8,%esp + 1752a: ff 75 ec pushl 0xffffffec(%ebp) + 1752d: 6a 01 push $0x1 + 1752f: e8 fc 24 00 00 call 19a30 <_ExAllocatePool@8> + 17534: 83 c4 08 add $0x8,%esp + 17537: 89 43 0c mov %eax,0xc(%ebx) + 1753a: 8b 45 08 mov 0x8(%ebp),%eax + 1753d: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 17541: 75 12 jne 17555 <_usb_parse_endpoint+0x185> + 17543: 8b 45 08 mov 0x8(%ebp),%eax + 17546: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 1754d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 17550: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17553: eb 26 jmp 1757b <_usb_parse_endpoint+0x1ab> + 17555: 83 ec 04 sub $0x4,%esp + 17558: ff 75 ec pushl 0xffffffec(%ebp) + 1755b: ff 75 f4 pushl 0xfffffff4(%ebp) + 1755e: 8b 45 08 mov 0x8(%ebp),%eax + 17561: ff 70 0c pushl 0xc(%eax) + 17564: e8 07 25 00 00 call 19a70 <_memcpy> + 17569: 83 c4 10 add $0x10,%esp + 1756c: 8b 55 08 mov 0x8(%ebp),%edx + 1756f: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17572: 89 42 10 mov %eax,0x10(%edx) + 17575: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 17578: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1757b: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1757e: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 17581: c9 leave + 17582: c3 ret + +00017583 <_usb_parse_interface>: + 17583: 55 push %ebp + 17584: 89 e5 mov %esp,%ebp + 17586: 53 push %ebx + 17587: 83 ec 34 sub $0x34,%esp + 1758a: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 17591: 8b 45 08 mov 0x8(%ebp),%eax + 17594: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) + 1759b: 8b 45 08 mov 0x8(%ebp),%eax + 1759e: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 175a5: 8b 45 08 mov 0x8(%ebp),%eax + 175a8: c7 40 0c 04 00 00 00 movl $0x4,0xc(%eax) + 175af: 83 ec 0c sub $0xc,%esp + 175b2: 8b 45 08 mov 0x8(%ebp),%eax + 175b5: 83 c0 18 add $0x18,%eax + 175b8: 50 push %eax + 175b9: e8 a2 22 00 00 call 19860 <_my_device_initialize> + 175be: 83 c4 10 add $0x10,%esp + 175c1: 8b 5d 08 mov 0x8(%ebp),%ebx + 175c4: 83 ec 08 sub $0x8,%esp + 175c7: 8b 45 08 mov 0x8(%ebp),%eax + 175ca: 8b 50 0c mov 0xc(%eax),%edx + 175cd: 89 d0 mov %edx,%eax + 175cf: 01 c0 add %eax,%eax + 175d1: 01 d0 add %edx,%eax + 175d3: c1 e0 03 shl $0x3,%eax + 175d6: 50 push %eax + 175d7: 6a 01 push $0x1 + 175d9: e8 52 24 00 00 call 19a30 <_ExAllocatePool@8> + 175de: 83 c4 08 add $0x8,%esp + 175e1: 89 03 mov %eax,(%ebx) + 175e3: 8b 45 08 mov 0x8(%ebp),%eax + 175e6: 83 38 00 cmpl $0x0,(%eax) + 175e9: 75 0c jne 175f7 <_usb_parse_interface+0x74> + 175eb: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 175f2: e9 85 03 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 175f7: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 175fb: 0f 8e 75 03 00 00 jle 17976 <_usb_parse_interface+0x3f3> + 17601: 8b 45 08 mov 0x8(%ebp),%eax + 17604: 8b 55 08 mov 0x8(%ebp),%edx + 17607: 8b 40 08 mov 0x8(%eax),%eax + 1760a: 3b 42 0c cmp 0xc(%edx),%eax + 1760d: 0f 82 9a 00 00 00 jb 176ad <_usb_parse_interface+0x12a> + 17613: 8b 45 08 mov 0x8(%ebp),%eax + 17616: 8b 40 0c mov 0xc(%eax),%eax + 17619: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 1761c: 8b 55 08 mov 0x8(%ebp),%edx + 1761f: 8b 45 08 mov 0x8(%ebp),%eax + 17622: 8b 40 0c mov 0xc(%eax),%eax + 17625: 83 c0 04 add $0x4,%eax + 17628: 89 42 0c mov %eax,0xc(%edx) + 1762b: 8b 45 08 mov 0x8(%ebp),%eax + 1762e: 81 78 0c 80 00 00 00 cmpl $0x80,0xc(%eax) + 17635: 76 0c jbe 17643 <_usb_parse_interface+0xc0> + 17637: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 1763e: e9 39 03 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17643: 83 ec 08 sub $0x8,%esp + 17646: 8b 45 08 mov 0x8(%ebp),%eax + 17649: 8b 50 0c mov 0xc(%eax),%edx + 1764c: 89 d0 mov %edx,%eax + 1764e: 01 c0 add %eax,%eax + 17650: 01 d0 add %edx,%eax + 17652: c1 e0 03 shl $0x3,%eax + 17655: 50 push %eax + 17656: 6a 01 push $0x1 + 17658: e8 d3 23 00 00 call 19a30 <_ExAllocatePool@8> + 1765d: 83 c4 08 add $0x8,%esp + 17660: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 17663: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) + 17667: 75 0c jne 17675 <_usb_parse_interface+0xf2> + 17669: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 17670: e9 07 03 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17675: 83 ec 04 sub $0x4,%esp + 17678: 8b 55 d0 mov 0xffffffd0(%ebp),%edx + 1767b: 89 d0 mov %edx,%eax + 1767d: 01 c0 add %eax,%eax + 1767f: 01 d0 add %edx,%eax + 17681: c1 e0 03 shl $0x3,%eax + 17684: 50 push %eax + 17685: 8b 45 08 mov 0x8(%ebp),%eax + 17688: ff 30 pushl (%eax) + 1768a: ff 75 d4 pushl 0xffffffd4(%ebp) + 1768d: e8 de 23 00 00 call 19a70 <_memcpy> + 17692: 83 c4 10 add $0x10,%esp + 17695: 83 ec 0c sub $0xc,%esp + 17698: 8b 45 08 mov 0x8(%ebp),%eax + 1769b: ff 30 pushl (%eax) + 1769d: e8 9e 23 00 00 call 19a40 <_ExFreePool@4> + 176a2: 83 c4 0c add $0xc,%esp + 176a5: 8b 55 08 mov 0x8(%ebp),%edx + 176a8: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 176ab: 89 02 mov %eax,(%edx) + 176ad: 8b 4d 08 mov 0x8(%ebp),%ecx + 176b0: 8b 45 08 mov 0x8(%ebp),%eax + 176b3: 8b 50 08 mov 0x8(%eax),%edx + 176b6: 89 d0 mov %edx,%eax + 176b8: 01 c0 add %eax,%eax + 176ba: 01 d0 add %edx,%eax + 176bc: c1 e0 03 shl $0x3,%eax + 176bf: 03 01 add (%ecx),%eax + 176c1: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 176c4: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 176c7: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 176ce: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 176d1: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 176d8: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 176db: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 176e2: 8b 45 08 mov 0x8(%ebp),%eax + 176e5: ff 40 08 incl 0x8(%eax) + 176e8: 83 ec 04 sub $0x4,%esp + 176eb: 6a 09 push $0x9 + 176ed: ff 75 0c pushl 0xc(%ebp) + 176f0: ff 75 e0 pushl 0xffffffe0(%ebp) + 176f3: e8 78 23 00 00 call 19a70 <_memcpy> + 176f8: 83 c4 10 add $0x10,%esp + 176fb: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 176fe: ba 00 00 00 00 mov $0x0,%edx + 17703: 8a 10 mov (%eax),%dl + 17705: 8d 45 0c lea 0xc(%ebp),%eax + 17708: 01 10 add %edx,(%eax) + 1770a: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 1770d: ba 00 00 00 00 mov $0x0,%edx + 17712: 8a 10 mov (%eax),%dl + 17714: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 17717: 01 10 add %edx,(%eax) + 17719: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 1771c: ba 00 00 00 00 mov $0x0,%edx + 17721: 8a 10 mov (%eax),%dl + 17723: 8d 45 10 lea 0x10(%ebp),%eax + 17726: 29 10 sub %edx,(%eax) + 17728: 8b 45 0c mov 0xc(%ebp),%eax + 1772b: 89 45 dc mov %eax,0xffffffdc(%ebp) + 1772e: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 17735: 83 7d 10 01 cmpl $0x1,0x10(%ebp) + 17739: 76 72 jbe 177ad <_usb_parse_interface+0x22a> + 1773b: 8b 45 0c mov 0xc(%ebp),%eax + 1773e: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17741: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17744: 80 38 01 cmpb $0x1,(%eax) + 17747: 77 0c ja 17755 <_usb_parse_interface+0x1d2> + 17749: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 17750: e9 27 02 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17755: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17758: 80 78 01 04 cmpb $0x4,0x1(%eax) + 1775c: 74 4f je 177ad <_usb_parse_interface+0x22a> + 1775e: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17761: 80 78 01 05 cmpb $0x5,0x1(%eax) + 17765: 74 46 je 177ad <_usb_parse_interface+0x22a> + 17767: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1776a: 80 78 01 02 cmpb $0x2,0x1(%eax) + 1776e: 74 3d je 177ad <_usb_parse_interface+0x22a> + 17770: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17773: 80 78 01 01 cmpb $0x1,0x1(%eax) + 17777: 74 34 je 177ad <_usb_parse_interface+0x22a> + 17779: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 1777c: ff 00 incl (%eax) + 1777e: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17781: ba 00 00 00 00 mov $0x0,%edx + 17786: 8a 10 mov (%eax),%dl + 17788: 8d 45 0c lea 0xc(%ebp),%eax + 1778b: 01 10 add %edx,(%eax) + 1778d: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17790: ba 00 00 00 00 mov $0x0,%edx + 17795: 8a 10 mov (%eax),%dl + 17797: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 1779a: 01 10 add %edx,(%eax) + 1779c: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1779f: ba 00 00 00 00 mov $0x0,%edx + 177a4: 8a 10 mov (%eax),%dl + 177a6: 8d 45 10 lea 0x10(%ebp),%eax + 177a9: 29 10 sub %edx,(%eax) + 177ab: eb 88 jmp 17735 <_usb_parse_interface+0x1b2> + 177ad: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 177b0: 8b 55 0c mov 0xc(%ebp),%edx + 177b3: 29 c2 sub %eax,%edx + 177b5: 89 d0 mov %edx,%eax + 177b7: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 177ba: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 177be: 74 55 je 17815 <_usb_parse_interface+0x292> + 177c0: 8b 5d e0 mov 0xffffffe0(%ebp),%ebx + 177c3: 83 ec 08 sub $0x8,%esp + 177c6: ff 75 f4 pushl 0xfffffff4(%ebp) + 177c9: 6a 01 push $0x1 + 177cb: e8 60 22 00 00 call 19a30 <_ExAllocatePool@8> + 177d0: 83 c4 08 add $0x8,%esp + 177d3: 89 43 10 mov %eax,0x10(%ebx) + 177d6: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 177d9: 83 78 10 00 cmpl $0x0,0x10(%eax) + 177dd: 75 16 jne 177f5 <_usb_parse_interface+0x272> + 177df: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 177e2: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 177e9: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 177f0: e9 87 01 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 177f5: 83 ec 04 sub $0x4,%esp + 177f8: ff 75 f4 pushl 0xfffffff4(%ebp) + 177fb: ff 75 dc pushl 0xffffffdc(%ebp) + 177fe: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17801: ff 70 10 pushl 0x10(%eax) + 17804: e8 67 22 00 00 call 19a70 <_memcpy> + 17809: 83 c4 10 add $0x10,%esp + 1780c: 8b 55 e0 mov 0xffffffe0(%ebp),%edx + 1780f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 17812: 89 42 14 mov %eax,0x14(%edx) + 17815: 8b 45 0c mov 0xc(%ebp),%eax + 17818: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1781b: 83 7d 10 01 cmpl $0x1,0x10(%ebp) + 1781f: 76 1f jbe 17840 <_usb_parse_interface+0x2bd> + 17821: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17824: 80 78 01 02 cmpb $0x2,0x1(%eax) + 17828: 74 0b je 17835 <_usb_parse_interface+0x2b2> + 1782a: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1782d: 80 78 01 01 cmpb $0x1,0x1(%eax) + 17831: 74 02 je 17835 <_usb_parse_interface+0x2b2> + 17833: eb 0b jmp 17840 <_usb_parse_interface+0x2bd> + 17835: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17838: 89 45 cc mov %eax,0xffffffcc(%ebp) + 1783b: e9 3c 01 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17840: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17843: 80 78 04 1e cmpb $0x1e,0x4(%eax) + 17847: 76 0c jbe 17855 <_usb_parse_interface+0x2d2> + 17849: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 17850: e9 27 01 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17855: 8b 5d e0 mov 0xffffffe0(%ebp),%ebx + 17858: 83 ec 08 sub $0x8,%esp + 1785b: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 1785e: ba 00 00 00 00 mov $0x0,%edx + 17863: 8a 50 04 mov 0x4(%eax),%dl + 17866: 89 d0 mov %edx,%eax + 17868: c1 e0 02 shl $0x2,%eax + 1786b: 01 d0 add %edx,%eax + 1786d: c1 e0 02 shl $0x2,%eax + 17870: 50 push %eax + 17871: 6a 01 push $0x1 + 17873: e8 b8 21 00 00 call 19a30 <_ExAllocatePool@8> + 17878: 83 c4 08 add $0x8,%esp + 1787b: 89 43 0c mov %eax,0xc(%ebx) + 1787e: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17881: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 17885: 75 0c jne 17893 <_usb_parse_interface+0x310> + 17887: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 1788e: e9 e9 00 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17893: 83 ec 04 sub $0x4,%esp + 17896: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17899: ba 00 00 00 00 mov $0x0,%edx + 1789e: 8a 50 04 mov 0x4(%eax),%dl + 178a1: 89 d0 mov %edx,%eax + 178a3: c1 e0 02 shl $0x2,%eax + 178a6: 01 d0 add %edx,%eax + 178a8: c1 e0 02 shl $0x2,%eax + 178ab: 50 push %eax + 178ac: 6a 00 push $0x0 + 178ae: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 178b1: ff 70 0c pushl 0xc(%eax) + 178b4: e8 97 21 00 00 call 19a50 <_memset> + 178b9: 83 c4 10 add $0x10,%esp + 178bc: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 178c3: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 178c6: 8a 40 04 mov 0x4(%eax),%al + 178c9: 25 ff 00 00 00 and $0xff,%eax + 178ce: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 178d1: 7e 79 jle 1794c <_usb_parse_interface+0x3c9> + 178d3: 8b 45 0c mov 0xc(%ebp),%eax + 178d6: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 178d9: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 178dc: 8a 00 mov (%eax),%al + 178de: 25 ff 00 00 00 and $0xff,%eax + 178e3: 3b 45 10 cmp 0x10(%ebp),%eax + 178e6: 7e 0c jle 178f4 <_usb_parse_interface+0x371> + 178e8: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 178ef: e9 88 00 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 178f4: 83 ec 04 sub $0x4,%esp + 178f7: ff 75 10 pushl 0x10(%ebp) + 178fa: ff 75 0c pushl 0xc(%ebp) + 178fd: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx + 17900: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 17903: 89 d0 mov %edx,%eax + 17905: c1 e0 02 shl $0x2,%eax + 17908: 01 d0 add %edx,%eax + 1790a: c1 e0 02 shl $0x2,%eax + 1790d: 03 41 0c add 0xc(%ecx),%eax + 17910: 50 push %eax + 17911: e8 ba fa ff ff call 173d0 <_usb_parse_endpoint> + 17916: 83 c4 10 add $0x10,%esp + 17919: 89 45 ec mov %eax,0xffffffec(%ebp) + 1791c: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 17920: 79 08 jns 1792a <_usb_parse_interface+0x3a7> + 17922: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17925: 89 45 cc mov %eax,0xffffffcc(%ebp) + 17928: eb 52 jmp 1797c <_usb_parse_interface+0x3f9> + 1792a: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1792d: 8d 45 0c lea 0xc(%ebp),%eax + 17930: 01 10 add %edx,(%eax) + 17932: 8b 55 ec mov 0xffffffec(%ebp),%edx + 17935: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 17938: 01 10 add %edx,(%eax) + 1793a: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1793d: 8d 45 10 lea 0x10(%ebp),%eax + 17940: 29 10 sub %edx,(%eax) + 17942: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 17945: ff 00 incl (%eax) + 17947: e9 77 ff ff ff jmp 178c3 <_usb_parse_interface+0x340> + 1794c: 8b 45 0c mov 0xc(%ebp),%eax + 1794f: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 17952: 83 7d 10 08 cmpl $0x8,0x10(%ebp) + 17956: 7e 16 jle 1796e <_usb_parse_interface+0x3eb> + 17958: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 1795b: 80 78 01 04 cmpb $0x4,0x1(%eax) + 1795f: 75 0d jne 1796e <_usb_parse_interface+0x3eb> + 17961: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 17964: 80 78 03 00 cmpb $0x0,0x3(%eax) + 17968: 0f 85 89 fc ff ff jne 175f7 <_usb_parse_interface+0x74> + 1796e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17971: 89 45 cc mov %eax,0xffffffcc(%ebp) + 17974: eb 06 jmp 1797c <_usb_parse_interface+0x3f9> + 17976: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17979: 89 45 cc mov %eax,0xffffffcc(%ebp) + 1797c: 8b 45 cc mov 0xffffffcc(%ebp),%eax + 1797f: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 17982: c9 leave + 17983: c3 ret + +00017984 <_usb_parse_configuration>: + 17984: 55 push %ebp + 17985: 89 e5 mov %esp,%ebp + 17987: 53 push %ebx + 17988: 83 ec 24 sub $0x24,%esp + 1798b: 83 ec 04 sub $0x4,%esp + 1798e: 6a 09 push $0x9 + 17990: ff 75 0c pushl 0xc(%ebp) + 17993: ff 75 08 pushl 0x8(%ebp) + 17996: e8 d5 20 00 00 call 19a70 <_memcpy> + 1799b: 83 c4 10 add $0x10,%esp + 1799e: 8b 45 08 mov 0x8(%ebp),%eax + 179a1: 66 8b 40 02 mov 0x2(%eax),%ax + 179a5: 25 ff ff 00 00 and $0xffff,%eax + 179aa: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 179ad: 8b 45 08 mov 0x8(%ebp),%eax + 179b0: 80 78 04 20 cmpb $0x20,0x4(%eax) + 179b4: 76 0c jbe 179c2 <_usb_parse_configuration+0x3e> + 179b6: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) + 179bd: e9 2b 02 00 00 jmp 17bed <_usb_parse_configuration+0x269> + 179c2: 8b 5d 08 mov 0x8(%ebp),%ebx + 179c5: 83 ec 08 sub $0x8,%esp + 179c8: 8b 45 08 mov 0x8(%ebp),%eax + 179cb: b9 00 00 00 00 mov $0x0,%ecx + 179d0: 8a 48 04 mov 0x4(%eax),%cl + 179d3: 89 c8 mov %ecx,%eax + 179d5: c1 e0 02 shl $0x2,%eax + 179d8: 01 c8 add %ecx,%eax + 179da: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 179e1: 01 d0 add %edx,%eax + 179e3: 01 c0 add %eax,%eax + 179e5: 01 c8 add %ecx,%eax + 179e7: c1 e0 02 shl $0x2,%eax + 179ea: 50 push %eax + 179eb: 6a 01 push $0x1 + 179ed: e8 3e 20 00 00 call 19a30 <_ExAllocatePool@8> + 179f2: 83 c4 08 add $0x8,%esp + 179f5: 89 43 0c mov %eax,0xc(%ebx) + 179f8: 8b 45 08 mov 0x8(%ebp),%eax + 179fb: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 179ff: 75 0c jne 17a0d <_usb_parse_configuration+0x89> + 17a01: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) + 17a08: e9 e0 01 00 00 jmp 17bed <_usb_parse_configuration+0x269> + 17a0d: 83 ec 04 sub $0x4,%esp + 17a10: 8b 45 08 mov 0x8(%ebp),%eax + 17a13: b9 00 00 00 00 mov $0x0,%ecx + 17a18: 8a 48 04 mov 0x4(%eax),%cl + 17a1b: 89 c8 mov %ecx,%eax + 17a1d: c1 e0 02 shl $0x2,%eax + 17a20: 01 c8 add %ecx,%eax + 17a22: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17a29: 01 d0 add %edx,%eax + 17a2b: 01 c0 add %eax,%eax + 17a2d: 01 c8 add %ecx,%eax + 17a2f: c1 e0 02 shl $0x2,%eax + 17a32: 50 push %eax + 17a33: 6a 00 push $0x0 + 17a35: 8b 45 08 mov 0x8(%ebp),%eax + 17a38: ff 70 0c pushl 0xc(%eax) + 17a3b: e8 10 20 00 00 call 19a50 <_memset> + 17a40: 83 c4 10 add $0x10,%esp + 17a43: 8b 45 08 mov 0x8(%ebp),%eax + 17a46: ba 00 00 00 00 mov $0x0,%edx + 17a4b: 8a 10 mov (%eax),%dl + 17a4d: 8d 45 0c lea 0xc(%ebp),%eax + 17a50: 01 10 add %edx,(%eax) + 17a52: 8b 45 08 mov 0x8(%ebp),%eax + 17a55: ba 00 00 00 00 mov $0x0,%edx + 17a5a: 8a 10 mov (%eax),%dl + 17a5c: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 17a5f: 29 10 sub %edx,(%eax) + 17a61: 8b 45 08 mov 0x8(%ebp),%eax + 17a64: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 17a6b: 8b 45 08 mov 0x8(%ebp),%eax + 17a6e: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 17a75: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 17a7c: 8b 45 08 mov 0x8(%ebp),%eax + 17a7f: 8a 40 04 mov 0x4(%eax),%al + 17a82: 25 ff 00 00 00 and $0xff,%eax + 17a87: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 17a8a: 0f 8e 57 01 00 00 jle 17be7 <_usb_parse_configuration+0x263> + 17a90: 8b 45 0c mov 0xc(%ebp),%eax + 17a93: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 17a96: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 17a9d: 83 7d f0 01 cmpl $0x1,0xfffffff0(%ebp) + 17aa1: 76 74 jbe 17b17 <_usb_parse_configuration+0x193> + 17aa3: 8b 45 0c mov 0xc(%ebp),%eax + 17aa6: 89 45 ec mov %eax,0xffffffec(%ebp) + 17aa9: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17aac: 8a 00 mov (%eax),%al + 17aae: 25 ff 00 00 00 and $0xff,%eax + 17ab3: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 17ab6: 7f 0a jg 17ac2 <_usb_parse_configuration+0x13e> + 17ab8: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17abb: 80 38 01 cmpb $0x1,(%eax) + 17abe: 76 02 jbe 17ac2 <_usb_parse_configuration+0x13e> + 17ac0: eb 0c jmp 17ace <_usb_parse_configuration+0x14a> + 17ac2: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) + 17ac9: e9 1f 01 00 00 jmp 17bed <_usb_parse_configuration+0x269> + 17ace: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17ad1: 80 78 01 05 cmpb $0x5,0x1(%eax) + 17ad5: 74 40 je 17b17 <_usb_parse_configuration+0x193> + 17ad7: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17ada: 80 78 01 04 cmpb $0x4,0x1(%eax) + 17ade: 74 37 je 17b17 <_usb_parse_configuration+0x193> + 17ae0: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17ae3: 80 78 01 02 cmpb $0x2,0x1(%eax) + 17ae7: 74 2e je 17b17 <_usb_parse_configuration+0x193> + 17ae9: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17aec: 80 78 01 01 cmpb $0x1,0x1(%eax) + 17af0: 74 25 je 17b17 <_usb_parse_configuration+0x193> + 17af2: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 17af5: ff 00 incl (%eax) + 17af7: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17afa: ba 00 00 00 00 mov $0x0,%edx + 17aff: 8a 10 mov (%eax),%dl + 17b01: 8d 45 0c lea 0xc(%ebp),%eax + 17b04: 01 10 add %edx,(%eax) + 17b06: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17b09: ba 00 00 00 00 mov $0x0,%edx + 17b0e: 8a 10 mov (%eax),%dl + 17b10: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 17b13: 29 10 sub %edx,(%eax) + 17b15: eb 86 jmp 17a9d <_usb_parse_configuration+0x119> + 17b17: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17b1a: 8b 55 0c mov 0xc(%ebp),%edx + 17b1d: 29 c2 sub %eax,%edx + 17b1f: 89 d0 mov %edx,%eax + 17b21: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17b24: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 17b28: 74 60 je 17b8a <_usb_parse_configuration+0x206> + 17b2a: 8b 45 08 mov 0x8(%ebp),%eax + 17b2d: 83 78 14 00 cmpl $0x0,0x14(%eax) + 17b31: 74 02 je 17b35 <_usb_parse_configuration+0x1b1> + 17b33: eb 55 jmp 17b8a <_usb_parse_configuration+0x206> + 17b35: 8b 5d 08 mov 0x8(%ebp),%ebx + 17b38: 83 ec 08 sub $0x8,%esp + 17b3b: ff 75 e4 pushl 0xffffffe4(%ebp) + 17b3e: 6a 01 push $0x1 + 17b40: e8 eb 1e 00 00 call 19a30 <_ExAllocatePool@8> + 17b45: 83 c4 08 add $0x8,%esp + 17b48: 89 43 10 mov %eax,0x10(%ebx) + 17b4b: 8b 45 08 mov 0x8(%ebp),%eax + 17b4e: 83 78 10 00 cmpl $0x0,0x10(%eax) + 17b52: 75 16 jne 17b6a <_usb_parse_configuration+0x1e6> + 17b54: 8b 45 08 mov 0x8(%ebp),%eax + 17b57: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 17b5e: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) + 17b65: e9 83 00 00 00 jmp 17bed <_usb_parse_configuration+0x269> + 17b6a: 83 ec 04 sub $0x4,%esp + 17b6d: ff 75 e4 pushl 0xffffffe4(%ebp) + 17b70: ff 75 e0 pushl 0xffffffe0(%ebp) + 17b73: 8b 45 08 mov 0x8(%ebp),%eax + 17b76: ff 70 10 pushl 0x10(%eax) + 17b79: e8 f2 1e 00 00 call 19a70 <_memcpy> + 17b7e: 83 c4 10 add $0x10,%esp + 17b81: 8b 55 08 mov 0x8(%ebp),%edx + 17b84: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17b87: 89 42 14 mov %eax,0x14(%edx) + 17b8a: 83 ec 04 sub $0x4,%esp + 17b8d: ff 75 f0 pushl 0xfffffff0(%ebp) + 17b90: ff 75 0c pushl 0xc(%ebp) + 17b93: 8b 5d 08 mov 0x8(%ebp),%ebx + 17b96: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 17b99: 89 c8 mov %ecx,%eax + 17b9b: c1 e0 02 shl $0x2,%eax + 17b9e: 01 c8 add %ecx,%eax + 17ba0: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17ba7: 01 d0 add %edx,%eax + 17ba9: 01 c0 add %eax,%eax + 17bab: 01 c8 add %ecx,%eax + 17bad: c1 e0 02 shl $0x2,%eax + 17bb0: 03 43 0c add 0xc(%ebx),%eax + 17bb3: 50 push %eax + 17bb4: e8 ca f9 ff ff call 17583 <_usb_parse_interface> + 17bb9: 83 c4 10 add $0x10,%esp + 17bbc: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 17bbf: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 17bc3: 79 08 jns 17bcd <_usb_parse_configuration+0x249> + 17bc5: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 17bc8: 89 45 dc mov %eax,0xffffffdc(%ebp) + 17bcb: eb 20 jmp 17bed <_usb_parse_configuration+0x269> + 17bcd: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 17bd0: 8d 45 0c lea 0xc(%ebp),%eax + 17bd3: 01 10 add %edx,(%eax) + 17bd5: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 17bd8: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 17bdb: 29 10 sub %edx,(%eax) + 17bdd: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 17be0: ff 00 incl (%eax) + 17be2: e9 95 fe ff ff jmp 17a7c <_usb_parse_configuration+0xf8> + 17be7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 17bea: 89 45 dc mov %eax,0xffffffdc(%ebp) + 17bed: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 17bf0: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 17bf3: c9 leave + 17bf4: c3 ret + +00017bf5 <_usb_destroy_configuration>: + 17bf5: 55 push %ebp + 17bf6: 89 e5 mov %esp,%ebp + 17bf8: 53 push %ebx + 17bf9: 83 ec 24 sub $0x24,%esp + 17bfc: 8b 45 08 mov 0x8(%ebp),%eax + 17bff: 83 b8 84 01 00 00 00 cmpl $0x0,0x184(%eax) + 17c06: 75 05 jne 17c0d <_usb_destroy_configuration+0x18> + 17c08: e9 06 02 00 00 jmp 17e13 <_usb_destroy_configuration+0x21e> + 17c0d: 8b 45 08 mov 0x8(%ebp),%eax + 17c10: 83 b8 8c 01 00 00 00 cmpl $0x0,0x18c(%eax) + 17c17: 74 56 je 17c6f <_usb_destroy_configuration+0x7a> + 17c19: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 17c20: 8b 45 08 mov 0x8(%ebp),%eax + 17c23: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 17c29: 25 ff 00 00 00 and $0xff,%eax + 17c2e: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 17c31: 7e 28 jle 17c5b <_usb_destroy_configuration+0x66> + 17c33: 83 ec 0c sub $0xc,%esp + 17c36: 8b 4d 08 mov 0x8(%ebp),%ecx + 17c39: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 17c3c: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17c43: 8b 81 8c 01 00 00 mov 0x18c(%ecx),%eax + 17c49: ff 34 02 pushl (%edx,%eax,1) + 17c4c: e8 ef 1d 00 00 call 19a40 <_ExFreePool@4> + 17c51: 83 c4 0c add $0xc,%esp + 17c54: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 17c57: ff 00 incl (%eax) + 17c59: eb c5 jmp 17c20 <_usb_destroy_configuration+0x2b> + 17c5b: 83 ec 0c sub $0xc,%esp + 17c5e: 8b 45 08 mov 0x8(%ebp),%eax + 17c61: ff b0 8c 01 00 00 pushl 0x18c(%eax) + 17c67: e8 d4 1d 00 00 call 19a40 <_ExFreePool@4> + 17c6c: 83 c4 0c add $0xc,%esp + 17c6f: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 17c76: 8b 45 08 mov 0x8(%ebp),%eax + 17c79: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 17c7f: 25 ff 00 00 00 and $0xff,%eax + 17c84: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 17c87: 0f 8e 72 01 00 00 jle 17dff <_usb_destroy_configuration+0x20a> + 17c8d: 8b 4d 08 mov 0x8(%ebp),%ecx + 17c90: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 17c93: 89 d0 mov %edx,%eax + 17c95: 01 c0 add %eax,%eax + 17c97: 01 d0 add %edx,%eax + 17c99: c1 e0 03 shl $0x3,%eax + 17c9c: 03 81 84 01 00 00 add 0x184(%ecx),%eax + 17ca2: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 17ca5: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17ca8: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 17cac: 75 05 jne 17cb3 <_usb_destroy_configuration+0xbe> + 17cae: e9 4c 01 00 00 jmp 17dff <_usb_destroy_configuration+0x20a> + 17cb3: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 17cba: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17cbd: 8a 40 04 mov 0x4(%eax),%al + 17cc0: 25 ff 00 00 00 and $0xff,%eax + 17cc5: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 17cc8: 0f 8e 16 01 00 00 jle 17de4 <_usb_destroy_configuration+0x1ef> + 17cce: 8b 5d e8 mov 0xffffffe8(%ebp),%ebx + 17cd1: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 17cd4: 89 c8 mov %ecx,%eax + 17cd6: c1 e0 02 shl $0x2,%eax + 17cd9: 01 c8 add %ecx,%eax + 17cdb: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17ce2: 01 d0 add %edx,%eax + 17ce4: 01 c0 add %eax,%eax + 17ce6: 01 c8 add %ecx,%eax + 17ce8: c1 e0 02 shl $0x2,%eax + 17ceb: 03 43 0c add 0xc(%ebx),%eax + 17cee: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17cf1: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17cf4: 83 38 00 cmpl $0x0,(%eax) + 17cf7: 75 05 jne 17cfe <_usb_destroy_configuration+0x109> + 17cf9: e9 e6 00 00 00 jmp 17de4 <_usb_destroy_configuration+0x1ef> + 17cfe: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 17d05: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 17d08: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 17d0b: 3b 42 08 cmp 0x8(%edx),%eax + 17d0e: 0f 83 b6 00 00 00 jae 17dca <_usb_destroy_configuration+0x1d5> + 17d14: 8b 4d e4 mov 0xffffffe4(%ebp),%ecx + 17d17: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 17d1a: 89 d0 mov %edx,%eax + 17d1c: 01 c0 add %eax,%eax + 17d1e: 01 d0 add %edx,%eax + 17d20: c1 e0 03 shl $0x3,%eax + 17d23: 03 01 add (%ecx),%eax + 17d25: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 17d28: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17d2b: 83 78 10 00 cmpl $0x0,0x10(%eax) + 17d2f: 74 11 je 17d42 <_usb_destroy_configuration+0x14d> + 17d31: 83 ec 0c sub $0xc,%esp + 17d34: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17d37: ff 70 10 pushl 0x10(%eax) + 17d3a: e8 01 1d 00 00 call 19a40 <_ExFreePool@4> + 17d3f: 83 c4 0c add $0xc,%esp + 17d42: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17d45: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 17d49: 75 02 jne 17d4d <_usb_destroy_configuration+0x158> + 17d4b: eb 7d jmp 17dca <_usb_destroy_configuration+0x1d5> + 17d4d: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 17d54: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17d57: 8a 40 04 mov 0x4(%eax),%al + 17d5a: 25 ff 00 00 00 and $0xff,%eax + 17d5f: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 17d62: 7e 4b jle 17daf <_usb_destroy_configuration+0x1ba> + 17d64: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx + 17d67: 8b 55 ec mov 0xffffffec(%ebp),%edx + 17d6a: 89 d0 mov %edx,%eax + 17d6c: c1 e0 02 shl $0x2,%eax + 17d6f: 01 d0 add %edx,%eax + 17d71: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17d78: 8b 41 0c mov 0xc(%ecx),%eax + 17d7b: 83 7c 02 0c 00 cmpl $0x0,0xc(%edx,%eax,1) + 17d80: 74 26 je 17da8 <_usb_destroy_configuration+0x1b3> + 17d82: 83 ec 0c sub $0xc,%esp + 17d85: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx + 17d88: 8b 55 ec mov 0xffffffec(%ebp),%edx + 17d8b: 89 d0 mov %edx,%eax + 17d8d: c1 e0 02 shl $0x2,%eax + 17d90: 01 d0 add %edx,%eax + 17d92: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17d99: 8b 41 0c mov 0xc(%ecx),%eax + 17d9c: ff 74 02 0c pushl 0xc(%edx,%eax,1) + 17da0: e8 9b 1c 00 00 call 19a40 <_ExFreePool@4> + 17da5: 83 c4 0c add $0xc,%esp + 17da8: 8d 45 ec lea 0xffffffec(%ebp),%eax + 17dab: ff 00 incl (%eax) + 17dad: eb a5 jmp 17d54 <_usb_destroy_configuration+0x15f> + 17daf: 83 ec 0c sub $0xc,%esp + 17db2: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17db5: ff 70 0c pushl 0xc(%eax) + 17db8: e8 83 1c 00 00 call 19a40 <_ExFreePool@4> + 17dbd: 83 c4 0c add $0xc,%esp + 17dc0: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 17dc3: ff 00 incl (%eax) + 17dc5: e9 3b ff ff ff jmp 17d05 <_usb_destroy_configuration+0x110> + 17dca: 83 ec 0c sub $0xc,%esp + 17dcd: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17dd0: ff 30 pushl (%eax) + 17dd2: e8 69 1c 00 00 call 19a40 <_ExFreePool@4> + 17dd7: 83 c4 0c add $0xc,%esp + 17dda: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 17ddd: ff 00 incl (%eax) + 17ddf: e9 d6 fe ff ff jmp 17cba <_usb_destroy_configuration+0xc5> + 17de4: 83 ec 0c sub $0xc,%esp + 17de7: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17dea: ff 70 0c pushl 0xc(%eax) + 17ded: e8 4e 1c 00 00 call 19a40 <_ExFreePool@4> + 17df2: 83 c4 0c add $0xc,%esp + 17df5: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 17df8: ff 00 incl (%eax) + 17dfa: e9 77 fe ff ff jmp 17c76 <_usb_destroy_configuration+0x81> + 17dff: 83 ec 0c sub $0xc,%esp + 17e02: 8b 45 08 mov 0x8(%ebp),%eax + 17e05: ff b0 84 01 00 00 pushl 0x184(%eax) + 17e0b: e8 30 1c 00 00 call 19a40 <_ExFreePool@4> + 17e10: 83 c4 0c add $0xc,%esp + 17e13: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 17e16: c9 leave + 17e17: c3 ret + +00017e18 <_usb_get_configuration>: + 17e18: 55 push %ebp + 17e19: 89 e5 mov %esp,%ebp + 17e1b: 53 push %ebx + 17e1c: 83 ec 24 sub $0x24,%esp + 17e1f: 8b 45 08 mov 0x8(%ebp),%eax + 17e22: 80 b8 81 01 00 00 08 cmpb $0x8,0x181(%eax) + 17e29: 76 0c jbe 17e37 <_usb_get_configuration+0x1f> + 17e2b: c7 45 e0 ea ff ff ff movl $0xffffffea,0xffffffe0(%ebp) + 17e32: e9 78 02 00 00 jmp 180af <_usb_get_configuration+0x297> + 17e37: 8b 45 08 mov 0x8(%ebp),%eax + 17e3a: 80 b8 81 01 00 00 00 cmpb $0x0,0x181(%eax) + 17e41: 75 0c jne 17e4f <_usb_get_configuration+0x37> + 17e43: c7 45 e0 ea ff ff ff movl $0xffffffea,0xffffffe0(%ebp) + 17e4a: e9 60 02 00 00 jmp 180af <_usb_get_configuration+0x297> + 17e4f: 8b 5d 08 mov 0x8(%ebp),%ebx + 17e52: 83 ec 08 sub $0x8,%esp + 17e55: 8b 45 08 mov 0x8(%ebp),%eax + 17e58: ba 00 00 00 00 mov $0x0,%edx + 17e5d: 8a 90 81 01 00 00 mov 0x181(%eax),%dl + 17e63: 89 d0 mov %edx,%eax + 17e65: 01 c0 add %eax,%eax + 17e67: 01 d0 add %edx,%eax + 17e69: c1 e0 03 shl $0x3,%eax + 17e6c: 50 push %eax + 17e6d: 6a 01 push $0x1 + 17e6f: e8 bc 1b 00 00 call 19a30 <_ExAllocatePool@8> + 17e74: 83 c4 08 add $0x8,%esp + 17e77: 89 83 84 01 00 00 mov %eax,0x184(%ebx) + 17e7d: 8b 45 08 mov 0x8(%ebp),%eax + 17e80: 83 b8 84 01 00 00 00 cmpl $0x0,0x184(%eax) + 17e87: 75 0c jne 17e95 <_usb_get_configuration+0x7d> + 17e89: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 17e90: e9 1a 02 00 00 jmp 180af <_usb_get_configuration+0x297> + 17e95: 83 ec 04 sub $0x4,%esp + 17e98: 8b 45 08 mov 0x8(%ebp),%eax + 17e9b: ba 00 00 00 00 mov $0x0,%edx + 17ea0: 8a 90 81 01 00 00 mov 0x181(%eax),%dl + 17ea6: 89 d0 mov %edx,%eax + 17ea8: 01 c0 add %eax,%eax + 17eaa: 01 d0 add %edx,%eax + 17eac: c1 e0 03 shl $0x3,%eax + 17eaf: 50 push %eax + 17eb0: 6a 00 push $0x0 + 17eb2: 8b 45 08 mov 0x8(%ebp),%eax + 17eb5: ff b0 84 01 00 00 pushl 0x184(%eax) + 17ebb: e8 90 1b 00 00 call 19a50 <_memset> + 17ec0: 83 c4 10 add $0x10,%esp + 17ec3: 8b 5d 08 mov 0x8(%ebp),%ebx + 17ec6: 83 ec 08 sub $0x8,%esp + 17ec9: 8b 45 08 mov 0x8(%ebp),%eax + 17ecc: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 17ed2: 25 ff 00 00 00 and $0xff,%eax + 17ed7: c1 e0 02 shl $0x2,%eax + 17eda: 50 push %eax + 17edb: 6a 01 push $0x1 + 17edd: e8 4e 1b 00 00 call 19a30 <_ExAllocatePool@8> + 17ee2: 83 c4 08 add $0x8,%esp + 17ee5: 89 83 8c 01 00 00 mov %eax,0x18c(%ebx) + 17eeb: 8b 45 08 mov 0x8(%ebp),%eax + 17eee: 83 b8 8c 01 00 00 00 cmpl $0x0,0x18c(%eax) + 17ef5: 75 0c jne 17f03 <_usb_get_configuration+0xeb> + 17ef7: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 17efe: e9 ac 01 00 00 jmp 180af <_usb_get_configuration+0x297> + 17f03: 83 ec 08 sub $0x8,%esp + 17f06: 6a 08 push $0x8 + 17f08: 6a 01 push $0x1 + 17f0a: e8 21 1b 00 00 call 19a30 <_ExAllocatePool@8> + 17f0f: 83 c4 08 add $0x8,%esp + 17f12: 89 45 ec mov %eax,0xffffffec(%ebp) + 17f15: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 17f19: 75 0c jne 17f27 <_usb_get_configuration+0x10f> + 17f1b: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 17f22: e9 88 01 00 00 jmp 180af <_usb_get_configuration+0x297> + 17f27: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17f2a: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17f2d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 17f34: 8b 45 08 mov 0x8(%ebp),%eax + 17f37: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 17f3d: 25 ff 00 00 00 and $0xff,%eax + 17f42: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 17f45: 0f 86 2d 01 00 00 jbe 18078 <_usb_get_configuration+0x260> + 17f4b: 83 ec 0c sub $0xc,%esp + 17f4e: 6a 08 push $0x8 + 17f50: ff 75 ec pushl 0xffffffec(%ebp) + 17f53: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 17f56: 25 ff 00 00 00 and $0xff,%eax + 17f5b: 50 push %eax + 17f5c: 6a 02 push $0x2 + 17f5e: ff 75 08 pushl 0x8(%ebp) + 17f61: e8 f6 93 ff ff call 1135c <_usb_get_descriptor> + 17f66: 83 c4 20 add $0x20,%esp + 17f69: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17f6c: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) + 17f70: 7f 17 jg 17f89 <_usb_get_configuration+0x171> + 17f72: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 17f76: 79 05 jns 17f7d <_usb_get_configuration+0x165> + 17f78: e9 12 01 00 00 jmp 1808f <_usb_get_configuration+0x277> + 17f7d: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 17f84: e9 06 01 00 00 jmp 1808f <_usb_get_configuration+0x277> + 17f89: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17f8c: 66 8b 40 02 mov 0x2(%eax),%ax + 17f90: 25 ff ff 00 00 and $0xffff,%eax + 17f95: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 17f98: 83 ec 08 sub $0x8,%esp + 17f9b: ff 75 f0 pushl 0xfffffff0(%ebp) + 17f9e: 6a 01 push $0x1 + 17fa0: e8 8b 1a 00 00 call 19a30 <_ExAllocatePool@8> + 17fa5: 83 c4 08 add $0x8,%esp + 17fa8: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 17fab: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 17faf: 75 0c jne 17fbd <_usb_get_configuration+0x1a5> + 17fb1: c7 45 f8 f4 ff ff ff movl $0xfffffff4,0xfffffff8(%ebp) + 17fb8: e9 d2 00 00 00 jmp 1808f <_usb_get_configuration+0x277> + 17fbd: 83 ec 0c sub $0xc,%esp + 17fc0: ff 75 f0 pushl 0xfffffff0(%ebp) + 17fc3: ff 75 e8 pushl 0xffffffe8(%ebp) + 17fc6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 17fc9: 25 ff 00 00 00 and $0xff,%eax + 17fce: 50 push %eax + 17fcf: 6a 02 push $0x2 + 17fd1: ff 75 08 pushl 0x8(%ebp) + 17fd4: e8 83 93 ff ff call 1135c <_usb_get_descriptor> + 17fd9: 83 c4 20 add $0x20,%esp + 17fdc: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17fdf: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 17fe3: 79 13 jns 17ff8 <_usb_get_configuration+0x1e0> + 17fe5: 83 ec 0c sub $0xc,%esp + 17fe8: ff 75 e8 pushl 0xffffffe8(%ebp) + 17feb: e8 50 1a 00 00 call 19a40 <_ExFreePool@4> + 17ff0: 83 c4 0c add $0xc,%esp + 17ff3: e9 97 00 00 00 jmp 1808f <_usb_get_configuration+0x277> + 17ff8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17ffb: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 17ffe: 73 17 jae 18017 <_usb_get_configuration+0x1ff> + 18000: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 18007: 83 ec 0c sub $0xc,%esp + 1800a: ff 75 e8 pushl 0xffffffe8(%ebp) + 1800d: e8 2e 1a 00 00 call 19a40 <_ExFreePool@4> + 18012: 83 c4 0c add $0xc,%esp + 18015: eb 78 jmp 1808f <_usb_get_configuration+0x277> + 18017: 8b 55 08 mov 0x8(%ebp),%edx + 1801a: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1801d: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 18024: 8b 92 8c 01 00 00 mov 0x18c(%edx),%edx + 1802a: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1802d: 89 04 11 mov %eax,(%ecx,%edx,1) + 18030: 83 ec 08 sub $0x8,%esp + 18033: ff 75 e8 pushl 0xffffffe8(%ebp) + 18036: 8b 4d 08 mov 0x8(%ebp),%ecx + 18039: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 1803c: 89 d0 mov %edx,%eax + 1803e: 01 c0 add %eax,%eax + 18040: 01 d0 add %edx,%eax + 18042: c1 e0 03 shl $0x3,%eax + 18045: 03 81 84 01 00 00 add 0x184(%ecx),%eax + 1804b: 50 push %eax + 1804c: e8 33 f9 ff ff call 17984 <_usb_parse_configuration> + 18051: 83 c4 10 add $0x10,%esp + 18054: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 18057: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 1805b: 7e 02 jle 1805f <_usb_get_configuration+0x247> + 1805d: eb 0f jmp 1806e <_usb_get_configuration+0x256> + 1805f: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 18063: 79 09 jns 1806e <_usb_get_configuration+0x256> + 18065: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 1806c: eb 21 jmp 1808f <_usb_get_configuration+0x277> + 1806e: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 18071: ff 00 incl (%eax) + 18073: e9 bc fe ff ff jmp 17f34 <_usb_get_configuration+0x11c> + 18078: 83 ec 0c sub $0xc,%esp + 1807b: ff 75 ec pushl 0xffffffec(%ebp) + 1807e: e8 bd 19 00 00 call 19a40 <_ExFreePool@4> + 18083: 83 c4 0c add $0xc,%esp + 18086: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) + 1808d: eb 20 jmp 180af <_usb_get_configuration+0x297> + 1808f: 83 ec 0c sub $0xc,%esp + 18092: ff 75 ec pushl 0xffffffec(%ebp) + 18095: e8 a6 19 00 00 call 19a40 <_ExFreePool@4> + 1809a: 83 c4 0c add $0xc,%esp + 1809d: 8b 45 08 mov 0x8(%ebp),%eax + 180a0: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 180a3: 88 90 81 01 00 00 mov %dl,0x181(%eax) + 180a9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 180ac: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 180af: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 180b2: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 180b5: c9 leave + 180b6: c3 ret + 180b7: 90 nop + 180b8: 90 nop + 180b9: 90 nop + 180ba: 90 nop + 180bb: 90 nop + 180bc: 90 nop + 180bd: 90 nop + 180be: 90 nop + 180bf: 90 nop + +000180c0 <_usb_init_urb@4>: + 180c0: 55 push %ebp + 180c1: 89 e5 mov %esp,%ebp + 180c3: 83 ec 08 sub $0x8,%esp + 180c6: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 180ca: 74 1c je 180e8 <_usb_init_urb@4+0x28> + 180cc: 83 ec 04 sub $0x4,%esp + 180cf: 6a 5c push $0x5c + 180d1: 6a 00 push $0x0 + 180d3: ff 75 08 pushl 0x8(%ebp) + 180d6: e8 75 19 00 00 call 19a50 <_memset> + 180db: 83 c4 10 add $0x10,%esp + 180de: 8b 45 08 mov 0x8(%ebp),%eax + 180e1: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) + 180e8: c9 leave + 180e9: c2 04 00 ret $0x4 + +000180ec <_usb_alloc_urb@8>: + 180ec: 55 push %ebp + 180ed: 89 e5 mov %esp,%ebp + 180ef: 83 ec 08 sub $0x8,%esp + 180f2: 83 ec 08 sub $0x8,%esp + 180f5: 8b 45 08 mov 0x8(%ebp),%eax + 180f8: c1 e0 04 shl $0x4,%eax + 180fb: 83 c0 5c add $0x5c,%eax + 180fe: 50 push %eax + 180ff: 6a 01 push $0x1 + 18101: e8 2a 19 00 00 call 19a30 <_ExAllocatePool@8> + 18106: 83 c4 08 add $0x8,%esp + 18109: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1810c: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 18110: 75 09 jne 1811b <_usb_alloc_urb@8+0x2f> + 18112: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 18119: eb 14 jmp 1812f <_usb_alloc_urb@8+0x43> + 1811b: 83 ec 0c sub $0xc,%esp + 1811e: ff 75 fc pushl 0xfffffffc(%ebp) + 18121: e8 9a ff ff ff call 180c0 <_usb_init_urb@4> + 18126: 83 c4 0c add $0xc,%esp + 18129: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1812c: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1812f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 18132: c9 leave + 18133: c2 08 00 ret $0x8 + +00018136 <_usb_free_urb@4>: + 18136: 55 push %ebp + 18137: 89 e5 mov %esp,%ebp + 18139: 83 ec 08 sub $0x8,%esp + 1813c: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 18140: 74 2a je 1816c <_usb_free_urb@4+0x36> + 18142: 8b 55 08 mov 0x8(%ebp),%edx + 18145: 83 c2 04 add $0x4,%edx + 18148: 8b 45 08 mov 0x8(%ebp),%eax + 1814b: 83 c0 04 add $0x4,%eax + 1814e: 8b 00 mov (%eax),%eax + 18150: 48 dec %eax + 18151: 89 02 mov %eax,(%edx) + 18153: 8b 45 08 mov 0x8(%ebp),%eax + 18156: 83 c0 04 add $0x4,%eax + 18159: 83 38 00 cmpl $0x0,(%eax) + 1815c: 75 0e jne 1816c <_usb_free_urb@4+0x36> + 1815e: 83 ec 0c sub $0xc,%esp + 18161: ff 75 08 pushl 0x8(%ebp) + 18164: e8 d7 18 00 00 call 19a40 <_ExFreePool@4> + 18169: 83 c4 0c add $0xc,%esp + 1816c: c9 leave + 1816d: c2 04 00 ret $0x4 + +00018170 <_usb_get_urb@4>: + 18170: 55 push %ebp + 18171: 89 e5 mov %esp,%ebp + 18173: 83 ec 04 sub $0x4,%esp + 18176: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 1817a: 74 19 je 18195 <_usb_get_urb@4+0x25> + 1817c: 8b 55 08 mov 0x8(%ebp),%edx + 1817f: 83 c2 04 add $0x4,%edx + 18182: 8b 45 08 mov 0x8(%ebp),%eax + 18185: 83 c0 04 add $0x4,%eax + 18188: 8b 00 mov (%eax),%eax + 1818a: 40 inc %eax + 1818b: 89 02 mov %eax,(%edx) + 1818d: 8b 45 08 mov 0x8(%ebp),%eax + 18190: 89 45 fc mov %eax,0xfffffffc(%ebp) + 18193: eb 07 jmp 1819c <_usb_get_urb@4+0x2c> + 18195: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1819c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1819f: c9 leave + 181a0: c2 04 00 ret $0x4 + +000181a3 <_usb_submit_urb@8>: + 181a3: 55 push %ebp + 181a4: 89 e5 mov %esp,%ebp + 181a6: 53 push %ebx + 181a7: 83 ec 34 sub $0x34,%esp + 181aa: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 181ae: 74 12 je 181c2 <_usb_submit_urb@8+0x1f> + 181b0: 8b 45 08 mov 0x8(%ebp),%eax + 181b3: 83 78 08 00 cmpl $0x0,0x8(%eax) + 181b7: 75 09 jne 181c2 <_usb_submit_urb@8+0x1f> + 181b9: 8b 45 08 mov 0x8(%ebp),%eax + 181bc: 83 78 58 00 cmpl $0x0,0x58(%eax) + 181c0: 75 0c jne 181ce <_usb_submit_urb@8+0x2b> + 181c2: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 181c9: e9 e2 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 181ce: 8b 45 08 mov 0x8(%ebp),%eax + 181d1: 8b 40 14 mov 0x14(%eax),%eax + 181d4: 89 45 ec mov %eax,0xffffffec(%ebp) + 181d7: 85 c0 test %eax,%eax + 181d9: 74 1f je 181fa <_usb_submit_urb@8+0x57> + 181db: 8b 45 ec mov 0xffffffec(%ebp),%eax + 181de: 83 78 14 02 cmpl $0x2,0x14(%eax) + 181e2: 76 16 jbe 181fa <_usb_submit_urb@8+0x57> + 181e4: 8b 45 ec mov 0xffffffec(%ebp),%eax + 181e7: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 181ee: 74 0a je 181fa <_usb_submit_urb@8+0x57> + 181f0: 8b 45 ec mov 0xffffffec(%ebp),%eax + 181f3: 83 38 00 cmpl $0x0,(%eax) + 181f6: 7e 02 jle 181fa <_usb_submit_urb@8+0x57> + 181f8: eb 0c jmp 18206 <_usb_submit_urb@8+0x63> + 181fa: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 18201: e9 aa 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 18206: 8b 45 ec mov 0xffffffec(%ebp),%eax + 18209: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1820f: 8b 40 20 mov 0x20(%eax),%eax + 18212: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 18215: 85 c0 test %eax,%eax + 18217: 74 09 je 18222 <_usb_submit_urb@8+0x7f> + 18219: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1821c: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 18220: 75 0c jne 1822e <_usb_submit_urb@8+0x8b> + 18222: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 18229: e9 82 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 1822e: 8b 45 08 mov 0x8(%ebp),%eax + 18231: c7 40 1c 8d ff ff ff movl $0xffffff8d,0x1c(%eax) + 18238: 8b 45 08 mov 0x8(%ebp),%eax + 1823b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) + 18242: 8b 45 08 mov 0x8(%ebp),%eax + 18245: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) + 1824c: 8b 45 08 mov 0x8(%ebp),%eax + 1824f: 8b 40 18 mov 0x18(%eax),%eax + 18252: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 18255: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 18258: c1 f8 1e sar $0x1e,%eax + 1825b: 83 e0 03 and $0x3,%eax + 1825e: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 18261: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 18264: c1 e8 07 shr $0x7,%eax + 18267: 83 f0 01 xor $0x1,%eax + 1826a: 83 e0 01 and $0x1,%eax + 1826d: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 18270: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 18273: c1 f8 1e sar $0x1e,%eax + 18276: 83 e0 03 and $0x3,%eax + 18279: 83 f8 02 cmp $0x2,%eax + 1827c: 74 15 je 18293 <_usb_submit_urb@8+0xf0> + 1827e: 8b 45 ec mov 0xffffffec(%ebp),%eax + 18281: 83 78 14 04 cmpl $0x4,0x14(%eax) + 18285: 77 0c ja 18293 <_usb_submit_urb@8+0xf0> + 18287: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 1828e: e9 1d 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 18293: 8b 55 ec mov 0xffffffec(%ebp),%edx + 18296: 8b 5d e4 mov 0xffffffe4(%ebp),%ebx + 18299: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1829c: c1 f8 0f sar $0xf,%eax + 1829f: 89 c1 mov %eax,%ecx + 182a1: 83 e1 0f and $0xf,%ecx + 182a4: b8 01 00 00 00 mov $0x1,%eax + 182a9: d3 e0 shl %cl,%eax + 182ab: 23 44 9a 30 and 0x30(%edx,%ebx,4),%eax + 182af: 85 c0 test %eax,%eax + 182b1: 74 0c je 182bf <_usb_submit_urb@8+0x11c> + 182b3: c7 45 d4 e0 ff ff ff movl $0xffffffe0,0xffffffd4(%ebp) + 182ba: e9 f1 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 182bf: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 182c3: 74 15 je 182da <_usb_submit_urb@8+0x137> + 182c5: 8b 55 ec mov 0xffffffec(%ebp),%edx + 182c8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 182cb: c1 f8 0f sar $0xf,%eax + 182ce: 83 e0 0f and $0xf,%eax + 182d1: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax + 182d5: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 182d8: eb 13 jmp 182ed <_usb_submit_urb@8+0x14a> + 182da: 8b 55 ec mov 0xffffffec(%ebp),%edx + 182dd: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 182e0: c1 f8 0f sar $0xf,%eax + 182e3: 83 e0 0f and $0xf,%eax + 182e6: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax + 182ea: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 182ed: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 182f0: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 182f3: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 182f7: 7f 0c jg 18305 <_usb_submit_urb@8+0x162> + 182f9: c7 45 d4 a6 ff ff ff movl $0xffffffa6,0xffffffd4(%ebp) + 18300: e9 ab 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 18305: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 18309: 0f 85 ae 00 00 00 jne 183bd <_usb_submit_urb@8+0x21a> + 1830f: 8b 45 ec mov 0xffffffec(%ebp),%eax + 18312: 83 78 18 03 cmpl $0x3,0x18(%eax) + 18316: 75 20 jne 18338 <_usb_submit_urb@8+0x195> + 18318: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1831b: c1 f8 0b sar $0xb,%eax + 1831e: 83 e0 03 and $0x3,%eax + 18321: 40 inc %eax + 18322: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 18325: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 18328: 81 20 ff 03 00 00 andl $0x3ff,(%eax) + 1832e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 18331: 0f af 45 d8 imul 0xffffffd8(%ebp),%eax + 18335: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 18338: 8b 45 08 mov 0x8(%ebp),%eax + 1833b: 83 78 44 00 cmpl $0x0,0x44(%eax) + 1833f: 7f 0c jg 1834d <_usb_submit_urb@8+0x1aa> + 18341: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 18348: e9 63 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 1834d: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) + 18354: 8b 45 08 mov 0x8(%ebp),%eax + 18357: 8b 40 44 mov 0x44(%eax),%eax + 1835a: 3b 45 e0 cmp 0xffffffe0(%ebp),%eax + 1835d: 7e 5e jle 183bd <_usb_submit_urb@8+0x21a> + 1835f: 8b 55 08 mov 0x8(%ebp),%edx + 18362: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 18365: c1 e0 04 shl $0x4,%eax + 18368: 01 d0 add %edx,%eax + 1836a: 83 c0 60 add $0x60,%eax + 1836d: 8b 00 mov (%eax),%eax + 1836f: 89 45 dc mov %eax,0xffffffdc(%ebp) + 18372: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) + 18376: 78 0a js 18382 <_usb_submit_urb@8+0x1df> + 18378: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 1837b: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 1837e: 7f 02 jg 18382 <_usb_submit_urb@8+0x1df> + 18380: eb 0c jmp 1838e <_usb_submit_urb@8+0x1eb> + 18382: c7 45 d4 a6 ff ff ff movl $0xffffffa6,0xffffffd4(%ebp) + 18389: e9 22 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 1838e: 8b 55 08 mov 0x8(%ebp),%edx + 18391: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 18394: c1 e0 04 shl $0x4,%eax + 18397: 01 d0 add %edx,%eax + 18399: 83 c0 68 add $0x68,%eax + 1839c: c7 00 ee ff ff ff movl $0xffffffee,(%eax) + 183a2: 8b 55 08 mov 0x8(%ebp),%edx + 183a5: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 183a8: c1 e0 04 shl $0x4,%eax + 183ab: 01 d0 add %edx,%eax + 183ad: 83 c0 64 add $0x64,%eax + 183b0: c7 00 00 00 00 00 movl $0x0,(%eax) + 183b6: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 183b9: ff 00 incl (%eax) + 183bb: eb 97 jmp 18354 <_usb_submit_urb@8+0x1b1> + 183bd: 8b 45 08 mov 0x8(%ebp),%eax + 183c0: 83 78 2c 00 cmpl $0x0,0x2c(%eax) + 183c4: 79 0c jns 183d2 <_usb_submit_urb@8+0x22f> + 183c6: c7 45 d4 a6 ff ff ff movl $0xffffffa6,0xffffffd4(%ebp) + 183cd: e9 de 00 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 183d2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 183d5: 83 c0 00 add $0x0,%eax + 183d8: 83 f8 01 cmp $0x1,%eax + 183db: 0f 87 b8 00 00 00 ja 18499 <_usb_submit_urb@8+0x2f6> + 183e1: 8b 45 08 mov 0x8(%ebp),%eax + 183e4: 83 78 48 00 cmpl $0x0,0x48(%eax) + 183e8: 7f 0c jg 183f6 <_usb_submit_urb@8+0x253> + 183ea: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 183f1: e9 ba 00 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 183f6: 8b 45 ec mov 0xffffffec(%ebp),%eax + 183f9: 8b 40 18 mov 0x18(%eax),%eax + 183fc: 89 45 cc mov %eax,0xffffffcc(%ebp) + 183ff: 83 7d cc 01 cmpl $0x1,0xffffffcc(%ebp) + 18403: 72 70 jb 18475 <_usb_submit_urb@8+0x2d2> + 18405: 83 7d cc 02 cmpl $0x2,0xffffffcc(%ebp) + 18409: 76 27 jbe 18432 <_usb_submit_urb@8+0x28f> + 1840b: 83 7d cc 03 cmpl $0x3,0xffffffcc(%ebp) + 1840f: 74 02 je 18413 <_usb_submit_urb@8+0x270> + 18411: eb 62 jmp 18475 <_usb_submit_urb@8+0x2d2> + 18413: 8b 45 08 mov 0x8(%ebp),%eax + 18416: 81 78 48 00 20 00 00 cmpl $0x2000,0x48(%eax) + 1841d: 7e 0a jle 18429 <_usb_submit_urb@8+0x286> + 1841f: 8b 45 08 mov 0x8(%ebp),%eax + 18422: c7 40 48 00 20 00 00 movl $0x2000,0x48(%eax) + 18429: c7 45 f4 00 20 00 00 movl $0x2000,0xfffffff4(%ebp) + 18430: eb 4c jmp 1847e <_usb_submit_urb@8+0x2db> + 18432: 83 7d f4 01 cmpl $0x1,0xfffffff4(%ebp) + 18436: 75 1e jne 18456 <_usb_submit_urb@8+0x2b3> + 18438: 8b 45 08 mov 0x8(%ebp),%eax + 1843b: 81 78 48 ff 00 00 00 cmpl $0xff,0x48(%eax) + 18442: 7e 09 jle 1844d <_usb_submit_urb@8+0x2aa> + 18444: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 1844b: eb 63 jmp 184b0 <_usb_submit_urb@8+0x30d> + 1844d: c7 45 f4 80 00 00 00 movl $0x80,0xfffffff4(%ebp) + 18454: eb 28 jmp 1847e <_usb_submit_urb@8+0x2db> + 18456: 8b 45 08 mov 0x8(%ebp),%eax + 18459: 81 78 48 00 04 00 00 cmpl $0x400,0x48(%eax) + 18460: 7e 0a jle 1846c <_usb_submit_urb@8+0x2c9> + 18462: 8b 45 08 mov 0x8(%ebp),%eax + 18465: c7 40 48 00 04 00 00 movl $0x400,0x48(%eax) + 1846c: c7 45 f4 00 04 00 00 movl $0x400,0xfffffff4(%ebp) + 18473: eb 09 jmp 1847e <_usb_submit_urb@8+0x2db> + 18475: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 1847c: eb 32 jmp 184b0 <_usb_submit_urb@8+0x30d> + 1847e: 8b 45 08 mov 0x8(%ebp),%eax + 18481: 8b 40 48 mov 0x48(%eax),%eax + 18484: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 18487: 7d 07 jge 18490 <_usb_submit_urb@8+0x2ed> + 18489: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 1848c: d1 38 sarl (%eax) + 1848e: eb ee jmp 1847e <_usb_submit_urb@8+0x2db> + 18490: 8b 55 08 mov 0x8(%ebp),%edx + 18493: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 18496: 89 42 48 mov %eax,0x48(%edx) + 18499: 83 ec 08 sub $0x8,%esp + 1849c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1849f: ff 75 0c pushl 0xc(%ebp) + 184a2: ff 75 08 pushl 0x8(%ebp) + 184a5: 8b 40 0c mov 0xc(%eax),%eax + 184a8: ff d0 call *%eax + 184aa: 83 c4 10 add $0x10,%esp + 184ad: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 184b0: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 184b3: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 184b6: c9 leave + 184b7: c2 08 00 ret $0x8 + +000184ba <_usb_unlink_urb@4>: + 184ba: 55 push %ebp + 184bb: 89 e5 mov %esp,%ebp + 184bd: 83 ec 08 sub $0x8,%esp + 184c0: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 184c4: 74 4c je 18512 <_usb_unlink_urb@4+0x58> + 184c6: 8b 45 08 mov 0x8(%ebp),%eax + 184c9: 83 78 14 00 cmpl $0x0,0x14(%eax) + 184cd: 74 43 je 18512 <_usb_unlink_urb@4+0x58> + 184cf: 8b 45 08 mov 0x8(%ebp),%eax + 184d2: 8b 40 14 mov 0x14(%eax),%eax + 184d5: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 184dc: 74 34 je 18512 <_usb_unlink_urb@4+0x58> + 184de: 8b 45 08 mov 0x8(%ebp),%eax + 184e1: 8b 40 14 mov 0x14(%eax),%eax + 184e4: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 184ea: 83 78 20 00 cmpl $0x0,0x20(%eax) + 184ee: 74 22 je 18512 <_usb_unlink_urb@4+0x58> + 184f0: 83 ec 0c sub $0xc,%esp + 184f3: 8b 45 08 mov 0x8(%ebp),%eax + 184f6: 8b 40 14 mov 0x14(%eax),%eax + 184f9: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 184ff: 8b 40 20 mov 0x20(%eax),%eax + 18502: ff 75 08 pushl 0x8(%ebp) + 18505: 8b 40 10 mov 0x10(%eax),%eax + 18508: ff d0 call *%eax + 1850a: 83 c4 10 add $0x10,%esp + 1850d: 89 45 fc mov %eax,0xfffffffc(%ebp) + 18510: eb 07 jmp 18519 <_usb_unlink_urb@4+0x5f> + 18512: c7 45 fc ed ff ff ff movl $0xffffffed,0xfffffffc(%ebp) + 18519: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1851c: c9 leave + 1851d: c2 04 00 ret $0x4 + +00018520 <_hcd_buffer_create>: + 18520: 55 push %ebp + 18521: 89 e5 mov %esp,%ebp + 18523: b8 00 00 00 00 mov $0x0,%eax + 18528: 5d pop %ebp + 18529: c3 ret + +0001852a <_hcd_buffer_destroy>: + 1852a: 55 push %ebp + 1852b: 89 e5 mov %esp,%ebp + 1852d: 5d pop %ebp + 1852e: c3 ret + +0001852f <_hcd_buffer_alloc>: + 1852f: 55 push %ebp + 18530: 89 e5 mov %esp,%ebp + 18532: 83 ec 08 sub $0x8,%esp + 18535: 83 ec 08 sub $0x8,%esp + 18538: ff 75 0c pushl 0xc(%ebp) + 1853b: 6a 01 push $0x1 + 1853d: e8 ee 14 00 00 call 19a30 <_ExAllocatePool@8> + 18542: 83 c4 08 add $0x8,%esp + 18545: c9 leave + 18546: c3 ret + +00018547 <_hcd_buffer_free>: + 18547: 55 push %ebp + 18548: 89 e5 mov %esp,%ebp + 1854a: 83 ec 08 sub $0x8,%esp + 1854d: 83 ec 0c sub $0xc,%esp + 18550: ff 75 10 pushl 0x10(%ebp) + 18553: e8 e8 14 00 00 call 19a40 <_ExFreePool@4> + 18558: 83 c4 0c add $0xc,%esp + 1855b: c9 leave + 1855c: c3 ret + 1855d: 90 nop + 1855e: 90 nop + 1855f: 90 nop + +00018560 <_usb_show_endpoint>: + 18560: 55 push %ebp + 18561: 89 e5 mov %esp,%ebp + 18563: 83 ec 08 sub $0x8,%esp + 18566: 83 ec 0c sub $0xc,%esp + 18569: ff 75 08 pushl 0x8(%ebp) + 1856c: e8 86 09 00 00 call 18ef7 <_usb_show_endpoint_descriptor> + 18571: 83 c4 10 add $0x10,%esp + 18574: c9 leave + 18575: c3 ret + +00018576 <_usb_show_interface>: + 18576: 55 push %ebp + 18577: 89 e5 mov %esp,%ebp + 18579: 83 ec 08 sub $0x8,%esp + 1857c: 83 ec 0c sub $0xc,%esp + 1857f: ff 75 08 pushl 0x8(%ebp) + 18582: e8 89 07 00 00 call 18d10 <_usb_show_interface_descriptor> + 18587: 83 c4 10 add $0x10,%esp + 1858a: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 18591: 8b 45 08 mov 0x8(%ebp),%eax + 18594: 8a 40 04 mov 0x4(%eax),%al + 18597: 25 ff 00 00 00 and $0xff,%eax + 1859c: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 1859f: 7e 26 jle 185c7 <_usb_show_interface+0x51> + 185a1: 83 ec 0c sub $0xc,%esp + 185a4: 8b 4d 08 mov 0x8(%ebp),%ecx + 185a7: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 185aa: 89 d0 mov %edx,%eax + 185ac: c1 e0 02 shl $0x2,%eax + 185af: 01 d0 add %edx,%eax + 185b1: c1 e0 02 shl $0x2,%eax + 185b4: 03 41 0c add 0xc(%ecx),%eax + 185b7: 50 push %eax + 185b8: e8 a3 ff ff ff call 18560 <_usb_show_endpoint> + 185bd: 83 c4 10 add $0x10,%esp + 185c0: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 185c3: ff 00 incl (%eax) + 185c5: eb ca jmp 18591 <_usb_show_interface+0x1b> + 185c7: c9 leave + 185c8: c3 ret + +000185c9 <_usb_show_config>: + 185c9: 55 push %ebp + 185ca: 89 e5 mov %esp,%ebp + 185cc: 53 push %ebx + 185cd: 83 ec 14 sub $0x14,%esp + 185d0: 83 ec 0c sub $0xc,%esp + 185d3: ff 75 08 pushl 0x8(%ebp) + 185d6: e8 45 05 00 00 call 18b20 <_usb_show_config_descriptor> + 185db: 83 c4 10 add $0x10,%esp + 185de: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 185e5: 8b 45 08 mov 0x8(%ebp),%eax + 185e8: 8a 40 04 mov 0x4(%eax),%al + 185eb: 25 ff 00 00 00 and $0xff,%eax + 185f0: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 185f3: 0f 8e 95 00 00 00 jle 1868e <_usb_show_config+0xc5> + 185f9: 8b 5d 08 mov 0x8(%ebp),%ebx + 185fc: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 185ff: 89 c8 mov %ecx,%eax + 18601: c1 e0 02 shl $0x2,%eax + 18604: 01 c8 add %ecx,%eax + 18606: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 1860d: 01 d0 add %edx,%eax + 1860f: 01 c0 add %eax,%eax + 18611: 01 c8 add %ecx,%eax + 18613: c1 e0 02 shl $0x2,%eax + 18616: 03 43 0c add 0xc(%ebx),%eax + 18619: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1861c: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 18620: 75 02 jne 18624 <_usb_show_config+0x5b> + 18622: eb 6a jmp 1868e <_usb_show_config+0xc5> + 18624: 83 ec 04 sub $0x4,%esp + 18627: 6a 32 push $0x32 + 18629: 68 c4 b2 01 00 push $0x1b2c4 + 1862e: 68 d0 b2 01 00 push $0x1b2d0 + 18633: e8 28 14 00 00 call 19a60 <_DbgPrint> + 18638: 83 c4 10 add $0x10,%esp + 1863b: 83 ec 08 sub $0x8,%esp + 1863e: ff 75 f8 pushl 0xfffffff8(%ebp) + 18641: 68 d9 b2 01 00 push $0x1b2d9 + 18646: e8 15 14 00 00 call 19a60 <_DbgPrint> + 1864b: 83 c4 10 add $0x10,%esp + 1864e: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 18655: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 18658: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1865b: 3b 42 08 cmp 0x8(%edx),%eax + 1865e: 73 24 jae 18684 <_usb_show_config+0xbb> + 18660: 83 ec 0c sub $0xc,%esp + 18663: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 18666: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 18669: 89 d0 mov %edx,%eax + 1866b: 01 c0 add %eax,%eax + 1866d: 01 d0 add %edx,%eax + 1866f: c1 e0 03 shl $0x3,%eax + 18672: 03 01 add (%ecx),%eax + 18674: 50 push %eax + 18675: e8 fc fe ff ff call 18576 <_usb_show_interface> + 1867a: 83 c4 10 add $0x10,%esp + 1867d: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 18680: ff 00 incl (%eax) + 18682: eb d1 jmp 18655 <_usb_show_config+0x8c> + 18684: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 18687: ff 00 incl (%eax) + 18689: e9 57 ff ff ff jmp 185e5 <_usb_show_config+0x1c> + 1868e: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 18691: c9 leave + 18692: c3 ret + +00018693 <_usb_show_device>: + 18693: 55 push %ebp + 18694: 89 e5 mov %esp,%ebp + 18696: 83 ec 08 sub $0x8,%esp + 18699: 83 ec 0c sub $0xc,%esp + 1869c: 8b 45 08 mov 0x8(%ebp),%eax + 1869f: 05 70 01 00 00 add $0x170,%eax + 186a4: 50 push %eax + 186a5: e8 47 00 00 00 call 186f1 <_usb_show_device_descriptor> + 186aa: 83 c4 10 add $0x10,%esp + 186ad: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 186b4: 8b 45 08 mov 0x8(%ebp),%eax + 186b7: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 186bd: 25 ff 00 00 00 and $0xff,%eax + 186c2: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 186c5: 7e 28 jle 186ef <_usb_show_device+0x5c> + 186c7: 83 ec 0c sub $0xc,%esp + 186ca: 8b 4d 08 mov 0x8(%ebp),%ecx + 186cd: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 186d0: 89 d0 mov %edx,%eax + 186d2: 01 c0 add %eax,%eax + 186d4: 01 d0 add %edx,%eax + 186d6: c1 e0 03 shl $0x3,%eax + 186d9: 03 81 84 01 00 00 add 0x184(%ecx),%eax + 186df: 50 push %eax + 186e0: e8 e4 fe ff ff call 185c9 <_usb_show_config> + 186e5: 83 c4 10 add $0x10,%esp + 186e8: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 186eb: ff 00 incl (%eax) + 186ed: eb c5 jmp 186b4 <_usb_show_device+0x21> + 186ef: c9 leave + 186f0: c3 ret + +000186f1 <_usb_show_device_descriptor>: + 186f1: 55 push %ebp + 186f2: 89 e5 mov %esp,%ebp + 186f4: 83 ec 08 sub $0x8,%esp + 186f7: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 186fb: 75 2c jne 18729 <_usb_show_device_descriptor+0x38> + 186fd: 83 ec 04 sub $0x4,%esp + 18700: 6a 48 push $0x48 + 18702: 68 c4 b2 01 00 push $0x1b2c4 + 18707: 68 d0 b2 01 00 push $0x1b2d0 + 1870c: e8 4f 13 00 00 call 19a60 <_DbgPrint> + 18711: 83 c4 10 add $0x10,%esp + 18714: 83 ec 0c sub $0xc,%esp + 18717: 68 ec b2 01 00 push $0x1b2ec + 1871c: e8 3f 13 00 00 call 19a60 <_DbgPrint> + 18721: 83 c4 10 add $0x10,%esp + 18724: e9 f5 03 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18729: 83 ec 04 sub $0x4,%esp + 1872c: 6a 4c push $0x4c + 1872e: 68 c4 b2 01 00 push $0x1b2c4 + 18733: 68 d0 b2 01 00 push $0x1b2d0 + 18738: e8 23 13 00 00 call 19a60 <_DbgPrint> + 1873d: 83 c4 10 add $0x10,%esp + 18740: 83 ec 04 sub $0x4,%esp + 18743: 8b 45 08 mov 0x8(%ebp),%eax + 18746: 80 38 12 cmpb $0x12,(%eax) + 18749: 75 09 jne 18754 <_usb_show_device_descriptor+0x63> + 1874b: c7 45 fc 1a b3 01 00 movl $0x1b31a,0xfffffffc(%ebp) + 18752: eb 07 jmp 1875b <_usb_show_device_descriptor+0x6a> + 18754: c7 45 fc 1b b3 01 00 movl $0x1b31b,0xfffffffc(%ebp) + 1875b: ff 75 fc pushl 0xfffffffc(%ebp) + 1875e: 8b 45 08 mov 0x8(%ebp),%eax + 18761: 8a 00 mov (%eax),%al + 18763: 25 ff 00 00 00 and $0xff,%eax + 18768: 50 push %eax + 18769: 68 24 b3 01 00 push $0x1b324 + 1876e: e8 ed 12 00 00 call 19a60 <_DbgPrint> + 18773: 83 c4 10 add $0x10,%esp + 18776: 83 ec 04 sub $0x4,%esp + 18779: 6a 4d push $0x4d + 1877b: 68 c4 b2 01 00 push $0x1b2c4 + 18780: 68 d0 b2 01 00 push $0x1b2d0 + 18785: e8 d6 12 00 00 call 19a60 <_DbgPrint> + 1878a: 83 c4 10 add $0x10,%esp + 1878d: 83 ec 08 sub $0x8,%esp + 18790: 8b 45 08 mov 0x8(%ebp),%eax + 18793: 8a 40 01 mov 0x1(%eax),%al + 18796: 25 ff 00 00 00 and $0xff,%eax + 1879b: 50 push %eax + 1879c: 68 43 b3 01 00 push $0x1b343 + 187a1: e8 ba 12 00 00 call 19a60 <_DbgPrint> + 187a6: 83 c4 10 add $0x10,%esp + 187a9: 83 ec 04 sub $0x4,%esp + 187ac: 6a 50 push $0x50 + 187ae: 68 c4 b2 01 00 push $0x1b2c4 + 187b3: 68 d0 b2 01 00 push $0x1b2d0 + 187b8: e8 a3 12 00 00 call 19a60 <_DbgPrint> + 187bd: 83 c4 10 add $0x10,%esp + 187c0: 83 ec 04 sub $0x4,%esp + 187c3: 8b 45 08 mov 0x8(%ebp),%eax + 187c6: 66 8b 40 02 mov 0x2(%eax),%ax + 187ca: 25 ff ff 00 00 and $0xffff,%eax + 187cf: 25 ff 00 00 00 and $0xff,%eax + 187d4: 50 push %eax + 187d5: 8b 45 08 mov 0x8(%ebp),%eax + 187d8: 66 8b 40 02 mov 0x2(%eax),%ax + 187dc: 66 c1 e8 08 shr $0x8,%ax + 187e0: 25 ff ff 00 00 and $0xffff,%eax + 187e5: 50 push %eax + 187e6: 68 64 b3 01 00 push $0x1b364 + 187eb: e8 70 12 00 00 call 19a60 <_DbgPrint> + 187f0: 83 c4 10 add $0x10,%esp + 187f3: 83 ec 04 sub $0x4,%esp + 187f6: 6a 52 push $0x52 + 187f8: 68 c4 b2 01 00 push $0x1b2c4 + 187fd: 68 d0 b2 01 00 push $0x1b2d0 + 18802: e8 59 12 00 00 call 19a60 <_DbgPrint> + 18807: 83 c4 10 add $0x10,%esp + 1880a: 83 ec 04 sub $0x4,%esp + 1880d: 8b 45 08 mov 0x8(%ebp),%eax + 18810: 66 8b 40 0a mov 0xa(%eax),%ax + 18814: 25 ff ff 00 00 and $0xffff,%eax + 18819: 50 push %eax + 1881a: 8b 45 08 mov 0x8(%ebp),%eax + 1881d: 66 8b 40 08 mov 0x8(%eax),%ax + 18821: 25 ff ff 00 00 and $0xffff,%eax + 18826: 50 push %eax + 18827: 68 88 b3 01 00 push $0x1b388 + 1882c: e8 2f 12 00 00 call 19a60 <_DbgPrint> + 18831: 83 c4 10 add $0x10,%esp + 18834: 83 ec 04 sub $0x4,%esp + 18837: 6a 53 push $0x53 + 18839: 68 c4 b2 01 00 push $0x1b2c4 + 1883e: 68 d0 b2 01 00 push $0x1b2d0 + 18843: e8 18 12 00 00 call 19a60 <_DbgPrint> + 18848: 83 c4 10 add $0x10,%esp + 1884b: 83 ec 08 sub $0x8,%esp + 1884e: 8b 45 08 mov 0x8(%ebp),%eax + 18851: 8a 40 07 mov 0x7(%eax),%al + 18854: 25 ff 00 00 00 and $0xff,%eax + 18859: 50 push %eax + 1885a: 68 ab b3 01 00 push $0x1b3ab + 1885f: e8 fc 11 00 00 call 19a60 <_DbgPrint> + 18864: 83 c4 10 add $0x10,%esp + 18867: 83 ec 04 sub $0x4,%esp + 1886a: 6a 54 push $0x54 + 1886c: 68 c4 b2 01 00 push $0x1b2c4 + 18871: 68 d0 b2 01 00 push $0x1b2d0 + 18876: e8 e5 11 00 00 call 19a60 <_DbgPrint> + 1887b: 83 c4 10 add $0x10,%esp + 1887e: 83 ec 08 sub $0x8,%esp + 18881: 8b 45 08 mov 0x8(%ebp),%eax + 18884: 8a 40 11 mov 0x11(%eax),%al + 18887: 25 ff 00 00 00 and $0xff,%eax + 1888c: 50 push %eax + 1888d: 68 c7 b3 01 00 push $0x1b3c7 + 18892: e8 c9 11 00 00 call 19a60 <_DbgPrint> + 18897: 83 c4 10 add $0x10,%esp + 1889a: 83 ec 04 sub $0x4,%esp + 1889d: 6a 56 push $0x56 + 1889f: 68 c4 b2 01 00 push $0x1b2c4 + 188a4: 68 d0 b2 01 00 push $0x1b2d0 + 188a9: e8 b2 11 00 00 call 19a60 <_DbgPrint> + 188ae: 83 c4 10 add $0x10,%esp + 188b1: 83 ec 04 sub $0x4,%esp + 188b4: 8b 45 08 mov 0x8(%ebp),%eax + 188b7: 66 8b 40 0c mov 0xc(%eax),%ax + 188bb: 25 ff ff 00 00 and $0xffff,%eax + 188c0: 25 ff 00 00 00 and $0xff,%eax + 188c5: 50 push %eax + 188c6: 8b 45 08 mov 0x8(%ebp),%eax + 188c9: 66 8b 40 0c mov 0xc(%eax),%ax + 188cd: 66 c1 e8 08 shr $0x8,%ax + 188d1: 25 ff ff 00 00 and $0xffff,%eax + 188d6: 50 push %eax + 188d7: 68 e4 b3 01 00 push $0x1b3e4 + 188dc: e8 7f 11 00 00 call 19a60 <_DbgPrint> + 188e1: 83 c4 10 add $0x10,%esp + 188e4: 83 ec 04 sub $0x4,%esp + 188e7: 6a 59 push $0x59 + 188e9: 68 c4 b2 01 00 push $0x1b2c4 + 188ee: 68 d0 b2 01 00 push $0x1b2d0 + 188f3: e8 68 11 00 00 call 19a60 <_DbgPrint> + 188f8: 83 c4 10 add $0x10,%esp + 188fb: 8b 45 08 mov 0x8(%ebp),%eax + 188fe: 8a 40 06 mov 0x6(%eax),%al + 18901: 25 ff 00 00 00 and $0xff,%eax + 18906: 50 push %eax + 18907: 8b 45 08 mov 0x8(%ebp),%eax + 1890a: 8a 40 05 mov 0x5(%eax),%al + 1890d: 25 ff 00 00 00 and $0xff,%eax + 18912: 50 push %eax + 18913: 8b 45 08 mov 0x8(%ebp),%eax + 18916: 8a 40 04 mov 0x4(%eax),%al + 18919: 25 ff 00 00 00 and $0xff,%eax + 1891e: 50 push %eax + 1891f: 68 08 b4 01 00 push $0x1b408 + 18924: e8 37 11 00 00 call 19a60 <_DbgPrint> + 18929: 83 c4 10 add $0x10,%esp + 1892c: 8b 45 08 mov 0x8(%ebp),%eax + 1892f: ba 00 00 00 00 mov $0x0,%edx + 18934: 8a 50 04 mov 0x4(%eax),%dl + 18937: 89 55 f8 mov %edx,0xfffffff8(%ebp) + 1893a: 83 7d f8 03 cmpl $0x3,0xfffffff8(%ebp) + 1893e: 0f 84 e0 00 00 00 je 18a24 <_usb_show_device_descriptor+0x333> + 18944: 83 7d f8 03 cmpl $0x3,0xfffffff8(%ebp) + 18948: 7f 1b jg 18965 <_usb_show_device_descriptor+0x274> + 1894a: 83 7d f8 01 cmpl $0x1,0xfffffff8(%ebp) + 1894e: 74 7c je 189cc <_usb_show_device_descriptor+0x2db> + 18950: 83 7d f8 01 cmpl $0x1,0xfffffff8(%ebp) + 18954: 0f 8f 9e 00 00 00 jg 189f8 <_usb_show_device_descriptor+0x307> + 1895a: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 1895e: 74 40 je 189a0 <_usb_show_device_descriptor+0x2af> + 18960: e9 92 01 00 00 jmp 18af7 <_usb_show_device_descriptor+0x406> + 18965: 83 7d f8 08 cmpl $0x8,0xfffffff8(%ebp) + 18969: 0f 84 0d 01 00 00 je 18a7c <_usb_show_device_descriptor+0x38b> + 1896f: 83 7d f8 08 cmpl $0x8,0xfffffff8(%ebp) + 18973: 7f 0f jg 18984 <_usb_show_device_descriptor+0x293> + 18975: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) + 18979: 0f 84 d1 00 00 00 je 18a50 <_usb_show_device_descriptor+0x35f> + 1897f: e9 73 01 00 00 jmp 18af7 <_usb_show_device_descriptor+0x406> + 18984: 83 7d f8 09 cmpl $0x9,0xfffffff8(%ebp) + 18988: 0f 84 17 01 00 00 je 18aa5 <_usb_show_device_descriptor+0x3b4> + 1898e: 81 7d f8 ff 00 00 00 cmpl $0xff,0xfffffff8(%ebp) + 18995: 0f 84 33 01 00 00 je 18ace <_usb_show_device_descriptor+0x3dd> + 1899b: e9 57 01 00 00 jmp 18af7 <_usb_show_device_descriptor+0x406> + 189a0: 83 ec 04 sub $0x4,%esp + 189a3: 6a 5c push $0x5c + 189a5: 68 c4 b2 01 00 push $0x1b2c4 + 189aa: 68 d0 b2 01 00 push $0x1b2d0 + 189af: e8 ac 10 00 00 call 19a60 <_DbgPrint> + 189b4: 83 c4 10 add $0x10,%esp + 189b7: 83 ec 0c sub $0xc,%esp + 189ba: 68 3b b4 01 00 push $0x1b43b + 189bf: e8 9c 10 00 00 call 19a60 <_DbgPrint> + 189c4: 83 c4 10 add $0x10,%esp + 189c7: e9 52 01 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 189cc: 83 ec 04 sub $0x4,%esp + 189cf: 6a 5f push $0x5f + 189d1: 68 c4 b2 01 00 push $0x1b2c4 + 189d6: 68 d0 b2 01 00 push $0x1b2d0 + 189db: e8 80 10 00 00 call 19a60 <_DbgPrint> + 189e0: 83 c4 10 add $0x10,%esp + 189e3: 83 ec 0c sub $0xc,%esp + 189e6: 68 56 b4 01 00 push $0x1b456 + 189eb: e8 70 10 00 00 call 19a60 <_DbgPrint> + 189f0: 83 c4 10 add $0x10,%esp + 189f3: e9 26 01 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 189f8: 83 ec 04 sub $0x4,%esp + 189fb: 6a 62 push $0x62 + 189fd: 68 c4 b2 01 00 push $0x1b2c4 + 18a02: 68 d0 b2 01 00 push $0x1b2d0 + 18a07: e8 54 10 00 00 call 19a60 <_DbgPrint> + 18a0c: 83 c4 10 add $0x10,%esp + 18a0f: 83 ec 0c sub $0xc,%esp + 18a12: 68 6e b4 01 00 push $0x1b46e + 18a17: e8 44 10 00 00 call 19a60 <_DbgPrint> + 18a1c: 83 c4 10 add $0x10,%esp + 18a1f: e9 fa 00 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18a24: 83 ec 04 sub $0x4,%esp + 18a27: 6a 65 push $0x65 + 18a29: 68 c4 b2 01 00 push $0x1b2c4 + 18a2e: 68 d0 b2 01 00 push $0x1b2d0 + 18a33: e8 28 10 00 00 call 19a60 <_DbgPrint> + 18a38: 83 c4 10 add $0x10,%esp + 18a3b: 83 ec 0c sub $0xc,%esp + 18a3e: 68 88 b4 01 00 push $0x1b488 + 18a43: e8 18 10 00 00 call 19a60 <_DbgPrint> + 18a48: 83 c4 10 add $0x10,%esp + 18a4b: e9 ce 00 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18a50: 83 ec 04 sub $0x4,%esp + 18a53: 6a 68 push $0x68 + 18a55: 68 c4 b2 01 00 push $0x1b2c4 + 18a5a: 68 d0 b2 01 00 push $0x1b2d0 + 18a5f: e8 fc 0f 00 00 call 19a60 <_DbgPrint> + 18a64: 83 c4 10 add $0x10,%esp + 18a67: 83 ec 0c sub $0xc,%esp + 18a6a: 68 ab b4 01 00 push $0x1b4ab + 18a6f: e8 ec 0f 00 00 call 19a60 <_DbgPrint> + 18a74: 83 c4 10 add $0x10,%esp + 18a77: e9 a2 00 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18a7c: 83 ec 04 sub $0x4,%esp + 18a7f: 6a 6b push $0x6b + 18a81: 68 c4 b2 01 00 push $0x1b2c4 + 18a86: 68 d0 b2 01 00 push $0x1b2d0 + 18a8b: e8 d0 0f 00 00 call 19a60 <_DbgPrint> + 18a90: 83 c4 10 add $0x10,%esp + 18a93: 83 ec 0c sub $0xc,%esp + 18a96: 68 c8 b4 01 00 push $0x1b4c8 + 18a9b: e8 c0 0f 00 00 call 19a60 <_DbgPrint> + 18aa0: 83 c4 10 add $0x10,%esp + 18aa3: eb 79 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18aa5: 83 ec 04 sub $0x4,%esp + 18aa8: 6a 6e push $0x6e + 18aaa: 68 c4 b2 01 00 push $0x1b2c4 + 18aaf: 68 d0 b2 01 00 push $0x1b2d0 + 18ab4: e8 a7 0f 00 00 call 19a60 <_DbgPrint> + 18ab9: 83 c4 10 add $0x10,%esp + 18abc: 83 ec 0c sub $0xc,%esp + 18abf: 68 e7 b4 01 00 push $0x1b4e7 + 18ac4: e8 97 0f 00 00 call 19a60 <_DbgPrint> + 18ac9: 83 c4 10 add $0x10,%esp + 18acc: eb 50 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18ace: 83 ec 04 sub $0x4,%esp + 18ad1: 6a 71 push $0x71 + 18ad3: 68 c4 b2 01 00 push $0x1b2c4 + 18ad8: 68 d0 b2 01 00 push $0x1b2d0 + 18add: e8 7e 0f 00 00 call 19a60 <_DbgPrint> + 18ae2: 83 c4 10 add $0x10,%esp + 18ae5: 83 ec 0c sub $0xc,%esp + 18ae8: 68 fd b4 01 00 push $0x1b4fd + 18aed: e8 6e 0f 00 00 call 19a60 <_DbgPrint> + 18af2: 83 c4 10 add $0x10,%esp + 18af5: eb 27 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18af7: 83 ec 04 sub $0x4,%esp + 18afa: 6a 74 push $0x74 + 18afc: 68 c4 b2 01 00 push $0x1b2c4 + 18b01: 68 d0 b2 01 00 push $0x1b2d0 + 18b06: e8 55 0f 00 00 call 19a60 <_DbgPrint> + 18b0b: 83 c4 10 add $0x10,%esp + 18b0e: 83 ec 0c sub $0xc,%esp + 18b11: 68 0f b5 01 00 push $0x1b50f + 18b16: e8 45 0f 00 00 call 19a60 <_DbgPrint> + 18b1b: 83 c4 10 add $0x10,%esp + 18b1e: c9 leave + 18b1f: c3 ret + +00018b20 <_usb_show_config_descriptor>: + 18b20: 55 push %ebp + 18b21: 89 e5 mov %esp,%ebp + 18b23: 83 ec 08 sub $0x8,%esp + 18b26: 83 ec 04 sub $0x4,%esp + 18b29: 6a 7a push $0x7a + 18b2b: 68 c4 b2 01 00 push $0x1b2c4 + 18b30: 68 d0 b2 01 00 push $0x1b2d0 + 18b35: e8 26 0f 00 00 call 19a60 <_DbgPrint> + 18b3a: 83 c4 10 add $0x10,%esp + 18b3d: 83 ec 0c sub $0xc,%esp + 18b40: 68 22 b5 01 00 push $0x1b522 + 18b45: e8 16 0f 00 00 call 19a60 <_DbgPrint> + 18b4a: 83 c4 10 add $0x10,%esp + 18b4d: 83 ec 04 sub $0x4,%esp + 18b50: 6a 7c push $0x7c + 18b52: 68 c4 b2 01 00 push $0x1b2c4 + 18b57: 68 d0 b2 01 00 push $0x1b2d0 + 18b5c: e8 ff 0e 00 00 call 19a60 <_DbgPrint> + 18b61: 83 c4 10 add $0x10,%esp + 18b64: 83 ec 04 sub $0x4,%esp + 18b67: 8b 45 08 mov 0x8(%ebp),%eax + 18b6a: 80 38 09 cmpb $0x9,(%eax) + 18b6d: 75 09 jne 18b78 <_usb_show_config_descriptor+0x58> + 18b6f: c7 45 fc 1a b3 01 00 movl $0x1b31a,0xfffffffc(%ebp) + 18b76: eb 07 jmp 18b7f <_usb_show_config_descriptor+0x5f> + 18b78: c7 45 fc 1b b3 01 00 movl $0x1b31b,0xfffffffc(%ebp) + 18b7f: ff 75 fc pushl 0xfffffffc(%ebp) + 18b82: 8b 45 08 mov 0x8(%ebp),%eax + 18b85: 8a 00 mov (%eax),%al + 18b87: 25 ff 00 00 00 and $0xff,%eax + 18b8c: 50 push %eax + 18b8d: 68 34 b5 01 00 push $0x1b534 + 18b92: e8 c9 0e 00 00 call 19a60 <_DbgPrint> + 18b97: 83 c4 10 add $0x10,%esp + 18b9a: 83 ec 04 sub $0x4,%esp + 18b9d: 6a 7d push $0x7d + 18b9f: 68 c4 b2 01 00 push $0x1b2c4 + 18ba4: 68 d0 b2 01 00 push $0x1b2d0 + 18ba9: e8 b2 0e 00 00 call 19a60 <_DbgPrint> + 18bae: 83 c4 10 add $0x10,%esp + 18bb1: 83 ec 08 sub $0x8,%esp + 18bb4: 8b 45 08 mov 0x8(%ebp),%eax + 18bb7: 8a 40 01 mov 0x1(%eax),%al + 18bba: 25 ff 00 00 00 and $0xff,%eax + 18bbf: 50 push %eax + 18bc0: 68 54 b5 01 00 push $0x1b554 + 18bc5: e8 96 0e 00 00 call 19a60 <_DbgPrint> + 18bca: 83 c4 10 add $0x10,%esp + 18bcd: 83 ec 04 sub $0x4,%esp + 18bd0: 6a 7e push $0x7e + 18bd2: 68 c4 b2 01 00 push $0x1b2c4 + 18bd7: 68 d0 b2 01 00 push $0x1b2d0 + 18bdc: e8 7f 0e 00 00 call 19a60 <_DbgPrint> + 18be1: 83 c4 10 add $0x10,%esp + 18be4: 83 ec 08 sub $0x8,%esp + 18be7: 8b 45 08 mov 0x8(%ebp),%eax + 18bea: 66 8b 40 02 mov 0x2(%eax),%ax + 18bee: 25 ff ff 00 00 and $0xffff,%eax + 18bf3: 50 push %eax + 18bf4: 68 74 b5 01 00 push $0x1b574 + 18bf9: e8 62 0e 00 00 call 19a60 <_DbgPrint> + 18bfe: 83 c4 10 add $0x10,%esp + 18c01: 83 ec 04 sub $0x4,%esp + 18c04: 6a 7f push $0x7f + 18c06: 68 c4 b2 01 00 push $0x1b2c4 + 18c0b: 68 d0 b2 01 00 push $0x1b2d0 + 18c10: e8 4b 0e 00 00 call 19a60 <_DbgPrint> + 18c15: 83 c4 10 add $0x10,%esp + 18c18: 83 ec 08 sub $0x8,%esp + 18c1b: 8b 45 08 mov 0x8(%ebp),%eax + 18c1e: 8a 40 04 mov 0x4(%eax),%al + 18c21: 25 ff 00 00 00 and $0xff,%eax + 18c26: 50 push %eax + 18c27: 68 94 b5 01 00 push $0x1b594 + 18c2c: e8 2f 0e 00 00 call 19a60 <_DbgPrint> + 18c31: 83 c4 10 add $0x10,%esp + 18c34: 83 ec 04 sub $0x4,%esp + 18c37: 68 80 00 00 00 push $0x80 + 18c3c: 68 c4 b2 01 00 push $0x1b2c4 + 18c41: 68 d0 b2 01 00 push $0x1b2d0 + 18c46: e8 15 0e 00 00 call 19a60 <_DbgPrint> + 18c4b: 83 c4 10 add $0x10,%esp + 18c4e: 83 ec 08 sub $0x8,%esp + 18c51: 8b 45 08 mov 0x8(%ebp),%eax + 18c54: 8a 40 05 mov 0x5(%eax),%al + 18c57: 25 ff 00 00 00 and $0xff,%eax + 18c5c: 50 push %eax + 18c5d: 68 b4 b5 01 00 push $0x1b5b4 + 18c62: e8 f9 0d 00 00 call 19a60 <_DbgPrint> + 18c67: 83 c4 10 add $0x10,%esp + 18c6a: 83 ec 04 sub $0x4,%esp + 18c6d: 68 81 00 00 00 push $0x81 + 18c72: 68 c4 b2 01 00 push $0x1b2c4 + 18c77: 68 d0 b2 01 00 push $0x1b2d0 + 18c7c: e8 df 0d 00 00 call 19a60 <_DbgPrint> + 18c81: 83 c4 10 add $0x10,%esp + 18c84: 83 ec 08 sub $0x8,%esp + 18c87: 8b 45 08 mov 0x8(%ebp),%eax + 18c8a: 8a 40 06 mov 0x6(%eax),%al + 18c8d: 25 ff 00 00 00 and $0xff,%eax + 18c92: 50 push %eax + 18c93: 68 d4 b5 01 00 push $0x1b5d4 + 18c98: e8 c3 0d 00 00 call 19a60 <_DbgPrint> + 18c9d: 83 c4 10 add $0x10,%esp + 18ca0: 83 ec 04 sub $0x4,%esp + 18ca3: 68 82 00 00 00 push $0x82 + 18ca8: 68 c4 b2 01 00 push $0x1b2c4 + 18cad: 68 d0 b2 01 00 push $0x1b2d0 + 18cb2: e8 a9 0d 00 00 call 19a60 <_DbgPrint> + 18cb7: 83 c4 10 add $0x10,%esp + 18cba: 83 ec 08 sub $0x8,%esp + 18cbd: 8b 45 08 mov 0x8(%ebp),%eax + 18cc0: 8a 40 07 mov 0x7(%eax),%al + 18cc3: 25 ff 00 00 00 and $0xff,%eax + 18cc8: 50 push %eax + 18cc9: 68 f4 b5 01 00 push $0x1b5f4 + 18cce: e8 8d 0d 00 00 call 19a60 <_DbgPrint> + 18cd3: 83 c4 10 add $0x10,%esp + 18cd6: 83 ec 04 sub $0x4,%esp + 18cd9: 68 83 00 00 00 push $0x83 + 18cde: 68 c4 b2 01 00 push $0x1b2c4 + 18ce3: 68 d0 b2 01 00 push $0x1b2d0 + 18ce8: e8 73 0d 00 00 call 19a60 <_DbgPrint> + 18ced: 83 c4 10 add $0x10,%esp + 18cf0: 83 ec 08 sub $0x8,%esp + 18cf3: 8b 45 08 mov 0x8(%ebp),%eax + 18cf6: 8a 40 08 mov 0x8(%eax),%al + 18cf9: 25 ff 00 00 00 and $0xff,%eax + 18cfe: 01 c0 add %eax,%eax + 18d00: 50 push %eax + 18d01: 68 14 b6 01 00 push $0x1b614 + 18d06: e8 55 0d 00 00 call 19a60 <_DbgPrint> + 18d0b: 83 c4 10 add $0x10,%esp + 18d0e: c9 leave + 18d0f: c3 ret + +00018d10 <_usb_show_interface_descriptor>: + 18d10: 55 push %ebp + 18d11: 89 e5 mov %esp,%ebp + 18d13: 83 ec 08 sub $0x8,%esp + 18d16: 83 ec 04 sub $0x4,%esp + 18d19: 68 88 00 00 00 push $0x88 + 18d1e: 68 c4 b2 01 00 push $0x1b2c4 + 18d23: 68 d0 b2 01 00 push $0x1b2d0 + 18d28: e8 33 0d 00 00 call 19a60 <_DbgPrint> + 18d2d: 83 c4 10 add $0x10,%esp + 18d30: 83 ec 08 sub $0x8,%esp + 18d33: 8b 45 08 mov 0x8(%ebp),%eax + 18d36: 8a 40 03 mov 0x3(%eax),%al + 18d39: 25 ff 00 00 00 and $0xff,%eax + 18d3e: 50 push %eax + 18d3f: 68 34 b6 01 00 push $0x1b634 + 18d44: e8 17 0d 00 00 call 19a60 <_DbgPrint> + 18d49: 83 c4 10 add $0x10,%esp + 18d4c: 83 ec 04 sub $0x4,%esp + 18d4f: 68 8a 00 00 00 push $0x8a + 18d54: 68 c4 b2 01 00 push $0x1b2c4 + 18d59: 68 d0 b2 01 00 push $0x1b2d0 + 18d5e: e8 fd 0c 00 00 call 19a60 <_DbgPrint> + 18d63: 83 c4 10 add $0x10,%esp + 18d66: 83 ec 04 sub $0x4,%esp + 18d69: 8b 45 08 mov 0x8(%ebp),%eax + 18d6c: 80 38 09 cmpb $0x9,(%eax) + 18d6f: 75 09 jne 18d7a <_usb_show_interface_descriptor+0x6a> + 18d71: c7 45 fc 1a b3 01 00 movl $0x1b31a,0xfffffffc(%ebp) + 18d78: eb 07 jmp 18d81 <_usb_show_interface_descriptor+0x71> + 18d7a: c7 45 fc 1b b3 01 00 movl $0x1b31b,0xfffffffc(%ebp) + 18d81: ff 75 fc pushl 0xfffffffc(%ebp) + 18d84: 8b 45 08 mov 0x8(%ebp),%eax + 18d87: 8a 00 mov (%eax),%al + 18d89: 25 ff 00 00 00 and $0xff,%eax + 18d8e: 50 push %eax + 18d8f: 68 50 b6 01 00 push $0x1b650 + 18d94: e8 c7 0c 00 00 call 19a60 <_DbgPrint> + 18d99: 83 c4 10 add $0x10,%esp + 18d9c: 83 ec 04 sub $0x4,%esp + 18d9f: 68 8b 00 00 00 push $0x8b + 18da4: 68 c4 b2 01 00 push $0x1b2c4 + 18da9: 68 d0 b2 01 00 push $0x1b2d0 + 18dae: e8 ad 0c 00 00 call 19a60 <_DbgPrint> + 18db3: 83 c4 10 add $0x10,%esp + 18db6: 83 ec 08 sub $0x8,%esp + 18db9: 8b 45 08 mov 0x8(%ebp),%eax + 18dbc: 8a 40 01 mov 0x1(%eax),%al + 18dbf: 25 ff 00 00 00 and $0xff,%eax + 18dc4: 50 push %eax + 18dc5: 68 74 b6 01 00 push $0x1b674 + 18dca: e8 91 0c 00 00 call 19a60 <_DbgPrint> + 18dcf: 83 c4 10 add $0x10,%esp + 18dd2: 83 ec 04 sub $0x4,%esp + 18dd5: 68 8c 00 00 00 push $0x8c + 18dda: 68 c4 b2 01 00 push $0x1b2c4 + 18ddf: 68 d0 b2 01 00 push $0x1b2d0 + 18de4: e8 77 0c 00 00 call 19a60 <_DbgPrint> + 18de9: 83 c4 10 add $0x10,%esp + 18dec: 83 ec 08 sub $0x8,%esp + 18def: 8b 45 08 mov 0x8(%ebp),%eax + 18df2: 8a 40 02 mov 0x2(%eax),%al + 18df5: 25 ff 00 00 00 and $0xff,%eax + 18dfa: 50 push %eax + 18dfb: 68 98 b6 01 00 push $0x1b698 + 18e00: e8 5b 0c 00 00 call 19a60 <_DbgPrint> + 18e05: 83 c4 10 add $0x10,%esp + 18e08: 83 ec 04 sub $0x4,%esp + 18e0b: 68 8d 00 00 00 push $0x8d + 18e10: 68 c4 b2 01 00 push $0x1b2c4 + 18e15: 68 d0 b2 01 00 push $0x1b2d0 + 18e1a: e8 41 0c 00 00 call 19a60 <_DbgPrint> + 18e1f: 83 c4 10 add $0x10,%esp + 18e22: 83 ec 08 sub $0x8,%esp + 18e25: 8b 45 08 mov 0x8(%ebp),%eax + 18e28: 8a 40 03 mov 0x3(%eax),%al + 18e2b: 25 ff 00 00 00 and $0xff,%eax + 18e30: 50 push %eax + 18e31: 68 bc b6 01 00 push $0x1b6bc + 18e36: e8 25 0c 00 00 call 19a60 <_DbgPrint> + 18e3b: 83 c4 10 add $0x10,%esp + 18e3e: 83 ec 04 sub $0x4,%esp + 18e41: 68 8e 00 00 00 push $0x8e + 18e46: 68 c4 b2 01 00 push $0x1b2c4 + 18e4b: 68 d0 b2 01 00 push $0x1b2d0 + 18e50: e8 0b 0c 00 00 call 19a60 <_DbgPrint> + 18e55: 83 c4 10 add $0x10,%esp + 18e58: 83 ec 08 sub $0x8,%esp + 18e5b: 8b 45 08 mov 0x8(%ebp),%eax + 18e5e: 8a 40 04 mov 0x4(%eax),%al + 18e61: 25 ff 00 00 00 and $0xff,%eax + 18e66: 50 push %eax + 18e67: 68 e0 b6 01 00 push $0x1b6e0 + 18e6c: e8 ef 0b 00 00 call 19a60 <_DbgPrint> + 18e71: 83 c4 10 add $0x10,%esp + 18e74: 83 ec 04 sub $0x4,%esp + 18e77: 68 90 00 00 00 push $0x90 + 18e7c: 68 c4 b2 01 00 push $0x1b2c4 + 18e81: 68 d0 b2 01 00 push $0x1b2d0 + 18e86: e8 d5 0b 00 00 call 19a60 <_DbgPrint> + 18e8b: 83 c4 10 add $0x10,%esp + 18e8e: 8b 45 08 mov 0x8(%ebp),%eax + 18e91: 8a 40 07 mov 0x7(%eax),%al + 18e94: 25 ff 00 00 00 and $0xff,%eax + 18e99: 50 push %eax + 18e9a: 8b 45 08 mov 0x8(%ebp),%eax + 18e9d: 8a 40 06 mov 0x6(%eax),%al + 18ea0: 25 ff 00 00 00 and $0xff,%eax + 18ea5: 50 push %eax + 18ea6: 8b 45 08 mov 0x8(%ebp),%eax + 18ea9: 8a 40 05 mov 0x5(%eax),%al + 18eac: 25 ff 00 00 00 and $0xff,%eax + 18eb1: 50 push %eax + 18eb2: 68 04 b7 01 00 push $0x1b704 + 18eb7: e8 a4 0b 00 00 call 19a60 <_DbgPrint> + 18ebc: 83 c4 10 add $0x10,%esp + 18ebf: 83 ec 04 sub $0x4,%esp + 18ec2: 68 91 00 00 00 push $0x91 + 18ec7: 68 c4 b2 01 00 push $0x1b2c4 + 18ecc: 68 d0 b2 01 00 push $0x1b2d0 + 18ed1: e8 8a 0b 00 00 call 19a60 <_DbgPrint> + 18ed6: 83 c4 10 add $0x10,%esp + 18ed9: 83 ec 08 sub $0x8,%esp + 18edc: 8b 45 08 mov 0x8(%ebp),%eax + 18edf: 8a 40 08 mov 0x8(%eax),%al + 18ee2: 25 ff 00 00 00 and $0xff,%eax + 18ee7: 50 push %eax + 18ee8: 68 40 b7 01 00 push $0x1b740 + 18eed: e8 6e 0b 00 00 call 19a60 <_DbgPrint> + 18ef2: 83 c4 10 add $0x10,%esp + 18ef5: c9 leave + 18ef6: c3 ret + +00018ef7 <_usb_show_endpoint_descriptor>: + 18ef7: 55 push %ebp + 18ef8: 89 e5 mov %esp,%ebp + 18efa: 83 ec 38 sub $0x38,%esp + 18efd: 8b 45 08 mov 0x8(%ebp),%eax + 18f00: 80 38 09 cmpb $0x9,(%eax) + 18f03: 74 1a je 18f1f <_usb_show_endpoint_descriptor+0x28> + 18f05: 8b 45 08 mov 0x8(%ebp),%eax + 18f08: 80 38 07 cmpb $0x7,(%eax) + 18f0b: 75 09 jne 18f16 <_usb_show_endpoint_descriptor+0x1f> + 18f0d: c7 45 d4 1a b3 01 00 movl $0x1b31a,0xffffffd4(%ebp) + 18f14: eb 10 jmp 18f26 <_usb_show_endpoint_descriptor+0x2f> + 18f16: c7 45 d4 1b b3 01 00 movl $0x1b31b,0xffffffd4(%ebp) + 18f1d: eb 07 jmp 18f26 <_usb_show_endpoint_descriptor+0x2f> + 18f1f: c7 45 d4 62 b7 01 00 movl $0x1b762,0xffffffd4(%ebp) + 18f26: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 18f29: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 18f2c: c7 45 d8 6b b7 01 00 movl $0x1b76b,0xffffffd8(%ebp) + 18f33: c7 45 dc 73 b7 01 00 movl $0x1b773,0xffffffdc(%ebp) + 18f3a: c7 45 e0 7f b7 01 00 movl $0x1b77f,0xffffffe0(%ebp) + 18f41: c7 45 e4 84 b7 01 00 movl $0x1b784,0xffffffe4(%ebp) + 18f48: 83 ec 04 sub $0x4,%esp + 18f4b: 68 9b 00 00 00 push $0x9b + 18f50: 68 c4 b2 01 00 push $0x1b2c4 + 18f55: 68 d0 b2 01 00 push $0x1b2d0 + 18f5a: e8 01 0b 00 00 call 19a60 <_DbgPrint> + 18f5f: 83 c4 10 add $0x10,%esp + 18f62: 83 ec 0c sub $0xc,%esp + 18f65: 68 8e b7 01 00 push $0x1b78e + 18f6a: e8 f1 0a 00 00 call 19a60 <_DbgPrint> + 18f6f: 83 c4 10 add $0x10,%esp + 18f72: 83 ec 04 sub $0x4,%esp + 18f75: 68 9d 00 00 00 push $0x9d + 18f7a: 68 c4 b2 01 00 push $0x1b2c4 + 18f7f: 68 d0 b2 01 00 push $0x1b2d0 + 18f84: e8 d7 0a 00 00 call 19a60 <_DbgPrint> + 18f89: 83 c4 10 add $0x10,%esp + 18f8c: 83 ec 04 sub $0x4,%esp + 18f8f: ff 75 f4 pushl 0xfffffff4(%ebp) + 18f92: 8b 45 08 mov 0x8(%ebp),%eax + 18f95: 8a 00 mov (%eax),%al + 18f97: 25 ff 00 00 00 and $0xff,%eax + 18f9c: 50 push %eax + 18f9d: 68 a0 b7 01 00 push $0x1b7a0 + 18fa2: e8 b9 0a 00 00 call 19a60 <_DbgPrint> + 18fa7: 83 c4 10 add $0x10,%esp + 18faa: 83 ec 04 sub $0x4,%esp + 18fad: 68 9e 00 00 00 push $0x9e + 18fb2: 68 c4 b2 01 00 push $0x1b2c4 + 18fb7: 68 d0 b2 01 00 push $0x1b2d0 + 18fbc: e8 9f 0a 00 00 call 19a60 <_DbgPrint> + 18fc1: 83 c4 10 add $0x10,%esp + 18fc4: 83 ec 08 sub $0x8,%esp + 18fc7: 8b 45 08 mov 0x8(%ebp),%eax + 18fca: 8a 40 01 mov 0x1(%eax),%al + 18fcd: 25 ff 00 00 00 and $0xff,%eax + 18fd2: 50 push %eax + 18fd3: 68 c4 b7 01 00 push $0x1b7c4 + 18fd8: e8 83 0a 00 00 call 19a60 <_DbgPrint> + 18fdd: 83 c4 10 add $0x10,%esp + 18fe0: 83 ec 04 sub $0x4,%esp + 18fe3: 68 a2 00 00 00 push $0xa2 + 18fe8: 68 c4 b2 01 00 push $0x1b2c4 + 18fed: 68 d0 b2 01 00 push $0x1b2d0 + 18ff2: e8 69 0a 00 00 call 19a60 <_DbgPrint> + 18ff7: 83 c4 10 add $0x10,%esp + 18ffa: 83 ec 04 sub $0x4,%esp + 18ffd: 8b 45 08 mov 0x8(%ebp),%eax + 19000: 8a 40 03 mov 0x3(%eax),%al + 19003: 25 ff 00 00 00 and $0xff,%eax + 19008: 83 e0 03 and $0x3,%eax + 1900b: 85 c0 test %eax,%eax + 1900d: 74 21 je 19030 <_usb_show_endpoint_descriptor+0x139> + 1900f: 8b 45 08 mov 0x8(%ebp),%eax + 19012: 80 78 02 00 cmpb $0x0,0x2(%eax) + 19016: 79 09 jns 19021 <_usb_show_endpoint_descriptor+0x12a> + 19018: c7 45 cc e8 b7 01 00 movl $0x1b7e8,0xffffffcc(%ebp) + 1901f: eb 07 jmp 19028 <_usb_show_endpoint_descriptor+0x131> + 19021: c7 45 cc eb b7 01 00 movl $0x1b7eb,0xffffffcc(%ebp) + 19028: 8b 45 cc mov 0xffffffcc(%ebp),%eax + 1902b: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 1902e: eb 07 jmp 19037 <_usb_show_endpoint_descriptor+0x140> + 19030: c7 45 d0 ef b7 01 00 movl $0x1b7ef,0xffffffd0(%ebp) + 19037: ff 75 d0 pushl 0xffffffd0(%ebp) + 1903a: 8b 45 08 mov 0x8(%ebp),%eax + 1903d: 8a 40 02 mov 0x2(%eax),%al + 19040: 25 ff 00 00 00 and $0xff,%eax + 19045: 50 push %eax + 19046: 68 f4 b7 01 00 push $0x1b7f4 + 1904b: e8 10 0a 00 00 call 19a60 <_DbgPrint> + 19050: 83 c4 10 add $0x10,%esp + 19053: 83 ec 04 sub $0x4,%esp + 19056: 68 a4 00 00 00 push $0xa4 + 1905b: 68 c4 b2 01 00 push $0x1b2c4 + 19060: 68 d0 b2 01 00 push $0x1b2d0 + 19065: e8 f6 09 00 00 call 19a60 <_DbgPrint> + 1906a: 83 c4 10 add $0x10,%esp + 1906d: 83 ec 04 sub $0x4,%esp + 19070: 8b 45 08 mov 0x8(%ebp),%eax + 19073: 8a 40 03 mov 0x3(%eax),%al + 19076: 25 ff 00 00 00 and $0xff,%eax + 1907b: 83 e0 03 and $0x3,%eax + 1907e: ff 74 85 d8 pushl 0xffffffd8(%ebp,%eax,4) + 19082: 8b 45 08 mov 0x8(%ebp),%eax + 19085: 8a 40 03 mov 0x3(%eax),%al + 19088: 25 ff 00 00 00 and $0xff,%eax + 1908d: 50 push %eax + 1908e: 68 20 b8 01 00 push $0x1b820 + 19093: e8 c8 09 00 00 call 19a60 <_DbgPrint> + 19098: 83 c4 10 add $0x10,%esp + 1909b: 83 ec 04 sub $0x4,%esp + 1909e: 68 a5 00 00 00 push $0xa5 + 190a3: 68 c4 b2 01 00 push $0x1b2c4 + 190a8: 68 d0 b2 01 00 push $0x1b2d0 + 190ad: e8 ae 09 00 00 call 19a60 <_DbgPrint> + 190b2: 83 c4 10 add $0x10,%esp + 190b5: 83 ec 08 sub $0x8,%esp + 190b8: 8b 45 08 mov 0x8(%ebp),%eax + 190bb: 66 8b 40 04 mov 0x4(%eax),%ax + 190bf: 25 ff ff 00 00 and $0xffff,%eax + 190c4: 50 push %eax + 190c5: 68 4c b8 01 00 push $0x1b84c + 190ca: e8 91 09 00 00 call 19a60 <_DbgPrint> + 190cf: 83 c4 10 add $0x10,%esp + 190d2: 83 ec 04 sub $0x4,%esp + 190d5: 68 a6 00 00 00 push $0xa6 + 190da: 68 c4 b2 01 00 push $0x1b2c4 + 190df: 68 d0 b2 01 00 push $0x1b2d0 + 190e4: e8 77 09 00 00 call 19a60 <_DbgPrint> + 190e9: 83 c4 10 add $0x10,%esp + 190ec: 83 ec 08 sub $0x8,%esp + 190ef: 8b 45 08 mov 0x8(%ebp),%eax + 190f2: 8a 40 06 mov 0x6(%eax),%al + 190f5: 25 ff 00 00 00 and $0xff,%eax + 190fa: 50 push %eax + 190fb: 68 70 b8 01 00 push $0x1b870 + 19100: e8 5b 09 00 00 call 19a60 <_DbgPrint> + 19105: 83 c4 10 add $0x10,%esp + 19108: 8b 45 08 mov 0x8(%ebp),%eax + 1910b: 80 38 09 cmpb $0x9,(%eax) + 1910e: 75 6c jne 1917c <_usb_show_endpoint_descriptor+0x285> + 19110: 83 ec 04 sub $0x4,%esp + 19113: 68 aa 00 00 00 push $0xaa + 19118: 68 c4 b2 01 00 push $0x1b2c4 + 1911d: 68 d0 b2 01 00 push $0x1b2d0 + 19122: e8 39 09 00 00 call 19a60 <_DbgPrint> + 19127: 83 c4 10 add $0x10,%esp + 1912a: 83 ec 08 sub $0x8,%esp + 1912d: 8b 45 08 mov 0x8(%ebp),%eax + 19130: 8a 40 07 mov 0x7(%eax),%al + 19133: 25 ff 00 00 00 and $0xff,%eax + 19138: 50 push %eax + 19139: 68 94 b8 01 00 push $0x1b894 + 1913e: e8 1d 09 00 00 call 19a60 <_DbgPrint> + 19143: 83 c4 10 add $0x10,%esp + 19146: 83 ec 04 sub $0x4,%esp + 19149: 68 ab 00 00 00 push $0xab + 1914e: 68 c4 b2 01 00 push $0x1b2c4 + 19153: 68 d0 b2 01 00 push $0x1b2d0 + 19158: e8 03 09 00 00 call 19a60 <_DbgPrint> + 1915d: 83 c4 10 add $0x10,%esp + 19160: 83 ec 08 sub $0x8,%esp + 19163: 8b 45 08 mov 0x8(%ebp),%eax + 19166: 8a 40 08 mov 0x8(%eax),%al + 19169: 25 ff 00 00 00 and $0xff,%eax + 1916e: 50 push %eax + 1916f: 68 b8 b8 01 00 push $0x1b8b8 + 19174: e8 e7 08 00 00 call 19a60 <_DbgPrint> + 19179: 83 c4 10 add $0x10,%esp + 1917c: c9 leave + 1917d: c3 ret + +0001917e <_usb_show_string>: + 1917e: 55 push %ebp + 1917f: 89 e5 mov %esp,%ebp + 19181: 83 ec 08 sub $0x8,%esp + 19184: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 19188: 75 02 jne 1918c <_usb_show_string+0xe> + 1918a: eb 42 jmp 191ce <_usb_show_string+0x50> + 1918c: 83 ec 08 sub $0x8,%esp + 1918f: 68 00 01 00 00 push $0x100 + 19194: 6a 01 push $0x1 + 19196: e8 95 08 00 00 call 19a30 <_ExAllocatePool@8> + 1919b: 83 c4 08 add $0x8,%esp + 1919e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 191a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 191a4: 85 c0 test %eax,%eax + 191a6: 75 02 jne 191aa <_usb_show_string+0x2c> + 191a8: eb 24 jmp 191ce <_usb_show_string+0x50> + 191aa: 68 00 01 00 00 push $0x100 + 191af: ff 75 fc pushl 0xfffffffc(%ebp) + 191b2: ff 75 10 pushl 0x10(%ebp) + 191b5: ff 75 08 pushl 0x8(%ebp) + 191b8: e8 26 8a ff ff call 11be3 <_usb_string> + 191bd: 83 c4 10 add $0x10,%esp + 191c0: 83 ec 0c sub $0xc,%esp + 191c3: ff 75 fc pushl 0xfffffffc(%ebp) + 191c6: e8 75 08 00 00 call 19a40 <_ExFreePool@4> + 191cb: 83 c4 0c add $0xc,%esp + 191ce: c9 leave + 191cf: c3 ret + +000191d0 <_usb_dump_urb>: + 191d0: 55 push %ebp + 191d1: 89 e5 mov %esp,%ebp + 191d3: 83 ec 08 sub $0x8,%esp + 191d6: 83 ec 04 sub $0x4,%esp + 191d9: 68 be 00 00 00 push $0xbe + 191de: 68 c4 b2 01 00 push $0x1b2c4 + 191e3: 68 d0 b2 01 00 push $0x1b2d0 + 191e8: e8 73 08 00 00 call 19a60 <_DbgPrint> + 191ed: 83 c4 10 add $0x10,%esp + 191f0: 83 ec 08 sub $0x8,%esp + 191f3: ff 75 08 pushl 0x8(%ebp) + 191f6: 68 dc b8 01 00 push $0x1b8dc + 191fb: e8 60 08 00 00 call 19a60 <_DbgPrint> + 19200: 83 c4 10 add $0x10,%esp + 19203: 83 ec 04 sub $0x4,%esp + 19206: 68 bf 00 00 00 push $0xbf + 1920b: 68 c4 b2 01 00 push $0x1b2c4 + 19210: 68 d0 b2 01 00 push $0x1b2d0 + 19215: e8 46 08 00 00 call 19a60 <_DbgPrint> + 1921a: 83 c4 10 add $0x10,%esp + 1921d: 83 ec 08 sub $0x8,%esp + 19220: 8b 45 08 mov 0x8(%ebp),%eax + 19223: ff 70 14 pushl 0x14(%eax) + 19226: 68 f7 b8 01 00 push $0x1b8f7 + 1922b: e8 30 08 00 00 call 19a60 <_DbgPrint> + 19230: 83 c4 10 add $0x10,%esp + 19233: 83 ec 04 sub $0x4,%esp + 19236: 68 c0 00 00 00 push $0xc0 + 1923b: 68 c4 b2 01 00 push $0x1b2c4 + 19240: 68 d0 b2 01 00 push $0x1b2d0 + 19245: e8 16 08 00 00 call 19a60 <_DbgPrint> + 1924a: 83 c4 10 add $0x10,%esp + 1924d: 83 ec 08 sub $0x8,%esp + 19250: 8b 45 08 mov 0x8(%ebp),%eax + 19253: ff 70 18 pushl 0x18(%eax) + 19256: 68 12 b9 01 00 push $0x1b912 + 1925b: e8 00 08 00 00 call 19a60 <_DbgPrint> + 19260: 83 c4 10 add $0x10,%esp + 19263: 83 ec 04 sub $0x4,%esp + 19266: 68 c1 00 00 00 push $0xc1 + 1926b: 68 c4 b2 01 00 push $0x1b2c4 + 19270: 68 d0 b2 01 00 push $0x1b2d0 + 19275: e8 e6 07 00 00 call 19a60 <_DbgPrint> + 1927a: 83 c4 10 add $0x10,%esp + 1927d: 83 ec 08 sub $0x8,%esp + 19280: 8b 45 08 mov 0x8(%ebp),%eax + 19283: ff 70 1c pushl 0x1c(%eax) + 19286: 68 2f b9 01 00 push $0x1b92f + 1928b: e8 d0 07 00 00 call 19a60 <_DbgPrint> + 19290: 83 c4 10 add $0x10,%esp + 19293: 83 ec 04 sub $0x4,%esp + 19296: 68 c2 00 00 00 push $0xc2 + 1929b: 68 c4 b2 01 00 push $0x1b2c4 + 192a0: 68 d0 b2 01 00 push $0x1b2d0 + 192a5: e8 b6 07 00 00 call 19a60 <_DbgPrint> + 192aa: 83 c4 10 add $0x10,%esp + 192ad: 83 ec 08 sub $0x8,%esp + 192b0: 8b 45 08 mov 0x8(%ebp),%eax + 192b3: ff 70 20 pushl 0x20(%eax) + 192b6: 68 4a b9 01 00 push $0x1b94a + 192bb: e8 a0 07 00 00 call 19a60 <_DbgPrint> + 192c0: 83 c4 10 add $0x10,%esp + 192c3: 83 ec 04 sub $0x4,%esp + 192c6: 68 c3 00 00 00 push $0xc3 + 192cb: 68 c4 b2 01 00 push $0x1b2c4 + 192d0: 68 d0 b2 01 00 push $0x1b2d0 + 192d5: e8 86 07 00 00 call 19a60 <_DbgPrint> + 192da: 83 c4 10 add $0x10,%esp + 192dd: 83 ec 08 sub $0x8,%esp + 192e0: 8b 45 08 mov 0x8(%ebp),%eax + 192e3: ff 70 24 pushl 0x24(%eax) + 192e6: 68 67 b9 01 00 push $0x1b967 + 192eb: e8 70 07 00 00 call 19a60 <_DbgPrint> + 192f0: 83 c4 10 add $0x10,%esp + 192f3: 83 ec 04 sub $0x4,%esp + 192f6: 68 c4 00 00 00 push $0xc4 + 192fb: 68 c4 b2 01 00 push $0x1b2c4 + 19300: 68 d0 b2 01 00 push $0x1b2d0 + 19305: e8 56 07 00 00 call 19a60 <_DbgPrint> + 1930a: 83 c4 10 add $0x10,%esp + 1930d: 83 ec 08 sub $0x8,%esp + 19310: 8b 45 08 mov 0x8(%ebp),%eax + 19313: ff 70 2c pushl 0x2c(%eax) + 19316: 68 82 b9 01 00 push $0x1b982 + 1931b: e8 40 07 00 00 call 19a60 <_DbgPrint> + 19320: 83 c4 10 add $0x10,%esp + 19323: 83 ec 04 sub $0x4,%esp + 19326: 68 c5 00 00 00 push $0xc5 + 1932b: 68 c4 b2 01 00 push $0x1b2c4 + 19330: 68 d0 b2 01 00 push $0x1b2d0 + 19335: e8 26 07 00 00 call 19a60 <_DbgPrint> + 1933a: 83 c4 10 add $0x10,%esp + 1933d: 83 ec 08 sub $0x8,%esp + 19340: 8b 45 08 mov 0x8(%ebp),%eax + 19343: ff 70 30 pushl 0x30(%eax) + 19346: 68 9d b9 01 00 push $0x1b99d + 1934b: e8 10 07 00 00 call 19a60 <_DbgPrint> + 19350: 83 c4 10 add $0x10,%esp + 19353: 83 ec 04 sub $0x4,%esp + 19356: 68 c6 00 00 00 push $0xc6 + 1935b: 68 c4 b2 01 00 push $0x1b2c4 + 19360: 68 d0 b2 01 00 push $0x1b2d0 + 19365: e8 f6 06 00 00 call 19a60 <_DbgPrint> + 1936a: 83 c4 10 add $0x10,%esp + 1936d: 83 ec 08 sub $0x8,%esp + 19370: 8b 45 08 mov 0x8(%ebp),%eax + 19373: ff 70 38 pushl 0x38(%eax) + 19376: 68 b8 b9 01 00 push $0x1b9b8 + 1937b: e8 e0 06 00 00 call 19a60 <_DbgPrint> + 19380: 83 c4 10 add $0x10,%esp + 19383: 83 ec 04 sub $0x4,%esp + 19386: 68 c7 00 00 00 push $0xc7 + 1938b: 68 c4 b2 01 00 push $0x1b2c4 + 19390: 68 d0 b2 01 00 push $0x1b2d0 + 19395: e8 c6 06 00 00 call 19a60 <_DbgPrint> + 1939a: 83 c4 10 add $0x10,%esp + 1939d: 83 ec 08 sub $0x8,%esp + 193a0: 8b 45 08 mov 0x8(%ebp),%eax + 193a3: ff 70 40 pushl 0x40(%eax) + 193a6: 68 d3 b9 01 00 push $0x1b9d3 + 193ab: e8 b0 06 00 00 call 19a60 <_DbgPrint> + 193b0: 83 c4 10 add $0x10,%esp + 193b3: 83 ec 04 sub $0x4,%esp + 193b6: 68 c8 00 00 00 push $0xc8 + 193bb: 68 c4 b2 01 00 push $0x1b2c4 + 193c0: 68 d0 b2 01 00 push $0x1b2d0 + 193c5: e8 96 06 00 00 call 19a60 <_DbgPrint> + 193ca: 83 c4 10 add $0x10,%esp + 193cd: 83 ec 08 sub $0x8,%esp + 193d0: 8b 45 08 mov 0x8(%ebp),%eax + 193d3: ff 70 44 pushl 0x44(%eax) + 193d6: 68 ee b9 01 00 push $0x1b9ee + 193db: e8 80 06 00 00 call 19a60 <_DbgPrint> + 193e0: 83 c4 10 add $0x10,%esp + 193e3: 83 ec 04 sub $0x4,%esp + 193e6: 68 c9 00 00 00 push $0xc9 + 193eb: 68 c4 b2 01 00 push $0x1b2c4 + 193f0: 68 d0 b2 01 00 push $0x1b2d0 + 193f5: e8 66 06 00 00 call 19a60 <_DbgPrint> + 193fa: 83 c4 10 add $0x10,%esp + 193fd: 83 ec 08 sub $0x8,%esp + 19400: 8b 45 08 mov 0x8(%ebp),%eax + 19403: ff 70 48 pushl 0x48(%eax) + 19406: 68 09 ba 01 00 push $0x1ba09 + 1940b: e8 50 06 00 00 call 19a60 <_DbgPrint> + 19410: 83 c4 10 add $0x10,%esp + 19413: 83 ec 04 sub $0x4,%esp + 19416: 68 ca 00 00 00 push $0xca + 1941b: 68 c4 b2 01 00 push $0x1b2c4 + 19420: 68 d0 b2 01 00 push $0x1b2d0 + 19425: e8 36 06 00 00 call 19a60 <_DbgPrint> + 1942a: 83 c4 10 add $0x10,%esp + 1942d: 83 ec 08 sub $0x8,%esp + 19430: 8b 45 08 mov 0x8(%ebp),%eax + 19433: ff 70 4c pushl 0x4c(%eax) + 19436: 68 24 ba 01 00 push $0x1ba24 + 1943b: e8 20 06 00 00 call 19a60 <_DbgPrint> + 19440: 83 c4 10 add $0x10,%esp + 19443: 83 ec 04 sub $0x4,%esp + 19446: 68 cb 00 00 00 push $0xcb + 1944b: 68 c4 b2 01 00 push $0x1b2c4 + 19450: 68 d0 b2 01 00 push $0x1b2d0 + 19455: e8 06 06 00 00 call 19a60 <_DbgPrint> + 1945a: 83 c4 10 add $0x10,%esp + 1945d: 83 ec 08 sub $0x8,%esp + 19460: 8b 45 08 mov 0x8(%ebp),%eax + 19463: ff 70 54 pushl 0x54(%eax) + 19466: 68 3f ba 01 00 push $0x1ba3f + 1946b: e8 f0 05 00 00 call 19a60 <_DbgPrint> + 19470: 83 c4 10 add $0x10,%esp + 19473: 83 ec 04 sub $0x4,%esp + 19476: 68 cc 00 00 00 push $0xcc + 1947b: 68 c4 b2 01 00 push $0x1b2c4 + 19480: 68 d0 b2 01 00 push $0x1b2d0 + 19485: e8 d6 05 00 00 call 19a60 <_DbgPrint> + 1948a: 83 c4 10 add $0x10,%esp + 1948d: 83 ec 08 sub $0x8,%esp + 19490: 8b 45 08 mov 0x8(%ebp),%eax + 19493: ff 70 58 pushl 0x58(%eax) + 19496: 68 5a ba 01 00 push $0x1ba5a + 1949b: e8 c0 05 00 00 call 19a60 <_DbgPrint> + 194a0: 83 c4 10 add $0x10,%esp + 194a3: c9 leave + 194a4: c3 ret + 194a5: 90 nop + 194a6: 90 nop + 194a7: 90 nop + 194a8: 90 nop + 194a9: 90 nop + 194aa: 90 nop + 194ab: 90 nop + 194ac: 90 nop + 194ad: 90 nop + 194ae: 90 nop + 194af: 90 nop + +000194b0 <_wait_ms>: + 194b0: 55 push %ebp + 194b1: 89 e5 mov %esp,%ebp + 194b3: 83 ec 08 sub $0x8,%esp + 194b6: 8b 55 08 mov 0x8(%ebp),%edx + 194b9: 89 d0 mov %edx,%eax + 194bb: c1 e0 02 shl $0x2,%eax + 194be: 01 d0 add %edx,%eax + 194c0: 01 c0 add %eax,%eax + 194c2: f7 d8 neg %eax + 194c4: 99 cltd + 194c5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 194c8: 89 55 fc mov %edx,0xfffffffc(%ebp) + 194cb: 83 ec 04 sub $0x4,%esp + 194ce: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 194d1: 50 push %eax + 194d2: 6a 00 push $0x0 + 194d4: 6a 00 push $0x0 + 194d6: e8 f5 05 00 00 call 19ad0 <_KeDelayExecutionThread@12> + 194db: 83 c4 04 add $0x4,%esp + 194de: c9 leave + 194df: c3 ret + +000194e0 <_init_wrapper>: + 194e0: 55 push %ebp + 194e1: 89 e5 mov %esp,%ebp + 194e3: 83 ec 04 sub $0x4,%esp + 194e6: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 194ed: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 194f1: 7f 15 jg 19508 <_init_wrapper+0x28> + 194f3: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 194f6: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) + 194fd: 00 00 00 00 + 19501: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 19504: ff 00 incl (%eax) + 19506: eb e5 jmp 194ed <_init_wrapper+0xd> + 19508: c7 05 40 c2 01 00 00 movl $0x0,0x1c240 + 1950f: 00 00 00 + 19512: c7 05 40 c1 01 00 00 movl $0x0,0x1c140 + 19519: 00 00 00 + 1951c: c7 05 30 c2 01 00 80 movl $0x1c080,0x1c230 + 19523: c0 01 00 + 19526: c7 05 88 c0 01 00 00 movl $0x0,0x1c088 + 1952d: 00 00 00 + 19530: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 19537: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 1953b: 7f 33 jg 19570 <_init_wrapper+0x90> + 1953d: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 19540: 89 d0 mov %edx,%eax + 19542: 01 c0 add %eax,%eax + 19544: 01 d0 add %edx,%eax + 19546: c1 e0 02 shl $0x2,%eax + 19549: c7 80 d0 c1 01 00 00 movl $0x0,0x1c1d0(%eax) + 19550: 00 00 00 + 19553: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 19556: 89 d0 mov %edx,%eax + 19558: 01 c0 add %eax,%eax + 1955a: 01 d0 add %edx,%eax + 1955c: c1 e0 02 shl $0x2,%eax + 1955f: c7 80 d4 c1 01 00 ff movl $0xffffffff,0x1c1d4(%eax) + 19566: ff ff ff + 19569: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1956c: ff 00 incl (%eax) + 1956e: eb c7 jmp 19537 <_init_wrapper+0x57> + 19570: c7 05 b8 c0 01 00 00 movl $0x0,0x1c0b8 + 19577: 00 00 00 + 1957a: c7 05 c0 c1 01 00 00 movl $0x0,0x1c1c0 + 19581: 00 00 00 + 19584: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1958b: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 1958f: 7f 15 jg 195a6 <_init_wrapper+0xc6> + 19591: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 19594: c7 04 85 98 c0 01 00 movl $0x0,0x1c098(,%eax,4) + 1959b: 00 00 00 00 + 1959f: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 195a2: ff 00 incl (%eax) + 195a4: eb e5 jmp 1958b <_init_wrapper+0xab> + 195a6: c9 leave + 195a7: c3 ret + +000195a8 <_handle_irqs>: + 195a8: 55 push %ebp + 195a9: 89 e5 mov %esp,%ebp + 195ab: 83 ec 08 sub $0x8,%esp + 195ae: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 195b5: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 195b9: 0f 8f 86 00 00 00 jg 19645 <_handle_irqs+0x9d> + 195bf: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 195c2: 89 c2 mov %eax,%edx + 195c4: 01 d2 add %edx,%edx + 195c6: 01 c2 add %eax,%edx + 195c8: 8d 04 95 00 00 00 00 lea 0x0(,%edx,4),%eax + 195cf: 83 b8 d0 c1 01 00 00 cmpl $0x0,0x1c1d0(%eax) + 195d6: 74 63 je 1963b <_handle_irqs+0x93> + 195d8: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 195db: 89 d0 mov %edx,%eax + 195dd: 01 c0 add %eax,%eax + 195df: 01 d0 add %edx,%eax + 195e1: c1 e0 02 shl $0x2,%eax + 195e4: 8b 80 d4 c1 01 00 mov 0x1c1d4(%eax),%eax + 195ea: 3b 45 08 cmp 0x8(%ebp),%eax + 195ed: 74 08 je 195f7 <_handle_irqs+0x4f> + 195ef: 83 7d 08 ff cmpl $0xffffffff,0x8(%ebp) + 195f3: 74 02 je 195f7 <_handle_irqs+0x4f> + 195f5: eb 44 jmp 1963b <_handle_irqs+0x93> + 195f7: 83 ec 04 sub $0x4,%esp + 195fa: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 195fd: 89 d0 mov %edx,%eax + 195ff: 01 c0 add %eax,%eax + 19601: 01 d0 add %edx,%eax + 19603: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 1960a: 6a 00 push $0x0 + 1960c: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1960f: 89 d0 mov %edx,%eax + 19611: 01 c0 add %eax,%eax + 19613: 01 d0 add %edx,%eax + 19615: c1 e0 02 shl $0x2,%eax + 19618: ff b0 d8 c1 01 00 pushl 0x1c1d8(%eax) + 1961e: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 19621: 89 d0 mov %edx,%eax + 19623: 01 c0 add %eax,%eax + 19625: 01 d0 add %edx,%eax + 19627: c1 e0 02 shl $0x2,%eax + 1962a: ff b0 d4 c1 01 00 pushl 0x1c1d4(%eax) + 19630: 8b 81 d0 c1 01 00 mov 0x1c1d0(%ecx),%eax + 19636: ff d0 call *%eax + 19638: 83 c4 10 add $0x10,%esp + 1963b: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1963e: ff 00 incl (%eax) + 19640: e9 70 ff ff ff jmp 195b5 <_handle_irqs+0xd> + 19645: c9 leave + 19646: c3 ret + +00019647 <_inc_jiffies>: + 19647: 55 push %ebp + 19648: 89 e5 mov %esp,%ebp + 1964a: 8b 45 08 mov 0x8(%ebp),%eax + 1964d: 01 05 40 c2 01 00 add %eax,0x1c240 + 19653: 5d pop %ebp + 19654: c3 ret + +00019655 <_do_all_timers>: + 19655: 55 push %ebp + 19656: 89 e5 mov %esp,%ebp + 19658: 83 ec 18 sub $0x18,%esp + 1965b: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 19662: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 19666: 0f 8f 82 00 00 00 jg 196ee <_do_all_timers+0x99> + 1966c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1966f: 83 3c 85 60 c1 01 00 cmpl $0x0,0x1c160(,%eax,4) + 19676: 00 + 19677: 74 6b je 196e4 <_do_all_timers+0x8f> + 19679: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1967c: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 19683: 83 38 00 cmpl $0x0,(%eax) + 19686: 74 5c je 196e4 <_do_all_timers+0x8f> + 19688: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1968b: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 19692: 83 78 08 00 cmpl $0x0,0x8(%eax) + 19696: 74 4c je 196e4 <_do_all_timers+0x8f> + 19698: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1969b: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 196a2: 8b 00 mov (%eax),%eax + 196a4: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 196a7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 196aa: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 196b1: 8b 40 04 mov 0x4(%eax),%eax + 196b4: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 196b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 196ba: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 196c1: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 196c8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 196cb: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) + 196d2: 00 00 00 00 + 196d6: 83 ec 0c sub $0xc,%esp + 196d9: ff 75 f4 pushl 0xfffffff4(%ebp) + 196dc: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 196df: ff d0 call *%eax + 196e1: 83 c4 10 add $0x10,%esp + 196e4: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 196e7: ff 00 incl (%eax) + 196e9: e9 74 ff ff ff jmp 19662 <_do_all_timers+0xd> + 196ee: c9 leave + 196ef: c3 ret + +000196f0 <_my_kernel_thread>: + 196f0: 55 push %ebp + 196f1: 89 e5 mov %esp,%ebp + 196f3: 8b 45 08 mov 0x8(%ebp),%eax + 196f6: a3 50 c1 01 00 mov %eax,0x1c150 + 196fb: 8b 45 0c mov 0xc(%ebp),%eax + 196fe: a3 b0 c1 01 00 mov %eax,0x1c1b0 + 19703: b8 2a 00 00 00 mov $0x2a,%eax + 19708: 5d pop %ebp + 19709: c3 ret + +0001970a <_my_device_add>: + 1970a: 55 push %ebp + 1970b: 89 e5 mov %esp,%ebp + 1970d: 83 ec 18 sub $0x18,%esp + 19710: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 19717: 8b 45 08 mov 0x8(%ebp),%eax + 1971a: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) + 19721: 74 32 je 19755 <_my_device_add+0x4b> + 19723: 8b 45 08 mov 0x8(%ebp),%eax + 19726: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 1972c: 83 78 08 00 cmpl $0x0,0x8(%eax) + 19730: 0f 84 8d 00 00 00 je 197c3 <_my_device_add+0xb9> + 19736: 83 ec 0c sub $0xc,%esp + 19739: 8b 45 08 mov 0x8(%ebp),%eax + 1973c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 19742: ff 75 08 pushl 0x8(%ebp) + 19745: 8b 40 08 mov 0x8(%eax),%eax + 19748: ff d0 call *%eax + 1974a: 83 c4 10 add $0x10,%esp + 1974d: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 19750: e9 82 00 00 00 jmp 197d7 <_my_device_add+0xcd> + 19755: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1975c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1975f: 3b 05 b8 c0 01 00 cmp 0x1c0b8,%eax + 19765: 7d 4d jge 197b4 <_my_device_add+0xaa> + 19767: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1976a: 8b 04 85 98 c0 01 00 mov 0x1c098(,%eax,4),%eax + 19771: 83 78 08 00 cmpl $0x0,0x8(%eax) + 19775: 74 36 je 197ad <_my_device_add+0xa3> + 19777: 8b 55 08 mov 0x8(%ebp),%edx + 1977a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1977d: 8b 04 85 98 c0 01 00 mov 0x1c098(,%eax,4),%eax + 19784: 89 82 98 00 00 00 mov %eax,0x98(%edx) + 1978a: 83 ec 0c sub $0xc,%esp + 1978d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 19790: 8b 04 85 98 c0 01 00 mov 0x1c098(,%eax,4),%eax + 19797: ff 75 08 pushl 0x8(%ebp) + 1979a: 8b 40 08 mov 0x8(%eax),%eax + 1979d: ff d0 call *%eax + 1979f: 83 c4 10 add $0x10,%esp + 197a2: 85 c0 test %eax,%eax + 197a4: 75 07 jne 197ad <_my_device_add+0xa3> + 197a6: c7 45 f8 01 00 00 00 movl $0x1,0xfffffff8(%ebp) + 197ad: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 197b0: ff 00 incl (%eax) + 197b2: eb a8 jmp 1975c <_my_device_add+0x52> + 197b4: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 197b8: 74 09 je 197c3 <_my_device_add+0xb9> + 197ba: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 197c1: eb 14 jmp 197d7 <_my_device_add+0xcd> + 197c3: 8b 45 08 mov 0x8(%ebp),%eax + 197c6: c7 80 98 00 00 00 00 movl $0x0,0x98(%eax) + 197cd: 00 00 00 + 197d0: c7 45 f4 ed ff ff ff movl $0xffffffed,0xfffffff4(%ebp) + 197d7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 197da: c9 leave + 197db: c3 ret + +000197dc <_my_driver_register>: + 197dc: 55 push %ebp + 197dd: 89 e5 mov %esp,%ebp + 197df: 83 ec 04 sub $0x4,%esp + 197e2: 83 3d b8 c0 01 00 07 cmpl $0x7,0x1c0b8 + 197e9: 7f 20 jg 1980b <_my_driver_register+0x2f> + 197eb: a1 b8 c0 01 00 mov 0x1c0b8,%eax + 197f0: 89 c2 mov %eax,%edx + 197f2: 8b 45 08 mov 0x8(%ebp),%eax + 197f5: 89 04 95 98 c0 01 00 mov %eax,0x1c098(,%edx,4) + 197fc: ff 05 b8 c0 01 00 incl 0x1c0b8 + 19802: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 19809: eb 07 jmp 19812 <_my_driver_register+0x36> + 1980b: c7 45 fc ff ff ff ff movl $0xffffffff,0xfffffffc(%ebp) + 19812: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 19815: c9 leave + 19816: c3 ret + +00019817 <_my_device_unregister>: + 19817: 55 push %ebp + 19818: 89 e5 mov %esp,%ebp + 1981a: 83 ec 08 sub $0x8,%esp + 1981d: 8b 45 08 mov 0x8(%ebp),%eax + 19820: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) + 19827: 74 26 je 1984f <_my_device_unregister+0x38> + 19829: 8b 45 08 mov 0x8(%ebp),%eax + 1982c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 19832: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 19836: 74 17 je 1984f <_my_device_unregister+0x38> + 19838: 83 ec 0c sub $0xc,%esp + 1983b: 8b 45 08 mov 0x8(%ebp),%eax + 1983e: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 19844: ff 75 08 pushl 0x8(%ebp) + 19847: 8b 40 0c mov 0xc(%eax),%eax + 1984a: ff d0 call *%eax + 1984c: 83 c4 10 add $0x10,%esp + 1984f: b8 00 00 00 00 mov $0x0,%eax + 19854: c9 leave + 19855: c3 ret + +00019856 <_my_get_device>: + 19856: 55 push %ebp + 19857: 89 e5 mov %esp,%ebp + 19859: b8 00 00 00 00 mov $0x0,%eax + 1985e: 5d pop %ebp + 1985f: c3 ret + +00019860 <_my_device_initialize>: + 19860: 55 push %ebp + 19861: 89 e5 mov %esp,%ebp + 19863: 5d pop %ebp + 19864: c3 ret + +00019865 <_my_wake_up>: + 19865: 55 push %ebp + 19866: 89 e5 mov %esp,%ebp + 19868: c7 05 c0 c1 01 00 01 movl $0x1,0x1c1c0 + 1986f: 00 00 00 + 19872: 5d pop %ebp + 19873: c3 ret + +00019874 <_my_schedule_timeout>: + 19874: 55 push %ebp + 19875: 89 e5 mov %esp,%ebp + 19877: 83 ec 08 sub $0x8,%esp + 1987a: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) + 19881: 83 45 08 0a addl $0xa,0x8(%ebp) + 19885: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 19889: 7e 3e jle 198c9 <_my_schedule_timeout+0x55> + 1988b: e8 c5 fd ff ff call 19655 <_do_all_timers> + 19890: 83 ec 0c sub $0xc,%esp + 19893: 6a ff push $0xffffffff + 19895: e8 0e fd ff ff call 195a8 <_handle_irqs> + 1989a: 83 c4 10 add $0x10,%esp + 1989d: 83 3d c0 c1 01 00 00 cmpl $0x0,0x1c1c0 + 198a4: 74 02 je 198a8 <_my_schedule_timeout+0x34> + 198a6: eb 21 jmp 198c9 <_my_schedule_timeout+0x55> + 198a8: 83 ec 0c sub $0xc,%esp + 198ab: ff 75 fc pushl 0xfffffffc(%ebp) + 198ae: e8 fd fb ff ff call 194b0 <_wait_ms> + 198b3: 83 c4 10 add $0x10,%esp + 198b6: ff 75 fc pushl 0xfffffffc(%ebp) + 198b9: e8 89 fd ff ff call 19647 <_inc_jiffies> + 198be: 83 c4 04 add $0x4,%esp + 198c1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 198c4: 29 45 08 sub %eax,0x8(%ebp) + 198c7: eb bc jmp 19885 <_my_schedule_timeout+0x11> + 198c9: c7 05 c0 c1 01 00 00 movl $0x0,0x1c1c0 + 198d0: 00 00 00 + 198d3: 8b 45 08 mov 0x8(%ebp),%eax + 198d6: c9 leave + 198d7: c3 ret + +000198d8 <_my_wait_for_completion>: + 198d8: 55 push %ebp + 198d9: 89 e5 mov %esp,%ebp + 198db: 83 ec 08 sub $0x8,%esp + 198de: c7 45 fc 64 00 00 00 movl $0x64,0xfffffffc(%ebp) + 198e5: 8b 45 08 mov 0x8(%ebp),%eax + 198e8: 83 38 00 cmpl $0x0,(%eax) + 198eb: 75 2c jne 19919 <_my_wait_for_completion+0x41> + 198ed: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 198f1: 7e 26 jle 19919 <_my_wait_for_completion+0x41> + 198f3: e8 5d fd ff ff call 19655 <_do_all_timers> + 198f8: 83 ec 0c sub $0xc,%esp + 198fb: 6a ff push $0xffffffff + 198fd: e8 a6 fc ff ff call 195a8 <_handle_irqs> + 19902: 83 c4 10 add $0x10,%esp + 19905: 83 ec 0c sub $0xc,%esp + 19908: 6a 0a push $0xa + 1990a: e8 a1 fb ff ff call 194b0 <_wait_ms> + 1990f: 83 c4 10 add $0x10,%esp + 19912: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 19915: ff 08 decl (%eax) + 19917: eb cc jmp 198e5 <_my_wait_for_completion+0xd> + 19919: c9 leave + 1991a: c3 ret + +0001991b <_my_pci_module_init>: + 1991b: 55 push %ebp + 1991c: 89 e5 mov %esp,%ebp + 1991e: 83 ec 18 sub $0x18,%esp + 19921: a1 88 c0 01 00 mov 0x1c088,%eax + 19926: 89 45 fc mov %eax,0xfffffffc(%ebp) + 19929: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 19930: 83 3d 88 c0 01 00 00 cmpl $0x0,0x1c088 + 19937: 75 33 jne 1996c <_my_pci_module_init+0x51> + 19939: 83 ec 04 sub $0x4,%esp + 1993c: 68 ef 00 00 00 push $0xef + 19941: 68 78 ba 01 00 push $0x1ba78 + 19946: 68 8e ba 01 00 push $0x1ba8e + 1994b: e8 10 01 00 00 call 19a60 <_DbgPrint> + 19950: 83 c4 10 add $0x10,%esp + 19953: 83 ec 0c sub $0xc,%esp + 19956: 68 97 ba 01 00 push $0x1ba97 + 1995b: e8 00 01 00 00 call 19a60 <_DbgPrint> + 19960: 83 c4 10 add $0x10,%esp + 19963: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 1996a: eb 1b jmp 19987 <_my_pci_module_init+0x6c> + 1996c: 83 ec 08 sub $0x8,%esp + 1996f: 8b 45 08 mov 0x8(%ebp),%eax + 19972: ff 75 f8 pushl 0xfffffff8(%ebp) + 19975: ff 75 fc pushl 0xfffffffc(%ebp) + 19978: 8b 40 10 mov 0x10(%eax),%eax + 1997b: ff d0 call *%eax + 1997d: 83 c4 10 add $0x10,%esp + 19980: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 19987: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1998a: c9 leave + 1998b: c3 ret + +0001998c <_my_pci_find_slot>: + 1998c: 55 push %ebp + 1998d: 89 e5 mov %esp,%ebp + 1998f: b8 00 00 00 00 mov $0x0,%eax + 19994: 5d pop %ebp + 19995: c3 ret + +00019996 <_my_request_irq>: + 19996: 55 push %ebp + 19997: 89 e5 mov %esp,%ebp + 19999: 83 ec 04 sub $0x4,%esp + 1999c: 83 3d 40 c1 01 00 07 cmpl $0x7,0x1c140 + 199a3: 7f 63 jg 19a08 <_my_request_irq+0x72> + 199a5: 8b 15 40 c1 01 00 mov 0x1c140,%edx + 199ab: 89 d0 mov %edx,%eax + 199ad: 01 c0 add %eax,%eax + 199af: 01 d0 add %edx,%eax + 199b1: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 199b8: 8b 45 0c mov 0xc(%ebp),%eax + 199bb: 89 82 d0 c1 01 00 mov %eax,0x1c1d0(%edx) + 199c1: 8b 15 40 c1 01 00 mov 0x1c140,%edx + 199c7: 89 d0 mov %edx,%eax + 199c9: 01 c0 add %eax,%eax + 199cb: 01 d0 add %edx,%eax + 199cd: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 199d4: 8b 45 08 mov 0x8(%ebp),%eax + 199d7: 89 82 d4 c1 01 00 mov %eax,0x1c1d4(%edx) + 199dd: 8b 15 40 c1 01 00 mov 0x1c140,%edx + 199e3: 89 d0 mov %edx,%eax + 199e5: 01 c0 add %eax,%eax + 199e7: 01 d0 add %edx,%eax + 199e9: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 199f0: 8b 45 18 mov 0x18(%ebp),%eax + 199f3: 89 82 d8 c1 01 00 mov %eax,0x1c1d8(%edx) + 199f9: ff 05 40 c1 01 00 incl 0x1c140 + 199ff: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 19a06: eb 07 jmp 19a0f <_my_request_irq+0x79> + 19a08: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) + 19a0f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 19a12: c9 leave + 19a13: c3 ret + +00019a14 <_my_free_irq>: + 19a14: 55 push %ebp + 19a15: 89 e5 mov %esp,%ebp + 19a17: b8 00 00 00 00 mov $0x0,%eax + 19a1c: 5d pop %ebp + 19a1d: c3 ret + 19a1e: 90 nop + 19a1f: 90 nop + +00019a20 <_DriverEntry@8>: + 19a20: 55 push %ebp + 19a21: 89 e5 mov %esp,%ebp + 19a23: b8 00 00 00 00 mov $0x0,%eax + 19a28: 5d pop %ebp + 19a29: c2 08 00 ret $0x8 + 19a2c: 90 nop + 19a2d: 90 nop + 19a2e: 90 nop + 19a2f: 90 nop + +00019a30 <_ExAllocatePool@8>: + 19a30: ff 25 64 e0 01 00 jmp *0x1e064 + 19a36: 90 nop + 19a37: 90 nop + ... + +00019a40 <_ExFreePool@4>: + 19a40: ff 25 68 e0 01 00 jmp *0x1e068 + 19a46: 90 nop + 19a47: 90 nop + ... + +00019a50 <_memset>: + 19a50: ff 25 7c e0 01 00 jmp *0x1e07c + 19a56: 90 nop + 19a57: 90 nop + ... + +00019a60 <_DbgPrint>: + 19a60: ff 25 60 e0 01 00 jmp *0x1e060 + 19a66: 90 nop + 19a67: 90 nop + ... + +00019a70 <_memcpy>: + 19a70: ff 25 78 e0 01 00 jmp *0x1e078 + 19a76: 90 nop + 19a77: 90 nop + ... + +00019a80 <_strlen>: + 19a80: ff 25 88 e0 01 00 jmp *0x1e088 + 19a86: 90 nop + 19a87: 90 nop + ... + +00019a90 <_sprintf>: + 19a90: ff 25 80 e0 01 00 jmp *0x1e080 + 19a96: 90 nop + 19a97: 90 nop + ... + +00019aa0 <_strcpy>: + 19aa0: ff 25 84 e0 01 00 jmp *0x1e084 + 19aa6: 90 nop + 19aa7: 90 nop + ... + +00019ab0 <_RtlCompareMemory@12>: + 19ab0: ff 25 70 e0 01 00 jmp *0x1e070 + 19ab6: 90 nop + 19ab7: 90 nop + ... + +00019ac0 <__snprintf>: + 19ac0: ff 25 74 e0 01 00 jmp *0x1e074 + 19ac6: 90 nop + 19ac7: 90 nop + ... + +00019ad0 <_KeDelayExecutionThread@12>: + 19ad0: ff 25 6c e0 01 00 jmp *0x1e06c + 19ad6: 90 nop + 19ad7: 90 nop + ... + +00019ae0 <__CTOR_LIST__>: + 19ae0: ff (bad) + 19ae1: ff (bad) + 19ae2: ff (bad) + 19ae3: ff 00 incl (%eax) + 19ae5: 00 00 add %al,(%eax) + ... + +00019ae8 <__DTOR_LIST__>: + 19ae8: ff (bad) + 19ae9: ff (bad) + 19aea: ff (bad) + 19aeb: ff 00 incl (%eax) + 19aed: 00 00 add %al,(%eax) + ... + +00019af0 : + ... diff --git a/reactos/drivers/usb/cromwell/core/usbcore.nostrip.sys b/reactos/drivers/usb/cromwell/core/usbcore.nostrip.sys new file mode 100644 index 00000000000..23844dbb11d Binary files /dev/null and b/reactos/drivers/usb/cromwell/core/usbcore.nostrip.sys differ diff --git a/reactos/drivers/usb/cromwell/core/usbcore.rc b/reactos/drivers/usb/cromwell/core/usbcore.rc new file mode 100644 index 00000000000..bccb64ac3d2 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usbcore.rc @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "USB Core Device Driver\0" +#define REACTOS_STR_INTERNAL_NAME "usbcore\0" +#define REACTOS_STR_ORIGINAL_FILENAME "usbcore.sys\0" +#include diff --git a/reactos/drivers/usb/cromwell/core/usbcore.sym b/reactos/drivers/usb/cromwell/core/usbcore.sym new file mode 100644 index 00000000000..12d96659795 Binary files /dev/null and b/reactos/drivers/usb/cromwell/core/usbcore.sym differ diff --git a/reactos/drivers/usb/cromwell/core/usbcore.sys b/reactos/drivers/usb/cromwell/core/usbcore.sys new file mode 100644 index 00000000000..c7841bd6375 Binary files /dev/null and b/reactos/drivers/usb/cromwell/core/usbcore.sys differ diff --git a/reactos/drivers/usb/cromwell/host/makefile b/reactos/drivers/usb/cromwell/host/makefile new file mode 100644 index 00000000000..0cc14867050 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/makefile @@ -0,0 +1,16 @@ +PATH_TO_TOP = ../../../.. + +TARGET_TYPE = export_driver + +TARGET_NAME = ohci + +TARGET_DDKLIBS = ntoskrnl.a usbcore.a + +TARGET_CFLAGS = -Wall -I$(PATH_TO_TOP)/ntoskrnl/include + +TARGET_OBJECTS = \ + ohci-hcd.o ohci_main.o ../sys/ros_wrapper.o ../sys/linuxwrapper.o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk diff --git a/reactos/drivers/usb/cromwell/host/makefile.crom b/reactos/drivers/usb/cromwell/host/makefile.crom new file mode 100644 index 00000000000..c23390585ae --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/makefile.crom @@ -0,0 +1,3 @@ +O_TARGET := ohci-hcd.o + +include $(TOPDIR)/Rules.make diff --git a/reactos/drivers/usb/cromwell/host/ohci-dbg.c b/reactos/drivers/usb/cromwell/host/ohci-dbg.c new file mode 100644 index 00000000000..6c9661b6738 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-dbg.c @@ -0,0 +1,666 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * This file is licenced under the GPL. + */ + +/*-------------------------------------------------------------------------*/ + +#ifdef DEBUG + +#define edstring(ed_type) ({ char *temp; \ + switch (ed_type) { \ + case PIPE_CONTROL: temp = "ctrl"; break; \ + case PIPE_BULK: temp = "bulk"; break; \ + case PIPE_INTERRUPT: temp = "intr"; break; \ + default: temp = "isoc"; break; \ + }; temp;}) +#define pipestring(pipe) edstring(usb_pipetype(pipe)) + +/* debug| print the main components of an URB + * small: 0) header + data packets 1) just header + */ +static void __attribute__((unused)) +urb_print (struct urb * urb, char * str, int small) +{ + unsigned int pipe= urb->pipe; + + if (!urb->dev || !urb->dev->bus) { + dbg("%s URB: no dev", str); + return; + } + +#ifndef OHCI_VERBOSE_DEBUG + if (urb->status != 0) +#endif + dbg("%s %p dev=%d ep=%d%s-%s flags=%x len=%d/%d stat=%d", + str, + urb, + usb_pipedevice (pipe), + usb_pipeendpoint (pipe), + usb_pipeout (pipe)? "out" : "in", + pipestring (pipe), + urb->transfer_flags, + urb->actual_length, + urb->transfer_buffer_length, + urb->status); + +#ifdef OHCI_VERBOSE_DEBUG + if (!small) { + int i, len; + + if (usb_pipecontrol (pipe)) { + printk (KERN_DEBUG __FILE__ ": setup(8):"); + for (i = 0; i < 8 ; i++) + printk (" %02x", ((__u8 *) urb->setup_packet) [i]); + printk ("\n"); + } + if (urb->transfer_buffer_length > 0 && urb->transfer_buffer) { + printk (KERN_DEBUG __FILE__ ": data(%d/%d):", + urb->actual_length, + urb->transfer_buffer_length); + len = usb_pipeout (pipe)? + urb->transfer_buffer_length: urb->actual_length; + for (i = 0; i < 16 && i < len; i++) + printk (" %02x", ((__u8 *) urb->transfer_buffer) [i]); + printk ("%s stat:%d\n", i < len? "...": "", urb->status); + } + } +#endif +} + +#define ohci_dbg_sw(ohci, next, size, format, arg...) \ + do { \ + if (next) { \ + unsigned s_len; \ + s_len = snprintf (*next, *size, format, ## arg ); \ + *size -= s_len; *next += s_len; \ + } else \ + ohci_dbg(ohci,format, ## arg ); \ + } while (0); + + +static void ohci_dump_intr_mask ( + struct ohci_hcd *ohci, + char *label, + u32 mask, + char **next, + unsigned *size) +{ + ohci_dbg_sw (ohci, next, size, "%s 0x%08x%s%s%s%s%s%s%s%s%s\n", + label, + mask, + (mask & OHCI_INTR_MIE) ? " MIE" : "", + (mask & OHCI_INTR_OC) ? " OC" : "", + (mask & OHCI_INTR_RHSC) ? " RHSC" : "", + (mask & OHCI_INTR_FNO) ? " FNO" : "", + (mask & OHCI_INTR_UE) ? " UE" : "", + (mask & OHCI_INTR_RD) ? " RD" : "", + (mask & OHCI_INTR_SF) ? " SF" : "", + (mask & OHCI_INTR_WDH) ? " WDH" : "", + (mask & OHCI_INTR_SO) ? " SO" : "" + ); +} + +static void maybe_print_eds ( + struct ohci_hcd *ohci, + char *label, + u32 value, + char **next, + unsigned *size) +{ + if (value) + ohci_dbg_sw (ohci, next, size, "%s %08x\n", label, value); +} + +static char *hcfs2string (int state) +{ + switch (state) { + case OHCI_USB_RESET: return "reset"; + case OHCI_USB_RESUME: return "resume"; + case OHCI_USB_OPER: return "operational"; + case OHCI_USB_SUSPEND: return "suspend"; + } + return "?"; +} + +// dump control and status registers +static void +ohci_dump_status (struct ohci_hcd *controller, char **next, unsigned *size) +{ + struct ohci_regs *regs = controller->regs; + u32 temp; + + temp = readl (®s->revision) & 0xff; + ohci_dbg_sw (controller, next, size, + "OHCI %d.%d, %s legacy support registers\n", + 0x03 & (temp >> 4), (temp & 0x0f), + (temp & 0x10) ? "with" : "NO"); + + temp = readl (®s->control); + ohci_dbg_sw (controller, next, size, + "control 0x%03x%s%s%s HCFS=%s%s%s%s%s CBSR=%d\n", + temp, + (temp & OHCI_CTRL_RWE) ? " RWE" : "", + (temp & OHCI_CTRL_RWC) ? " RWC" : "", + (temp & OHCI_CTRL_IR) ? " IR" : "", + hcfs2string (temp & OHCI_CTRL_HCFS), + (temp & OHCI_CTRL_BLE) ? " BLE" : "", + (temp & OHCI_CTRL_CLE) ? " CLE" : "", + (temp & OHCI_CTRL_IE) ? " IE" : "", + (temp & OHCI_CTRL_PLE) ? " PLE" : "", + temp & OHCI_CTRL_CBSR + ); + + temp = readl (®s->cmdstatus); + ohci_dbg_sw (controller, next, size, + "cmdstatus 0x%05x SOC=%d%s%s%s%s\n", temp, + (temp & OHCI_SOC) >> 16, + (temp & OHCI_OCR) ? " OCR" : "", + (temp & OHCI_BLF) ? " BLF" : "", + (temp & OHCI_CLF) ? " CLF" : "", + (temp & OHCI_HCR) ? " HCR" : "" + ); + + ohci_dump_intr_mask (controller, "intrstatus", + readl (®s->intrstatus), next, size); + ohci_dump_intr_mask (controller, "intrenable", + readl (®s->intrenable), next, size); + // intrdisable always same as intrenable + + maybe_print_eds (controller, "ed_periodcurrent", + readl (®s->ed_periodcurrent), next, size); + + maybe_print_eds (controller, "ed_controlhead", + readl (®s->ed_controlhead), next, size); + maybe_print_eds (controller, "ed_controlcurrent", + readl (®s->ed_controlcurrent), next, size); + + maybe_print_eds (controller, "ed_bulkhead", + readl (®s->ed_bulkhead), next, size); + maybe_print_eds (controller, "ed_bulkcurrent", + readl (®s->ed_bulkcurrent), next, size); + + maybe_print_eds (controller, "donehead", + readl (®s->donehead), next, size); +} + +#define dbg_port_sw(hc,num,value,next,size) \ + ohci_dbg_sw (hc, next, size, \ + "roothub.portstatus [%d] " \ + "0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \ + num, temp, \ + (temp & RH_PS_PRSC) ? " PRSC" : "", \ + (temp & RH_PS_OCIC) ? " OCIC" : "", \ + (temp & RH_PS_PSSC) ? " PSSC" : "", \ + (temp & RH_PS_PESC) ? " PESC" : "", \ + (temp & RH_PS_CSC) ? " CSC" : "", \ + \ + (temp & RH_PS_LSDA) ? " LSDA" : "", \ + (temp & RH_PS_PPS) ? " PPS" : "", \ + (temp & RH_PS_PRS) ? " PRS" : "", \ + (temp & RH_PS_POCI) ? " POCI" : "", \ + (temp & RH_PS_PSS) ? " PSS" : "", \ + \ + (temp & RH_PS_PES) ? " PES" : "", \ + (temp & RH_PS_CCS) ? " CCS" : "" \ + ); + + +static void +ohci_dump_roothub ( + struct ohci_hcd *controller, + int verbose, + char **next, + unsigned *size) +{ + u32 temp, ndp, i; + + temp = roothub_a (controller); + if (temp == ~(u32)0) + return; + ndp = (temp & RH_A_NDP); + + if (verbose) { + ohci_dbg_sw (controller, next, size, + "roothub.a %08x POTPGT=%d%s%s%s%s%s NDP=%d\n", temp, + ((temp & RH_A_POTPGT) >> 24) & 0xff, + (temp & RH_A_NOCP) ? " NOCP" : "", + (temp & RH_A_OCPM) ? " OCPM" : "", + (temp & RH_A_DT) ? " DT" : "", + (temp & RH_A_NPS) ? " NPS" : "", + (temp & RH_A_PSM) ? " PSM" : "", + ndp + ); + temp = roothub_b (controller); + ohci_dbg_sw (controller, next, size, + "roothub.b %08x PPCM=%04x DR=%04x\n", + temp, + (temp & RH_B_PPCM) >> 16, + (temp & RH_B_DR) + ); + temp = roothub_status (controller); + ohci_dbg_sw (controller, next, size, + "roothub.status %08x%s%s%s%s%s%s\n", + temp, + (temp & RH_HS_CRWE) ? " CRWE" : "", + (temp & RH_HS_OCIC) ? " OCIC" : "", + (temp & RH_HS_LPSC) ? " LPSC" : "", + (temp & RH_HS_DRWE) ? " DRWE" : "", + (temp & RH_HS_OCI) ? " OCI" : "", + (temp & RH_HS_LPS) ? " LPS" : "" + ); + } + + for (i = 0; i < ndp; i++) { + temp = roothub_portstatus (controller, i); + dbg_port_sw (controller, i, temp, next, size); + } +} + +static void ohci_dump (struct ohci_hcd *controller, int verbose) +{ + ohci_dbg (controller, "OHCI controller state\n"); + + // dumps some of the state we know about + ohci_dump_status (controller, NULL, 0); + if (controller->hcca) + ohci_dbg (controller, + "hcca frame #%04x\n", controller->hcca->frame_no); + ohci_dump_roothub (controller, 1, NULL, 0); +} + +static const char data0 [] = "DATA0"; +static const char data1 [] = "DATA1"; + +static void ohci_dump_td (struct ohci_hcd *ohci, char *label, struct td *td) +{ + u32 tmp = le32_to_cpup (&td->hwINFO); + + ohci_dbg (ohci, "%s td %p%s; urb %p index %d; hw next td %08x", + label, td, + (tmp & TD_DONE) ? " (DONE)" : "", + td->urb, td->index, + le32_to_cpup (&td->hwNextTD)); + if ((tmp & TD_ISO) == 0) { + const char *toggle, *pid; + u32 cbp, be; + + switch (tmp & TD_T) { + case TD_T_DATA0: toggle = data0; break; + case TD_T_DATA1: toggle = data1; break; + case TD_T_TOGGLE: toggle = "(CARRY)"; break; + default: toggle = "(?)"; break; + } + switch (tmp & TD_DP) { + case TD_DP_SETUP: pid = "SETUP"; break; + case TD_DP_IN: pid = "IN"; break; + case TD_DP_OUT: pid = "OUT"; break; + default: pid = "(bad pid)"; break; + } + ohci_dbg (ohci, " info %08x CC=%x %s DI=%d %s %s", tmp, + TD_CC_GET(tmp), /* EC, */ toggle, + (tmp & TD_DI) >> 21, pid, + (tmp & TD_R) ? "R" : ""); + cbp = le32_to_cpup (&td->hwCBP); + be = le32_to_cpup (&td->hwBE); + ohci_dbg (ohci, " cbp %08x be %08x (len %d)", cbp, be, + cbp ? (be + 1 - cbp) : 0); + } else { + unsigned i; + ohci_dbg (ohci, " info %08x CC=%x FC=%d DI=%d SF=%04x", tmp, + TD_CC_GET(tmp), + (tmp >> 24) & 0x07, + (tmp & TD_DI) >> 21, + tmp & 0x0000ffff); + ohci_dbg (ohci, " bp0 %08x be %08x", + le32_to_cpup (&td->hwCBP) & ~0x0fff, + le32_to_cpup (&td->hwBE)); + for (i = 0; i < MAXPSW; i++) { + u16 psw = le16_to_cpup (&td->hwPSW [i]); + int cc = (psw >> 12) & 0x0f; + ohci_dbg (ohci, " psw [%d] = %2x, CC=%x %s=%d", i, + psw, cc, + (cc >= 0x0e) ? "OFFSET" : "SIZE", + psw & 0x0fff); + } + } +} + +/* caller MUST own hcd spinlock if verbose is set! */ +static void __attribute__((unused)) +ohci_dump_ed (struct ohci_hcd *ohci, char *label, struct ed *ed, int verbose) +{ + u32 tmp = ed->hwINFO; + char *type = ""; + + ohci_dbg (ohci, "%s, ed %p state 0x%x type %s; next ed %08x", + label, + ed, ed->state, edstring (ed->type), + le32_to_cpup (&ed->hwNextED)); + switch (tmp & (ED_IN|ED_OUT)) { + case ED_OUT: type = "-OUT"; break; + case ED_IN: type = "-IN"; break; + /* else from TDs ... control */ + } + ohci_dbg (ohci, + " info %08x MAX=%d%s%s%s%s EP=%d%s DEV=%d", le32_to_cpu (tmp), + 0x03ff & (le32_to_cpu (tmp) >> 16), + (tmp & ED_DEQUEUE) ? " DQ" : "", + (tmp & ED_ISO) ? " ISO" : "", + (tmp & ED_SKIP) ? " SKIP" : "", + (tmp & ED_LOWSPEED) ? " LOW" : "", + 0x000f & (le32_to_cpu (tmp) >> 7), + type, + 0x007f & le32_to_cpu (tmp)); + ohci_dbg (ohci, " tds: head %08x %s%s tail %08x%s", + tmp = le32_to_cpup (&ed->hwHeadP), + (ed->hwHeadP & ED_C) ? data1 : data0, + (ed->hwHeadP & ED_H) ? " HALT" : "", + le32_to_cpup (&ed->hwTailP), + verbose ? "" : " (not listing)"); + if (verbose) { + struct list_head *tmp; + + /* use ed->td_list because HC concurrently modifies + * hwNextTD as it accumulates ed_donelist. + */ + list_for_each (tmp, &ed->td_list) { + struct td *td; + td = list_entry (tmp, struct td, td_list); + ohci_dump_td (ohci, " ->", td); + } + } +} + +#else +static inline void ohci_dump (struct ohci_hcd *controller, int verbose) {} + +#undef OHCI_VERBOSE_DEBUG + +#endif /* DEBUG */ + +/*-------------------------------------------------------------------------*/ + +#ifdef STUB_DEBUG_FILES + +static inline void create_debug_files (struct ohci_hcd *bus) { } +static inline void remove_debug_files (struct ohci_hcd *bus) { } + +#else + +static inline struct ohci_hcd *dev_to_ohci (struct device *dev) +{ + struct usb_hcd *hcd = dev_get_drvdata (dev); + + return hcd_to_ohci (hcd); +} + +static ssize_t +show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed) +{ + unsigned temp, size = count; + + if (!ed) + return 0; + + /* print first --> last */ + while (ed->ed_prev) + ed = ed->ed_prev; + + /* dump a snapshot of the bulk or control schedule */ + while (ed) { + u32 info = ed->hwINFO; + u32 scratch = cpu_to_le32p (&ed->hwINFO); + struct list_head *entry; + struct td *td; + + temp = snprintf (buf, size, + "ed/%p %cs dev%d ep%d%s max %d %08x%s%s %s", + ed, + (info & ED_LOWSPEED) ? 'l' : 'f', + scratch & 0x7f, + (scratch >> 7) & 0xf, + (info & ED_IN) ? "in" : "out", + 0x03ff & (scratch >> 16), + scratch, + (info & ED_SKIP) ? " s" : "", + (ed->hwHeadP & ED_H) ? " H" : "", + (ed->hwHeadP & ED_C) ? data1 : data0); + size -= temp; + buf += temp; + + list_for_each (entry, &ed->td_list) { + u32 cbp, be; + + td = list_entry (entry, struct td, td_list); + scratch = cpu_to_le32p (&td->hwINFO); + cbp = le32_to_cpup (&td->hwCBP); + be = le32_to_cpup (&td->hwBE); + temp = snprintf (buf, size, + "\n\ttd %p %s %d cc=%x urb %p (%08x)", + td, + ({ char *pid; + switch (scratch & TD_DP) { + case TD_DP_SETUP: pid = "setup"; break; + case TD_DP_IN: pid = "in"; break; + case TD_DP_OUT: pid = "out"; break; + default: pid = "(?)"; break; + } pid;}), + cbp ? (be + 1 - cbp) : 0, + TD_CC_GET (scratch), td->urb, scratch); + size -= temp; + buf += temp; + } + + temp = snprintf (buf, size, "\n"); + size -= temp; + buf += temp; + + ed = ed->ed_next; + } + return count - size; +} + +static ssize_t +show_async (struct device *dev, char *buf) +{ + struct ohci_hcd *ohci; + size_t temp; + unsigned long flags; + + ohci = dev_to_ohci(dev); + + /* display control and bulk lists together, for simplicity */ + spin_lock_irqsave (&ohci->lock, flags); + temp = show_list (ohci, buf, PAGE_SIZE, ohci->ed_controltail); + temp += show_list (ohci, buf + temp, PAGE_SIZE - temp, ohci->ed_bulktail); + spin_unlock_irqrestore (&ohci->lock, flags); + + return temp; +} +static DEVICE_ATTR (async, S_IRUGO, show_async, NULL); + + +#define DBG_SCHED_LIMIT 64 + +static ssize_t +show_periodic (struct device *dev, char *buf) +{ + struct ohci_hcd *ohci; + struct ed **seen, *ed; + unsigned long flags; + unsigned temp, size, seen_count; + char *next; + unsigned i; + + if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, SLAB_ATOMIC))) + return 0; + seen_count = 0; + + ohci = dev_to_ohci(dev); + next = buf; + size = PAGE_SIZE; + + temp = snprintf (next, size, "size = %d\n", NUM_INTS); + size -= temp; + next += temp; + + /* dump a snapshot of the periodic schedule (and load) */ + spin_lock_irqsave (&ohci->lock, flags); + for (i = 0; i < NUM_INTS; i++) { + if (!(ed = ohci->periodic [i])) + continue; + + temp = snprintf (next, size, "%2d [%3d]:", i, ohci->load [i]); + size -= temp; + next += temp; + + do { + temp = snprintf (next, size, " ed%d/%p", + ed->interval, ed); + size -= temp; + next += temp; + for (temp = 0; temp < seen_count; temp++) { + if (seen [temp] == ed) + break; + } + + /* show more info the first time around */ + if (temp == seen_count) { + u32 info = ed->hwINFO; + u32 scratch = cpu_to_le32p (&ed->hwINFO); + + temp = snprintf (next, size, + " (%cs dev%d%s ep%d%s" + " max %d %08x%s%s)", + (info & ED_LOWSPEED) ? 'l' : 'f', + scratch & 0x7f, + (info & ED_ISO) ? " iso" : "", + (scratch >> 7) & 0xf, + (info & ED_IN) ? "in" : "out", + 0x03ff & (scratch >> 16), + scratch, + (info & ED_SKIP) ? " s" : "", + (ed->hwHeadP & ED_H) ? " H" : ""); + size -= temp; + next += temp; + + // FIXME some TD info too + + if (seen_count < DBG_SCHED_LIMIT) + seen [seen_count++] = ed; + + ed = ed->ed_next; + + } else { + /* we've seen it and what's after */ + temp = 0; + ed = 0; + } + + } while (ed); + + temp = snprintf (next, size, "\n"); + size -= temp; + next += temp; + } + spin_unlock_irqrestore (&ohci->lock, flags); + kfree (seen); + + return PAGE_SIZE - size; +} +static DEVICE_ATTR (periodic, S_IRUGO, show_periodic, NULL); + + +#undef DBG_SCHED_LIMIT + +static ssize_t +show_registers (struct device *dev, char *buf) +{ + struct ohci_hcd *ohci; + struct ohci_regs *regs; + unsigned long flags; + unsigned temp, size; + char *next; + u32 rdata; + + ohci = dev_to_ohci(dev); + regs = ohci->regs; + next = buf; + size = PAGE_SIZE; + + spin_lock_irqsave (&ohci->lock, flags); + + /* dump driver info, then registers in spec order */ + + ohci_dbg_sw (ohci, &next, &size, + "%s version " DRIVER_VERSION "\n", hcd_name); + + ohci_dump_status(ohci, &next, &size); + + /* hcca */ + if (ohci->hcca) + ohci_dbg_sw (ohci, &next, &size, + "hcca frame 0x%04x\n", ohci->hcca->frame_no); + + /* other registers mostly affect frame timings */ + rdata = readl (®s->fminterval); + temp = snprintf (next, size, + "fmintvl 0x%08x %sFSMPS=0x%04x FI=0x%04x\n", + rdata, (rdata >> 31) ? " FIT" : "", + (rdata >> 16) & 0xefff, rdata & 0xffff); + size -= temp; + next += temp; + + rdata = readl (®s->fmremaining); + temp = snprintf (next, size, "fmremaining 0x%08x %sFR=0x%04x\n", + rdata, (rdata >> 31) ? " FRT" : "", + rdata & 0x3fff); + size -= temp; + next += temp; + + rdata = readl (®s->periodicstart); + temp = snprintf (next, size, "periodicstart 0x%04x\n", + rdata & 0x3fff); + size -= temp; + next += temp; + + rdata = readl (®s->lsthresh); + temp = snprintf (next, size, "lsthresh 0x%04x\n", + rdata & 0x3fff); + size -= temp; + next += temp; + + /* roothub */ + ohci_dump_roothub (ohci, 1, &next, &size); + + spin_unlock_irqrestore (&ohci->lock, flags); + + return PAGE_SIZE - size; +} +static DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL); + + +static inline void create_debug_files (struct ohci_hcd *bus) +{ + device_create_file (bus->hcd.controller, &dev_attr_async); + device_create_file (bus->hcd.controller, &dev_attr_periodic); + device_create_file (bus->hcd.controller, &dev_attr_registers); + ohci_dbg (bus, "created debug files\n"); +} + +static inline void remove_debug_files (struct ohci_hcd *bus) +{ + device_remove_file (bus->hcd.controller, &dev_attr_async); + device_remove_file (bus->hcd.controller, &dev_attr_periodic); + device_remove_file (bus->hcd.controller, &dev_attr_registers); +} + +#endif + +/*-------------------------------------------------------------------------*/ + diff --git a/reactos/drivers/usb/cromwell/host/ohci-hcd.c b/reactos/drivers/usb/cromwell/host/ohci-hcd.c new file mode 100644 index 00000000000..fec58a01b5a --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-hcd.c @@ -0,0 +1,703 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * [ Initialisation is based on Linus' ] + * [ uhci code and gregs ohci fragments ] + * [ (C) Copyright 1999 Linus Torvalds ] + * [ (C) Copyright 1999 Gregory P. Smith] + * + * + * OHCI is the main "non-Intel/VIA" standard for USB 1.1 host controller + * interfaces (though some non-x86 Intel chips use it). It supports + * smarter hardware than UHCI. A download link for the spec available + * through the http://www.usb.org website. + * + * History: + * + * 2003/02/24 show registers in sysfs (Kevin Brosius) + * + * 2002/09/03 get rid of ed hashtables, rework periodic scheduling and + * bandwidth accounting; if debugging, show schedules in driverfs + * 2002/07/19 fixes to management of ED and schedule state. + * 2002/06/09 SA-1111 support (Christopher Hoover) + * 2002/06/01 remember frame when HC won't see EDs any more; use that info + * to fix urb unlink races caused by interrupt latency assumptions; + * minor ED field and function naming updates + * 2002/01/18 package as a patch for 2.5.3; this should match the + * 2.4.17 kernel modulo some bugs being fixed. + * + * 2001/10/18 merge pmac cleanup (Benjamin Herrenschmidt) and bugfixes + * from post-2.4.5 patches. + * 2001/09/20 URB_ZERO_PACKET support; hcca_dma portability, OPTi warning + * 2001/09/07 match PCI PM changes, errnos from Linus' tree + * 2001/05/05 fork 2.4.5 version into "hcd" framework, cleanup, simplify; + * pbook pci quirks gone (please fix pbook pci sw!) (db) + * + * 2001/04/08 Identify version on module load (gb) + * 2001/03/24 td/ed hashing to remove bus_to_virt (Steve Longerbeam); + pci_map_single (db) + * 2001/03/21 td and dev/ed allocation uses new pci_pool API (db) + * 2001/03/07 hcca allocation uses pci_alloc_consistent (Steve Longerbeam) + * + * 2000/09/26 fixed races in removing the private portion of the urb + * 2000/09/07 disable bulk and control lists when unlinking the last + * endpoint descriptor in order to avoid unrecoverable errors on + * the Lucent chips. (rwc@sgi) + * 2000/08/29 use bandwidth claiming hooks (thanks Randy!), fix some + * urb unlink probs, indentation fixes + * 2000/08/11 various oops fixes mostly affecting iso and cleanup from + * device unplugs. + * 2000/06/28 use PCI hotplug framework, for better power management + * and for Cardbus support (David Brownell) + * 2000/earlier: fixes for NEC/Lucent chips; suspend/resume handling + * when the controller loses power; handle UE; cleanup; ... + * + * v5.2 1999/12/07 URB 3rd preview, + * v5.1 1999/11/30 URB 2nd preview, cpia, (usb-scsi) + * v5.0 1999/11/22 URB Technical preview, Paul Mackerras powerbook susp/resume + * i386: HUB, Keyboard, Mouse, Printer + * + * v4.3 1999/10/27 multiple HCs, bulk_request + * v4.2 1999/09/05 ISO API alpha, new dev alloc, neg Error-codes + * v4.1 1999/08/27 Randy Dunlap's - ISO API first impl. + * v4.0 1999/08/18 + * v3.0 1999/06/25 + * v2.1 1999/05/09 code clean up + * v2.0 1999/05/04 + * v1.0 1999/04/27 initial release + * + * This file is licenced under the GPL. + */ + +#if 0 +#include + +#ifdef CONFIG_USB_DEBUG +# define DEBUG +#else +# undef DEBUG +#endif + + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* for in_interrupt () */ +#include +#include "../core/hcd.h" + +#include +#include +#include +#include +#include +#else +#include "ohci_config.h" + +#include "../usb_wrapper.h" +#include "../core/hcd.h" + +//#define OHCI_VERBOSE_DEBUG +#endif + +/* + * TO DO: + * + * - "disabled" and "sleeping" should be in hcd->state + * - lots more testing!! + */ + +#define DRIVER_VERSION "2003 Feb 24" +#define DRIVER_AUTHOR "Roman Weissgaerber, David Brownell" +#define DRIVER_DESC "USB 1.1 'Open' Host Controller (OHCI) Driver" + +/*-------------------------------------------------------------------------*/ + +// #define OHCI_VERBOSE_DEBUG /* not always helpful */ + +/* For initializing controller (mask in an HCFS mode too) */ +#define OHCI_CONTROL_INIT \ + (OHCI_CTRL_CBSR & 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE + +#define OHCI_UNLINK_TIMEOUT (HZ / 10) + +/*-------------------------------------------------------------------------*/ + +static const char hcd_name [] = "ohci-hcd"; + +#include "ohci.h" + +static inline void disable (struct ohci_hcd *ohci) +{ + ohci->disabled = 1; + ohci->hcd.state = USB_STATE_HALT; +} + +#include "ohci-hub.c" +#include "ohci-dbg.c" +#include "ohci-mem.c" +#include "ohci-q.c" + +/*-------------------------------------------------------------------------*/ + +/* + * queue up an urb for anything except the root hub + */ +static int ohci_urb_enqueue ( + struct usb_hcd *hcd, + struct urb *urb, + int mem_flags +) { + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + struct ed *ed; + urb_priv_t *urb_priv; + unsigned int pipe = urb->pipe; + int i, size = 0; + unsigned long flags; + int retval = 0; + +#ifdef OHCI_VERBOSE_DEBUG + urb_print (urb, "SUB", usb_pipein (pipe)); +#endif + + /* every endpoint has a ed, locate and maybe (re)initialize it */ + if (! (ed = ed_get (ohci, urb->dev, pipe, urb->interval))) + return -ENOMEM; + + /* for the private part of the URB we need the number of TDs (size) */ + switch (ed->type) { + case PIPE_CONTROL: + /* td_submit_urb() doesn't yet handle these */ + if (urb->transfer_buffer_length > 4096) + return -EMSGSIZE; + + /* 1 TD for setup, 1 for ACK, plus ... */ + size = 2; + /* FALLTHROUGH */ + // case PIPE_INTERRUPT: + // case PIPE_BULK: + default: + /* one TD for every 4096 Bytes (can be upto 8K) */ + size += urb->transfer_buffer_length / 4096; + /* ... and for any remaining bytes ... */ + if ((urb->transfer_buffer_length % 4096) != 0) + size++; + /* ... and maybe a zero length packet to wrap it up */ + if (size == 0) + size++; + else if ((urb->transfer_flags & URB_ZERO_PACKET) != 0 + && (urb->transfer_buffer_length + % usb_maxpacket (urb->dev, pipe, + usb_pipeout (pipe))) == 0) + size++; + break; + case PIPE_ISOCHRONOUS: /* number of packets from URB */ + size = urb->number_of_packets; + break; + } + + /* allocate the private part of the URB */ + urb_priv = kmalloc (sizeof (urb_priv_t) + size * sizeof (struct td *), + mem_flags); + if (!urb_priv) + return -ENOMEM; + memset (urb_priv, 0, sizeof (urb_priv_t) + size * sizeof (struct td *)); + + /* fill the private part of the URB */ + urb_priv->length = size; + urb_priv->ed = ed; + + /* allocate the TDs (deferring hash chain updates) */ + for (i = 0; i < size; i++) { + urb_priv->td [i] = td_alloc (ohci, mem_flags); + if (!urb_priv->td [i]) { + urb_priv->length = i; + urb_free_priv (ohci, urb_priv); + return -ENOMEM; + } + } + + spin_lock_irqsave (&ohci->lock, flags); + + /* don't submit to a dead HC */ + if (ohci->disabled || ohci->sleeping) { + retval = -ENODEV; + goto fail; + } + + /* schedule the ed if needed */ + if (ed->state == ED_IDLE) { + retval = ed_schedule (ohci, ed); + if (retval < 0) + goto fail; + if (ed->type == PIPE_ISOCHRONOUS) { + u16 frame = le16_to_cpu (ohci->hcca->frame_no); + + /* delay a few frames before the first TD */ + frame += max_t (u16, 8, ed->interval); + frame &= ~(ed->interval - 1); + frame |= ed->branch; + urb->start_frame = frame; + + /* yes, only URB_ISO_ASAP is supported, and + * urb->start_frame is never used as input. + */ + } + } else if (ed->type == PIPE_ISOCHRONOUS) + urb->start_frame = ed->last_iso + ed->interval; + + /* fill the TDs and link them to the ed; and + * enable that part of the schedule, if needed + * and update count of queued periodic urbs + */ + urb->hcpriv = urb_priv; + td_submit_urb (ohci, urb); + +fail: + if (retval) + urb_free_priv (ohci, urb_priv); + spin_unlock_irqrestore (&ohci->lock, flags); + return retval; +} + +/* + * decouple the URB from the HC queues (TDs, urb_priv); it's + * already marked using urb->status. reporting is always done + * asynchronously, and we might be dealing with an urb that's + * partially transferred, or an ED with other urbs being unlinked. + */ +static int ohci_urb_dequeue (struct usb_hcd *hcd, struct urb *urb) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + unsigned long flags; + +#ifdef OHCI_VERBOSE_DEBUG + urb_print (urb, "UNLINK", 1); +#endif + + spin_lock_irqsave (&ohci->lock, flags); + if (!ohci->disabled) { + urb_priv_t *urb_priv; + + /* Unless an IRQ completed the unlink while it was being + * handed to us, flag it for unlink and giveback, and force + * some upcoming INTR_SF to call finish_unlinks() + */ + urb_priv = urb->hcpriv; + if (urb_priv) { + urb_priv->state = URB_DEL; + if (urb_priv->ed->state == ED_OPER) + start_urb_unlink (ohci, urb_priv->ed); + } + } else { + /* + * with HC dead, we won't respect hc queue pointers + * any more ... just clean up every urb's memory. + */ + if (urb->hcpriv) { + spin_unlock (&ohci->lock); + finish_urb (ohci, urb, NULL); + spin_lock (&ohci->lock); + } + } + spin_unlock_irqrestore (&ohci->lock, flags); + return 0; +} + +/*-------------------------------------------------------------------------*/ + +/* frees config/altsetting state for endpoints, + * including ED memory, dummy TD, and bulk/intr data toggle + */ + +static void +ohci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + int epnum = ep & USB_ENDPOINT_NUMBER_MASK; + unsigned long flags; + struct ed *ed; + + /* ASSERT: any requests/urbs are being unlinked */ + /* ASSERT: nobody can be submitting urbs for this any more */ + + epnum <<= 1; + if (epnum != 0 && !(ep & USB_DIR_IN)) + epnum |= 1; + +rescan: + spin_lock_irqsave (&ohci->lock, flags); + ed = dev->ep [epnum]; + if (!ed) + goto done; + + if (!HCD_IS_RUNNING (ohci->hcd.state) || ohci->disabled) + ed->state = ED_IDLE; + switch (ed->state) { + case ED_UNLINK: /* wait for hw to finish? */ + spin_unlock_irqrestore (&ohci->lock, flags); + set_current_state (TASK_UNINTERRUPTIBLE); + schedule_timeout (1); + goto rescan; + case ED_IDLE: /* fully unlinked */ + if (list_empty (&ed->td_list)) { + td_free (ohci, ed->dummy); + ed_free (ohci, ed); + break; + } + /* else FALL THROUGH */ + default: + /* caller was supposed to have unlinked any requests; + * that's not our job. can't recover; must leak ed. + */ + ohci_err (ohci, "ed %p (#%d) state %d%s\n", + ed, epnum, ed->state, + list_empty (&ed->td_list) ? "" : "(has tds)"); + td_free (ohci, ed->dummy); + break; + } + dev->ep [epnum] = 0; +done: + spin_unlock_irqrestore (&ohci->lock, flags); + return; +} + +static int ohci_get_frame (struct usb_hcd *hcd) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + + return le16_to_cpu (ohci->hcca->frame_no); +} + +/*-------------------------------------------------------------------------* + * HC functions + *-------------------------------------------------------------------------*/ + +/* reset the HC and BUS */ + +static int hc_reset (struct ohci_hcd *ohci) +{ + u32 temp; + u32 ints; + u32 control; + + /* Disable HC interrupts */ + writel (OHCI_INTR_MIE, &ohci->regs->intrdisable); + // acknowledge all pending interrupts + ints = readl(&ohci->regs->intrstatus); + writel (ints, &ohci->regs->intrstatus); + + if (readl (&ohci->regs->control) & OHCI_CTRL_IR) { + // takeover without negotiation - there is noone to negotiate with + control = readl (&ohci->regs->control) & ~OHCI_CTRL_IR; + writel (control, &ohci->regs->control); + } + + ohci_dbg (ohci, "USB HC reset_hc %s: ctrl = 0x%x ;\n", + hcd_to_bus (&ohci->hcd)->bus_name, + readl (&ohci->regs->control)); + + /* Reset USB (needed by some controllers); RemoteWakeupConnected + * saved if boot firmware (BIOS/SMM/...) told us it's connected + */ + ohci->hc_control = readl (&ohci->regs->control); + ohci->hc_control &= OHCI_CTRL_RWC; /* hcfs 0 = RESET */ + writel (ohci->hc_control, &ohci->regs->control); + // flush those pci writes + (void) readl (&ohci->regs->control); + wait_ms (50); + + /* HC Reset requires max 10 us delay */ + writel (OHCI_HCR, &ohci->regs->cmdstatus); + temp = 30; /* ... allow extra time */ + while ((readl (&ohci->regs->cmdstatus) & OHCI_HCR) != 0) { + if (--temp == 0) { + ohci_err (ohci, "USB HC reset timed out!\n"); + return -1; + } + udelay (1); + } + + /* now we're in the SUSPEND state ... must go OPERATIONAL + * within 2msec else HC enters RESUME + * + * ... but some hardware won't init fmInterval "by the book" + * (SiS, OPTi ...), so reset again instead. SiS doesn't need + * this if we write fmInterval after we're OPERATIONAL. + */ + writel (ohci->hc_control, &ohci->regs->control); + // flush those pci writes + (void) readl (&ohci->regs->control); + + return 0; +} + +/*-------------------------------------------------------------------------*/ + +#define FI 0x2edf /* 12000 bits per frame (-1) */ +#define LSTHRESH 0x628 /* lowspeed bit threshold */ + +/* Start an OHCI controller, set the BUS operational + * enable interrupts + * connect the virtual root hub + */ +static int hc_start (struct ohci_hcd *ohci) +{ + u32 mask, tmp; + struct usb_device *udev; + struct usb_bus *bus; + + spin_lock_init (&ohci->lock); + ohci->disabled = 1; + ohci->sleeping = 0; + + /* Tell the controller where the control and bulk lists are + * The lists are empty now. */ + writel (0, &ohci->regs->ed_controlhead); + writel (0, &ohci->regs->ed_bulkhead); + + /* a reset clears this */ + writel ((u32) ohci->hcca_dma, &ohci->regs->hcca); +// usbprintk("HCCA: %p \n",ohci->regs->hcca); + + /* force default fmInterval (we won't adjust it); init thresholds + * for last FS and LS packets, reserve 90% for periodic. + */ + writel ((((6 * (FI - 210)) / 7) << 16) | FI, &ohci->regs->fminterval); + writel (((9 * FI) / 10) & 0x3fff, &ohci->regs->periodicstart); + writel (LSTHRESH, &ohci->regs->lsthresh); + + /* some OHCI implementations are finicky about how they init. + * bogus values here mean not even enumeration could work. + */ + if ((readl (&ohci->regs->fminterval) & 0x3fff0000) == 0 + || !readl (&ohci->regs->periodicstart)) { + ohci_err (ohci, "init err\n"); + return -EOVERFLOW; + } + + /* start controller operations */ + ohci->hc_control &= OHCI_CTRL_RWC; + ohci->hc_control |= OHCI_CONTROL_INIT | OHCI_USB_OPER; + ohci->disabled = 0; + writel (ohci->hc_control, &ohci->regs->control); + + /* Choose the interrupts we care about now, others later on demand */ + mask = OHCI_INTR_MIE | OHCI_INTR_UE | OHCI_INTR_WDH; + writel (mask, &ohci->regs->intrstatus); + writel (mask, &ohci->regs->intrenable); + + /* handle root hub init quirks ... */ + tmp = roothub_a (ohci); + tmp &= ~(RH_A_PSM | RH_A_OCPM); + if (ohci->flags & OHCI_QUIRK_SUPERIO) { + /* NSC 87560 and maybe others */ + tmp |= RH_A_NOCP; + tmp &= ~(RH_A_POTPGT | RH_A_NPS); + } else { + /* hub power always on; required for AMD-756 and some + * Mac platforms, use this mode everywhere by default + */ + tmp |= RH_A_NPS; + } + writel (tmp, &ohci->regs->roothub.a); + writel (RH_HS_LPSC, &ohci->regs->roothub.status); + writel (0, &ohci->regs->roothub.b); + // flush those pci writes + (void) readl (&ohci->regs->control); + + // POTPGT delay is bits 24-31, in 2 ms units. + mdelay ((roothub_a (ohci) >> 23) & 0x1fe); + + /* connect the virtual root hub */ + bus = hcd_to_bus (&ohci->hcd); + bus->root_hub = udev = usb_alloc_dev (NULL, bus); + ohci->hcd.state = USB_STATE_READY; + if (!udev) { + disable (ohci); + ohci->hc_control &= ~OHCI_CTRL_HCFS; + writel (ohci->hc_control, &ohci->regs->control); + ohci_err(ohci,"out of mem"); + return -ENOMEM; + } + + usb_connect (udev); + udev->speed = USB_SPEED_FULL; + if (hcd_register_root (&ohci->hcd) != 0) { + usb_put_dev (udev); + bus->root_hub = NULL; + disable (ohci); + ohci->hc_control &= ~OHCI_CTRL_HCFS; + writel (ohci->hc_control, &ohci->regs->control); + return -ENODEV; + } + create_debug_files (ohci); + return 0; +} + +/*-------------------------------------------------------------------------*/ + +/* an interrupt happens */ + +static void ohci_irq (struct usb_hcd *hcd, struct pt_regs *ptregs) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + struct ohci_regs *regs = ohci->regs; + int ints; + + /* we can eliminate a (slow) readl() if _only_ WDH caused this irq */ + if ((ohci->hcca->done_head != 0) + && ! (le32_to_cpup (&ohci->hcca->done_head) & 0x01)) { + ints = OHCI_INTR_WDH; + + /* cardbus/... hardware gone before remove() */ + } else if ((ints = readl (®s->intrstatus)) == ~(u32)0) { + disable (ohci); + ohci_dbg (ohci, "device removed!\n"); + return; + + /* interrupt for some other device? */ + } else if ((ints &= readl (®s->intrenable)) == 0) { + return; + } + + if (ints & OHCI_INTR_UE) { + disable (ohci); + ohci_err (ohci, "OHCI Unrecoverable Error, disabled\n"); + // e.g. due to PCI Master/Target Abort + + ohci_dump (ohci, 1); + hc_reset (ohci); + } + + if (ints & OHCI_INTR_WDH) { + writel (OHCI_INTR_WDH, ®s->intrdisable); + dl_done_list (ohci, dl_reverse_done_list (ohci), ptregs); + writel (OHCI_INTR_WDH, ®s->intrenable); + } + + /* could track INTR_SO to reduce available PCI/... bandwidth */ + + /* handle any pending URB/ED unlinks, leaving INTR_SF enabled + * when there's still unlinking to be done (next frame). + */ + spin_lock (&ohci->lock); + if (ohci->ed_rm_list) + finish_unlinks (ohci, le16_to_cpu (ohci->hcca->frame_no), + ptregs); + if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list) + writel (OHCI_INTR_SF, ®s->intrdisable); + spin_unlock (&ohci->lock); + + writel (ints, ®s->intrstatus); + writel (OHCI_INTR_MIE, ®s->intrenable); + // flush those pci writes + (void) readl (&ohci->regs->control); +} + +/*-------------------------------------------------------------------------*/ + +static void ohci_stop (struct usb_hcd *hcd) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + struct ohci_regs *regs = ohci->regs; + int ints; + + ohci_dbg (ohci, "stop %s controller%s\n", + hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS), + ohci->disabled ? " (disabled)" : "" + ); + ohci_dump (ohci, 1); + + if (!ohci->disabled) + hc_reset (ohci); + + // Disable all interrupts + writel (OHCI_INTR_MIE, ®s->intrdisable); + // acknowledge all pending interrupts + ints = readl(®s->intrstatus); + writel (ints, ®s->intrstatus); + // flush register writes + (void) readl (&ohci->regs->control); + + remove_debug_files (ohci); + ohci_mem_cleanup (ohci); + if (ohci->hcca) { + pci_free_consistent (ohci->hcd.pdev, sizeof *ohci->hcca, + ohci->hcca, ohci->hcca_dma); + ohci->hcca = NULL; + ohci->hcca_dma = 0; + } +} + +/*-------------------------------------------------------------------------*/ + +// FIXME: this restart logic should be generic, +// and handle full hcd state cleanup + +/* controller died; cleanup debris, then restart */ +/* must not be called from interrupt context */ + +#ifdef CONFIG_PM +static int hc_restart (struct ohci_hcd *ohci) +{ + int temp; + int i; + + ohci->disabled = 1; + ohci->sleeping = 0; + if (hcd_to_bus (&ohci->hcd)->root_hub) + usb_disconnect (&hcd_to_bus (&ohci->hcd)->root_hub); + + /* empty the interrupt branches */ + for (i = 0; i < NUM_INTS; i++) ohci->load [i] = 0; + for (i = 0; i < NUM_INTS; i++) ohci->hcca->int_table [i] = 0; + + /* no EDs to remove */ + ohci->ed_rm_list = NULL; + + /* empty control and bulk lists */ + ohci->ed_controltail = NULL; + ohci->ed_bulktail = NULL; + + if ((temp = hc_reset (ohci)) < 0 || (temp = hc_start (ohci)) < 0) { + ohci_err (ohci, "can't restart, %d\n", temp); + return temp; + } else + ohci_dbg (ohci, "restart complete\n"); + return 0; +} +#endif + +/*-------------------------------------------------------------------------*/ + +#define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC + +MODULE_AUTHOR (DRIVER_AUTHOR); +MODULE_DESCRIPTION (DRIVER_INFO); +MODULE_LICENSE ("GPL"); + +#ifdef CONFIG_PCI +#include "ohci-pci.c" +#endif + +#ifdef CONFIG_SA1111 +#include "ohci-sa1111.c" +#endif + +#if !(defined(CONFIG_PCI) || defined(CONFIG_SA1111)) +#error "missing bus glue for ohci-hcd" +#endif diff --git a/reactos/drivers/usb/cromwell/host/ohci-hub.c b/reactos/drivers/usb/cromwell/host/ohci-hub.c new file mode 100644 index 00000000000..03be82741e0 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-hub.c @@ -0,0 +1,271 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * This file is licenced under GPL + */ + +/*-------------------------------------------------------------------------*/ + +/* + * OHCI Root Hub ... the nonsharable stuff + * + * Registers don't need cpu_to_le32, that happens transparently + */ + +/* AMD-756 (D2 rev) reports corrupt register contents in some cases. + * The erratum (#4) description is incorrect. AMD's workaround waits + * till some bits (mostly reserved) are clear; ok for all revs. + */ +#define read_roothub(hc, register, mask) ({ \ + u32 temp = readl (&hc->regs->roothub.register); \ + if (temp == -1) \ + disable (hc); \ + else if (hc->flags & OHCI_QUIRK_AMD756) \ + while (temp & mask) \ + temp = readl (&hc->regs->roothub.register); \ + temp; }) + +static u32 roothub_a (struct ohci_hcd *hc) + { return read_roothub (hc, a, 0xfc0fe000); } +static inline u32 roothub_b (struct ohci_hcd *hc) + { return readl (&hc->regs->roothub.b); } +static inline u32 roothub_status (struct ohci_hcd *hc) + { return readl (&hc->regs->roothub.status); } +static u32 roothub_portstatus (struct ohci_hcd *hc, int i) + { return read_roothub (hc, portstatus [i], 0xffe0fce0); } + +/*-------------------------------------------------------------------------*/ + +#define dbg_port(hc,label,num,value) \ + ohci_dbg (hc, \ + "%s roothub.portstatus [%d] " \ + "= 0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \ + label, num, temp, \ + (temp & RH_PS_PRSC) ? " PRSC" : "", \ + (temp & RH_PS_OCIC) ? " OCIC" : "", \ + (temp & RH_PS_PSSC) ? " PSSC" : "", \ + (temp & RH_PS_PESC) ? " PESC" : "", \ + (temp & RH_PS_CSC) ? " CSC" : "", \ + \ + (temp & RH_PS_LSDA) ? " LSDA" : "", \ + (temp & RH_PS_PPS) ? " PPS" : "", \ + (temp & RH_PS_PRS) ? " PRS" : "", \ + (temp & RH_PS_POCI) ? " POCI" : "", \ + (temp & RH_PS_PSS) ? " PSS" : "", \ + \ + (temp & RH_PS_PES) ? " PES" : "", \ + (temp & RH_PS_CCS) ? " CCS" : "" \ + ); + + +/*-------------------------------------------------------------------------*/ + +/* build "status change" packet (one or two bytes) from HC registers */ + +static int +ohci_hub_status_data (struct usb_hcd *hcd, char *buf) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + int ports, i, changed = 0, length = 1; + + ports = roothub_a (ohci) & RH_A_NDP; + if (ports > MAX_ROOT_PORTS) { + if (ohci->disabled) + return -ESHUTDOWN; + ohci_err (ohci, "bogus NDP=%d, rereads as NDP=%d\n", + ports, readl (&ohci->regs->roothub.a) & RH_A_NDP); + /* retry later; "should not happen" */ + return 0; + } + + /* init status */ + if (roothub_status (ohci) & (RH_HS_LPSC | RH_HS_OCIC)) + buf [0] = changed = 1; + else + buf [0] = 0; + if (ports > 7) { + buf [1] = 0; + length++; + } + + /* look at each port */ + for (i = 0; i < ports; i++) { + u32 status = roothub_portstatus (ohci, i); + + status &= RH_PS_CSC | RH_PS_PESC | RH_PS_PSSC + | RH_PS_OCIC | RH_PS_PRSC; + if (status) { + changed = 1; + if (i < 7) + buf [0] |= 1 << (i + 1); + else + buf [1] |= 1 << (i - 7); + } + } + return changed ? length : 0; +} + +/*-------------------------------------------------------------------------*/ + +static void +ohci_hub_descriptor ( + struct ohci_hcd *ohci, + struct usb_hub_descriptor *desc +) { + u32 rh = roothub_a (ohci); + int ports = rh & RH_A_NDP; + u16 temp; + + desc->bDescriptorType = 0x29; + desc->bPwrOn2PwrGood = (rh & RH_A_POTPGT) >> 24; + desc->bHubContrCurrent = 0; + + desc->bNbrPorts = ports; + temp = 1 + (ports / 8); + desc->bDescLength = 7 + 2 * temp; + + temp = 0; + if (rh & RH_A_PSM) /* per-port power switching? */ + temp |= 0x0001; + if (rh & RH_A_NOCP) /* no overcurrent reporting? */ + temp |= 0x0010; + else if (rh & RH_A_OCPM) /* per-port overcurrent reporting? */ + temp |= 0x0008; + desc->wHubCharacteristics = cpu_to_le16 (temp); + + /* two bitmaps: ports removable, and usb 1.0 legacy PortPwrCtrlMask */ + rh = roothub_b (ohci); + desc->bitmap [0] = rh & RH_B_DR; + if (ports > 7) { + desc->bitmap [1] = (rh & RH_B_DR) >> 8; + desc->bitmap [2] = desc->bitmap [3] = 0xff; + } else + desc->bitmap [1] = 0xff; +} + +/*-------------------------------------------------------------------------*/ + +static int ohci_hub_control ( + struct usb_hcd *hcd, + u16 typeReq, + u16 wValue, + u16 wIndex, + char *buf, + u16 wLength +) { + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + int ports = hcd_to_bus (hcd)->root_hub->maxchild; + u32 temp; + int retval = 0; + + switch (typeReq) { + case ClearHubFeature: + switch (wValue) { + case C_HUB_OVER_CURRENT: + writel (RH_HS_OCIC, &ohci->regs->roothub.status); + case C_HUB_LOCAL_POWER: + break; + default: + goto error; + } + break; + case ClearPortFeature: + if (!wIndex || wIndex > ports) + goto error; + wIndex--; + + switch (wValue) { + case USB_PORT_FEAT_ENABLE: + temp = RH_PS_CCS; + break; + case USB_PORT_FEAT_C_ENABLE: + temp = RH_PS_PESC; + break; + case USB_PORT_FEAT_SUSPEND: + temp = RH_PS_POCI; + break; + case USB_PORT_FEAT_C_SUSPEND: + temp = RH_PS_PSSC; + break; + case USB_PORT_FEAT_POWER: + temp = RH_PS_LSDA; + break; + case USB_PORT_FEAT_C_CONNECTION: + temp = RH_PS_CSC; + break; + case USB_PORT_FEAT_C_OVER_CURRENT: + temp = RH_PS_OCIC; + break; + case USB_PORT_FEAT_C_RESET: + temp = RH_PS_PRSC; + break; + default: + goto error; + } + writel (temp, &ohci->regs->roothub.portstatus [wIndex]); + // readl (&ohci->regs->roothub.portstatus [wIndex]); + break; + case GetHubDescriptor: + ohci_hub_descriptor (ohci, (struct usb_hub_descriptor *) buf); + break; + case GetHubStatus: + temp = roothub_status (ohci) & ~(RH_HS_CRWE | RH_HS_DRWE); + *(u32 *) buf = cpu_to_le32 (temp); + break; + case GetPortStatus: + if (!wIndex || wIndex > ports) + goto error; + wIndex--; + temp = roothub_portstatus (ohci, wIndex); + *(u32 *) buf = cpu_to_le32 (temp); + +#ifndef OHCI_VERBOSE_DEBUG + if (*(u16*)(buf+2)) /* only if wPortChange is interesting */ +#endif + dbg_port (ohci, "GetStatus", wIndex + 1, temp); + break; + case SetHubFeature: + switch (wValue) { + case C_HUB_OVER_CURRENT: + // FIXME: this can be cleared, yes? + case C_HUB_LOCAL_POWER: + break; + default: + goto error; + } + break; + case SetPortFeature: + if (!wIndex || wIndex > ports) + goto error; + wIndex--; + switch (wValue) { + case USB_PORT_FEAT_SUSPEND: + writel (RH_PS_PSS, + &ohci->regs->roothub.portstatus [wIndex]); + break; + case USB_PORT_FEAT_POWER: + writel (RH_PS_PPS, + &ohci->regs->roothub.portstatus [wIndex]); + break; + case USB_PORT_FEAT_RESET: + temp = readl (&ohci->regs->roothub.portstatus [wIndex]); + if (temp & RH_PS_CCS) + writel (RH_PS_PRS, + &ohci->regs->roothub.portstatus [wIndex]); + break; + default: + goto error; + } + break; + + default: +error: + /* "protocol stall" on error */ + retval = -EPIPE; + } + return retval; +} + diff --git a/reactos/drivers/usb/cromwell/host/ohci-mem.c b/reactos/drivers/usb/cromwell/host/ohci-mem.c new file mode 100644 index 00000000000..85371e9756a --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-mem.c @@ -0,0 +1,146 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * This file is licenced under the GPL. + */ + +/*-------------------------------------------------------------------------*/ + +/* + * There's basically three types of memory: + * - data used only by the HCD ... kmalloc is fine + * - async and periodic schedules, shared by HC and HCD ... these + * need to use pci_pool or pci_alloc_consistent + * - driver buffers, read/written by HC ... the hcd glue or the + * device driver provides us with dma addresses + * + * There's also PCI "register" data, which is memory mapped. + * No memory seen by this driver is pagable. + */ + +/*-------------------------------------------------------------------------*/ + +static struct usb_hcd *ohci_hcd_alloc (void) +{ + struct ohci_hcd *ohci; + + ohci = (struct ohci_hcd *) kmalloc (sizeof *ohci, GFP_KERNEL); + if (ohci != 0) { + memset (ohci, 0, sizeof (struct ohci_hcd)); + return &ohci->hcd; + } + return 0; +} + +static void ohci_hcd_free (struct usb_hcd *hcd) +{ + kfree (hcd_to_ohci (hcd)); +} + +/*-------------------------------------------------------------------------*/ + +static int ohci_mem_init (struct ohci_hcd *ohci) +{ + ohci->td_cache = pci_pool_create ("ohci_td", ohci->hcd.pdev, + sizeof (struct td), + 32 /* byte alignment */, + 0 /* no page-crossing issues */); + if (!ohci->td_cache) + return -ENOMEM; + ohci->ed_cache = pci_pool_create ("ohci_ed", ohci->hcd.pdev, + sizeof (struct ed), + 16 /* byte alignment */, + 0 /* no page-crossing issues */); + if (!ohci->ed_cache) { + pci_pool_destroy (ohci->td_cache); + return -ENOMEM; + } + return 0; +} + +static void ohci_mem_cleanup (struct ohci_hcd *ohci) +{ + if (ohci->td_cache) { + pci_pool_destroy (ohci->td_cache); + ohci->td_cache = 0; + } + if (ohci->ed_cache) { + pci_pool_destroy (ohci->ed_cache); + ohci->ed_cache = 0; + } +} + +/*-------------------------------------------------------------------------*/ + +/* ohci "done list" processing needs this mapping */ +static inline struct td * +dma_to_td (struct ohci_hcd *hc, dma_addr_t td_dma) +{ + struct td *td; + + td_dma &= TD_MASK; + td = hc->td_hash [TD_HASH_FUNC(td_dma)]; + while (td && td->td_dma != td_dma) + td = td->td_hash; + return td; +} + +/* TDs ... */ +static struct td * +td_alloc (struct ohci_hcd *hc, int mem_flags) +{ + dma_addr_t dma; + struct td *td; + + td = pci_pool_alloc (hc->td_cache, mem_flags, &dma); + if (td) { + /* in case hc fetches it, make it look dead */ + memset (td, 0, sizeof *td); + td->hwNextTD = cpu_to_le32 (dma); + td->td_dma = dma; + /* hashed in td_fill */ + } + return td; +} + +static void +td_free (struct ohci_hcd *hc, struct td *td) +{ + struct td **prev = &hc->td_hash [TD_HASH_FUNC (td->td_dma)]; + + while (*prev && *prev != td) + prev = &(*prev)->td_hash; + if (*prev) + *prev = td->td_hash; + else if ((td->hwINFO & TD_DONE) != 0) + ohci_dbg (hc, "no hash for td %p\n", td); + pci_pool_free (hc->td_cache, td, td->td_dma); +} + +/*-------------------------------------------------------------------------*/ + +/* EDs ... */ +static struct ed * +ed_alloc (struct ohci_hcd *hc, int mem_flags) +{ + dma_addr_t dma; + struct ed *ed; + + ed = pci_pool_alloc (hc->ed_cache, mem_flags, &dma); + if (ed) { + memset (ed, 0, sizeof (*ed)); + INIT_LIST_HEAD (&ed->td_list); + ed->dma = dma; + } + return ed; +} + +static void +ed_free (struct ohci_hcd *hc, struct ed *ed) +{ + pci_pool_free (hc->ed_cache, ed, ed->dma); +} + diff --git a/reactos/drivers/usb/cromwell/host/ohci-pci.c b/reactos/drivers/usb/cromwell/host/ohci-pci.c new file mode 100644 index 00000000000..1e7fd945f21 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-pci.c @@ -0,0 +1,405 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * [ Initialisation is based on Linus' ] + * [ uhci code and gregs ohci fragments ] + * [ (C) Copyright 1999 Linus Torvalds ] + * [ (C) Copyright 1999 Gregory P. Smith] + * + * PCI Bus Glue + * + * This file is licenced under the GPL. + */ + +#ifdef CONFIG_PMAC_PBOOK +#include +#include +#include +#include +#ifndef CONFIG_PM +# define CONFIG_PM +#endif +#endif + +#ifndef CONFIG_PCI +#error "This file is PCI bus glue. CONFIG_PCI must be defined." +#endif + +#include "../linux/pci_ids.h" + +/*-------------------------------------------------------------------------*/ + +static int __devinit +ohci_pci_start (struct usb_hcd *hcd) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + int ret; + + if (hcd->pdev) { + ohci->hcca = pci_alloc_consistent (hcd->pdev, + sizeof *ohci->hcca, &ohci->hcca_dma); + if (!ohci->hcca) + return -ENOMEM; + + /* AMD 756, for most chips (early revs), corrupts register + * values on read ... so enable the vendor workaround. + */ + if (hcd->pdev->vendor == PCI_VENDOR_ID_AMD + && hcd->pdev->device == 0x740c) { + ohci->flags = OHCI_QUIRK_AMD756; + ohci_info (ohci, "AMD756 erratum 4 workaround\n"); + } + + /* FIXME for some of the early AMD 760 southbridges, OHCI + * won't work at all. blacklist them. + */ + + /* Apple's OHCI driver has a lot of bizarre workarounds + * for this chip. Evidently control and bulk lists + * can get confused. (B&W G3 models, and ...) + */ + else if (hcd->pdev->vendor == PCI_VENDOR_ID_OPTI + && hcd->pdev->device == 0xc861) { + ohci_info (ohci, + "WARNING: OPTi workarounds unavailable\n"); + } + + /* Check for NSC87560. We have to look at the bridge (fn1) to + * identify the USB (fn2). This quirk might apply to more or + * even all NSC stuff. + */ + else if (hcd->pdev->vendor == PCI_VENDOR_ID_NS) { + struct pci_dev *b, *hc; + + hc = hcd->pdev; + b = pci_find_slot (hc->bus->number, + PCI_DEVFN (PCI_SLOT (hc->devfn), 1)); + if (b && b->device == PCI_DEVICE_ID_NS_87560_LIO + && b->vendor == PCI_VENDOR_ID_NS) { + ohci->flags |= OHCI_QUIRK_SUPERIO; + ohci_info (ohci, "Using NSC SuperIO setup\n"); + } + } + + } + + memset (ohci->hcca, 0, sizeof (struct ohci_hcca)); + if ((ret = ohci_mem_init (ohci)) < 0) { + ohci_stop (hcd); + return ret; + } + ohci->regs = hcd->regs; + + if (hc_reset (ohci) < 0) { + ohci_stop (hcd); + return -ENODEV; + } + + if (hc_start (ohci) < 0) { + ohci_err (ohci, "can't start\n"); + ohci_stop (hcd); + return -EBUSY; + } + +#ifdef DEBUG + ohci_dump (ohci, 1); +#endif + return 0; +} + +#ifdef CONFIG_PM + +static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + unsigned long flags; + u16 cmd; + + if ((ohci->hc_control & OHCI_CTRL_HCFS) != OHCI_USB_OPER) { + ohci_dbg (ohci, "can't suspend (state is %s)\n", + hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS)); + return -EIO; + } + + /* act as if usb suspend can always be used */ + ohci_dbg (ohci, "suspend to %d\n", state); + ohci->sleeping = 1; + + /* First stop processing */ + spin_lock_irqsave (&ohci->lock, flags); + ohci->hc_control &= + ~(OHCI_CTRL_PLE|OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_IE); + writel (ohci->hc_control, &ohci->regs->control); + writel (OHCI_INTR_SF, &ohci->regs->intrstatus); + (void) readl (&ohci->regs->intrstatus); + spin_unlock_irqrestore (&ohci->lock, flags); + + /* Wait a frame or two */ + mdelay (1); + if (!readl (&ohci->regs->intrstatus) & OHCI_INTR_SF) + mdelay (1); + +#ifdef CONFIG_PMAC_PBOOK + if (_machine == _MACH_Pmac) + disable_irq (hcd->pdev->irq); + /* else, 2.4 assumes shared irqs -- don't disable */ +#endif + + /* Enable remote wakeup */ + writel (readl (&ohci->regs->intrenable) | OHCI_INTR_RD, + &ohci->regs->intrenable); + + /* Suspend chip and let things settle down a bit */ + ohci->hc_control = OHCI_USB_SUSPEND; + writel (ohci->hc_control, &ohci->regs->control); + (void) readl (&ohci->regs->control); + mdelay (500); /* No schedule here ! */ + + switch (readl (&ohci->regs->control) & OHCI_CTRL_HCFS) { + case OHCI_USB_RESET: + ohci_dbg (ohci, "suspend->reset ?\n"); + break; + case OHCI_USB_RESUME: + ohci_dbg (ohci, "suspend->resume ?\n"); + break; + case OHCI_USB_OPER: + ohci_dbg (ohci, "suspend->operational ?\n"); + break; + case OHCI_USB_SUSPEND: + ohci_dbg (ohci, "suspended\n"); + break; + } + + /* In some rare situations, Apple's OHCI have happily trashed + * memory during sleep. We disable its bus master bit during + * suspend + */ + pci_read_config_word (hcd->pdev, PCI_COMMAND, &cmd); + cmd &= ~PCI_COMMAND_MASTER; + pci_write_config_word (hcd->pdev, PCI_COMMAND, cmd); +#ifdef CONFIG_PMAC_PBOOK + { + struct device_node *of_node; + + /* Disable USB PAD & cell clock */ + of_node = pci_device_to_OF_node (hcd->pdev); + if (of_node) + pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0); + } +#endif + return 0; +} + + +static int ohci_pci_resume (struct usb_hcd *hcd) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + int temp; + int retval = 0; + unsigned long flags; + +#ifdef CONFIG_PMAC_PBOOK + { + struct device_node *of_node; + + /* Re-enable USB PAD & cell clock */ + of_node = pci_device_to_OF_node (hcd->pdev); + if (of_node) + pmac_call_feature (PMAC_FTR_USB_ENABLE, of_node, 0, 1); + } +#endif + /* did we suspend, or were we powered off? */ + ohci->hc_control = readl (&ohci->regs->control); + temp = ohci->hc_control & OHCI_CTRL_HCFS; + +#ifdef DEBUG + /* the registers may look crazy here */ + ohci_dump_status (ohci, 0, 0); +#endif + + /* Re-enable bus mastering */ + pci_set_master (ohci->hcd.pdev); + + switch (temp) { + + case OHCI_USB_RESET: // lost power + ohci_info (ohci, "USB restart\n"); + retval = hc_restart (ohci); + break; + + case OHCI_USB_SUSPEND: // host wakeup + case OHCI_USB_RESUME: // remote wakeup + ohci_info (ohci, "USB continue from %s wakeup\n", + (temp == OHCI_USB_SUSPEND) + ? "host" : "remote"); + ohci->hc_control = OHCI_USB_RESUME; + writel (ohci->hc_control, &ohci->regs->control); + (void) readl (&ohci->regs->control); + mdelay (20); /* no schedule here ! */ + /* Some controllers (lucent) need a longer delay here */ + mdelay (15); + + temp = readl (&ohci->regs->control); + temp = ohci->hc_control & OHCI_CTRL_HCFS; + if (temp != OHCI_USB_RESUME) { + ohci_err (ohci, "controller won't resume\n"); + ohci->disabled = 1; + retval = -EIO; + break; + } + + /* Some chips likes being resumed first */ + writel (OHCI_USB_OPER, &ohci->regs->control); + (void) readl (&ohci->regs->control); + mdelay (3); + + /* Then re-enable operations */ + spin_lock_irqsave (&ohci->lock, flags); + ohci->disabled = 0; + ohci->sleeping = 0; + ohci->hc_control = OHCI_CONTROL_INIT | OHCI_USB_OPER; + if (!ohci->ed_rm_list) { + if (ohci->ed_controltail) + ohci->hc_control |= OHCI_CTRL_CLE; + if (ohci->ed_bulktail) + ohci->hc_control |= OHCI_CTRL_BLE; + } + hcd->state = USB_STATE_READY; + writel (ohci->hc_control, &ohci->regs->control); + + /* trigger a start-frame interrupt (why?) */ + writel (OHCI_INTR_SF, &ohci->regs->intrstatus); + writel (OHCI_INTR_SF, &ohci->regs->intrenable); + + /* Check for a pending done list */ + writel (OHCI_INTR_WDH, &ohci->regs->intrdisable); + (void) readl (&ohci->regs->intrdisable); + spin_unlock_irqrestore (&ohci->lock, flags); + +#ifdef CONFIG_PMAC_PBOOK + if (_machine == _MACH_Pmac) + enable_irq (hcd->pdev->irq); +#endif + if (ohci->hcca->done_head) + dl_done_list (ohci, dl_reverse_done_list (ohci), NULL); + writel (OHCI_INTR_WDH, &ohci->regs->intrenable); + + /* assume there are TDs on the bulk and control lists */ + writel (OHCI_BLF | OHCI_CLF, &ohci->regs->cmdstatus); + +// ohci_dump_status (ohci); +ohci_dbg (ohci, "sleeping = %d, disabled = %d\n", + ohci->sleeping, ohci->disabled); + break; + + default: + ohci_warn (ohci, "odd PCI resume\n"); + } + return retval; +} + +#endif /* CONFIG_PM */ + + +/*-------------------------------------------------------------------------*/ + +static const struct hc_driver ohci_pci_hc_driver = { + .description = hcd_name, + + /* + * generic hardware linkage + */ + .irq = ohci_irq, + .flags = HCD_MEMORY | HCD_USB11, + + /* + * basic lifecycle operations + */ + .start = ohci_pci_start, +#ifdef CONFIG_PM + .suspend = ohci_pci_suspend, + .resume = ohci_pci_resume, +#endif + .stop = ohci_stop, + + /* + * memory lifecycle (except per-request) + */ + .hcd_alloc = ohci_hcd_alloc, + .hcd_free = ohci_hcd_free, + + /* + * managing i/o requests and associated device resources + */ + .urb_enqueue = ohci_urb_enqueue, + .urb_dequeue = ohci_urb_dequeue, + .endpoint_disable = ohci_endpoint_disable, + + /* + * scheduling support + */ + .get_frame_number = ohci_get_frame, + + /* + * root hub support + */ + .hub_status_data = ohci_hub_status_data, + .hub_control = ohci_hub_control, +}; + +/*-------------------------------------------------------------------------*/ + +static const struct pci_device_id __devinitdata pci_ids [] = { { + + /* handle any USB OHCI controller */ + .class = (PCI_CLASS_SERIAL_USB << 8) | 0x10, + .class_mask = ~0, + .driver_data = (unsigned long) &ohci_pci_hc_driver, + + /* no matter who makes it */ + .vendor = PCI_ANY_ID, + .device = PCI_ANY_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + + }, { /* end: all zeroes */ } +}; +MODULE_DEVICE_TABLE (pci, pci_ids); + +/* pci driver glue; this is a "new style" PCI driver module */ +static struct pci_driver ohci_pci_driver = { + .name = (char *) hcd_name, + .id_table = pci_ids, + + .probe = usb_hcd_pci_probe, + .remove = usb_hcd_pci_remove, + +#ifdef CONFIG_PM + .suspend = usb_hcd_pci_suspend, + .resume = usb_hcd_pci_resume, +#endif +}; + + +static int __init ohci_hcd_pci_init (void) +{ + printk (KERN_DEBUG "%s: " DRIVER_INFO " (PCI)\n", hcd_name); + if (usb_disabled()) + return -ENODEV; + + printk (KERN_DEBUG "%s: block sizes: ed %Zd td %Zd\n", hcd_name, + sizeof (struct ed), sizeof (struct td)); + return pci_module_init (&ohci_pci_driver); +} +module_init (ohci_hcd_pci_init); + +/*-------------------------------------------------------------------------*/ + +static void __exit ohci_hcd_pci_cleanup (void) +{ + pci_unregister_driver (&ohci_pci_driver); +} +module_exit (ohci_hcd_pci_cleanup); diff --git a/reactos/drivers/usb/cromwell/host/ohci-q.c b/reactos/drivers/usb/cromwell/host/ohci-q.c new file mode 100644 index 00000000000..71e6350b87b --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-q.c @@ -0,0 +1,1014 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * This file is licenced under the GPL. + */ + +static void urb_free_priv (struct ohci_hcd *hc, urb_priv_t *urb_priv) +{ + int last = urb_priv->length - 1; + + if (last >= 0) { + int i; + struct td *td; + + for (i = 0; i <= last; i++) { + td = urb_priv->td [i]; + if (td) + td_free (hc, td); + } + } + + kfree (urb_priv); +} + +/*-------------------------------------------------------------------------*/ + +/* + * URB goes back to driver, and isn't reissued. + * It's completely gone from HC data structures. + * PRECONDITION: no locks held, irqs blocked (Giveback can call into HCD.) + */ +static void +finish_urb (struct ohci_hcd *ohci, struct urb *urb, struct pt_regs *regs) +{ + // ASSERT (urb->hcpriv != 0); + + urb_free_priv (ohci, urb->hcpriv); + urb->hcpriv = NULL; + + spin_lock (&urb->lock); + if (likely (urb->status == -EINPROGRESS)) + urb->status = 0; + spin_unlock (&urb->lock); + + // what lock protects these? + switch (usb_pipetype (urb->pipe)) { + case PIPE_ISOCHRONOUS: + hcd_to_bus (&ohci->hcd)->bandwidth_isoc_reqs--; + break; + case PIPE_INTERRUPT: + hcd_to_bus (&ohci->hcd)->bandwidth_int_reqs--; + break; + } + +#ifdef OHCI_VERBOSE_DEBUG + urb_print (urb, "RET", usb_pipeout (urb->pipe)); +#endif + usb_hcd_giveback_urb (&ohci->hcd, urb, regs); +} + + +/*-------------------------------------------------------------------------* + * ED handling functions + *-------------------------------------------------------------------------*/ + +/* search for the right schedule branch to use for a periodic ed. + * does some load balancing; returns the branch, or negative errno. + */ +static int balance (struct ohci_hcd *ohci, int interval, int load) +{ + int i, branch = -ENOSPC; + + /* iso periods can be huge; iso tds specify frame numbers */ + if (interval > NUM_INTS) + interval = NUM_INTS; + + /* search for the least loaded schedule branch of that period + * that has enough bandwidth left unreserved. + */ + for (i = 0; i < interval ; i++) { + if (branch < 0 || ohci->load [branch] > ohci->load [i]) { +#if 1 /* CONFIG_USB_BANDWIDTH */ + int j; + + /* usb 1.1 says 90% of one frame */ + for (j = i; j < NUM_INTS; j += interval) { + if ((ohci->load [j] + load) > 900) + break; + } + if (j < NUM_INTS) + continue; +#endif + branch = i; + } + } + return branch; +} + +/*-------------------------------------------------------------------------*/ + +/* both iso and interrupt requests have periods; this routine puts them + * into the schedule tree in the apppropriate place. most iso devices use + * 1msec periods, but that's not required. + */ +static void periodic_link (struct ohci_hcd *ohci, struct ed *ed) +{ + unsigned i; + + ohci_vdbg (ohci, "link %sed %p branch %d [%dus.], interval %d\n", + (ed->hwINFO & ED_ISO) ? "iso " : "", + ed, ed->branch, ed->load, ed->interval); + + for (i = ed->branch; i < NUM_INTS; i += ed->interval) { + struct ed **prev = &ohci->periodic [i]; + u32 *prev_p = &ohci->hcca->int_table [i]; + struct ed *here = *prev; + + /* sorting each branch by period (slow before fast) + * lets us share the faster parts of the tree. + * (plus maybe: put interrupt eds before iso) + */ + while (here && ed != here) { + if (ed->interval > here->interval) + break; + prev = &here->ed_next; + prev_p = &here->hwNextED; + here = *prev; + } + if (ed != here) { + ed->ed_next = here; + if (here) + ed->hwNextED = *prev_p; + wmb (); + *prev = ed; + *prev_p = cpu_to_le32p (&ed->dma); + } + ohci->load [i] += ed->load; + } + hcd_to_bus (&ohci->hcd)->bandwidth_allocated += ed->load / ed->interval; +} + +/* link an ed into one of the HC chains */ + +static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed) +{ + int branch; + + ed->state = ED_OPER; + ed->ed_prev = 0; + ed->ed_next = 0; + ed->hwNextED = 0; + wmb (); + + /* we care about rm_list when setting CLE/BLE in case the HC was at + * work on some TD when CLE/BLE was turned off, and isn't quiesced + * yet. finish_unlinks() restarts as needed, some upcoming INTR_SF. + * + * control and bulk EDs are doubly linked (ed_next, ed_prev), but + * periodic ones are singly linked (ed_next). that's because the + * periodic schedule encodes a tree like figure 3-5 in the ohci + * spec: each qh can have several "previous" nodes, and the tree + * doesn't have unused/idle descriptors. + */ + switch (ed->type) { + case PIPE_CONTROL: + if (ohci->ed_controltail == NULL) { + writel (ed->dma, &ohci->regs->ed_controlhead); + } else { + ohci->ed_controltail->ed_next = ed; + ohci->ed_controltail->hwNextED = cpu_to_le32 (ed->dma); + } + ed->ed_prev = ohci->ed_controltail; + if (!ohci->ed_controltail && !ohci->ed_rm_list) { + ohci->hc_control |= OHCI_CTRL_CLE; + writel (0, &ohci->regs->ed_controlcurrent); + writel (ohci->hc_control, &ohci->regs->control); + } + ohci->ed_controltail = ed; + break; + + case PIPE_BULK: + if (ohci->ed_bulktail == NULL) { + writel (ed->dma, &ohci->regs->ed_bulkhead); + } else { + ohci->ed_bulktail->ed_next = ed; + ohci->ed_bulktail->hwNextED = cpu_to_le32 (ed->dma); + } + ed->ed_prev = ohci->ed_bulktail; + if (!ohci->ed_bulktail && !ohci->ed_rm_list) { + ohci->hc_control |= OHCI_CTRL_BLE; + writel (0, &ohci->regs->ed_bulkcurrent); + writel (ohci->hc_control, &ohci->regs->control); + } + ohci->ed_bulktail = ed; + break; + + // case PIPE_INTERRUPT: + // case PIPE_ISOCHRONOUS: + default: + branch = balance (ohci, ed->interval, ed->load); + if (branch < 0) { + ohci_dbg (ohci, + "ERR %d, interval %d msecs, load %d\n", + branch, ed->interval, ed->load); + // FIXME if there are TDs queued, fail them! + return branch; + } + ed->branch = branch; + periodic_link (ohci, ed); + } + + /* the HC may not see the schedule updates yet, but if it does + * then they'll be properly ordered. + */ + return 0; +} + +/*-------------------------------------------------------------------------*/ + +/* scan the periodic table to find and unlink this ED */ +static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed) +{ + int i; + + for (i = ed->branch; i < NUM_INTS; i += ed->interval) { + struct ed *temp; + struct ed **prev = &ohci->periodic [i]; + u32 *prev_p = &ohci->hcca->int_table [i]; + + while (*prev && (temp = *prev) != ed) { + prev_p = &temp->hwNextED; + prev = &temp->ed_next; + } + if (*prev) { + *prev_p = ed->hwNextED; + *prev = ed->ed_next; + } + ohci->load [i] -= ed->load; + } + hcd_to_bus (&ohci->hcd)->bandwidth_allocated -= ed->load / ed->interval; + + ohci_vdbg (ohci, "unlink %sed %p branch %d [%dus.], interval %d\n", + (ed->hwINFO & ED_ISO) ? "iso " : "", + ed, ed->branch, ed->load, ed->interval); +} + +/* unlink an ed from one of the HC chains. + * just the link to the ed is unlinked. + * the link from the ed still points to another operational ed or 0 + * so the HC can eventually finish the processing of the unlinked ed + */ +static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed) +{ + ed->hwINFO |= ED_SKIP; + + switch (ed->type) { + case PIPE_CONTROL: + if (ed->ed_prev == NULL) { + if (!ed->hwNextED) { + ohci->hc_control &= ~OHCI_CTRL_CLE; + writel (ohci->hc_control, &ohci->regs->control); + writel (0, &ohci->regs->ed_controlcurrent); + // post those pci writes + (void) readl (&ohci->regs->control); + } + writel (le32_to_cpup (&ed->hwNextED), + &ohci->regs->ed_controlhead); + } else { + ed->ed_prev->ed_next = ed->ed_next; + ed->ed_prev->hwNextED = ed->hwNextED; + } + if (ohci->ed_controltail == ed) { + ohci->ed_controltail = ed->ed_prev; + if (ohci->ed_controltail) + ohci->ed_controltail->ed_next = 0; + } else if (ed->ed_next) { + ed->ed_next->ed_prev = ed->ed_prev; + } + break; + + case PIPE_BULK: + if (ed->ed_prev == NULL) { + if (!ed->hwNextED) { + ohci->hc_control &= ~OHCI_CTRL_BLE; + writel (ohci->hc_control, &ohci->regs->control); + writel (0, &ohci->regs->ed_bulkcurrent); + // post those pci writes + (void) readl (&ohci->regs->control); + } + writel (le32_to_cpup (&ed->hwNextED), + &ohci->regs->ed_bulkhead); + } else { + ed->ed_prev->ed_next = ed->ed_next; + ed->ed_prev->hwNextED = ed->hwNextED; + } + if (ohci->ed_bulktail == ed) { + ohci->ed_bulktail = ed->ed_prev; + if (ohci->ed_bulktail) + ohci->ed_bulktail->ed_next = 0; + } else if (ed->ed_next) { + ed->ed_next->ed_prev = ed->ed_prev; + } + break; + + // case PIPE_INTERRUPT: + // case PIPE_ISOCHRONOUS: + default: + periodic_unlink (ohci, ed); + break; + } + + /* NOTE: Except for a couple of exceptionally clean unlink cases + * (like unlinking the only c/b ED, with no TDs) HCs may still be + * caching this operational ED (or its address). Safe unlinking + * involves not marking it ED_IDLE till INTR_SF; we always do that + * if td_list isn't empty. Otherwise the race is small; but ... + */ + if (ed->state == ED_OPER) { + ed->state = ED_IDLE; + ed->hwINFO &= ~(ED_SKIP | ED_DEQUEUE); + ed->hwHeadP &= ~ED_H; + wmb (); + } +} + + +/*-------------------------------------------------------------------------*/ + +/* get and maybe (re)init an endpoint. init _should_ be done only as part + * of usb_set_configuration() or usb_set_interface() ... but the USB stack + * isn't very stateful, so we re-init whenever the HC isn't looking. + */ +static struct ed *ed_get ( + struct ohci_hcd *ohci, + struct usb_device *udev, + unsigned int pipe, + int interval +) { + int is_out = !usb_pipein (pipe); + int type = usb_pipetype (pipe); + struct hcd_dev *dev = (struct hcd_dev *) udev->hcpriv; + struct ed *ed; + unsigned ep; + unsigned long flags; + + ep = usb_pipeendpoint (pipe) << 1; + if (type != PIPE_CONTROL && is_out) + ep |= 1; + + spin_lock_irqsave (&ohci->lock, flags); + + if (!(ed = dev->ep [ep])) { + struct td *td; + + ed = ed_alloc (ohci, SLAB_ATOMIC); + if (!ed) { + /* out of memory */ + goto done; + } + dev->ep [ep] = ed; + + /* dummy td; end of td list for ed */ + td = td_alloc (ohci, SLAB_ATOMIC); + if (!td) { + /* out of memory */ + ed_free (ohci, ed); + ed = 0; + goto done; + } + ed->dummy = td; + ed->hwTailP = cpu_to_le32 (td->td_dma); + ed->hwHeadP = ed->hwTailP; /* ED_C, ED_H zeroed */ + ed->state = ED_IDLE; + ed->type = type; + } + + /* NOTE: only ep0 currently needs this "re"init logic, during + * enumeration (after set_address, or if ep0 maxpacket >8). + */ + if (ed->state == ED_IDLE) { + u32 info; + + info = usb_pipedevice (pipe); + info |= (ep >> 1) << 7; + info |= usb_maxpacket (udev, pipe, is_out) << 16; + info = cpu_to_le32 (info); + if (udev->speed == USB_SPEED_LOW) + info |= ED_LOWSPEED; + /* only control transfers store pids in tds */ + if (type != PIPE_CONTROL) { + info |= is_out ? ED_OUT : ED_IN; + if (type != PIPE_BULK) { + /* periodic transfers... */ + if (type == PIPE_ISOCHRONOUS) + info |= ED_ISO; + else if (interval > 32) /* iso can be bigger */ + interval = 32; + ed->interval = interval; + ed->load = usb_calc_bus_time ( + udev->speed, !is_out, + type == PIPE_ISOCHRONOUS, + usb_maxpacket (udev, pipe, is_out)) + / 1000; + } + } + ed->hwINFO = info; + } + +done: + spin_unlock_irqrestore (&ohci->lock, flags); + return ed; +} + +/*-------------------------------------------------------------------------*/ + +/* request unlinking of an endpoint from an operational HC. + * put the ep on the rm_list + * real work is done at the next start frame (SF) hardware interrupt + */ +static void start_urb_unlink (struct ohci_hcd *ohci, struct ed *ed) +{ + ed->hwINFO |= ED_DEQUEUE; + ed->state = ED_UNLINK; + ed_deschedule (ohci, ed); + + /* SF interrupt might get delayed; record the frame counter value that + * indicates when the HC isn't looking at it, so concurrent unlinks + * behave. frame_no wraps every 2^16 msec, and changes right before + * SF is triggered. + */ + ed->tick = le16_to_cpu (ohci->hcca->frame_no) + 1; + + /* rm_list is just singly linked, for simplicity */ + ed->ed_next = ohci->ed_rm_list; + ed->ed_prev = 0; + ohci->ed_rm_list = ed; + + /* enable SOF interrupt */ + if (!ohci->sleeping) { + writel (OHCI_INTR_SF, &ohci->regs->intrstatus); + writel (OHCI_INTR_SF, &ohci->regs->intrenable); + // flush those pci writes + (void) readl (&ohci->regs->control); + } +} + +/*-------------------------------------------------------------------------* + * TD handling functions + *-------------------------------------------------------------------------*/ + +/* enqueue next TD for this URB (OHCI spec 5.2.8.2) */ + +static void +td_fill (struct ohci_hcd *ohci, u32 info, + dma_addr_t data, int len, + struct urb *urb, int index) +{ + struct td *td, *td_pt; + struct urb_priv *urb_priv = urb->hcpriv; + int is_iso = info & TD_ISO; + int hash; + + // ASSERT (index < urb_priv->length); + + /* aim for only one interrupt per urb. mostly applies to control + * and iso; other urbs rarely need more than one TD per urb. + * this way, only final tds (or ones with an error) cause IRQs. + * at least immediately; use DI=6 in case any control request is + * tempted to die part way through. + * + * NOTE: could delay interrupts even for the last TD, and get fewer + * interrupts ... increasing per-urb latency by sharing interrupts. + * Drivers that queue bulk urbs may request that behavior. + */ + if (index != (urb_priv->length - 1) + || (urb->transfer_flags & URB_NO_INTERRUPT)) + info |= TD_DI_SET (6); + + /* use this td as the next dummy */ + td_pt = urb_priv->td [index]; + + /* fill the old dummy TD */ + td = urb_priv->td [index] = urb_priv->ed->dummy; + urb_priv->ed->dummy = td_pt; + + td->ed = urb_priv->ed; + td->next_dl_td = NULL; + td->index = index; + td->urb = urb; + td->data_dma = data; + if (!len) + data = 0; + + td->hwINFO = cpu_to_le32 (info); + if (is_iso) { + td->hwCBP = cpu_to_le32 (data & 0xFFFFF000); + td->hwPSW [0] = cpu_to_le16 ((data & 0x0FFF) | 0xE000); + td->ed->last_iso = info & 0xffff; + } else { + td->hwCBP = cpu_to_le32 (data); + } + if (data) + td->hwBE = cpu_to_le32 (data + len - 1); + else + td->hwBE = 0; + td->hwNextTD = cpu_to_le32 (td_pt->td_dma); + + /* append to queue */ + list_add_tail (&td->td_list, &td->ed->td_list); + + /* hash it for later reverse mapping */ + hash = TD_HASH_FUNC (td->td_dma); + td->td_hash = ohci->td_hash [hash]; + ohci->td_hash [hash] = td; + + /* HC might read the TD (or cachelines) right away ... */ + wmb (); + td->ed->hwTailP = td->hwNextTD; +} + +/*-------------------------------------------------------------------------*/ + +/* Prepare all TDs of a transfer, and queue them onto the ED. + * Caller guarantees HC is active. + * Usually the ED is already on the schedule, so TDs might be + * processed as soon as they're queued. + */ +static void td_submit_urb ( + struct ohci_hcd *ohci, + struct urb *urb +) { + struct urb_priv *urb_priv = urb->hcpriv; + dma_addr_t data; + int data_len = urb->transfer_buffer_length; + int cnt = 0; + u32 info = 0; + int is_out = usb_pipeout (urb->pipe); + + /* OHCI handles the bulk/interrupt data toggles itself. We just + * use the device toggle bits for resetting, and rely on the fact + * that resetting toggle is meaningless if the endpoint is active. + */ + if (!usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), is_out)) { + usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), + is_out, 1); + urb_priv->ed->hwHeadP &= ~ED_C; + } + + urb_priv->td_cnt = 0; + + if (data_len) + data = urb->transfer_dma; + else + data = 0; + + /* NOTE: TD_CC is set so we can tell which TDs the HC processed by + * using TD_CC_GET, as well as by seeing them on the done list. + * (CC = NotAccessed ... 0x0F, or 0x0E in PSWs for ISO.) + */ + switch (urb_priv->ed->type) { + + /* Bulk and interrupt are identical except for where in the schedule + * their EDs live. + */ + case PIPE_INTERRUPT: + /* ... and periodic urbs have extra accounting */ + hcd_to_bus (&ohci->hcd)->bandwidth_int_reqs++; + /* FALLTHROUGH */ + case PIPE_BULK: + info = is_out + ? TD_T_TOGGLE | TD_CC | TD_DP_OUT + : TD_T_TOGGLE | TD_CC | TD_DP_IN; + /* TDs _could_ transfer up to 8K each */ + while (data_len > 4096) { + td_fill (ohci, info, data, 4096, urb, cnt); + data += 4096; + data_len -= 4096; + cnt++; + } + /* maybe avoid ED halt on final TD short read */ + if (!(urb->transfer_flags & URB_SHORT_NOT_OK)) + info |= TD_R; + td_fill (ohci, info, data, data_len, urb, cnt); + cnt++; + if ((urb->transfer_flags & URB_ZERO_PACKET) + && cnt < urb_priv->length) { + td_fill (ohci, info, 0, 0, urb, cnt); + cnt++; + } + /* maybe kickstart bulk list */ + if (urb_priv->ed->type == PIPE_BULK) { + wmb (); + writel (OHCI_BLF, &ohci->regs->cmdstatus); + } + break; + + /* control manages DATA0/DATA1 toggle per-request; SETUP resets it, + * any DATA phase works normally, and the STATUS ack is special. + */ + case PIPE_CONTROL: + info = TD_CC | TD_DP_SETUP | TD_T_DATA0; + td_fill (ohci, info, urb->setup_dma, 8, urb, cnt++); + if (data_len > 0) { + info = TD_CC | TD_R | TD_T_DATA1; + info |= is_out ? TD_DP_OUT : TD_DP_IN; + /* NOTE: mishandles transfers >8K, some >4K */ + td_fill (ohci, info, data, data_len, urb, cnt++); + } + info = is_out + ? TD_CC | TD_DP_IN | TD_T_DATA1 + : TD_CC | TD_DP_OUT | TD_T_DATA1; + td_fill (ohci, info, data, 0, urb, cnt++); + /* maybe kickstart control list */ + wmb (); + writel (OHCI_CLF, &ohci->regs->cmdstatus); + break; + + /* ISO has no retransmit, so no toggle; and it uses special TDs. + * Each TD could handle multiple consecutive frames (interval 1); + * we could often reduce the number of TDs here. + */ + case PIPE_ISOCHRONOUS: + for (cnt = 0; cnt < urb->number_of_packets; cnt++) { + int frame = urb->start_frame; + + // FIXME scheduling should handle frame counter + // roll-around ... exotic case (and OHCI has + // a 2^16 iso range, vs other HCs max of 2^10) + frame += cnt * urb->interval; + frame &= 0xffff; + td_fill (ohci, TD_CC | TD_ISO | frame, + data + urb->iso_frame_desc [cnt].offset, + urb->iso_frame_desc [cnt].length, urb, cnt); + } + hcd_to_bus (&ohci->hcd)->bandwidth_isoc_reqs++; + break; + } + // ASSERT (urb_priv->length == cnt); +} + +/*-------------------------------------------------------------------------* + * Done List handling functions + *-------------------------------------------------------------------------*/ + +/* calculate transfer length/status and update the urb + * PRECONDITION: irqsafe (only for urb->status locking) + */ +static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td) +{ + u32 tdINFO = le32_to_cpup (&td->hwINFO); + int cc = 0; + + list_del (&td->td_list); + + /* ISO ... drivers see per-TD length/status */ + if (tdINFO & TD_ISO) { + u16 tdPSW = le16_to_cpu (td->hwPSW [0]); + int dlen = 0; + + /* NOTE: assumes FC in tdINFO == 0 (and MAXPSW == 1) */ + + cc = (tdPSW >> 12) & 0xF; + if (tdINFO & TD_CC) /* hc didn't touch? */ + return; + + if (usb_pipeout (urb->pipe)) + dlen = urb->iso_frame_desc [td->index].length; + else { + /* short reads are always OK for ISO */ + if (cc == TD_DATAUNDERRUN) + cc = TD_CC_NOERROR; + dlen = tdPSW & 0x3ff; + } + urb->actual_length += dlen; + urb->iso_frame_desc [td->index].actual_length = dlen; + urb->iso_frame_desc [td->index].status = cc_to_error [cc]; + + if (cc != TD_CC_NOERROR) + ohci_vdbg (ohci, + "urb %p iso td %p (%d) len %d cc %d\n", + urb, td, 1 + td->index, dlen, cc); + + /* BULK, INT, CONTROL ... drivers see aggregate length/status, + * except that "setup" bytes aren't counted and "short" transfers + * might not be reported as errors. + */ + } else { + int type = usb_pipetype (urb->pipe); + u32 tdBE = le32_to_cpup (&td->hwBE); + + cc = TD_CC_GET (tdINFO); + + /* control endpoints only have soft stalls */ + if (type != PIPE_CONTROL && cc == TD_CC_STALL) + usb_endpoint_halt (urb->dev, + usb_pipeendpoint (urb->pipe), + usb_pipeout (urb->pipe)); + + /* update packet status if needed (short is normally ok) */ + if (cc == TD_DATAUNDERRUN + && !(urb->transfer_flags & URB_SHORT_NOT_OK)) + cc = TD_CC_NOERROR; + if (cc != TD_CC_NOERROR && cc < 0x0E) { + spin_lock (&urb->lock); + if (urb->status == -EINPROGRESS) + urb->status = cc_to_error [cc]; + spin_unlock (&urb->lock); + } + + /* count all non-empty packets except control SETUP packet */ + if ((type != PIPE_CONTROL || td->index != 0) && tdBE != 0) { + if (td->hwCBP == 0) + urb->actual_length += tdBE - td->data_dma + 1; + else + urb->actual_length += + le32_to_cpup (&td->hwCBP) + - td->data_dma; + } + + if (cc != TD_CC_NOERROR && cc < 0x0E) + ohci_vdbg (ohci, + "urb %p td %p (%d) cc %d, len=%d/%d\n", + urb, td, 1 + td->index, cc, + urb->actual_length, + urb->transfer_buffer_length); + } +} + +/*-------------------------------------------------------------------------*/ + +static inline struct td * +ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev) +{ + struct urb *urb = td->urb; + struct ed *ed = td->ed; + struct list_head *tmp = td->td_list.next; + u32 toggle = ed->hwHeadP & ED_C; + + /* clear ed halt; this is the td that caused it, but keep it inactive + * until its urb->complete() has a chance to clean up. + */ + ed->hwINFO |= ED_SKIP; + wmb (); + ed->hwHeadP &= ~ED_H; + + /* put any later tds from this urb onto the donelist, after 'td', + * order won't matter here: no errors, and nothing was transferred. + * also patch the ed so it looks as if those tds completed normally. + */ + while (tmp != &ed->td_list) { + struct td *next; + u32 info; + + next = list_entry (tmp, struct td, td_list); + tmp = next->td_list.next; + + if (next->urb != urb) + break; + + /* NOTE: if multi-td control DATA segments get supported, + * this urb had one of them, this td wasn't the last td + * in that segment (TD_R clear), this ed halted because + * of a short read, _and_ URB_SHORT_NOT_OK is clear ... + * then we need to leave the control STATUS packet queued + * and clear ED_SKIP. + */ + info = next->hwINFO; + info |= cpu_to_le32 (TD_DONE); + info &= ~cpu_to_le32 (TD_CC); + next->hwINFO = info; + + next->next_dl_td = rev; + rev = next; + + if (ed->hwTailP == cpu_to_le32 (next->td_dma)) + ed->hwTailP = next->hwNextTD; + ed->hwHeadP = next->hwNextTD | toggle; + } + + /* help for troubleshooting: report anything that + * looks odd ... that doesn't include protocol stalls + * (or maybe some other things) + */ + if (cc != TD_CC_STALL || !usb_pipecontrol (urb->pipe)) + ohci_dbg (ohci, + "urb %p path %s ep%d%s %08x cc %d --> status %d\n", + urb, urb->dev->devpath, + usb_pipeendpoint (urb->pipe), + usb_pipein (urb->pipe) ? "in" : "out", + le32_to_cpu (td->hwINFO), + cc, cc_to_error [cc]); + + return rev; +} + +/* replies to the request have to be on a FIFO basis so + * we unreverse the hc-reversed done-list + */ +static struct td *dl_reverse_done_list (struct ohci_hcd *ohci) +{ + u32 td_dma; + struct td *td_rev = NULL; + struct td *td = NULL; + unsigned long flags; + + spin_lock_irqsave (&ohci->lock, flags); + td_dma = le32_to_cpup (&ohci->hcca->done_head); + ohci->hcca->done_head = 0; + + /* get TD from hc's singly linked list, and + * prepend to ours. ed->td_list changes later. + */ + while (td_dma) { + int cc; + + td = dma_to_td (ohci, td_dma); + if (!td) { + ohci_err (ohci, "bad entry %8x\n", td_dma); + break; + } + + td->hwINFO |= cpu_to_le32 (TD_DONE); + cc = TD_CC_GET (le32_to_cpup (&td->hwINFO)); + + /* Non-iso endpoints can halt on error; un-halt, + * and dequeue any other TDs from this urb. + * No other TD could have caused the halt. + */ + if (cc != TD_CC_NOERROR && (td->ed->hwHeadP & ED_H)) + td_rev = ed_halted (ohci, td, cc, td_rev); + + td->next_dl_td = td_rev; + td_rev = td; + td_dma = le32_to_cpup (&td->hwNextTD); + } + spin_unlock_irqrestore (&ohci->lock, flags); + return td_rev; +} + +/*-------------------------------------------------------------------------*/ + +/* wrap-aware logic stolen from */ +#define tick_before(t1,t2) ((((s16)(t1))-((s16)(t2))) < 0) + +/* there are some urbs/eds to unlink; called in_irq(), with HCD locked */ +static void +finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs) +{ + struct ed *ed, **last; + +rescan_all: + for (last = &ohci->ed_rm_list, ed = *last; ed != NULL; ed = *last) { + struct list_head *entry, *tmp; + int completed, modified; + u32 *prev; + + /* only take off EDs that the HC isn't using, accounting for + * frame counter wraps. + */ + if (tick_before (tick, ed->tick) && !ohci->disabled) { + last = &ed->ed_next; + continue; + } + + /* reentrancy: if we drop the schedule lock, someone might + * have modified this list. normally it's just prepending + * entries (which we'd ignore), but paranoia won't hurt. + */ + *last = ed->ed_next; + ed->ed_next = 0; + modified = 0; + + /* unlink urbs as requested, but rescan the list after + * we call a completion since it might have unlinked + * another (earlier) urb + */ +rescan_this: + completed = 0; + prev = &ed->hwHeadP; + list_for_each_safe (entry, tmp, &ed->td_list) { + struct td *td; + struct urb *urb; + urb_priv_t *urb_priv; + u32 savebits; + + td = list_entry (entry, struct td, td_list); + urb = td->urb; + urb_priv = td->urb->hcpriv; + + if (urb_priv->state != URB_DEL) { + prev = &td->hwNextTD; + continue; + } + + /* patch pointers hc uses ... tail, if we're removing + * an otherwise active td, and whatever td pointer + * points to this td + */ + if (ed->hwTailP == cpu_to_le32 (td->td_dma)) + ed->hwTailP = td->hwNextTD; + savebits = *prev & ~cpu_to_le32 (TD_MASK); + *prev = td->hwNextTD | savebits; + + /* HC may have partly processed this TD */ + td_done (ohci, urb, td); + urb_priv->td_cnt++; + + /* if URB is done, clean up */ + if (urb_priv->td_cnt == urb_priv->length) { + modified = completed = 1; + spin_unlock (&ohci->lock); + finish_urb (ohci, urb, regs); + spin_lock (&ohci->lock); + } + } + if (completed && !list_empty (&ed->td_list)) + goto rescan_this; + + /* ED's now officially unlinked, hc doesn't see */ + ed->state = ED_IDLE; + ed->hwINFO &= ~(ED_SKIP | ED_DEQUEUE); + ed->hwHeadP &= ~ED_H; + ed->hwNextED = 0; + + /* but if there's work queued, reschedule */ + if (!list_empty (&ed->td_list)) { + if (!ohci->disabled && !ohci->sleeping) + ed_schedule (ohci, ed); + } + + if (modified) + goto rescan_all; + } + + /* maybe reenable control and bulk lists */ + if (!ohci->disabled && !ohci->ed_rm_list) { + u32 command = 0, control = 0; + + if (ohci->ed_controltail) { + command |= OHCI_CLF; + if (!(ohci->hc_control & OHCI_CTRL_CLE)) { + control |= OHCI_CTRL_CLE; + writel (0, &ohci->regs->ed_controlcurrent); + } + } + if (ohci->ed_bulktail) { + command |= OHCI_BLF; + if (!(ohci->hc_control & OHCI_CTRL_BLE)) { + control |= OHCI_CTRL_BLE; + writel (0, &ohci->regs->ed_bulkcurrent); + } + } + + /* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */ + if (control) { + ohci->hc_control |= control; + writel (ohci->hc_control, &ohci->regs->control); + } + if (command) + writel (command, &ohci->regs->cmdstatus); + } +} + + + +/*-------------------------------------------------------------------------*/ + +/* + * Process normal completions (error or success) and clean the schedules. + * + * This is the main path for handing urbs back to drivers. The only other + * path is finish_unlinks(), which unlinks URBs using ed_rm_list, instead of + * scanning the (re-reversed) donelist as this does. + */ +static void +dl_done_list (struct ohci_hcd *ohci, struct td *td, struct pt_regs *regs) +{ + unsigned long flags; + + spin_lock_irqsave (&ohci->lock, flags); + while (td) { + struct td *td_next = td->next_dl_td; + struct urb *urb = td->urb; + urb_priv_t *urb_priv = urb->hcpriv; + struct ed *ed = td->ed; + + /* update URB's length and status from TD */ + td_done (ohci, urb, td); + urb_priv->td_cnt++; + + /* If all this urb's TDs are done, call complete() */ + if (urb_priv->td_cnt == urb_priv->length) { + spin_unlock (&ohci->lock); + finish_urb (ohci, urb, regs); + spin_lock (&ohci->lock); + } + + /* clean schedule: unlink EDs that are no longer busy */ + if (list_empty (&ed->td_list)) + ed_deschedule (ohci, ed); + /* ... reenabling halted EDs only after fault cleanup */ + else if (!(ed->hwINFO & ED_DEQUEUE)) { + td = list_entry (ed->td_list.next, struct td, td_list); + if (!(td->hwINFO & TD_DONE)) + ed->hwINFO &= ~ED_SKIP; + } + + td = td_next; + } + spin_unlock_irqrestore (&ohci->lock, flags); +} diff --git a/reactos/drivers/usb/cromwell/host/ohci.a b/reactos/drivers/usb/cromwell/host/ohci.a new file mode 100644 index 00000000000..362d3402fca Binary files /dev/null and b/reactos/drivers/usb/cromwell/host/ohci.a differ diff --git a/reactos/drivers/usb/cromwell/host/ohci.coff b/reactos/drivers/usb/cromwell/host/ohci.coff new file mode 100644 index 00000000000..678fc013e55 Binary files /dev/null and b/reactos/drivers/usb/cromwell/host/ohci.coff differ diff --git a/reactos/drivers/usb/cromwell/host/ohci.def b/reactos/drivers/usb/cromwell/host/ohci.def new file mode 100644 index 00000000000..9bc5544dd2f --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci.def @@ -0,0 +1,2 @@ +LIBRARY ohci.sys +EXPORTS diff --git a/reactos/drivers/usb/cromwell/host/ohci.h b/reactos/drivers/usb/cromwell/host/ohci.h new file mode 100644 index 00000000000..400b505e65a --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci.h @@ -0,0 +1,406 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * This file is licenced under the GPL. + */ + +/* + * OHCI Endpoint Descriptor (ED) ... holds TD queue + * See OHCI spec, section 4.2 + * + * This is a "Queue Head" for those transfers, which is why + * both EHCI and UHCI call similar structures a "QH". + */ +struct ed { + /* first fields are hardware-specified, le32 */ + __u32 hwINFO; /* endpoint config bitmap */ + /* info bits defined by hcd */ +#define ED_DEQUEUE __constant_cpu_to_le32(1 << 27) + /* info bits defined by the hardware */ +#define ED_ISO __constant_cpu_to_le32(1 << 15) +#define ED_SKIP __constant_cpu_to_le32(1 << 14) +#define ED_LOWSPEED __constant_cpu_to_le32(1 << 13) +#define ED_OUT __constant_cpu_to_le32(0x01 << 11) +#define ED_IN __constant_cpu_to_le32(0x02 << 11) + __u32 hwTailP; /* tail of TD list */ + __u32 hwHeadP; /* head of TD list (hc r/w) */ +#define ED_C __constant_cpu_to_le32(0x02) /* toggle carry */ +#define ED_H __constant_cpu_to_le32(0x01) /* halted */ + __u32 hwNextED; /* next ED in list */ + + /* rest are purely for the driver's use */ + dma_addr_t dma; /* addr of ED */ + struct td *dummy; /* next TD to activate */ + + /* host's view of schedule */ + struct ed *ed_next; /* on schedule or rm_list */ + struct ed *ed_prev; /* for non-interrupt EDs */ + struct list_head td_list; /* "shadow list" of our TDs */ + + /* create --> IDLE --> OPER --> ... --> IDLE --> destroy + * usually: OPER --> UNLINK --> (IDLE | OPER) --> ... + * some special cases : OPER --> IDLE ... + */ + u8 state; /* ED_{IDLE,UNLINK,OPER} */ +#define ED_IDLE 0x00 /* NOT linked to HC */ +#define ED_UNLINK 0x01 /* being unlinked from hc */ +#define ED_OPER 0x02 /* IS linked to hc */ + + u8 type; /* PIPE_{BULK,...} */ + + /* periodic scheduling params (for intr and iso) */ + u8 branch; + u16 interval; + u16 load; + u16 last_iso; /* iso only */ + + /* HC may see EDs on rm_list until next frame (frame_no == tick) */ + u16 tick; +} __attribute__ ((aligned(16))); + +#define ED_MASK ((u32)~0x0f) /* strip hw status in low addr bits */ + + +/* + * OHCI Transfer Descriptor (TD) ... one per transfer segment + * See OHCI spec, sections 4.3.1 (general = control/bulk/interrupt) + * and 4.3.2 (iso) + */ +struct td { + /* first fields are hardware-specified, le32 */ + __u32 hwINFO; /* transfer info bitmask */ + + /* hwINFO bits for both general and iso tds: */ +#define TD_CC 0xf0000000 /* condition code */ +#define TD_CC_GET(td_p) ((td_p >>28) & 0x0f) +//#define TD_CC_SET(td_p, cc) (td_p) = ((td_p) & 0x0fffffff) | (((cc) & 0x0f) << 28) +#define TD_DI 0x00E00000 /* frames before interrupt */ +#define TD_DI_SET(X) (((X) & 0x07)<< 21) + /* these two bits are available for definition/use by HCDs in both + * general and iso tds ... others are available for only one type + */ +#define TD_DONE 0x00020000 /* retired to donelist */ +#define TD_ISO 0x00010000 /* copy of ED_ISO */ + + /* hwINFO bits for general tds: */ +#define TD_EC 0x0C000000 /* error count */ +#define TD_T 0x03000000 /* data toggle state */ +#define TD_T_DATA0 0x02000000 /* DATA0 */ +#define TD_T_DATA1 0x03000000 /* DATA1 */ +#define TD_T_TOGGLE 0x00000000 /* uses ED_C */ +#define TD_DP 0x00180000 /* direction/pid */ +#define TD_DP_SETUP 0x00000000 /* SETUP pid */ +#define TD_DP_IN 0x00100000 /* IN pid */ +#define TD_DP_OUT 0x00080000 /* OUT pid */ + /* 0x00180000 rsvd */ +#define TD_R 0x00040000 /* round: short packets OK? */ + + /* (no hwINFO #defines yet for iso tds) */ + + __u32 hwCBP; /* Current Buffer Pointer (or 0) */ + __u32 hwNextTD; /* Next TD Pointer */ + __u32 hwBE; /* Memory Buffer End Pointer */ + + /* PSW is only for ISO */ +#define MAXPSW 1 /* hardware allows 8 */ + __u16 hwPSW [MAXPSW]; + + /* rest are purely for the driver's use */ + __u8 index; + struct ed *ed; + struct td *td_hash; /* dma-->td hashtable */ + struct td *next_dl_td; + struct urb *urb; + + dma_addr_t td_dma; /* addr of this TD */ + dma_addr_t data_dma; /* addr of data it points to */ + + struct list_head td_list; /* "shadow list", TDs on same ED */ +} __attribute__ ((aligned(32))); /* c/b/i need 16; only iso needs 32 */ + +#define TD_MASK ((u32)~0x1f) /* strip hw status in low addr bits */ + +/* + * Hardware transfer status codes -- CC from td->hwINFO or td->hwPSW + */ +#define TD_CC_NOERROR 0x00 +#define TD_CC_CRC 0x01 +#define TD_CC_BITSTUFFING 0x02 +#define TD_CC_DATATOGGLEM 0x03 +#define TD_CC_STALL 0x04 +#define TD_DEVNOTRESP 0x05 +#define TD_PIDCHECKFAIL 0x06 +#define TD_UNEXPECTEDPID 0x07 +#define TD_DATAOVERRUN 0x08 +#define TD_DATAUNDERRUN 0x09 + /* 0x0A, 0x0B reserved for hardware */ +#define TD_BUFFEROVERRUN 0x0C +#define TD_BUFFERUNDERRUN 0x0D + /* 0x0E, 0x0F reserved for HCD */ +#define TD_NOTACCESSED 0x0F + + +/* map OHCI TD status codes (CC) to errno values */ +static const int cc_to_error [16] = { + /* No Error */ 0, + /* CRC Error */ -EILSEQ, + /* Bit Stuff */ -EPROTO, + /* Data Togg */ -EILSEQ, + /* Stall */ -EPIPE, + /* DevNotResp */ -ETIMEDOUT, + /* PIDCheck */ -EPROTO, + /* UnExpPID */ -EPROTO, + /* DataOver */ -EOVERFLOW, + /* DataUnder */ -EREMOTEIO, + /* (for hw) */ -EIO, + /* (for hw) */ -EIO, + /* BufferOver */ -ECOMM, + /* BuffUnder */ -ENOSR, + /* (for HCD) */ -EALREADY, + /* (for HCD) */ -EALREADY +}; + + +/* + * The HCCA (Host Controller Communications Area) is a 256 byte + * structure defined section 4.4.1 of the OHCI spec. The HC is + * told the base address of it. It must be 256-byte aligned. + */ +struct ohci_hcca { +#define NUM_INTS 32 + __u32 int_table [NUM_INTS]; /* periodic schedule */ + __u16 frame_no; /* current frame number */ + __u16 pad1; /* set to 0 on each frame_no change */ + __u32 done_head; /* info returned for an interrupt */ + u8 reserved_for_hc [116]; + u8 what [4]; /* spec only identifies 252 bytes :) */ +} __attribute__ ((aligned(256))); + + +/* + * This is the structure of the OHCI controller's memory mapped I/O region. + * You must use readl() and writel() (in ) to access these fields!! + * Layout is in section 7 (and appendix B) of the spec. + */ +struct ohci_regs { + /* control and status registers (section 7.1) */ + __u32 revision; + __u32 control; + __u32 cmdstatus; + __u32 intrstatus; + __u32 intrenable; + __u32 intrdisable; + + /* memory pointers (section 7.2) */ + __u32 hcca; + __u32 ed_periodcurrent; + __u32 ed_controlhead; + __u32 ed_controlcurrent; + __u32 ed_bulkhead; + __u32 ed_bulkcurrent; + __u32 donehead; + + /* frame counters (section 7.3) */ + __u32 fminterval; + __u32 fmremaining; + __u32 fmnumber; + __u32 periodicstart; + __u32 lsthresh; + + /* Root hub ports (section 7.4) */ + struct ohci_roothub_regs { + __u32 a; + __u32 b; + __u32 status; +#define MAX_ROOT_PORTS 15 /* maximum OHCI root hub ports (RH_A_NDP) */ + __u32 portstatus [MAX_ROOT_PORTS]; + } roothub; + + /* and optional "legacy support" registers (appendix B) at 0x0100 */ + +} __attribute__ ((aligned(32))); + + +/* OHCI CONTROL AND STATUS REGISTER MASKS */ + +/* + * HcControl (control) register masks + */ +#define OHCI_CTRL_CBSR (3 << 0) /* control/bulk service ratio */ +#define OHCI_CTRL_PLE (1 << 2) /* periodic list enable */ +#define OHCI_CTRL_IE (1 << 3) /* isochronous enable */ +#define OHCI_CTRL_CLE (1 << 4) /* control list enable */ +#define OHCI_CTRL_BLE (1 << 5) /* bulk list enable */ +#define OHCI_CTRL_HCFS (3 << 6) /* host controller functional state */ +#define OHCI_CTRL_IR (1 << 8) /* interrupt routing */ +#define OHCI_CTRL_RWC (1 << 9) /* remote wakeup connected */ +#define OHCI_CTRL_RWE (1 << 10) /* remote wakeup enable */ + +/* pre-shifted values for HCFS */ +# define OHCI_USB_RESET (0 << 6) +# define OHCI_USB_RESUME (1 << 6) +# define OHCI_USB_OPER (2 << 6) +# define OHCI_USB_SUSPEND (3 << 6) + +/* + * HcCommandStatus (cmdstatus) register masks + */ +#define OHCI_HCR (1 << 0) /* host controller reset */ +#define OHCI_CLF (1 << 1) /* control list filled */ +#define OHCI_BLF (1 << 2) /* bulk list filled */ +#define OHCI_OCR (1 << 3) /* ownership change request */ +#define OHCI_SOC (3 << 16) /* scheduling overrun count */ + +/* + * masks used with interrupt registers: + * HcInterruptStatus (intrstatus) + * HcInterruptEnable (intrenable) + * HcInterruptDisable (intrdisable) + */ +#define OHCI_INTR_SO (1 << 0) /* scheduling overrun */ +#define OHCI_INTR_WDH (1 << 1) /* writeback of done_head */ +#define OHCI_INTR_SF (1 << 2) /* start frame */ +#define OHCI_INTR_RD (1 << 3) /* resume detect */ +#define OHCI_INTR_UE (1 << 4) /* unrecoverable error */ +#define OHCI_INTR_FNO (1 << 5) /* frame number overflow */ +#define OHCI_INTR_RHSC (1 << 6) /* root hub status change */ +#define OHCI_INTR_OC (1 << 30) /* ownership change */ +#define OHCI_INTR_MIE (1 << 31) /* master interrupt enable */ + + +/* OHCI ROOT HUB REGISTER MASKS */ + +/* roothub.portstatus [i] bits */ +#define RH_PS_CCS 0x00000001 /* current connect status */ +#define RH_PS_PES 0x00000002 /* port enable status*/ +#define RH_PS_PSS 0x00000004 /* port suspend status */ +#define RH_PS_POCI 0x00000008 /* port over current indicator */ +#define RH_PS_PRS 0x00000010 /* port reset status */ +#define RH_PS_PPS 0x00000100 /* port power status */ +#define RH_PS_LSDA 0x00000200 /* low speed device attached */ +#define RH_PS_CSC 0x00010000 /* connect status change */ +#define RH_PS_PESC 0x00020000 /* port enable status change */ +#define RH_PS_PSSC 0x00040000 /* port suspend status change */ +#define RH_PS_OCIC 0x00080000 /* over current indicator change */ +#define RH_PS_PRSC 0x00100000 /* port reset status change */ + +/* roothub.status bits */ +#define RH_HS_LPS 0x00000001 /* local power status */ +#define RH_HS_OCI 0x00000002 /* over current indicator */ +#define RH_HS_DRWE 0x00008000 /* device remote wakeup enable */ +#define RH_HS_LPSC 0x00010000 /* local power status change */ +#define RH_HS_OCIC 0x00020000 /* over current indicator change */ +#define RH_HS_CRWE 0x80000000 /* clear remote wakeup enable */ + +/* roothub.b masks */ +#define RH_B_DR 0x0000ffff /* device removable flags */ +#define RH_B_PPCM 0xffff0000 /* port power control mask */ + +/* roothub.a masks */ +#define RH_A_NDP (0xff << 0) /* number of downstream ports */ +#define RH_A_PSM (1 << 8) /* power switching mode */ +#define RH_A_NPS (1 << 9) /* no power switching */ +#define RH_A_DT (1 << 10) /* device type (mbz) */ +#define RH_A_OCPM (1 << 11) /* over current protection mode */ +#define RH_A_NOCP (1 << 12) /* no over current protection */ +#define RH_A_POTPGT (0xff << 24) /* power on to power good time */ + + +/* hcd-private per-urb state */ +typedef struct urb_priv { + struct ed *ed; + __u16 length; // # tds in this request + __u16 td_cnt; // tds already serviced + int state; + struct td *td [0]; // all TDs in this request + +} urb_priv_t; + +#define URB_DEL 1 + +#define TD_HASH_SIZE 64 /* power'o'two */ +// sizeof (struct td) ~= 64 == 2^6 ... +#define TD_HASH_FUNC(td_dma) ((td_dma ^ (td_dma >> 6)) % TD_HASH_SIZE) + + +/* + * This is the full ohci controller description + * + * Note how the "proper" USB information is just + * a subset of what the full implementation needs. (Linus) + */ + +struct ohci_hcd { + spinlock_t lock; + + /* + * I/O memory used to communicate with the HC (dma-consistent) + */ + struct ohci_regs *regs; + + /* + * main memory used to communicate with the HC (dma-consistent). + * hcd adds to schedule for a live hc any time, but removals finish + * only at the start of the next frame. + */ + struct ohci_hcca *hcca; + dma_addr_t hcca_dma; + + struct ed *ed_rm_list; /* to be removed */ + + struct ed *ed_bulktail; /* last in bulk list */ + struct ed *ed_controltail; /* last in ctrl list */ + struct ed *periodic [NUM_INTS]; /* shadow int_table */ + + /* + * memory management for queue data structures + */ + struct pci_pool *td_cache; + struct pci_pool *ed_cache; + struct td *td_hash [TD_HASH_SIZE]; + + /* + * driver state + */ + int disabled; /* e.g. got a UE, we're hung */ + int sleeping; + int load [NUM_INTS]; + u32 hc_control; /* copy of hc control reg */ + + unsigned long flags; /* for HC bugs */ +#define OHCI_QUIRK_AMD756 0x01 /* erratum #4 */ +#define OHCI_QUIRK_SUPERIO 0x02 /* natsemi */ + // there are also chip quirks/bugs in init logic + + /* + * framework state + */ + struct usb_hcd hcd; +}; + +#define hcd_to_ohci(hcd_ptr) container_of(hcd_ptr, struct ohci_hcd, hcd) + +/*-------------------------------------------------------------------------*/ + +#ifndef DEBUG +#define STUB_DEBUG_FILES +#endif /* DEBUG */ + +#define ohci_dbg(ohci, fmt, args...) \ + dev_dbg ((ohci)->hcd.controller , fmt , ## args ) +#define ohci_err(ohci, fmt, args...) \ + dev_err ((ohci)->hcd.controller , fmt , ## args ) +#define ohci_info(ohci, fmt, args...) \ + dev_info ((ohci)->hcd.controller , fmt , ## args ) +#define ohci_warn(ohci, fmt, args...) \ + dev_warn ((ohci)->hcd.controller , fmt , ## args ) + +#ifdef OHCI_VERBOSE_DEBUG +# define ohci_vdbg ohci_dbg +#else +# define ohci_vdbg(ohci, fmt, args...) do { } while (0) +#endif + diff --git a/reactos/drivers/usb/cromwell/host/ohci.map b/reactos/drivers/usb/cromwell/host/ohci.map new file mode 100644 index 00000000000..05acb2430c0 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci.map @@ -0,0 +1,4524 @@ + +ohci.nostrip.sys: file format pei-i386 + +Disassembly of section .text: + +00011000 <__end__>: + 11000: 55 push %ebp + 11001: 89 e5 mov %esp,%ebp + 11003: 83 ec 08 sub $0x8,%esp + 11006: 8b 45 08 mov 0x8(%ebp),%eax + 11009: 8b 40 04 mov 0x4(%eax),%eax + 1100c: 83 c0 48 add $0x48,%eax + 1100f: 8b 00 mov (%eax),%eax + 11011: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11014: 83 7d fc ff cmpl $0xffffffff,0xfffffffc(%ebp) + 11018: 75 10 jne 1102a <__end__+0x2a> + 1101a: 83 ec 0c sub $0xc,%esp + 1101d: ff 75 08 pushl 0x8(%ebp) + 11020: e8 36 00 00 00 call 1105b <_disable> + 11025: 83 c4 10 add $0x10,%esp + 11028: eb 2c jmp 11056 <__end__+0x56> + 1102a: 8b 45 08 mov 0x8(%ebp),%eax + 1102d: 8b 80 30 02 00 00 mov 0x230(%eax),%eax + 11033: 83 e0 01 and $0x1,%eax + 11036: 85 c0 test %eax,%eax + 11038: 74 1c je 11056 <__end__+0x56> + 1103a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1103d: 25 00 e0 0f fc and $0xfc0fe000,%eax + 11042: 85 c0 test %eax,%eax + 11044: 74 10 je 11056 <__end__+0x56> + 11046: 8b 45 08 mov 0x8(%ebp),%eax + 11049: 8b 40 04 mov 0x4(%eax),%eax + 1104c: 83 c0 48 add $0x48,%eax + 1104f: 8b 00 mov (%eax),%eax + 11051: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11054: eb e4 jmp 1103a <__end__+0x3a> + 11056: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11059: c9 leave + 1105a: c3 ret + +0001105b <_disable>: + 1105b: 55 push %ebp + 1105c: 89 e5 mov %esp,%ebp + 1105e: 8b 45 08 mov 0x8(%ebp),%eax + 11061: c7 80 a4 01 00 00 01 movl $0x1,0x1a4(%eax) + 11068: 00 00 00 + 1106b: 8b 45 08 mov 0x8(%ebp),%eax + 1106e: c7 80 14 03 00 00 00 movl $0x0,0x314(%eax) + 11075: 00 00 00 + 11078: 5d pop %ebp + 11079: c3 ret + +0001107a <_roothub_portstatus>: + 1107a: 55 push %ebp + 1107b: 89 e5 mov %esp,%ebp + 1107d: 83 ec 04 sub $0x4,%esp + 11080: 8b 55 08 mov 0x8(%ebp),%edx + 11083: 8b 45 0c mov 0xc(%ebp),%eax + 11086: c1 e0 02 shl $0x2,%eax + 11089: 03 42 04 add 0x4(%edx),%eax + 1108c: 83 c0 54 add $0x54,%eax + 1108f: 8b 00 mov (%eax),%eax + 11091: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11094: 83 7d fc ff cmpl $0xffffffff,0xfffffffc(%ebp) + 11098: 75 0d jne 110a7 <_roothub_portstatus+0x2d> + 1109a: ff 75 08 pushl 0x8(%ebp) + 1109d: e8 b9 ff ff ff call 1105b <_disable> + 110a2: 83 c4 04 add $0x4,%esp + 110a5: eb 32 jmp 110d9 <_roothub_portstatus+0x5f> + 110a7: 8b 45 08 mov 0x8(%ebp),%eax + 110aa: 8b 80 30 02 00 00 mov 0x230(%eax),%eax + 110b0: 83 e0 01 and $0x1,%eax + 110b3: 85 c0 test %eax,%eax + 110b5: 74 22 je 110d9 <_roothub_portstatus+0x5f> + 110b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 110ba: 25 e0 fc e0 ff and $0xffe0fce0,%eax + 110bf: 85 c0 test %eax,%eax + 110c1: 74 16 je 110d9 <_roothub_portstatus+0x5f> + 110c3: 8b 55 08 mov 0x8(%ebp),%edx + 110c6: 8b 45 0c mov 0xc(%ebp),%eax + 110c9: c1 e0 02 shl $0x2,%eax + 110cc: 03 42 04 add 0x4(%edx),%eax + 110cf: 83 c0 54 add $0x54,%eax + 110d2: 8b 00 mov (%eax),%eax + 110d4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 110d7: eb de jmp 110b7 <_roothub_portstatus+0x3d> + 110d9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 110dc: c9 leave + 110dd: c3 ret + +000110de <_ohci_hub_status_data>: + 110de: 55 push %ebp + 110df: 89 e5 mov %esp,%ebp + 110e1: 53 push %ebx + 110e2: 83 ec 24 sub $0x24,%esp + 110e5: 8b 45 08 mov 0x8(%ebp),%eax + 110e8: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 110eb: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 110ee: 2d 34 02 00 00 sub $0x234,%eax + 110f3: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 110f6: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 110fd: c7 45 e8 01 00 00 00 movl $0x1,0xffffffe8(%ebp) + 11104: 83 ec 0c sub $0xc,%esp + 11107: ff 75 f8 pushl 0xfffffff8(%ebp) + 1110a: e8 f1 fe ff ff call 11000 <__end__> + 1110f: 83 c4 10 add $0x10,%esp + 11112: 25 ff 00 00 00 and $0xff,%eax + 11117: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1111a: 83 7d f4 0f cmpl $0xf,0xfffffff4(%ebp) + 1111e: 7e 24 jle 11144 <_ohci_hub_status_data+0x66> + 11120: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11123: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 1112a: 74 0c je 11138 <_ohci_hub_status_data+0x5a> + 1112c: c7 45 e0 94 ff ff ff movl $0xffffff94,0xffffffe0(%ebp) + 11133: e9 d8 00 00 00 jmp 11210 <_ohci_hub_status_data+0x132> + 11138: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) + 1113f: e9 cc 00 00 00 jmp 11210 <_ohci_hub_status_data+0x132> + 11144: 83 ec 0c sub $0xc,%esp + 11147: ff 75 f8 pushl 0xfffffff8(%ebp) + 1114a: e8 c9 00 00 00 call 11218 <_roothub_status> + 1114f: 83 c4 10 add $0x10,%esp + 11152: 25 00 00 03 00 and $0x30000,%eax + 11157: 85 c0 test %eax,%eax + 11159: 74 0f je 1116a <_ohci_hub_status_data+0x8c> + 1115b: 8b 45 0c mov 0xc(%ebp),%eax + 1115e: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) + 11165: c6 00 01 movb $0x1,(%eax) + 11168: eb 06 jmp 11170 <_ohci_hub_status_data+0x92> + 1116a: 8b 45 0c mov 0xc(%ebp),%eax + 1116d: c6 00 00 movb $0x0,(%eax) + 11170: 83 7d f4 07 cmpl $0x7,0xfffffff4(%ebp) + 11174: 7e 0c jle 11182 <_ohci_hub_status_data+0xa4> + 11176: 8b 45 0c mov 0xc(%ebp),%eax + 11179: 40 inc %eax + 1117a: c6 00 00 movb $0x0,(%eax) + 1117d: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 11180: ff 00 incl (%eax) + 11182: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 11189: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1118c: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 1118f: 7d 64 jge 111f5 <_ohci_hub_status_data+0x117> + 11191: ff 75 f0 pushl 0xfffffff0(%ebp) + 11194: ff 75 f8 pushl 0xfffffff8(%ebp) + 11197: e8 de fe ff ff call 1107a <_roothub_portstatus> + 1119c: 83 c4 08 add $0x8,%esp + 1119f: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 111a2: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 111a5: 81 20 00 00 1f 00 andl $0x1f0000,(%eax) + 111ab: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 111af: 74 3d je 111ee <_ohci_hub_status_data+0x110> + 111b1: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) + 111b8: 83 7d f0 06 cmpl $0x6,0xfffffff0(%ebp) + 111bc: 7f 17 jg 111d5 <_ohci_hub_status_data+0xf7> + 111be: 8b 5d 0c mov 0xc(%ebp),%ebx + 111c1: 8b 55 0c mov 0xc(%ebp),%edx + 111c4: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 111c7: 41 inc %ecx + 111c8: b8 01 00 00 00 mov $0x1,%eax + 111cd: d3 e0 shl %cl,%eax + 111cf: 0a 02 or (%edx),%al + 111d1: 88 03 mov %al,(%ebx) + 111d3: eb 19 jmp 111ee <_ohci_hub_status_data+0x110> + 111d5: 8b 5d 0c mov 0xc(%ebp),%ebx + 111d8: 43 inc %ebx + 111d9: 8b 55 0c mov 0xc(%ebp),%edx + 111dc: 42 inc %edx + 111dd: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 111e0: 83 e9 07 sub $0x7,%ecx + 111e3: b8 01 00 00 00 mov $0x1,%eax + 111e8: d3 e0 shl %cl,%eax + 111ea: 0a 02 or (%edx),%al + 111ec: 88 03 mov %al,(%ebx) + 111ee: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 111f1: ff 00 incl (%eax) + 111f3: eb 94 jmp 11189 <_ohci_hub_status_data+0xab> + 111f5: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 111f9: 74 08 je 11203 <_ohci_hub_status_data+0x125> + 111fb: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 111fe: 89 45 dc mov %eax,0xffffffdc(%ebp) + 11201: eb 07 jmp 1120a <_ohci_hub_status_data+0x12c> + 11203: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) + 1120a: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 1120d: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 11210: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 11213: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 11216: c9 leave + 11217: c3 ret + +00011218 <_roothub_status>: + 11218: 55 push %ebp + 11219: 89 e5 mov %esp,%ebp + 1121b: 8b 45 08 mov 0x8(%ebp),%eax + 1121e: 8b 40 04 mov 0x4(%eax),%eax + 11221: 83 c0 50 add $0x50,%eax + 11224: 8b 00 mov (%eax),%eax + 11226: 5d pop %ebp + 11227: c3 ret + +00011228 <_ohci_hub_descriptor>: + 11228: 55 push %ebp + 11229: 89 e5 mov %esp,%ebp + 1122b: 83 ec 18 sub $0x18,%esp + 1122e: 83 ec 0c sub $0xc,%esp + 11231: ff 75 08 pushl 0x8(%ebp) + 11234: e8 c7 fd ff ff call 11000 <__end__> + 11239: 83 c4 10 add $0x10,%esp + 1123c: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1123f: 0f b6 45 fc movzbl 0xfffffffc(%ebp),%eax + 11243: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11246: 8b 45 0c mov 0xc(%ebp),%eax + 11249: c6 40 01 29 movb $0x29,0x1(%eax) + 1124d: 8b 55 0c mov 0xc(%ebp),%edx + 11250: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11253: 25 00 00 00 ff and $0xff000000,%eax + 11258: c1 e8 18 shr $0x18,%eax + 1125b: 88 42 05 mov %al,0x5(%edx) + 1125e: 8b 45 0c mov 0xc(%ebp),%eax + 11261: c6 40 06 00 movb $0x0,0x6(%eax) + 11265: 8b 55 0c mov 0xc(%ebp),%edx + 11268: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1126b: 88 42 02 mov %al,0x2(%edx) + 1126e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11271: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11274: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 11278: 79 04 jns 1127e <_ohci_hub_descriptor+0x56> + 1127a: 83 45 f0 07 addl $0x7,0xfffffff0(%ebp) + 1127e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11281: c1 f8 03 sar $0x3,%eax + 11284: 40 inc %eax + 11285: 66 89 45 f6 mov %ax,0xfffffff6(%ebp) + 11289: 8b 55 0c mov 0xc(%ebp),%edx + 1128c: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11290: 25 ff ff 00 00 and $0xffff,%eax + 11295: 01 c0 add %eax,%eax + 11297: 83 c0 07 add $0x7,%eax + 1129a: 88 02 mov %al,(%edx) + 1129c: 66 c7 45 f6 00 00 movw $0x0,0xfffffff6(%ebp) + 112a2: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 112a5: c1 e8 08 shr $0x8,%eax + 112a8: 83 e0 01 and $0x1,%eax + 112ab: 85 c0 test %eax,%eax + 112ad: 74 07 je 112b6 <_ohci_hub_descriptor+0x8e> + 112af: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 112b2: 66 83 08 01 orw $0x1,(%eax) + 112b6: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 112b9: c1 e8 0c shr $0xc,%eax + 112bc: 83 e0 01 and $0x1,%eax + 112bf: 85 c0 test %eax,%eax + 112c1: 74 09 je 112cc <_ohci_hub_descriptor+0xa4> + 112c3: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 112c6: 66 83 08 10 orw $0x10,(%eax) + 112ca: eb 14 jmp 112e0 <_ohci_hub_descriptor+0xb8> + 112cc: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 112cf: c1 e8 0b shr $0xb,%eax + 112d2: 83 e0 01 and $0x1,%eax + 112d5: 85 c0 test %eax,%eax + 112d7: 74 07 je 112e0 <_ohci_hub_descriptor+0xb8> + 112d9: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 112dc: 66 83 08 08 orw $0x8,(%eax) + 112e0: 8b 55 0c mov 0xc(%ebp),%edx + 112e3: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 112e7: 66 89 42 03 mov %ax,0x3(%edx) + 112eb: 83 ec 0c sub $0xc,%esp + 112ee: ff 75 08 pushl 0x8(%ebp) + 112f1: e8 3b 00 00 00 call 11331 <_roothub_b> + 112f6: 83 c4 10 add $0x10,%esp + 112f9: 89 45 fc mov %eax,0xfffffffc(%ebp) + 112fc: 8b 55 0c mov 0xc(%ebp),%edx + 112ff: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11302: 88 42 07 mov %al,0x7(%edx) + 11305: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) + 11309: 7e 1d jle 11328 <_ohci_hub_descriptor+0x100> + 1130b: 8b 55 0c mov 0xc(%ebp),%edx + 1130e: 0f b7 45 fc movzwl 0xfffffffc(%ebp),%eax + 11312: c1 e8 08 shr $0x8,%eax + 11315: 88 42 08 mov %al,0x8(%edx) + 11318: 8b 55 0c mov 0xc(%ebp),%edx + 1131b: 8b 45 0c mov 0xc(%ebp),%eax + 1131e: c6 40 0a ff movb $0xff,0xa(%eax) + 11322: c6 42 09 ff movb $0xff,0x9(%edx) + 11326: eb 07 jmp 1132f <_ohci_hub_descriptor+0x107> + 11328: 8b 45 0c mov 0xc(%ebp),%eax + 1132b: c6 40 08 ff movb $0xff,0x8(%eax) + 1132f: c9 leave + 11330: c3 ret + +00011331 <_roothub_b>: + 11331: 55 push %ebp + 11332: 89 e5 mov %esp,%ebp + 11334: 8b 45 08 mov 0x8(%ebp),%eax + 11337: 8b 40 04 mov 0x4(%eax),%eax + 1133a: 83 c0 4c add $0x4c,%eax + 1133d: 8b 00 mov (%eax),%eax + 1133f: 5d pop %ebp + 11340: c3 ret + +00011341 <_ohci_hub_control>: + 11341: 55 push %ebp + 11342: 89 e5 mov %esp,%ebp + 11344: 53 push %ebx + 11345: 83 ec 34 sub $0x34,%esp + 11348: 8b 45 0c mov 0xc(%ebp),%eax + 1134b: 8b 55 10 mov 0x10(%ebp),%edx + 1134e: 8b 4d 14 mov 0x14(%ebp),%ecx + 11351: 8b 5d 1c mov 0x1c(%ebp),%ebx + 11354: 66 89 45 fa mov %ax,0xfffffffa(%ebp) + 11358: 66 89 55 f8 mov %dx,0xfffffff8(%ebp) + 1135c: 66 89 4d f6 mov %cx,0xfffffff6(%ebp) + 11360: 66 89 5d f4 mov %bx,0xfffffff4(%ebp) + 11364: 8b 45 08 mov 0x8(%ebp),%eax + 11367: 89 45 ec mov %eax,0xffffffec(%ebp) + 1136a: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1136d: 2d 34 02 00 00 sub $0x234,%eax + 11372: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11375: 83 ec 0c sub $0xc,%esp + 11378: ff 75 08 pushl 0x8(%ebp) + 1137b: e8 fb 02 00 00 call 1167b <_hcd_to_bus> + 11380: 83 c4 10 add $0x10,%esp + 11383: 8b 40 24 mov 0x24(%eax),%eax + 11386: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 1138c: 89 45 ec mov %eax,0xffffffec(%ebp) + 1138f: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 11396: 66 8b 45 fa mov 0xfffffffa(%ebp),%ax + 1139a: 89 c2 mov %eax,%edx + 1139c: 81 e2 ff ff 00 00 and $0xffff,%edx + 113a2: 89 55 d4 mov %edx,0xffffffd4(%ebp) + 113a5: 81 7d d4 03 23 00 00 cmpl $0x2303,0xffffffd4(%ebp) + 113ac: 0f 84 ef 01 00 00 je 115a1 <_ohci_hub_control+0x260> + 113b2: 81 7d d4 03 23 00 00 cmpl $0x2303,0xffffffd4(%ebp) + 113b9: 7f 32 jg 113ed <_ohci_hub_control+0xac> + 113bb: 81 7d d4 03 20 00 00 cmpl $0x2003,0xffffffd4(%ebp) + 113c2: 0f 84 c0 01 00 00 je 11588 <_ohci_hub_control+0x247> + 113c8: 81 7d d4 03 20 00 00 cmpl $0x2003,0xffffffd4(%ebp) + 113cf: 7f 0e jg 113df <_ohci_hub_control+0x9e> + 113d1: 81 7d d4 01 20 00 00 cmpl $0x2001,0xffffffd4(%ebp) + 113d8: 74 4d je 11427 <_ohci_hub_control+0xe6> + 113da: e9 8d 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 113df: 81 7d d4 01 23 00 00 cmpl $0x2301,0xffffffd4(%ebp) + 113e6: 74 76 je 1145e <_ohci_hub_control+0x11d> + 113e8: e9 7f 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 113ed: 81 7d d4 06 a0 00 00 cmpl $0xa006,0xffffffd4(%ebp) + 113f4: 0f 84 10 01 00 00 je 1150a <_ohci_hub_control+0x1c9> + 113fa: 81 7d d4 06 a0 00 00 cmpl $0xa006,0xffffffd4(%ebp) + 11401: 7f 12 jg 11415 <_ohci_hub_control+0xd4> + 11403: 81 7d d4 00 a0 00 00 cmpl $0xa000,0xffffffd4(%ebp) + 1140a: 0f 84 10 01 00 00 je 11520 <_ohci_hub_control+0x1df> + 11410: e9 57 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 11415: 81 7d d4 00 a3 00 00 cmpl $0xa300,0xffffffd4(%ebp) + 1141c: 0f 84 1e 01 00 00 je 11540 <_ohci_hub_control+0x1ff> + 11422: e9 45 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 11427: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1142a: 89 c2 mov %eax,%edx + 1142c: 81 e2 ff ff 00 00 and $0xffff,%edx + 11432: 89 55 e0 mov %edx,0xffffffe0(%ebp) + 11435: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 11439: 0f 84 34 02 00 00 je 11673 <_ohci_hub_control+0x332> + 1143f: 83 7d e0 01 cmpl $0x1,0xffffffe0(%ebp) + 11443: 74 05 je 1144a <_ohci_hub_control+0x109> + 11445: e9 22 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 1144a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1144d: 8b 40 04 mov 0x4(%eax),%eax + 11450: 83 c0 50 add $0x50,%eax + 11453: c7 00 00 00 02 00 movl $0x20000,(%eax) + 11459: e9 15 02 00 00 jmp 11673 <_ohci_hub_control+0x332> + 1145e: 66 83 7d f6 00 cmpw $0x0,0xfffffff6(%ebp) + 11463: 0f 84 03 02 00 00 je 1166c <_ohci_hub_control+0x32b> + 11469: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 1146d: 25 ff ff 00 00 and $0xffff,%eax + 11472: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 11475: 0f 8f f1 01 00 00 jg 1166c <_ohci_hub_control+0x32b> + 1147b: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 1147e: 66 ff 08 decw (%eax) + 11481: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11484: 89 c2 mov %eax,%edx + 11486: 81 e2 ff ff 00 00 and $0xffff,%edx + 1148c: 89 55 dc mov %edx,0xffffffdc(%ebp) + 1148f: 83 7d dc 14 cmpl $0x14,0xffffffdc(%ebp) + 11493: 0f 87 d3 01 00 00 ja 1166c <_ohci_hub_control+0x32b> + 11499: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 1149c: 8b 04 95 60 60 01 00 mov 0x16060(,%edx,4),%eax + 114a3: ff e0 jmp *%eax + 114a5: c7 45 e8 01 00 00 00 movl $0x1,0xffffffe8(%ebp) + 114ac: eb 3d jmp 114eb <_ohci_hub_control+0x1aa> + 114ae: c7 45 e8 00 00 02 00 movl $0x20000,0xffffffe8(%ebp) + 114b5: eb 34 jmp 114eb <_ohci_hub_control+0x1aa> + 114b7: c7 45 e8 08 00 00 00 movl $0x8,0xffffffe8(%ebp) + 114be: eb 2b jmp 114eb <_ohci_hub_control+0x1aa> + 114c0: c7 45 e8 00 00 04 00 movl $0x40000,0xffffffe8(%ebp) + 114c7: eb 22 jmp 114eb <_ohci_hub_control+0x1aa> + 114c9: c7 45 e8 00 02 00 00 movl $0x200,0xffffffe8(%ebp) + 114d0: eb 19 jmp 114eb <_ohci_hub_control+0x1aa> + 114d2: c7 45 e8 00 00 01 00 movl $0x10000,0xffffffe8(%ebp) + 114d9: eb 10 jmp 114eb <_ohci_hub_control+0x1aa> + 114db: c7 45 e8 00 00 08 00 movl $0x80000,0xffffffe8(%ebp) + 114e2: eb 07 jmp 114eb <_ohci_hub_control+0x1aa> + 114e4: c7 45 e8 00 00 10 00 movl $0x100000,0xffffffe8(%ebp) + 114eb: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 114ee: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 114f2: 25 ff ff 00 00 and $0xffff,%eax + 114f7: c1 e0 02 shl $0x2,%eax + 114fa: 03 42 04 add 0x4(%edx),%eax + 114fd: 8d 50 54 lea 0x54(%eax),%edx + 11500: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11503: 89 02 mov %eax,(%edx) + 11505: e9 69 01 00 00 jmp 11673 <_ohci_hub_control+0x332> + 1150a: 83 ec 08 sub $0x8,%esp + 1150d: ff 75 18 pushl 0x18(%ebp) + 11510: ff 75 f0 pushl 0xfffffff0(%ebp) + 11513: e8 10 fd ff ff call 11228 <_ohci_hub_descriptor> + 11518: 83 c4 10 add $0x10,%esp + 1151b: e9 53 01 00 00 jmp 11673 <_ohci_hub_control+0x332> + 11520: ff 75 f0 pushl 0xfffffff0(%ebp) + 11523: e8 f0 fc ff ff call 11218 <_roothub_status> + 11528: 83 c4 04 add $0x4,%esp + 1152b: 25 ff 7f ff 7f and $0x7fff7fff,%eax + 11530: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11533: 8b 55 18 mov 0x18(%ebp),%edx + 11536: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11539: 89 02 mov %eax,(%edx) + 1153b: e9 33 01 00 00 jmp 11673 <_ohci_hub_control+0x332> + 11540: 66 83 7d f6 00 cmpw $0x0,0xfffffff6(%ebp) + 11545: 0f 84 21 01 00 00 je 1166c <_ohci_hub_control+0x32b> + 1154b: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 1154f: 25 ff ff 00 00 and $0xffff,%eax + 11554: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 11557: 0f 8f 0f 01 00 00 jg 1166c <_ohci_hub_control+0x32b> + 1155d: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 11560: 66 ff 08 decw (%eax) + 11563: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11567: 25 ff ff 00 00 and $0xffff,%eax + 1156c: 50 push %eax + 1156d: ff 75 f0 pushl 0xfffffff0(%ebp) + 11570: e8 05 fb ff ff call 1107a <_roothub_portstatus> + 11575: 83 c4 08 add $0x8,%esp + 11578: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 1157b: 8b 55 18 mov 0x18(%ebp),%edx + 1157e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11581: 89 02 mov %eax,(%edx) + 11583: e9 eb 00 00 00 jmp 11673 <_ohci_hub_control+0x332> + 11588: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1158b: 25 ff ff 00 00 and $0xffff,%eax + 11590: 83 c0 00 add $0x0,%eax + 11593: 83 f8 01 cmp $0x1,%eax + 11596: 0f 87 d0 00 00 00 ja 1166c <_ohci_hub_control+0x32b> + 1159c: e9 d2 00 00 00 jmp 11673 <_ohci_hub_control+0x332> + 115a1: 66 83 7d f6 00 cmpw $0x0,0xfffffff6(%ebp) + 115a6: 0f 84 c0 00 00 00 je 1166c <_ohci_hub_control+0x32b> + 115ac: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 115b0: 25 ff ff 00 00 and $0xffff,%eax + 115b5: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 115b8: 0f 8f ae 00 00 00 jg 1166c <_ohci_hub_control+0x32b> + 115be: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 115c1: 66 ff 08 decw (%eax) + 115c4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 115c7: 89 c2 mov %eax,%edx + 115c9: 81 e2 ff ff 00 00 and $0xffff,%edx + 115cf: 89 55 d8 mov %edx,0xffffffd8(%ebp) + 115d2: 83 7d d8 04 cmpl $0x4,0xffffffd8(%ebp) + 115d6: 74 53 je 1162b <_ohci_hub_control+0x2ea> + 115d8: 83 7d d8 04 cmpl $0x4,0xffffffd8(%ebp) + 115dc: 7f 0b jg 115e9 <_ohci_hub_control+0x2a8> + 115de: 83 7d d8 02 cmpl $0x2,0xffffffd8(%ebp) + 115e2: 74 0d je 115f1 <_ohci_hub_control+0x2b0> + 115e4: e9 83 00 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 115e9: 83 7d d8 08 cmpl $0x8,0xffffffd8(%ebp) + 115ed: 74 1f je 1160e <_ohci_hub_control+0x2cd> + 115ef: eb 7b jmp 1166c <_ohci_hub_control+0x32b> + 115f1: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 115f4: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 115f8: 25 ff ff 00 00 and $0xffff,%eax + 115fd: c1 e0 02 shl $0x2,%eax + 11600: 03 42 04 add 0x4(%edx),%eax + 11603: 83 c0 54 add $0x54,%eax + 11606: c7 00 04 00 00 00 movl $0x4,(%eax) + 1160c: eb 65 jmp 11673 <_ohci_hub_control+0x332> + 1160e: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 11611: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11615: 25 ff ff 00 00 and $0xffff,%eax + 1161a: c1 e0 02 shl $0x2,%eax + 1161d: 03 42 04 add 0x4(%edx),%eax + 11620: 83 c0 54 add $0x54,%eax + 11623: c7 00 00 01 00 00 movl $0x100,(%eax) + 11629: eb 48 jmp 11673 <_ohci_hub_control+0x332> + 1162b: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 1162e: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11632: 25 ff ff 00 00 and $0xffff,%eax + 11637: c1 e0 02 shl $0x2,%eax + 1163a: 03 42 04 add 0x4(%edx),%eax + 1163d: 83 c0 54 add $0x54,%eax + 11640: 8b 00 mov (%eax),%eax + 11642: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11645: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11648: 83 e0 01 and $0x1,%eax + 1164b: 85 c0 test %eax,%eax + 1164d: 74 24 je 11673 <_ohci_hub_control+0x332> + 1164f: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 11652: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11656: 25 ff ff 00 00 and $0xffff,%eax + 1165b: c1 e0 02 shl $0x2,%eax + 1165e: 03 42 04 add 0x4(%edx),%eax + 11661: 83 c0 54 add $0x54,%eax + 11664: c7 00 10 00 00 00 movl $0x10,(%eax) + 1166a: eb 07 jmp 11673 <_ohci_hub_control+0x332> + 1166c: c7 45 e4 e0 ff ff ff movl $0xffffffe0,0xffffffe4(%ebp) + 11673: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 11676: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 11679: c9 leave + 1167a: c3 ret + +0001167b <_hcd_to_bus>: + 1167b: 55 push %ebp + 1167c: 89 e5 mov %esp,%ebp + 1167e: 8b 45 08 mov 0x8(%ebp),%eax + 11681: 5d pop %ebp + 11682: c3 ret + +00011683 <_ohci_hcd_alloc>: + 11683: 55 push %ebp + 11684: 89 e5 mov %esp,%ebp + 11686: 83 ec 08 sub $0x8,%esp + 11689: 83 ec 08 sub $0x8,%esp + 1168c: 68 18 03 00 00 push $0x318 + 11691: 6a 01 push $0x1 + 11693: e8 d8 2e 00 00 call 14570 <_ExAllocatePool@8> + 11698: 83 c4 08 add $0x8,%esp + 1169b: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1169e: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 116a2: 74 22 je 116c6 <_ohci_hcd_alloc+0x43> + 116a4: 83 ec 04 sub $0x4,%esp + 116a7: 68 18 03 00 00 push $0x318 + 116ac: 6a 00 push $0x0 + 116ae: ff 75 fc pushl 0xfffffffc(%ebp) + 116b1: e8 ea 2e 00 00 call 145a0 <_memset> + 116b6: 83 c4 10 add $0x10,%esp + 116b9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 116bc: 05 34 02 00 00 add $0x234,%eax + 116c1: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 116c4: eb 07 jmp 116cd <_ohci_hcd_alloc+0x4a> + 116c6: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 116cd: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 116d0: c9 leave + 116d1: c3 ret + +000116d2 <_ohci_hcd_free>: + 116d2: 55 push %ebp + 116d3: 89 e5 mov %esp,%ebp + 116d5: 83 ec 08 sub $0x8,%esp + 116d8: 8b 45 08 mov 0x8(%ebp),%eax + 116db: 89 45 fc mov %eax,0xfffffffc(%ebp) + 116de: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 116e1: 2d 34 02 00 00 sub $0x234,%eax + 116e6: 83 ec 0c sub $0xc,%esp + 116e9: 50 push %eax + 116ea: e8 91 2e 00 00 call 14580 <_ExFreePool@4> + 116ef: 83 c4 0c add $0xc,%esp + 116f2: c9 leave + 116f3: c3 ret + +000116f4 <_ohci_mem_init>: + 116f4: 55 push %ebp + 116f5: 89 e5 mov %esp,%ebp + 116f7: 83 ec 04 sub $0x4,%esp + 116fa: 8b 45 08 mov 0x8(%ebp),%eax + 116fd: c7 80 9c 00 00 00 01 movl $0x1,0x9c(%eax) + 11704: 00 00 00 + 11707: 8b 45 08 mov 0x8(%ebp),%eax + 1170a: 83 b8 9c 00 00 00 00 cmpl $0x0,0x9c(%eax) + 11711: 75 09 jne 1171c <_ohci_mem_init+0x28> + 11713: c7 45 fc f4 ff ff ff movl $0xfffffff4,0xfffffffc(%ebp) + 1171a: eb 29 jmp 11745 <_ohci_mem_init+0x51> + 1171c: 8b 45 08 mov 0x8(%ebp),%eax + 1171f: c7 80 a0 00 00 00 01 movl $0x1,0xa0(%eax) + 11726: 00 00 00 + 11729: 8b 45 08 mov 0x8(%ebp),%eax + 1172c: 83 b8 a0 00 00 00 00 cmpl $0x0,0xa0(%eax) + 11733: 75 09 jne 1173e <_ohci_mem_init+0x4a> + 11735: c7 45 fc f4 ff ff ff movl $0xfffffff4,0xfffffffc(%ebp) + 1173c: eb 07 jmp 11745 <_ohci_mem_init+0x51> + 1173e: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 11745: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11748: c9 leave + 11749: c3 ret + +0001174a <_ohci_mem_cleanup>: + 1174a: 55 push %ebp + 1174b: 89 e5 mov %esp,%ebp + 1174d: 8b 45 08 mov 0x8(%ebp),%eax + 11750: 83 b8 9c 00 00 00 00 cmpl $0x0,0x9c(%eax) + 11757: 74 0d je 11766 <_ohci_mem_cleanup+0x1c> + 11759: 8b 45 08 mov 0x8(%ebp),%eax + 1175c: c7 80 9c 00 00 00 00 movl $0x0,0x9c(%eax) + 11763: 00 00 00 + 11766: 8b 45 08 mov 0x8(%ebp),%eax + 11769: 83 b8 a0 00 00 00 00 cmpl $0x0,0xa0(%eax) + 11770: 74 0d je 1177f <_ohci_mem_cleanup+0x35> + 11772: 8b 45 08 mov 0x8(%ebp),%eax + 11775: c7 80 a0 00 00 00 00 movl $0x0,0xa0(%eax) + 1177c: 00 00 00 + 1177f: 5d pop %ebp + 11780: c3 ret + +00011781 <_td_alloc>: + 11781: 55 push %ebp + 11782: 89 e5 mov %esp,%ebp + 11784: 83 ec 08 sub $0x8,%esp + 11787: 83 ec 04 sub $0x4,%esp + 1178a: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1178d: 50 push %eax + 1178e: ff 75 0c pushl 0xc(%ebp) + 11791: 8b 45 08 mov 0x8(%ebp),%eax + 11794: ff b0 9c 00 00 00 pushl 0x9c(%eax) + 1179a: e8 35 00 00 00 call 117d4 <_my_pci_pool_alloc> + 1179f: 83 c4 10 add $0x10,%esp + 117a2: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 117a5: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 117a9: 74 24 je 117cf <_td_alloc+0x4e> + 117ab: 83 ec 04 sub $0x4,%esp + 117ae: 6a 40 push $0x40 + 117b0: 6a 00 push $0x0 + 117b2: ff 75 f8 pushl 0xfffffff8(%ebp) + 117b5: e8 e6 2d 00 00 call 145a0 <_memset> + 117ba: 83 c4 10 add $0x10,%esp + 117bd: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 117c0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 117c3: 89 42 08 mov %eax,0x8(%edx) + 117c6: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 117c9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 117cc: 89 42 24 mov %eax,0x24(%edx) + 117cf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 117d2: c9 leave + 117d3: c3 ret + +000117d4 <_my_pci_pool_alloc>: + 117d4: 55 push %ebp + 117d5: 89 e5 mov %esp,%ebp + 117d7: 83 ec 08 sub $0x8,%esp + 117da: 83 ec 08 sub $0x8,%esp + 117dd: ff 75 0c pushl 0xc(%ebp) + 117e0: 6a 01 push $0x1 + 117e2: e8 89 2d 00 00 call 14570 <_ExAllocatePool@8> + 117e7: 83 c4 08 add $0x8,%esp + 117ea: 89 45 fc mov %eax,0xfffffffc(%ebp) + 117ed: 8b 55 10 mov 0x10(%ebp),%edx + 117f0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 117f3: 89 02 mov %eax,(%edx) + 117f5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 117f8: c9 leave + 117f9: c3 ret + +000117fa <_td_free>: + 117fa: 55 push %ebp + 117fb: 89 e5 mov %esp,%ebp + 117fd: 83 ec 08 sub $0x8,%esp + 11800: 8b 55 0c mov 0xc(%ebp),%edx + 11803: 8b 45 0c mov 0xc(%ebp),%eax + 11806: 8b 40 24 mov 0x24(%eax),%eax + 11809: c1 e8 06 shr $0x6,%eax + 1180c: 33 42 24 xor 0x24(%edx),%eax + 1180f: 83 e0 3f and $0x3f,%eax + 11812: c1 e0 02 shl $0x2,%eax + 11815: 03 45 08 add 0x8(%ebp),%eax + 11818: 05 a4 00 00 00 add $0xa4,%eax + 1181d: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11820: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11823: 83 38 00 cmpl $0x0,(%eax) + 11826: 74 17 je 1183f <_td_free+0x45> + 11828: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1182b: 8b 00 mov (%eax),%eax + 1182d: 3b 45 0c cmp 0xc(%ebp),%eax + 11830: 74 0d je 1183f <_td_free+0x45> + 11832: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11835: 8b 00 mov (%eax),%eax + 11837: 83 c0 18 add $0x18,%eax + 1183a: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1183d: eb e1 jmp 11820 <_td_free+0x26> + 1183f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11842: 83 38 00 cmpl $0x0,(%eax) + 11845: 74 0d je 11854 <_td_free+0x5a> + 11847: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1184a: 8b 55 0c mov 0xc(%ebp),%edx + 1184d: 8b 52 18 mov 0x18(%edx),%edx + 11850: 89 10 mov %edx,(%eax) + 11852: eb 00 jmp 11854 <_td_free+0x5a> + 11854: 83 ec 0c sub $0xc,%esp + 11857: ff 75 0c pushl 0xc(%ebp) + 1185a: e8 21 2d 00 00 call 14580 <_ExFreePool@4> + 1185f: 83 c4 0c add $0xc,%esp + 11862: c9 leave + 11863: c3 ret + +00011864 <_ed_alloc>: + 11864: 55 push %ebp + 11865: 89 e5 mov %esp,%ebp + 11867: 83 ec 08 sub $0x8,%esp + 1186a: 83 ec 04 sub $0x4,%esp + 1186d: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 11870: 50 push %eax + 11871: ff 75 0c pushl 0xc(%ebp) + 11874: 8b 45 08 mov 0x8(%ebp),%eax + 11877: ff b0 a0 00 00 00 pushl 0xa0(%eax) + 1187d: e8 52 ff ff ff call 117d4 <_my_pci_pool_alloc> + 11882: 83 c4 10 add $0x10,%esp + 11885: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11888: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 1188c: 74 38 je 118c6 <_ed_alloc+0x62> + 1188e: 83 ec 04 sub $0x4,%esp + 11891: 6a 40 push $0x40 + 11893: 6a 00 push $0x0 + 11895: ff 75 f8 pushl 0xfffffff8(%ebp) + 11898: e8 03 2d 00 00 call 145a0 <_memset> + 1189d: 83 c4 10 add $0x10,%esp + 118a0: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 118a3: 83 c2 20 add $0x20,%edx + 118a6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 118a9: 83 c0 20 add $0x20,%eax + 118ac: 89 02 mov %eax,(%edx) + 118ae: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 118b1: 83 c2 20 add $0x20,%edx + 118b4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 118b7: 83 c0 20 add $0x20,%eax + 118ba: 89 42 04 mov %eax,0x4(%edx) + 118bd: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 118c0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 118c3: 89 42 10 mov %eax,0x10(%edx) + 118c6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 118c9: c9 leave + 118ca: c3 ret + +000118cb <_ed_free>: + 118cb: 55 push %ebp + 118cc: 89 e5 mov %esp,%ebp + 118ce: 83 ec 08 sub $0x8,%esp + 118d1: 83 ec 0c sub $0xc,%esp + 118d4: ff 75 0c pushl 0xc(%ebp) + 118d7: e8 a4 2c 00 00 call 14580 <_ExFreePool@4> + 118dc: 83 c4 0c add $0xc,%esp + 118df: c9 leave + 118e0: c3 ret + +000118e1 <_urb_free_priv>: + 118e1: 55 push %ebp + 118e2: 89 e5 mov %esp,%ebp + 118e4: 83 ec 18 sub $0x18,%esp + 118e7: 8b 45 0c mov 0xc(%ebp),%eax + 118ea: 66 8b 40 04 mov 0x4(%eax),%ax + 118ee: 25 ff ff 00 00 and $0xffff,%eax + 118f3: 48 dec %eax + 118f4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 118f7: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 118fb: 78 3a js 11937 <_urb_free_priv+0x56> + 118fd: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 11904: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11907: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 1190a: 7f 2b jg 11937 <_urb_free_priv+0x56> + 1190c: 8b 45 0c mov 0xc(%ebp),%eax + 1190f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 11912: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax + 11916: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11919: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 1191d: 74 11 je 11930 <_urb_free_priv+0x4f> + 1191f: 83 ec 08 sub $0x8,%esp + 11922: ff 75 f4 pushl 0xfffffff4(%ebp) + 11925: ff 75 08 pushl 0x8(%ebp) + 11928: e8 cd fe ff ff call 117fa <_td_free> + 1192d: 83 c4 10 add $0x10,%esp + 11930: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 11933: ff 00 incl (%eax) + 11935: eb cd jmp 11904 <_urb_free_priv+0x23> + 11937: 83 ec 0c sub $0xc,%esp + 1193a: ff 75 0c pushl 0xc(%ebp) + 1193d: e8 3e 2c 00 00 call 14580 <_ExFreePool@4> + 11942: 83 c4 0c add $0xc,%esp + 11945: c9 leave + 11946: c3 ret + +00011947 <_finish_urb>: + 11947: 55 push %ebp + 11948: 89 e5 mov %esp,%ebp + 1194a: 83 ec 08 sub $0x8,%esp + 1194d: 83 ec 08 sub $0x8,%esp + 11950: 8b 45 0c mov 0xc(%ebp),%eax + 11953: ff 70 08 pushl 0x8(%eax) + 11956: ff 75 08 pushl 0x8(%ebp) + 11959: e8 83 ff ff ff call 118e1 <_urb_free_priv> + 1195e: 83 c4 10 add $0x10,%esp + 11961: 8b 45 0c mov 0xc(%ebp),%eax + 11964: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 1196b: 8b 45 0c mov 0xc(%ebp),%eax + 1196e: c7 00 01 00 00 00 movl $0x1,(%eax) + 11974: 8b 45 0c mov 0xc(%ebp),%eax + 11977: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 1197b: 75 0a jne 11987 <_finish_urb+0x40> + 1197d: 8b 45 0c mov 0xc(%ebp),%eax + 11980: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 11987: 8b 45 0c mov 0xc(%ebp),%eax + 1198a: 8b 40 18 mov 0x18(%eax),%eax + 1198d: c1 e8 1e shr $0x1e,%eax + 11990: 83 e0 03 and $0x3,%eax + 11993: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11996: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 1199a: 74 08 je 119a4 <_finish_urb+0x5d> + 1199c: 83 7d fc 01 cmpl $0x1,0xfffffffc(%ebp) + 119a0: 74 18 je 119ba <_finish_urb+0x73> + 119a2: eb 2a jmp 119ce <_finish_urb+0x87> + 119a4: 8b 45 08 mov 0x8(%ebp),%eax + 119a7: 05 34 02 00 00 add $0x234,%eax + 119ac: 50 push %eax + 119ad: e8 c9 fc ff ff call 1167b <_hcd_to_bus> + 119b2: 83 c4 04 add $0x4,%esp + 119b5: ff 48 3c decl 0x3c(%eax) + 119b8: eb 14 jmp 119ce <_finish_urb+0x87> + 119ba: 8b 45 08 mov 0x8(%ebp),%eax + 119bd: 05 34 02 00 00 add $0x234,%eax + 119c2: 50 push %eax + 119c3: e8 b3 fc ff ff call 1167b <_hcd_to_bus> + 119c8: 83 c4 04 add $0x4,%esp + 119cb: ff 48 38 decl 0x38(%eax) + 119ce: 83 ec 04 sub $0x4,%esp + 119d1: ff 75 10 pushl 0x10(%ebp) + 119d4: ff 75 0c pushl 0xc(%ebp) + 119d7: 8b 45 08 mov 0x8(%ebp),%eax + 119da: 05 34 02 00 00 add $0x234,%eax + 119df: 50 push %eax + 119e0: e8 db 2b 00 00 call 145c0 <_usb_hcd_giveback_urb@12> + 119e5: 83 c4 04 add $0x4,%esp + 119e8: c9 leave + 119e9: c3 ret + +000119ea <_balance>: + 119ea: 55 push %ebp + 119eb: 89 e5 mov %esp,%ebp + 119ed: 53 push %ebx + 119ee: 83 ec 0c sub $0xc,%esp + 119f1: c7 45 f4 e4 ff ff ff movl $0xffffffe4,0xfffffff4(%ebp) + 119f8: 83 7d 0c 20 cmpl $0x20,0xc(%ebp) + 119fc: 7e 07 jle 11a05 <_balance+0x1b> + 119fe: c7 45 0c 20 00 00 00 movl $0x20,0xc(%ebp) + 11a05: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 11a0c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11a0f: 3b 45 0c cmp 0xc(%ebp),%eax + 11a12: 7d 68 jge 11a7c <_balance+0x92> + 11a14: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 11a18: 78 1e js 11a38 <_balance+0x4e> + 11a1a: 8b 5d 08 mov 0x8(%ebp),%ebx + 11a1d: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11a20: 8b 4d 08 mov 0x8(%ebp),%ecx + 11a23: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 11a26: 8b 84 83 ac 01 00 00 mov 0x1ac(%ebx,%eax,4),%eax + 11a2d: 3b 84 91 ac 01 00 00 cmp 0x1ac(%ecx,%edx,4),%eax + 11a34: 7f 02 jg 11a38 <_balance+0x4e> + 11a36: eb 3d jmp 11a75 <_balance+0x8b> + 11a38: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11a3b: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11a3e: 83 7d f0 1f cmpl $0x1f,0xfffffff0(%ebp) + 11a42: 7f 23 jg 11a67 <_balance+0x7d> + 11a44: 8b 4d 08 mov 0x8(%ebp),%ecx + 11a47: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 11a4a: 8b 45 10 mov 0x10(%ebp),%eax + 11a4d: 03 84 91 ac 01 00 00 add 0x1ac(%ecx,%edx,4),%eax + 11a54: 3d 84 03 00 00 cmp $0x384,%eax + 11a59: 7e 02 jle 11a5d <_balance+0x73> + 11a5b: eb 0a jmp 11a67 <_balance+0x7d> + 11a5d: 8b 55 0c mov 0xc(%ebp),%edx + 11a60: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 11a63: 01 10 add %edx,(%eax) + 11a65: eb d7 jmp 11a3e <_balance+0x54> + 11a67: 83 7d f0 1f cmpl $0x1f,0xfffffff0(%ebp) + 11a6b: 7f 02 jg 11a6f <_balance+0x85> + 11a6d: eb 06 jmp 11a75 <_balance+0x8b> + 11a6f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11a72: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11a75: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 11a78: ff 00 incl (%eax) + 11a7a: eb 90 jmp 11a0c <_balance+0x22> + 11a7c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11a7f: 83 c4 0c add $0xc,%esp + 11a82: 5b pop %ebx + 11a83: 5d pop %ebp + 11a84: c3 ret + +00011a85 <_periodic_link>: + 11a85: 55 push %ebp + 11a86: 89 e5 mov %esp,%ebp + 11a88: 56 push %esi + 11a89: 53 push %ebx + 11a8a: 83 ec 10 sub $0x10,%esp + 11a8d: 8b 45 0c mov 0xc(%ebp),%eax + 11a90: 8a 40 2a mov 0x2a(%eax),%al + 11a93: 25 ff 00 00 00 and $0xff,%eax + 11a98: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11a9b: 83 7d f4 1f cmpl $0x1f,0xfffffff4(%ebp) + 11a9f: 0f 87 d8 00 00 00 ja 11b7d <_periodic_link+0xf8> + 11aa5: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11aa8: c1 e0 02 shl $0x2,%eax + 11aab: 03 45 08 add 0x8(%ebp),%eax + 11aae: 83 c0 1c add $0x1c,%eax + 11ab1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11ab4: 8b 55 08 mov 0x8(%ebp),%edx + 11ab7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11aba: c1 e0 02 shl $0x2,%eax + 11abd: 03 42 08 add 0x8(%edx),%eax + 11ac0: 89 45 ec mov %eax,0xffffffec(%ebp) + 11ac3: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11ac6: 8b 00 mov (%eax),%eax + 11ac8: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11acb: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 11acf: 74 36 je 11b07 <_periodic_link+0x82> + 11ad1: 8b 45 0c mov 0xc(%ebp),%eax + 11ad4: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax + 11ad7: 74 2e je 11b07 <_periodic_link+0x82> + 11ad9: 8b 45 0c mov 0xc(%ebp),%eax + 11adc: 8b 55 e8 mov 0xffffffe8(%ebp),%edx + 11adf: 66 8b 40 2c mov 0x2c(%eax),%ax + 11ae3: 66 3b 42 2c cmp 0x2c(%edx),%ax + 11ae7: 76 02 jbe 11aeb <_periodic_link+0x66> + 11ae9: eb 1c jmp 11b07 <_periodic_link+0x82> + 11aeb: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11aee: 83 c0 18 add $0x18,%eax + 11af1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11af4: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11af7: 83 c0 0c add $0xc,%eax + 11afa: 89 45 ec mov %eax,0xffffffec(%ebp) + 11afd: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11b00: 8b 00 mov (%eax),%eax + 11b02: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11b05: eb c4 jmp 11acb <_periodic_link+0x46> + 11b07: 8b 45 0c mov 0xc(%ebp),%eax + 11b0a: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax + 11b0d: 74 2f je 11b3e <_periodic_link+0xb9> + 11b0f: 8b 55 0c mov 0xc(%ebp),%edx + 11b12: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11b15: 89 42 18 mov %eax,0x18(%edx) + 11b18: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 11b1c: 74 0b je 11b29 <_periodic_link+0xa4> + 11b1e: 8b 45 0c mov 0xc(%ebp),%eax + 11b21: 8b 55 ec mov 0xffffffec(%ebp),%edx + 11b24: 8b 12 mov (%edx),%edx + 11b26: 89 50 0c mov %edx,0xc(%eax) + 11b29: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 11b2c: 8b 45 0c mov 0xc(%ebp),%eax + 11b2f: 89 02 mov %eax,(%edx) + 11b31: 8b 55 ec mov 0xffffffec(%ebp),%edx + 11b34: 8b 45 0c mov 0xc(%ebp),%eax + 11b37: 83 c0 10 add $0x10,%eax + 11b3a: 8b 00 mov (%eax),%eax + 11b3c: 89 02 mov %eax,(%edx) + 11b3e: 8b 5d 08 mov 0x8(%ebp),%ebx + 11b41: 8b 75 f4 mov 0xfffffff4(%ebp),%esi + 11b44: 8b 55 08 mov 0x8(%ebp),%edx + 11b47: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 11b4a: 8b 45 0c mov 0xc(%ebp),%eax + 11b4d: 66 8b 40 2e mov 0x2e(%eax),%ax + 11b51: 25 ff ff 00 00 and $0xffff,%eax + 11b56: 03 84 8a ac 01 00 00 add 0x1ac(%edx,%ecx,4),%eax + 11b5d: 89 84 b3 ac 01 00 00 mov %eax,0x1ac(%ebx,%esi,4) + 11b64: 8b 45 0c mov 0xc(%ebp),%eax + 11b67: 66 8b 40 2c mov 0x2c(%eax),%ax + 11b6b: 89 c2 mov %eax,%edx + 11b6d: 81 e2 ff ff 00 00 and $0xffff,%edx + 11b73: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 11b76: 01 10 add %edx,(%eax) + 11b78: e9 1e ff ff ff jmp 11a9b <_periodic_link+0x16> + 11b7d: 8b 45 08 mov 0x8(%ebp),%eax + 11b80: 05 34 02 00 00 add $0x234,%eax + 11b85: 50 push %eax + 11b86: e8 f0 fa ff ff call 1167b <_hcd_to_bus> + 11b8b: 83 c4 04 add $0x4,%esp + 11b8e: 89 c3 mov %eax,%ebx + 11b90: 8b 45 0c mov 0xc(%ebp),%eax + 11b93: 8b 4d 0c mov 0xc(%ebp),%ecx + 11b96: 66 8b 40 2e mov 0x2e(%eax),%ax + 11b9a: ba 00 00 00 00 mov $0x0,%edx + 11b9f: 66 f7 71 2c divw 0x2c(%ecx) + 11ba3: 25 ff ff 00 00 and $0xffff,%eax + 11ba8: 01 43 34 add %eax,0x34(%ebx) + 11bab: 8d 65 f8 lea 0xfffffff8(%ebp),%esp + 11bae: 5b pop %ebx + 11baf: 5e pop %esi + 11bb0: 5d pop %ebp + 11bb1: c3 ret + +00011bb2 <_ed_schedule>: + 11bb2: 55 push %ebp + 11bb3: 89 e5 mov %esp,%ebp + 11bb5: 83 ec 0c sub $0xc,%esp + 11bb8: 8b 45 0c mov 0xc(%ebp),%eax + 11bbb: c6 40 28 02 movb $0x2,0x28(%eax) + 11bbf: 8b 45 0c mov 0xc(%ebp),%eax + 11bc2: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 11bc9: 8b 45 0c mov 0xc(%ebp),%eax + 11bcc: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 11bd3: 8b 45 0c mov 0xc(%ebp),%eax + 11bd6: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 11bdd: 8b 45 0c mov 0xc(%ebp),%eax + 11be0: ba 00 00 00 00 mov $0x0,%edx + 11be5: 8a 50 29 mov 0x29(%eax),%dl + 11be8: 89 55 f4 mov %edx,0xfffffff4(%ebp) + 11beb: 83 7d f4 02 cmpl $0x2,0xfffffff4(%ebp) + 11bef: 74 0f je 11c00 <_ed_schedule+0x4e> + 11bf1: 83 7d f4 03 cmpl $0x3,0xfffffff4(%ebp) + 11bf5: 0f 84 a0 00 00 00 je 11c9b <_ed_schedule+0xe9> + 11bfb: e9 33 01 00 00 jmp 11d33 <_ed_schedule+0x181> + 11c00: 8b 45 08 mov 0x8(%ebp),%eax + 11c03: 83 78 18 00 cmpl $0x0,0x18(%eax) + 11c07: 75 13 jne 11c1c <_ed_schedule+0x6a> + 11c09: 8b 45 08 mov 0x8(%ebp),%eax + 11c0c: 8b 50 04 mov 0x4(%eax),%edx + 11c0f: 83 c2 20 add $0x20,%edx + 11c12: 8b 45 0c mov 0xc(%ebp),%eax + 11c15: 8b 40 10 mov 0x10(%eax),%eax + 11c18: 89 02 mov %eax,(%edx) + 11c1a: eb 1b jmp 11c37 <_ed_schedule+0x85> + 11c1c: 8b 45 08 mov 0x8(%ebp),%eax + 11c1f: 8b 50 18 mov 0x18(%eax),%edx + 11c22: 8b 45 0c mov 0xc(%ebp),%eax + 11c25: 89 42 18 mov %eax,0x18(%edx) + 11c28: 8b 45 08 mov 0x8(%ebp),%eax + 11c2b: 8b 50 18 mov 0x18(%eax),%edx + 11c2e: 8b 45 0c mov 0xc(%ebp),%eax + 11c31: 8b 40 10 mov 0x10(%eax),%eax + 11c34: 89 42 0c mov %eax,0xc(%edx) + 11c37: 8b 55 0c mov 0xc(%ebp),%edx + 11c3a: 8b 45 08 mov 0x8(%ebp),%eax + 11c3d: 8b 40 18 mov 0x18(%eax),%eax + 11c40: 89 42 1c mov %eax,0x1c(%edx) + 11c43: 8b 45 08 mov 0x8(%ebp),%eax + 11c46: 83 78 18 00 cmpl $0x0,0x18(%eax) + 11c4a: 75 41 jne 11c8d <_ed_schedule+0xdb> + 11c4c: 8b 45 08 mov 0x8(%ebp),%eax + 11c4f: 83 78 10 00 cmpl $0x0,0x10(%eax) + 11c53: 75 38 jne 11c8d <_ed_schedule+0xdb> + 11c55: 8b 55 08 mov 0x8(%ebp),%edx + 11c58: 8b 45 08 mov 0x8(%ebp),%eax + 11c5b: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11c61: 83 c8 10 or $0x10,%eax + 11c64: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 11c6a: 8b 45 08 mov 0x8(%ebp),%eax + 11c6d: 8b 40 04 mov 0x4(%eax),%eax + 11c70: 83 c0 24 add $0x24,%eax + 11c73: c7 00 00 00 00 00 movl $0x0,(%eax) + 11c79: 8b 45 08 mov 0x8(%ebp),%eax + 11c7c: 8b 50 04 mov 0x4(%eax),%edx + 11c7f: 83 c2 04 add $0x4,%edx + 11c82: 8b 45 08 mov 0x8(%ebp),%eax + 11c85: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11c8b: 89 02 mov %eax,(%edx) + 11c8d: 8b 55 08 mov 0x8(%ebp),%edx + 11c90: 8b 45 0c mov 0xc(%ebp),%eax + 11c93: 89 42 18 mov %eax,0x18(%edx) + 11c96: e9 e5 00 00 00 jmp 11d80 <_ed_schedule+0x1ce> + 11c9b: 8b 45 08 mov 0x8(%ebp),%eax + 11c9e: 83 78 14 00 cmpl $0x0,0x14(%eax) + 11ca2: 75 13 jne 11cb7 <_ed_schedule+0x105> + 11ca4: 8b 45 08 mov 0x8(%ebp),%eax + 11ca7: 8b 50 04 mov 0x4(%eax),%edx + 11caa: 83 c2 28 add $0x28,%edx + 11cad: 8b 45 0c mov 0xc(%ebp),%eax + 11cb0: 8b 40 10 mov 0x10(%eax),%eax + 11cb3: 89 02 mov %eax,(%edx) + 11cb5: eb 1b jmp 11cd2 <_ed_schedule+0x120> + 11cb7: 8b 45 08 mov 0x8(%ebp),%eax + 11cba: 8b 50 14 mov 0x14(%eax),%edx + 11cbd: 8b 45 0c mov 0xc(%ebp),%eax + 11cc0: 89 42 18 mov %eax,0x18(%edx) + 11cc3: 8b 45 08 mov 0x8(%ebp),%eax + 11cc6: 8b 50 14 mov 0x14(%eax),%edx + 11cc9: 8b 45 0c mov 0xc(%ebp),%eax + 11ccc: 8b 40 10 mov 0x10(%eax),%eax + 11ccf: 89 42 0c mov %eax,0xc(%edx) + 11cd2: 8b 55 0c mov 0xc(%ebp),%edx + 11cd5: 8b 45 08 mov 0x8(%ebp),%eax + 11cd8: 8b 40 14 mov 0x14(%eax),%eax + 11cdb: 89 42 1c mov %eax,0x1c(%edx) + 11cde: 8b 45 08 mov 0x8(%ebp),%eax + 11ce1: 83 78 14 00 cmpl $0x0,0x14(%eax) + 11ce5: 75 41 jne 11d28 <_ed_schedule+0x176> + 11ce7: 8b 45 08 mov 0x8(%ebp),%eax + 11cea: 83 78 10 00 cmpl $0x0,0x10(%eax) + 11cee: 75 38 jne 11d28 <_ed_schedule+0x176> + 11cf0: 8b 55 08 mov 0x8(%ebp),%edx + 11cf3: 8b 45 08 mov 0x8(%ebp),%eax + 11cf6: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11cfc: 83 c8 20 or $0x20,%eax + 11cff: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 11d05: 8b 45 08 mov 0x8(%ebp),%eax + 11d08: 8b 40 04 mov 0x4(%eax),%eax + 11d0b: 83 c0 2c add $0x2c,%eax + 11d0e: c7 00 00 00 00 00 movl $0x0,(%eax) + 11d14: 8b 45 08 mov 0x8(%ebp),%eax + 11d17: 8b 50 04 mov 0x4(%eax),%edx + 11d1a: 83 c2 04 add $0x4,%edx + 11d1d: 8b 45 08 mov 0x8(%ebp),%eax + 11d20: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11d26: 89 02 mov %eax,(%edx) + 11d28: 8b 55 08 mov 0x8(%ebp),%edx + 11d2b: 8b 45 0c mov 0xc(%ebp),%eax + 11d2e: 89 42 14 mov %eax,0x14(%edx) + 11d31: eb 4d jmp 11d80 <_ed_schedule+0x1ce> + 11d33: 8b 45 0c mov 0xc(%ebp),%eax + 11d36: 66 8b 40 2e mov 0x2e(%eax),%ax + 11d3a: 25 ff ff 00 00 and $0xffff,%eax + 11d3f: 50 push %eax + 11d40: 8b 45 0c mov 0xc(%ebp),%eax + 11d43: 66 8b 40 2c mov 0x2c(%eax),%ax + 11d47: 25 ff ff 00 00 and $0xffff,%eax + 11d4c: 50 push %eax + 11d4d: ff 75 08 pushl 0x8(%ebp) + 11d50: e8 95 fc ff ff call 119ea <_balance> + 11d55: 83 c4 0c add $0xc,%esp + 11d58: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11d5b: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 11d5f: 79 08 jns 11d69 <_ed_schedule+0x1b7> + 11d61: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11d64: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11d67: eb 1e jmp 11d87 <_ed_schedule+0x1d5> + 11d69: 8b 55 0c mov 0xc(%ebp),%edx + 11d6c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11d6f: 88 42 2a mov %al,0x2a(%edx) + 11d72: ff 75 0c pushl 0xc(%ebp) + 11d75: ff 75 08 pushl 0x8(%ebp) + 11d78: e8 08 fd ff ff call 11a85 <_periodic_link> + 11d7d: 83 c4 08 add $0x8,%esp + 11d80: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 11d87: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11d8a: c9 leave + 11d8b: c3 ret + +00011d8c <_periodic_unlink>: + 11d8c: 55 push %ebp + 11d8d: 89 e5 mov %esp,%ebp + 11d8f: 57 push %edi + 11d90: 56 push %esi + 11d91: 53 push %ebx + 11d92: 83 ec 10 sub $0x10,%esp + 11d95: 8b 45 0c mov 0xc(%ebp),%eax + 11d98: 8a 40 2a mov 0x2a(%eax),%al + 11d9b: 25 ff 00 00 00 and $0xff,%eax + 11da0: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11da3: 83 7d f0 1f cmpl $0x1f,0xfffffff0(%ebp) + 11da7: 0f 8f a9 00 00 00 jg 11e56 <_periodic_unlink+0xca> + 11dad: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11db0: c1 e0 02 shl $0x2,%eax + 11db3: 03 45 08 add 0x8(%ebp),%eax + 11db6: 83 c0 1c add $0x1c,%eax + 11db9: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11dbc: 8b 55 08 mov 0x8(%ebp),%edx + 11dbf: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11dc2: c1 e0 02 shl $0x2,%eax + 11dc5: 03 42 08 add 0x8(%edx),%eax + 11dc8: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 11dcb: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11dce: 83 38 00 cmpl $0x0,(%eax) + 11dd1: 74 21 je 11df4 <_periodic_unlink+0x68> + 11dd3: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11dd6: 8b 00 mov (%eax),%eax + 11dd8: 89 45 ec mov %eax,0xffffffec(%ebp) + 11ddb: 3b 45 0c cmp 0xc(%ebp),%eax + 11dde: 74 14 je 11df4 <_periodic_unlink+0x68> + 11de0: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11de3: 83 c0 0c add $0xc,%eax + 11de6: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 11de9: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11dec: 83 c0 18 add $0x18,%eax + 11def: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11df2: eb d7 jmp 11dcb <_periodic_unlink+0x3f> + 11df4: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11df7: 83 38 00 cmpl $0x0,(%eax) + 11dfa: 74 16 je 11e12 <_periodic_unlink+0x86> + 11dfc: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 11dff: 8b 45 0c mov 0xc(%ebp),%eax + 11e02: 8b 40 0c mov 0xc(%eax),%eax + 11e05: 89 02 mov %eax,(%edx) + 11e07: 8b 55 e8 mov 0xffffffe8(%ebp),%edx + 11e0a: 8b 45 0c mov 0xc(%ebp),%eax + 11e0d: 8b 40 18 mov 0x18(%eax),%eax + 11e10: 89 02 mov %eax,(%edx) + 11e12: 8b 75 08 mov 0x8(%ebp),%esi + 11e15: 8b 7d f0 mov 0xfffffff0(%ebp),%edi + 11e18: 8b 4d 08 mov 0x8(%ebp),%ecx + 11e1b: 8b 5d f0 mov 0xfffffff0(%ebp),%ebx + 11e1e: 8b 45 0c mov 0xc(%ebp),%eax + 11e21: 66 8b 40 2e mov 0x2e(%eax),%ax + 11e25: 89 c2 mov %eax,%edx + 11e27: 81 e2 ff ff 00 00 and $0xffff,%edx + 11e2d: 8b 84 99 ac 01 00 00 mov 0x1ac(%ecx,%ebx,4),%eax + 11e34: 29 d0 sub %edx,%eax + 11e36: 89 84 be ac 01 00 00 mov %eax,0x1ac(%esi,%edi,4) + 11e3d: 8b 45 0c mov 0xc(%ebp),%eax + 11e40: 66 8b 40 2c mov 0x2c(%eax),%ax + 11e44: 89 c2 mov %eax,%edx + 11e46: 81 e2 ff ff 00 00 and $0xffff,%edx + 11e4c: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 11e4f: 01 10 add %edx,(%eax) + 11e51: e9 4d ff ff ff jmp 11da3 <_periodic_unlink+0x17> + 11e56: 8b 45 08 mov 0x8(%ebp),%eax + 11e59: 05 34 02 00 00 add $0x234,%eax + 11e5e: 50 push %eax + 11e5f: e8 17 f8 ff ff call 1167b <_hcd_to_bus> + 11e64: 83 c4 04 add $0x4,%esp + 11e67: 89 c3 mov %eax,%ebx + 11e69: 8b 45 0c mov 0xc(%ebp),%eax + 11e6c: 8b 4d 0c mov 0xc(%ebp),%ecx + 11e6f: 66 8b 40 2e mov 0x2e(%eax),%ax + 11e73: ba 00 00 00 00 mov $0x0,%edx + 11e78: 66 f7 71 2c divw 0x2c(%ecx) + 11e7c: 25 ff ff 00 00 and $0xffff,%eax + 11e81: 29 43 34 sub %eax,0x34(%ebx) + 11e84: 8d 65 f4 lea 0xfffffff4(%ebp),%esp + 11e87: 5b pop %ebx + 11e88: 5e pop %esi + 11e89: 5f pop %edi + 11e8a: 5d pop %ebp + 11e8b: c3 ret + +00011e8c <_ed_deschedule>: + 11e8c: 55 push %ebp + 11e8d: 89 e5 mov %esp,%ebp + 11e8f: 83 ec 04 sub $0x4,%esp + 11e92: 8b 55 0c mov 0xc(%ebp),%edx + 11e95: 8b 45 0c mov 0xc(%ebp),%eax + 11e98: 8b 00 mov (%eax),%eax + 11e9a: 80 cc 40 or $0x40,%ah + 11e9d: 89 02 mov %eax,(%edx) + 11e9f: 8b 45 0c mov 0xc(%ebp),%eax + 11ea2: ba 00 00 00 00 mov $0x0,%edx + 11ea7: 8a 50 29 mov 0x29(%eax),%dl + 11eaa: 89 55 fc mov %edx,0xfffffffc(%ebp) + 11ead: 83 7d fc 02 cmpl $0x2,0xfffffffc(%ebp) + 11eb1: 74 0f je 11ec2 <_ed_deschedule+0x36> + 11eb3: 83 7d fc 03 cmpl $0x3,0xfffffffc(%ebp) + 11eb7: 0f 84 e4 00 00 00 je 11fa1 <_ed_deschedule+0x115> + 11ebd: e9 b0 01 00 00 jmp 12072 <_ed_deschedule+0x1e6> + 11ec2: 8b 45 0c mov 0xc(%ebp),%eax + 11ec5: 83 78 1c 00 cmpl $0x0,0x1c(%eax) + 11ec9: 75 61 jne 11f2c <_ed_deschedule+0xa0> + 11ecb: 8b 45 0c mov 0xc(%ebp),%eax + 11ece: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 11ed2: 75 43 jne 11f17 <_ed_deschedule+0x8b> + 11ed4: 8b 55 08 mov 0x8(%ebp),%edx + 11ed7: 8b 45 08 mov 0x8(%ebp),%eax + 11eda: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11ee0: 83 e0 ef and $0xffffffef,%eax + 11ee3: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 11ee9: 8b 45 08 mov 0x8(%ebp),%eax + 11eec: 8b 50 04 mov 0x4(%eax),%edx + 11eef: 83 c2 04 add $0x4,%edx + 11ef2: 8b 45 08 mov 0x8(%ebp),%eax + 11ef5: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11efb: 89 02 mov %eax,(%edx) + 11efd: 8b 45 08 mov 0x8(%ebp),%eax + 11f00: 8b 40 04 mov 0x4(%eax),%eax + 11f03: 83 c0 24 add $0x24,%eax + 11f06: c7 00 00 00 00 00 movl $0x0,(%eax) + 11f0c: 8b 45 08 mov 0x8(%ebp),%eax + 11f0f: 8b 40 04 mov 0x4(%eax),%eax + 11f12: 83 c0 04 add $0x4,%eax + 11f15: 8b 00 mov (%eax),%eax + 11f17: 8b 45 08 mov 0x8(%ebp),%eax + 11f1a: 8b 50 04 mov 0x4(%eax),%edx + 11f1d: 83 c2 20 add $0x20,%edx + 11f20: 8b 45 0c mov 0xc(%ebp),%eax + 11f23: 83 c0 0c add $0xc,%eax + 11f26: 8b 00 mov (%eax),%eax + 11f28: 89 02 mov %eax,(%edx) + 11f2a: eb 1e jmp 11f4a <_ed_deschedule+0xbe> + 11f2c: 8b 45 0c mov 0xc(%ebp),%eax + 11f2f: 8b 50 1c mov 0x1c(%eax),%edx + 11f32: 8b 45 0c mov 0xc(%ebp),%eax + 11f35: 8b 40 18 mov 0x18(%eax),%eax + 11f38: 89 42 18 mov %eax,0x18(%edx) + 11f3b: 8b 45 0c mov 0xc(%ebp),%eax + 11f3e: 8b 50 1c mov 0x1c(%eax),%edx + 11f41: 8b 45 0c mov 0xc(%ebp),%eax + 11f44: 8b 40 0c mov 0xc(%eax),%eax + 11f47: 89 42 0c mov %eax,0xc(%edx) + 11f4a: 8b 45 08 mov 0x8(%ebp),%eax + 11f4d: 8b 40 18 mov 0x18(%eax),%eax + 11f50: 3b 45 0c cmp 0xc(%ebp),%eax + 11f53: 75 2b jne 11f80 <_ed_deschedule+0xf4> + 11f55: 8b 55 08 mov 0x8(%ebp),%edx + 11f58: 8b 45 0c mov 0xc(%ebp),%eax + 11f5b: 8b 40 1c mov 0x1c(%eax),%eax + 11f5e: 89 42 18 mov %eax,0x18(%edx) + 11f61: 8b 45 08 mov 0x8(%ebp),%eax + 11f64: 83 78 18 00 cmpl $0x0,0x18(%eax) + 11f68: 0f 84 12 01 00 00 je 12080 <_ed_deschedule+0x1f4> + 11f6e: 8b 45 08 mov 0x8(%ebp),%eax + 11f71: 8b 40 18 mov 0x18(%eax),%eax + 11f74: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 11f7b: e9 00 01 00 00 jmp 12080 <_ed_deschedule+0x1f4> + 11f80: 8b 45 0c mov 0xc(%ebp),%eax + 11f83: 83 78 18 00 cmpl $0x0,0x18(%eax) + 11f87: 0f 84 f3 00 00 00 je 12080 <_ed_deschedule+0x1f4> + 11f8d: 8b 45 0c mov 0xc(%ebp),%eax + 11f90: 8b 50 18 mov 0x18(%eax),%edx + 11f93: 8b 45 0c mov 0xc(%ebp),%eax + 11f96: 8b 40 1c mov 0x1c(%eax),%eax + 11f99: 89 42 1c mov %eax,0x1c(%edx) + 11f9c: e9 df 00 00 00 jmp 12080 <_ed_deschedule+0x1f4> + 11fa1: 8b 45 0c mov 0xc(%ebp),%eax + 11fa4: 83 78 1c 00 cmpl $0x0,0x1c(%eax) + 11fa8: 75 61 jne 1200b <_ed_deschedule+0x17f> + 11faa: 8b 45 0c mov 0xc(%ebp),%eax + 11fad: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 11fb1: 75 43 jne 11ff6 <_ed_deschedule+0x16a> + 11fb3: 8b 55 08 mov 0x8(%ebp),%edx + 11fb6: 8b 45 08 mov 0x8(%ebp),%eax + 11fb9: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11fbf: 83 e0 df and $0xffffffdf,%eax + 11fc2: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 11fc8: 8b 45 08 mov 0x8(%ebp),%eax + 11fcb: 8b 50 04 mov 0x4(%eax),%edx + 11fce: 83 c2 04 add $0x4,%edx + 11fd1: 8b 45 08 mov 0x8(%ebp),%eax + 11fd4: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11fda: 89 02 mov %eax,(%edx) + 11fdc: 8b 45 08 mov 0x8(%ebp),%eax + 11fdf: 8b 40 04 mov 0x4(%eax),%eax + 11fe2: 83 c0 2c add $0x2c,%eax + 11fe5: c7 00 00 00 00 00 movl $0x0,(%eax) + 11feb: 8b 45 08 mov 0x8(%ebp),%eax + 11fee: 8b 40 04 mov 0x4(%eax),%eax + 11ff1: 83 c0 04 add $0x4,%eax + 11ff4: 8b 00 mov (%eax),%eax + 11ff6: 8b 45 08 mov 0x8(%ebp),%eax + 11ff9: 8b 50 04 mov 0x4(%eax),%edx + 11ffc: 83 c2 28 add $0x28,%edx + 11fff: 8b 45 0c mov 0xc(%ebp),%eax + 12002: 83 c0 0c add $0xc,%eax + 12005: 8b 00 mov (%eax),%eax + 12007: 89 02 mov %eax,(%edx) + 12009: eb 1e jmp 12029 <_ed_deschedule+0x19d> + 1200b: 8b 45 0c mov 0xc(%ebp),%eax + 1200e: 8b 50 1c mov 0x1c(%eax),%edx + 12011: 8b 45 0c mov 0xc(%ebp),%eax + 12014: 8b 40 18 mov 0x18(%eax),%eax + 12017: 89 42 18 mov %eax,0x18(%edx) + 1201a: 8b 45 0c mov 0xc(%ebp),%eax + 1201d: 8b 50 1c mov 0x1c(%eax),%edx + 12020: 8b 45 0c mov 0xc(%ebp),%eax + 12023: 8b 40 0c mov 0xc(%eax),%eax + 12026: 89 42 0c mov %eax,0xc(%edx) + 12029: 8b 45 08 mov 0x8(%ebp),%eax + 1202c: 8b 40 14 mov 0x14(%eax),%eax + 1202f: 3b 45 0c cmp 0xc(%ebp),%eax + 12032: 75 24 jne 12058 <_ed_deschedule+0x1cc> + 12034: 8b 55 08 mov 0x8(%ebp),%edx + 12037: 8b 45 0c mov 0xc(%ebp),%eax + 1203a: 8b 40 1c mov 0x1c(%eax),%eax + 1203d: 89 42 14 mov %eax,0x14(%edx) + 12040: 8b 45 08 mov 0x8(%ebp),%eax + 12043: 83 78 14 00 cmpl $0x0,0x14(%eax) + 12047: 74 37 je 12080 <_ed_deschedule+0x1f4> + 12049: 8b 45 08 mov 0x8(%ebp),%eax + 1204c: 8b 40 14 mov 0x14(%eax),%eax + 1204f: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 12056: eb 28 jmp 12080 <_ed_deschedule+0x1f4> + 12058: 8b 45 0c mov 0xc(%ebp),%eax + 1205b: 83 78 18 00 cmpl $0x0,0x18(%eax) + 1205f: 74 1f je 12080 <_ed_deschedule+0x1f4> + 12061: 8b 45 0c mov 0xc(%ebp),%eax + 12064: 8b 50 18 mov 0x18(%eax),%edx + 12067: 8b 45 0c mov 0xc(%ebp),%eax + 1206a: 8b 40 1c mov 0x1c(%eax),%eax + 1206d: 89 42 1c mov %eax,0x1c(%edx) + 12070: eb 0e jmp 12080 <_ed_deschedule+0x1f4> + 12072: ff 75 0c pushl 0xc(%ebp) + 12075: ff 75 08 pushl 0x8(%ebp) + 12078: e8 0f fd ff ff call 11d8c <_periodic_unlink> + 1207d: 83 c4 08 add $0x8,%esp + 12080: 8b 45 0c mov 0xc(%ebp),%eax + 12083: 80 78 28 02 cmpb $0x2,0x28(%eax) + 12087: 75 25 jne 120ae <_ed_deschedule+0x222> + 12089: 8b 45 0c mov 0xc(%ebp),%eax + 1208c: c6 40 28 00 movb $0x0,0x28(%eax) + 12090: 8b 55 0c mov 0xc(%ebp),%edx + 12093: 8b 45 0c mov 0xc(%ebp),%eax + 12096: 8b 00 mov (%eax),%eax + 12098: 25 ff bf ff f7 and $0xf7ffbfff,%eax + 1209d: 89 02 mov %eax,(%edx) + 1209f: 8b 55 0c mov 0xc(%ebp),%edx + 120a2: 8b 45 0c mov 0xc(%ebp),%eax + 120a5: 8b 40 08 mov 0x8(%eax),%eax + 120a8: 83 e0 fe and $0xfffffffe,%eax + 120ab: 89 42 08 mov %eax,0x8(%edx) + 120ae: c9 leave + 120af: c3 ret + +000120b0 <_ed_get>: + 120b0: 55 push %ebp + 120b1: 89 e5 mov %esp,%ebp + 120b3: 83 ec 38 sub $0x38,%esp + 120b6: 8b 45 10 mov 0x10(%ebp),%eax + 120b9: c1 e8 07 shr $0x7,%eax + 120bc: 83 f0 01 xor $0x1,%eax + 120bf: 83 e0 01 and $0x1,%eax + 120c2: 89 45 fc mov %eax,0xfffffffc(%ebp) + 120c5: 8b 45 10 mov 0x10(%ebp),%eax + 120c8: c1 e8 1e shr $0x1e,%eax + 120cb: 83 e0 03 and $0x3,%eax + 120ce: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 120d1: 8b 45 0c mov 0xc(%ebp),%eax + 120d4: 8b 80 98 01 00 00 mov 0x198(%eax),%eax + 120da: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 120dd: 8b 45 10 mov 0x10(%ebp),%eax + 120e0: c1 e8 0f shr $0xf,%eax + 120e3: 83 e0 0f and $0xf,%eax + 120e6: 01 c0 add %eax,%eax + 120e8: 89 45 ec mov %eax,0xffffffec(%ebp) + 120eb: 83 7d f8 02 cmpl $0x2,0xfffffff8(%ebp) + 120ef: 74 0c je 120fd <_ed_get+0x4d> + 120f1: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 120f5: 74 06 je 120fd <_ed_get+0x4d> + 120f7: 8d 45 ec lea 0xffffffec(%ebp),%eax + 120fa: 83 08 01 orl $0x1,(%eax) + 120fd: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 12104: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12107: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1210a: 8b 44 90 10 mov 0x10(%eax,%edx,4),%eax + 1210e: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12111: 85 c0 test %eax,%eax + 12113: 0f 85 92 00 00 00 jne 121ab <_ed_get+0xfb> + 12119: 83 ec 08 sub $0x8,%esp + 1211c: 6a 00 push $0x0 + 1211e: ff 75 08 pushl 0x8(%ebp) + 12121: e8 3e f7 ff ff call 11864 <_ed_alloc> + 12126: 83 c4 10 add $0x10,%esp + 12129: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1212c: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 12130: 75 05 jne 12137 <_ed_get+0x87> + 12132: e9 d0 01 00 00 jmp 12307 <_ed_get+0x257> + 12137: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 1213a: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1213d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12140: 89 44 91 10 mov %eax,0x10(%ecx,%edx,4) + 12144: 83 ec 08 sub $0x8,%esp + 12147: 6a 00 push $0x0 + 12149: ff 75 08 pushl 0x8(%ebp) + 1214c: e8 30 f6 ff ff call 11781 <_td_alloc> + 12151: 83 c4 10 add $0x10,%esp + 12154: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 12157: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 1215b: 75 1d jne 1217a <_ed_get+0xca> + 1215d: 83 ec 08 sub $0x8,%esp + 12160: ff 75 f0 pushl 0xfffffff0(%ebp) + 12163: ff 75 08 pushl 0x8(%ebp) + 12166: e8 60 f7 ff ff call 118cb <_ed_free> + 1216b: 83 c4 10 add $0x10,%esp + 1216e: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 12175: e9 8d 01 00 00 jmp 12307 <_ed_get+0x257> + 1217a: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 1217d: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 12180: 89 42 14 mov %eax,0x14(%edx) + 12183: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 12186: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 12189: 8b 40 24 mov 0x24(%eax),%eax + 1218c: 89 42 04 mov %eax,0x4(%edx) + 1218f: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 12192: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12195: 8b 40 04 mov 0x4(%eax),%eax + 12198: 89 42 08 mov %eax,0x8(%edx) + 1219b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1219e: c6 40 28 00 movb $0x0,0x28(%eax) + 121a2: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 121a5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 121a8: 88 42 29 mov %al,0x29(%edx) + 121ab: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 121ae: 80 78 28 00 cmpb $0x0,0x28(%eax) + 121b2: 0f 85 4f 01 00 00 jne 12307 <_ed_get+0x257> + 121b8: 8b 45 10 mov 0x10(%ebp),%eax + 121bb: c1 e8 08 shr $0x8,%eax + 121be: 83 e0 7f and $0x7f,%eax + 121c1: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 121c4: 8b 45 ec mov 0xffffffec(%ebp),%eax + 121c7: d1 e8 shr %eax + 121c9: 89 c2 mov %eax,%edx + 121cb: c1 e2 07 shl $0x7,%edx + 121ce: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 121d1: 09 10 or %edx,(%eax) + 121d3: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 121d7: 74 1e je 121f7 <_ed_get+0x147> + 121d9: 8b 55 0c mov 0xc(%ebp),%edx + 121dc: 8b 45 10 mov 0x10(%ebp),%eax + 121df: c1 e8 0f shr $0xf,%eax + 121e2: 83 e0 0f and $0xf,%eax + 121e5: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax + 121e9: c1 e0 10 shl $0x10,%eax + 121ec: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 121ef: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 121f2: 09 45 e0 or %eax,0xffffffe0(%ebp) + 121f5: eb 1c jmp 12213 <_ed_get+0x163> + 121f7: 8b 55 0c mov 0xc(%ebp),%edx + 121fa: 8b 45 10 mov 0x10(%ebp),%eax + 121fd: c1 e8 0f shr $0xf,%eax + 12200: 83 e0 0f and $0xf,%eax + 12203: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax + 12207: c1 e0 10 shl $0x10,%eax + 1220a: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 1220d: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 12210: 09 55 e0 or %edx,0xffffffe0(%ebp) + 12213: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 12216: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 12219: 8b 45 0c mov 0xc(%ebp),%eax + 1221c: 83 78 18 01 cmpl $0x1,0x18(%eax) + 12220: 75 09 jne 1222b <_ed_get+0x17b> + 12222: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 12225: 81 08 00 20 00 00 orl $0x2000,(%eax) + 1222b: 83 7d f8 02 cmpl $0x2,0xfffffff8(%ebp) + 1222f: 0f 84 ca 00 00 00 je 122ff <_ed_get+0x24f> + 12235: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12239: 74 0b je 12246 <_ed_get+0x196> + 1223b: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 1223e: 80 ce 08 or $0x8,%dh + 12241: 89 55 dc mov %edx,0xffffffdc(%ebp) + 12244: eb 09 jmp 1224f <_ed_get+0x19f> + 12246: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 12249: 80 cc 10 or $0x10,%ah + 1224c: 89 45 dc mov %eax,0xffffffdc(%ebp) + 1224f: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 12252: 89 55 e4 mov %edx,0xffffffe4(%ebp) + 12255: 83 7d f8 03 cmpl $0x3,0xfffffff8(%ebp) + 12259: 0f 84 a0 00 00 00 je 122ff <_ed_get+0x24f> + 1225f: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 12263: 75 0b jne 12270 <_ed_get+0x1c0> + 12265: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 12268: 81 08 00 80 00 00 orl $0x8000,(%eax) + 1226e: eb 0d jmp 1227d <_ed_get+0x1cd> + 12270: 83 7d 14 20 cmpl $0x20,0x14(%ebp) + 12274: 7e 07 jle 1227d <_ed_get+0x1cd> + 12276: c7 45 14 20 00 00 00 movl $0x20,0x14(%ebp) + 1227d: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 12280: 8b 45 14 mov 0x14(%ebp),%eax + 12283: 66 89 42 2c mov %ax,0x2c(%edx) + 12287: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1228a: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 1228d: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12291: 74 15 je 122a8 <_ed_get+0x1f8> + 12293: 8b 55 0c mov 0xc(%ebp),%edx + 12296: 8b 45 10 mov 0x10(%ebp),%eax + 12299: c1 e8 0f shr $0xf,%eax + 1229c: 83 e0 0f and $0xf,%eax + 1229f: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax + 122a3: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 122a6: eb 13 jmp 122bb <_ed_get+0x20b> + 122a8: 8b 55 0c mov 0xc(%ebp),%edx + 122ab: 8b 45 10 mov 0x10(%ebp),%eax + 122ae: c1 e8 0f shr $0xf,%eax + 122b1: 83 e0 0f and $0xf,%eax + 122b4: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax + 122b8: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 122bb: ff 75 d4 pushl 0xffffffd4(%ebp) + 122be: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 122c2: 0f 94 c0 sete %al + 122c5: 25 ff 00 00 00 and $0xff,%eax + 122ca: 50 push %eax + 122cb: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 122cf: 0f 94 c0 sete %al + 122d2: 25 ff 00 00 00 and $0xff,%eax + 122d7: 50 push %eax + 122d8: 8b 45 0c mov 0xc(%ebp),%eax + 122db: ff 70 18 pushl 0x18(%eax) + 122de: e8 ed 22 00 00 call 145d0 <_usb_calc_bus_time@16> + 122e3: 89 c1 mov %eax,%ecx + 122e5: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 122ea: f7 e9 imul %ecx + 122ec: c1 fa 06 sar $0x6,%edx + 122ef: 89 c8 mov %ecx,%eax + 122f1: c1 f8 1f sar $0x1f,%eax + 122f4: 29 c2 sub %eax,%edx + 122f6: 89 d0 mov %edx,%eax + 122f8: 8b 55 d8 mov 0xffffffd8(%ebp),%edx + 122fb: 66 89 42 2e mov %ax,0x2e(%edx) + 122ff: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 12302: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 12305: 89 02 mov %eax,(%edx) + 12307: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1230a: c9 leave + 1230b: c3 ret + +0001230c <_start_urb_unlink>: + 1230c: 55 push %ebp + 1230d: 89 e5 mov %esp,%ebp + 1230f: 8b 55 0c mov 0xc(%ebp),%edx + 12312: 8b 45 0c mov 0xc(%ebp),%eax + 12315: 8b 00 mov (%eax),%eax + 12317: 0d 00 00 00 08 or $0x8000000,%eax + 1231c: 89 02 mov %eax,(%edx) + 1231e: 8b 45 0c mov 0xc(%ebp),%eax + 12321: c6 40 28 01 movb $0x1,0x28(%eax) + 12325: ff 75 0c pushl 0xc(%ebp) + 12328: ff 75 08 pushl 0x8(%ebp) + 1232b: e8 5c fb ff ff call 11e8c <_ed_deschedule> + 12330: 83 c4 08 add $0x8,%esp + 12333: 8b 55 0c mov 0xc(%ebp),%edx + 12336: 8b 45 08 mov 0x8(%ebp),%eax + 12339: 8b 40 08 mov 0x8(%eax),%eax + 1233c: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax + 12343: 40 inc %eax + 12344: 66 89 42 32 mov %ax,0x32(%edx) + 12348: 8b 55 0c mov 0xc(%ebp),%edx + 1234b: 8b 45 08 mov 0x8(%ebp),%eax + 1234e: 8b 40 10 mov 0x10(%eax),%eax + 12351: 89 42 18 mov %eax,0x18(%edx) + 12354: 8b 45 0c mov 0xc(%ebp),%eax + 12357: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 1235e: 8b 55 08 mov 0x8(%ebp),%edx + 12361: 8b 45 0c mov 0xc(%ebp),%eax + 12364: 89 42 10 mov %eax,0x10(%edx) + 12367: 8b 45 08 mov 0x8(%ebp),%eax + 1236a: 83 b8 a8 01 00 00 00 cmpl $0x0,0x1a8(%eax) + 12371: 75 29 jne 1239c <_start_urb_unlink+0x90> + 12373: 8b 45 08 mov 0x8(%ebp),%eax + 12376: 8b 40 04 mov 0x4(%eax),%eax + 12379: 83 c0 0c add $0xc,%eax + 1237c: c7 00 04 00 00 00 movl $0x4,(%eax) + 12382: 8b 45 08 mov 0x8(%ebp),%eax + 12385: 8b 40 04 mov 0x4(%eax),%eax + 12388: 83 c0 10 add $0x10,%eax + 1238b: c7 00 04 00 00 00 movl $0x4,(%eax) + 12391: 8b 45 08 mov 0x8(%ebp),%eax + 12394: 8b 40 04 mov 0x4(%eax),%eax + 12397: 83 c0 04 add $0x4,%eax + 1239a: 8b 00 mov (%eax),%eax + 1239c: c9 leave + 1239d: c3 ret + +0001239e <_td_fill>: + 1239e: 55 push %ebp + 1239f: 89 e5 mov %esp,%ebp + 123a1: 83 ec 18 sub $0x18,%esp + 123a4: 8b 45 18 mov 0x18(%ebp),%eax + 123a7: 8b 40 08 mov 0x8(%eax),%eax + 123aa: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 123ad: 8b 45 0c mov 0xc(%ebp),%eax + 123b0: 25 00 00 01 00 and $0x10000,%eax + 123b5: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 123b8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 123bb: 66 8b 40 04 mov 0x4(%eax),%ax + 123bf: 25 ff ff 00 00 and $0xffff,%eax + 123c4: 48 dec %eax + 123c5: 3b 45 1c cmp 0x1c(%ebp),%eax + 123c8: 75 12 jne 123dc <_td_fill+0x3e> + 123ca: 8b 45 18 mov 0x18(%ebp),%eax + 123cd: 8b 40 20 mov 0x20(%eax),%eax + 123d0: c1 e8 07 shr $0x7,%eax + 123d3: 83 e0 01 and $0x1,%eax + 123d6: 85 c0 test %eax,%eax + 123d8: 75 02 jne 123dc <_td_fill+0x3e> + 123da: eb 09 jmp 123e5 <_td_fill+0x47> + 123dc: 8d 45 0c lea 0xc(%ebp),%eax + 123df: 81 08 00 00 c0 00 orl $0xc00000,(%eax) + 123e5: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 123e8: 8b 45 1c mov 0x1c(%ebp),%eax + 123eb: 8b 44 82 0c mov 0xc(%edx,%eax,4),%eax + 123ef: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 123f2: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 123f5: 8b 4d 1c mov 0x1c(%ebp),%ecx + 123f8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 123fb: 8b 00 mov (%eax),%eax + 123fd: 8b 40 14 mov 0x14(%eax),%eax + 12400: 89 44 8a 0c mov %eax,0xc(%edx,%ecx,4) + 12404: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12407: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1240a: 8b 10 mov (%eax),%edx + 1240c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1240f: 89 42 14 mov %eax,0x14(%edx) + 12412: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12415: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12418: 8b 00 mov (%eax),%eax + 1241a: 89 42 14 mov %eax,0x14(%edx) + 1241d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12420: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 12427: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1242a: 8b 45 1c mov 0x1c(%ebp),%eax + 1242d: 88 42 12 mov %al,0x12(%edx) + 12430: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12433: 8b 45 18 mov 0x18(%ebp),%eax + 12436: 89 42 20 mov %eax,0x20(%edx) + 12439: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1243c: 8b 45 10 mov 0x10(%ebp),%eax + 1243f: 89 42 28 mov %eax,0x28(%edx) + 12442: 83 7d 14 00 cmpl $0x0,0x14(%ebp) + 12446: 75 07 jne 1244f <_td_fill+0xb1> + 12448: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) + 1244f: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12452: 8b 45 0c mov 0xc(%ebp),%eax + 12455: 89 02 mov %eax,(%edx) + 12457: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 1245b: 74 31 je 1248e <_td_fill+0xf0> + 1245d: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12460: 8b 45 10 mov 0x10(%ebp),%eax + 12463: 25 00 f0 ff ff and $0xfffff000,%eax + 12468: 89 42 04 mov %eax,0x4(%edx) + 1246b: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1246e: 8b 45 10 mov 0x10(%ebp),%eax + 12471: 25 ff 0f 00 00 and $0xfff,%eax + 12476: 0d 00 e0 ff ff or $0xffffe000,%eax + 1247b: 66 89 42 10 mov %ax,0x10(%edx) + 1247f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12482: 8b 50 14 mov 0x14(%eax),%edx + 12485: 8b 45 0c mov 0xc(%ebp),%eax + 12488: 66 89 42 30 mov %ax,0x30(%edx) + 1248c: eb 09 jmp 12497 <_td_fill+0xf9> + 1248e: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12491: 8b 45 10 mov 0x10(%ebp),%eax + 12494: 89 42 04 mov %eax,0x4(%edx) + 12497: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 1249b: 74 0f je 124ac <_td_fill+0x10e> + 1249d: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 124a0: 8b 45 14 mov 0x14(%ebp),%eax + 124a3: 03 45 10 add 0x10(%ebp),%eax + 124a6: 48 dec %eax + 124a7: 89 42 0c mov %eax,0xc(%edx) + 124aa: eb 0a jmp 124b6 <_td_fill+0x118> + 124ac: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 124af: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 124b6: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 124b9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 124bc: 8b 40 24 mov 0x24(%eax),%eax + 124bf: 89 42 08 mov %eax,0x8(%edx) + 124c2: 83 ec 08 sub $0x8,%esp + 124c5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 124c8: 8b 40 14 mov 0x14(%eax),%eax + 124cb: 83 c0 20 add $0x20,%eax + 124ce: 50 push %eax + 124cf: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 124d2: 83 c0 2c add $0x2c,%eax + 124d5: 50 push %eax + 124d6: e8 4c 00 00 00 call 12527 <_list_add_tail> + 124db: 83 c4 10 add $0x10,%esp + 124de: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 124e1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 124e4: 8b 40 24 mov 0x24(%eax),%eax + 124e7: c1 e8 06 shr $0x6,%eax + 124ea: 33 42 24 xor 0x24(%edx),%eax + 124ed: 83 e0 3f and $0x3f,%eax + 124f0: 89 45 ec mov %eax,0xffffffec(%ebp) + 124f3: 8b 4d fc mov 0xfffffffc(%ebp),%ecx + 124f6: 8b 55 08 mov 0x8(%ebp),%edx + 124f9: 8b 45 ec mov 0xffffffec(%ebp),%eax + 124fc: 8b 84 82 a4 00 00 00 mov 0xa4(%edx,%eax,4),%eax + 12503: 89 41 18 mov %eax,0x18(%ecx) + 12506: 8b 4d 08 mov 0x8(%ebp),%ecx + 12509: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1250c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1250f: 89 84 91 a4 00 00 00 mov %eax,0xa4(%ecx,%edx,4) + 12516: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12519: 8b 50 14 mov 0x14(%eax),%edx + 1251c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1251f: 8b 40 08 mov 0x8(%eax),%eax + 12522: 89 42 04 mov %eax,0x4(%edx) + 12525: c9 leave + 12526: c3 ret + +00012527 <_list_add_tail>: + 12527: 55 push %ebp + 12528: 89 e5 mov %esp,%ebp + 1252a: 83 ec 08 sub $0x8,%esp + 1252d: 83 ec 04 sub $0x4,%esp + 12530: ff 75 0c pushl 0xc(%ebp) + 12533: 8b 45 0c mov 0xc(%ebp),%eax + 12536: ff 70 04 pushl 0x4(%eax) + 12539: ff 75 08 pushl 0x8(%ebp) + 1253c: e8 05 00 00 00 call 12546 <___list_add> + 12541: 83 c4 10 add $0x10,%esp + 12544: c9 leave + 12545: c3 ret + +00012546 <___list_add>: + 12546: 55 push %ebp + 12547: 89 e5 mov %esp,%ebp + 12549: 8b 55 10 mov 0x10(%ebp),%edx + 1254c: 8b 45 08 mov 0x8(%ebp),%eax + 1254f: 89 42 04 mov %eax,0x4(%edx) + 12552: 8b 55 08 mov 0x8(%ebp),%edx + 12555: 8b 45 10 mov 0x10(%ebp),%eax + 12558: 89 02 mov %eax,(%edx) + 1255a: 8b 55 08 mov 0x8(%ebp),%edx + 1255d: 8b 45 0c mov 0xc(%ebp),%eax + 12560: 89 42 04 mov %eax,0x4(%edx) + 12563: 8b 55 0c mov 0xc(%ebp),%edx + 12566: 8b 45 08 mov 0x8(%ebp),%eax + 12569: 89 02 mov %eax,(%edx) + 1256b: 5d pop %ebp + 1256c: c3 ret + +0001256d <_td_submit_urb>: + 1256d: 55 push %ebp + 1256e: 89 e5 mov %esp,%ebp + 12570: 57 push %edi + 12571: 56 push %esi + 12572: 53 push %ebx + 12573: 83 ec 2c sub $0x2c,%esp + 12576: 8b 45 0c mov 0xc(%ebp),%eax + 12579: 8b 40 08 mov 0x8(%eax),%eax + 1257c: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1257f: 8b 45 0c mov 0xc(%ebp),%eax + 12582: 8b 40 2c mov 0x2c(%eax),%eax + 12585: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 12588: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 1258f: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) + 12596: 8b 45 0c mov 0xc(%ebp),%eax + 12599: 8b 40 18 mov 0x18(%eax),%eax + 1259c: c1 e8 07 shr $0x7,%eax + 1259f: 83 f0 01 xor $0x1,%eax + 125a2: 83 e0 01 and $0x1,%eax + 125a5: 89 45 dc mov %eax,0xffffffdc(%ebp) + 125a8: 8b 45 0c mov 0xc(%ebp),%eax + 125ab: 8b 58 14 mov 0x14(%eax),%ebx + 125ae: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 125b1: 8b 45 0c mov 0xc(%ebp),%eax + 125b4: 8b 40 18 mov 0x18(%eax),%eax + 125b7: c1 e8 0f shr $0xf,%eax + 125ba: 89 c1 mov %eax,%ecx + 125bc: 83 e1 0f and $0xf,%ecx + 125bf: 8b 44 93 28 mov 0x28(%ebx,%edx,4),%eax + 125c3: d3 e8 shr %cl,%eax + 125c5: 83 e0 01 and $0x1,%eax + 125c8: 85 c0 test %eax,%eax + 125ca: 75 5d jne 12629 <_td_submit_urb+0xbc> + 125cc: 8b 45 0c mov 0xc(%ebp),%eax + 125cf: 8b 70 14 mov 0x14(%eax),%esi + 125d2: 8b 7d dc mov 0xffffffdc(%ebp),%edi + 125d5: 8b 45 0c mov 0xc(%ebp),%eax + 125d8: 8b 50 14 mov 0x14(%eax),%edx + 125db: 8b 5d dc mov 0xffffffdc(%ebp),%ebx + 125de: 8b 45 0c mov 0xc(%ebp),%eax + 125e1: 8b 40 18 mov 0x18(%eax),%eax + 125e4: c1 e8 0f shr $0xf,%eax + 125e7: 89 c1 mov %eax,%ecx + 125e9: 83 e1 0f and $0xf,%ecx + 125ec: b8 01 00 00 00 mov $0x1,%eax + 125f1: d3 e0 shl %cl,%eax + 125f3: f7 d0 not %eax + 125f5: 23 44 9a 28 and 0x28(%edx,%ebx,4),%eax + 125f9: 89 c2 mov %eax,%edx + 125fb: 8b 45 0c mov 0xc(%ebp),%eax + 125fe: 8b 40 18 mov 0x18(%eax),%eax + 12601: c1 e8 0f shr $0xf,%eax + 12604: 89 c1 mov %eax,%ecx + 12606: 83 e1 0f and $0xf,%ecx + 12609: b8 01 00 00 00 mov $0x1,%eax + 1260e: d3 e0 shl %cl,%eax + 12610: 09 d0 or %edx,%eax + 12612: 89 44 be 28 mov %eax,0x28(%esi,%edi,4) + 12616: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12619: 8b 10 mov (%eax),%edx + 1261b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1261e: 8b 00 mov (%eax),%eax + 12620: 8b 40 08 mov 0x8(%eax),%eax + 12623: 83 e0 fd and $0xfffffffd,%eax + 12626: 89 42 08 mov %eax,0x8(%edx) + 12629: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1262c: 66 c7 40 06 00 00 movw $0x0,0x6(%eax) + 12632: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 12636: 74 0b je 12643 <_td_submit_urb+0xd6> + 12638: 8b 45 0c mov 0xc(%ebp),%eax + 1263b: 8b 40 28 mov 0x28(%eax),%eax + 1263e: 89 45 ec mov %eax,0xffffffec(%ebp) + 12641: eb 07 jmp 1264a <_td_submit_urb+0xdd> + 12643: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 1264a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1264d: 8b 00 mov (%eax),%eax + 1264f: ba 00 00 00 00 mov $0x0,%edx + 12654: 8a 50 29 mov 0x29(%eax),%dl + 12657: 89 55 c8 mov %edx,0xffffffc8(%ebp) + 1265a: 83 7d c8 01 cmpl $0x1,0xffffffc8(%ebp) + 1265e: 74 2a je 1268a <_td_submit_urb+0x11d> + 12660: 83 7d c8 01 cmpl $0x1,0xffffffc8(%ebp) + 12664: 7f 0f jg 12675 <_td_submit_urb+0x108> + 12666: 83 7d c8 00 cmpl $0x0,0xffffffc8(%ebp) + 1266a: 0f 84 fa 01 00 00 je 1286a <_td_submit_urb+0x2fd> + 12670: e9 86 02 00 00 jmp 128fb <_td_submit_urb+0x38e> + 12675: 83 7d c8 02 cmpl $0x2,0xffffffc8(%ebp) + 12679: 0f 84 18 01 00 00 je 12797 <_td_submit_urb+0x22a> + 1267f: 83 7d c8 03 cmpl $0x3,0xffffffc8(%ebp) + 12683: 74 19 je 1269e <_td_submit_urb+0x131> + 12685: e9 71 02 00 00 jmp 128fb <_td_submit_urb+0x38e> + 1268a: 8b 45 08 mov 0x8(%ebp),%eax + 1268d: 05 34 02 00 00 add $0x234,%eax + 12692: 50 push %eax + 12693: e8 e3 ef ff ff call 1167b <_hcd_to_bus> + 12698: 83 c4 04 add $0x4,%esp + 1269b: ff 40 38 incl 0x38(%eax) + 1269e: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) + 126a2: 74 09 je 126ad <_td_submit_urb+0x140> + 126a4: c7 45 d4 00 00 08 f0 movl $0xf0080000,0xffffffd4(%ebp) + 126ab: eb 07 jmp 126b4 <_td_submit_urb+0x147> + 126ad: c7 45 d4 00 00 10 f0 movl $0xf0100000,0xffffffd4(%ebp) + 126b4: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 126b7: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 126ba: 81 7d e8 00 10 00 00 cmpl $0x1000,0xffffffe8(%ebp) + 126c1: 7e 38 jle 126fb <_td_submit_urb+0x18e> + 126c3: 83 ec 08 sub $0x8,%esp + 126c6: ff 75 e4 pushl 0xffffffe4(%ebp) + 126c9: ff 75 0c pushl 0xc(%ebp) + 126cc: 68 00 10 00 00 push $0x1000 + 126d1: ff 75 ec pushl 0xffffffec(%ebp) + 126d4: ff 75 e0 pushl 0xffffffe0(%ebp) + 126d7: ff 75 08 pushl 0x8(%ebp) + 126da: e8 bf fc ff ff call 1239e <_td_fill> + 126df: 83 c4 20 add $0x20,%esp + 126e2: 8d 45 ec lea 0xffffffec(%ebp),%eax + 126e5: 81 00 00 10 00 00 addl $0x1000,(%eax) + 126eb: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 126ee: 81 28 00 10 00 00 subl $0x1000,(%eax) + 126f4: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 126f7: ff 00 incl (%eax) + 126f9: eb bf jmp 126ba <_td_submit_urb+0x14d> + 126fb: 8b 45 0c mov 0xc(%ebp),%eax + 126fe: 8b 40 20 mov 0x20(%eax),%eax + 12701: 83 e0 01 and $0x1,%eax + 12704: 85 c0 test %eax,%eax + 12706: 75 09 jne 12711 <_td_submit_urb+0x1a4> + 12708: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 1270b: 81 08 00 00 04 00 orl $0x40000,(%eax) + 12711: 83 ec 08 sub $0x8,%esp + 12714: ff 75 e4 pushl 0xffffffe4(%ebp) + 12717: ff 75 0c pushl 0xc(%ebp) + 1271a: ff 75 e8 pushl 0xffffffe8(%ebp) + 1271d: ff 75 ec pushl 0xffffffec(%ebp) + 12720: ff 75 e0 pushl 0xffffffe0(%ebp) + 12723: ff 75 08 pushl 0x8(%ebp) + 12726: e8 73 fc ff ff call 1239e <_td_fill> + 1272b: 83 c4 20 add $0x20,%esp + 1272e: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 12731: ff 00 incl (%eax) + 12733: 8b 45 0c mov 0xc(%ebp),%eax + 12736: 8b 40 20 mov 0x20(%eax),%eax + 12739: c1 e8 06 shr $0x6,%eax + 1273c: 83 e0 01 and $0x1,%eax + 1273f: 85 c0 test %eax,%eax + 12741: 74 31 je 12774 <_td_submit_urb+0x207> + 12743: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12746: 66 8b 40 04 mov 0x4(%eax),%ax + 1274a: 25 ff ff 00 00 and $0xffff,%eax + 1274f: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax + 12752: 7e 20 jle 12774 <_td_submit_urb+0x207> + 12754: 83 ec 08 sub $0x8,%esp + 12757: ff 75 e4 pushl 0xffffffe4(%ebp) + 1275a: ff 75 0c pushl 0xc(%ebp) + 1275d: 6a 00 push $0x0 + 1275f: 6a 00 push $0x0 + 12761: ff 75 e0 pushl 0xffffffe0(%ebp) + 12764: ff 75 08 pushl 0x8(%ebp) + 12767: e8 32 fc ff ff call 1239e <_td_fill> + 1276c: 83 c4 20 add $0x20,%esp + 1276f: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 12772: ff 00 incl (%eax) + 12774: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12777: 8b 00 mov (%eax),%eax + 12779: 80 78 29 03 cmpb $0x3,0x29(%eax) + 1277d: 0f 85 78 01 00 00 jne 128fb <_td_submit_urb+0x38e> + 12783: 8b 45 08 mov 0x8(%ebp),%eax + 12786: 8b 40 04 mov 0x4(%eax),%eax + 12789: 83 c0 08 add $0x8,%eax + 1278c: c7 00 04 00 00 00 movl $0x4,(%eax) + 12792: e9 64 01 00 00 jmp 128fb <_td_submit_urb+0x38e> + 12797: c7 45 e0 00 00 00 f2 movl $0xf2000000,0xffffffe0(%ebp) + 1279e: 83 ec 08 sub $0x8,%esp + 127a1: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 127a4: 50 push %eax + 127a5: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 127a8: ff 00 incl (%eax) + 127aa: ff 75 0c pushl 0xc(%ebp) + 127ad: 6a 08 push $0x8 + 127af: 8b 45 0c mov 0xc(%ebp),%eax + 127b2: ff 70 3c pushl 0x3c(%eax) + 127b5: ff 75 e0 pushl 0xffffffe0(%ebp) + 127b8: ff 75 08 pushl 0x8(%ebp) + 127bb: e8 de fb ff ff call 1239e <_td_fill> + 127c0: 83 c4 20 add $0x20,%esp + 127c3: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 127c7: 7e 4f jle 12818 <_td_submit_urb+0x2ab> + 127c9: c7 45 e0 00 00 04 f3 movl $0xf3040000,0xffffffe0(%ebp) + 127d0: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) + 127d4: 74 0e je 127e4 <_td_submit_urb+0x277> + 127d6: 8b 55 e0 mov 0xffffffe0(%ebp),%edx + 127d9: 81 ca 00 00 08 00 or $0x80000,%edx + 127df: 89 55 d0 mov %edx,0xffffffd0(%ebp) + 127e2: eb 0b jmp 127ef <_td_submit_urb+0x282> + 127e4: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 127e7: 0d 00 00 10 00 or $0x100000,%eax + 127ec: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 127ef: 8b 55 d0 mov 0xffffffd0(%ebp),%edx + 127f2: 89 55 e0 mov %edx,0xffffffe0(%ebp) + 127f5: 83 ec 08 sub $0x8,%esp + 127f8: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 127fb: 50 push %eax + 127fc: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 127ff: ff 00 incl (%eax) + 12801: ff 75 0c pushl 0xc(%ebp) + 12804: ff 75 e8 pushl 0xffffffe8(%ebp) + 12807: ff 75 ec pushl 0xffffffec(%ebp) + 1280a: ff 75 e0 pushl 0xffffffe0(%ebp) + 1280d: ff 75 08 pushl 0x8(%ebp) + 12810: e8 89 fb ff ff call 1239e <_td_fill> + 12815: 83 c4 20 add $0x20,%esp + 12818: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) + 1281c: 74 09 je 12827 <_td_submit_urb+0x2ba> + 1281e: c7 45 cc 00 00 10 f3 movl $0xf3100000,0xffffffcc(%ebp) + 12825: eb 07 jmp 1282e <_td_submit_urb+0x2c1> + 12827: c7 45 cc 00 00 08 f3 movl $0xf3080000,0xffffffcc(%ebp) + 1282e: 8b 45 cc mov 0xffffffcc(%ebp),%eax + 12831: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 12834: 83 ec 08 sub $0x8,%esp + 12837: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1283a: 50 push %eax + 1283b: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 1283e: ff 00 incl (%eax) + 12840: ff 75 0c pushl 0xc(%ebp) + 12843: 6a 00 push $0x0 + 12845: ff 75 ec pushl 0xffffffec(%ebp) + 12848: ff 75 e0 pushl 0xffffffe0(%ebp) + 1284b: ff 75 08 pushl 0x8(%ebp) + 1284e: e8 4b fb ff ff call 1239e <_td_fill> + 12853: 83 c4 20 add $0x20,%esp + 12856: 8b 45 08 mov 0x8(%ebp),%eax + 12859: 8b 40 04 mov 0x4(%eax),%eax + 1285c: 83 c0 08 add $0x8,%eax + 1285f: c7 00 02 00 00 00 movl $0x2,(%eax) + 12865: e9 91 00 00 00 jmp 128fb <_td_submit_urb+0x38e> + 1286a: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 12871: 8b 45 0c mov 0xc(%ebp),%eax + 12874: 8b 40 44 mov 0x44(%eax),%eax + 12877: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax + 1287a: 7e 6b jle 128e7 <_td_submit_urb+0x37a> + 1287c: 8b 45 0c mov 0xc(%ebp),%eax + 1287f: 8b 40 40 mov 0x40(%eax),%eax + 12882: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 12885: 8b 45 0c mov 0xc(%ebp),%eax + 12888: 8b 40 48 mov 0x48(%eax),%eax + 1288b: 89 c2 mov %eax,%edx + 1288d: 0f af 55 e4 imul 0xffffffe4(%ebp),%edx + 12891: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 12894: 01 10 add %edx,(%eax) + 12896: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 12899: 81 20 ff ff 00 00 andl $0xffff,(%eax) + 1289f: 83 ec 08 sub $0x8,%esp + 128a2: ff 75 e4 pushl 0xffffffe4(%ebp) + 128a5: ff 75 0c pushl 0xc(%ebp) + 128a8: 8b 55 0c mov 0xc(%ebp),%edx + 128ab: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 128ae: c1 e0 04 shl $0x4,%eax + 128b1: 01 d0 add %edx,%eax + 128b3: 83 c0 60 add $0x60,%eax + 128b6: ff 30 pushl (%eax) + 128b8: 8b 55 0c mov 0xc(%ebp),%edx + 128bb: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 128be: c1 e0 04 shl $0x4,%eax + 128c1: 01 d0 add %edx,%eax + 128c3: 8d 50 5c lea 0x5c(%eax),%edx + 128c6: 8b 45 ec mov 0xffffffec(%ebp),%eax + 128c9: 03 02 add (%edx),%eax + 128cb: 50 push %eax + 128cc: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 128cf: 0d 00 00 01 f0 or $0xf0010000,%eax + 128d4: 50 push %eax + 128d5: ff 75 08 pushl 0x8(%ebp) + 128d8: e8 c1 fa ff ff call 1239e <_td_fill> + 128dd: 83 c4 20 add $0x20,%esp + 128e0: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 128e3: ff 00 incl (%eax) + 128e5: eb 8a jmp 12871 <_td_submit_urb+0x304> + 128e7: 8b 45 08 mov 0x8(%ebp),%eax + 128ea: 05 34 02 00 00 add $0x234,%eax + 128ef: 50 push %eax + 128f0: e8 86 ed ff ff call 1167b <_hcd_to_bus> + 128f5: 83 c4 04 add $0x4,%esp + 128f8: ff 40 3c incl 0x3c(%eax) + 128fb: 8d 65 f4 lea 0xfffffff4(%ebp),%esp + 128fe: 5b pop %ebx + 128ff: 5e pop %esi + 12900: 5f pop %edi + 12901: 5d pop %ebp + 12902: c3 ret + +00012903 <_td_done>: + 12903: 55 push %ebp + 12904: 89 e5 mov %esp,%ebp + 12906: 57 push %edi + 12907: 56 push %esi + 12908: 53 push %ebx + 12909: 83 ec 1c sub $0x1c,%esp + 1290c: 8b 45 10 mov 0x10(%ebp),%eax + 1290f: 8b 00 mov (%eax),%eax + 12911: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12914: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 1291b: 83 ec 0c sub $0xc,%esp + 1291e: 8b 45 10 mov 0x10(%ebp),%eax + 12921: 83 c0 2c add $0x2c,%eax + 12924: 50 push %eax + 12925: e8 0f 02 00 00 call 12b39 <_list_del> + 1292a: 83 c4 10 add $0x10,%esp + 1292d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12930: c1 e8 10 shr $0x10,%eax + 12933: 83 e0 01 and $0x1,%eax + 12936: 85 c0 test %eax,%eax + 12938: 0f 84 d2 00 00 00 je 12a10 <_td_done+0x10d> + 1293e: 8b 45 10 mov 0x10(%ebp),%eax + 12941: 66 8b 40 10 mov 0x10(%eax),%ax + 12945: 66 89 45 ea mov %ax,0xffffffea(%ebp) + 12949: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 12950: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 12954: 66 c1 e8 0c shr $0xc,%ax + 12958: 25 ff ff 00 00 and $0xffff,%eax + 1295d: 83 e0 0f and $0xf,%eax + 12960: 89 45 ec mov %eax,0xffffffec(%ebp) + 12963: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12966: 25 00 00 00 f0 and $0xf0000000,%eax + 1296b: 85 c0 test %eax,%eax + 1296d: 74 05 je 12974 <_td_done+0x71> + 1296f: e9 bd 01 00 00 jmp 12b31 <_td_done+0x22e> + 12974: 8b 45 0c mov 0xc(%ebp),%eax + 12977: 8b 40 18 mov 0x18(%eax),%eax + 1297a: c1 e8 07 shr $0x7,%eax + 1297d: 83 e0 01 and $0x1,%eax + 12980: 85 c0 test %eax,%eax + 12982: 75 1d jne 129a1 <_td_done+0x9e> + 12984: 8b 55 0c mov 0xc(%ebp),%edx + 12987: 8b 45 10 mov 0x10(%ebp),%eax + 1298a: 8a 40 12 mov 0x12(%eax),%al + 1298d: 25 ff 00 00 00 and $0xff,%eax + 12992: c1 e0 04 shl $0x4,%eax + 12995: 01 d0 add %edx,%eax + 12997: 83 c0 60 add $0x60,%eax + 1299a: 8b 00 mov (%eax),%eax + 1299c: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1299f: eb 1e jmp 129bf <_td_done+0xbc> + 129a1: 83 7d ec 09 cmpl $0x9,0xffffffec(%ebp) + 129a5: 75 07 jne 129ae <_td_done+0xab> + 129a7: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 129ae: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 129b2: 25 ff ff 00 00 and $0xffff,%eax + 129b7: 25 ff 03 00 00 and $0x3ff,%eax + 129bc: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 129bf: 8b 4d 0c mov 0xc(%ebp),%ecx + 129c2: 8b 55 0c mov 0xc(%ebp),%edx + 129c5: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 129c8: 03 42 30 add 0x30(%edx),%eax + 129cb: 89 41 30 mov %eax,0x30(%ecx) + 129ce: 8b 55 0c mov 0xc(%ebp),%edx + 129d1: 8b 45 10 mov 0x10(%ebp),%eax + 129d4: 8a 40 12 mov 0x12(%eax),%al + 129d7: 25 ff 00 00 00 and $0xff,%eax + 129dc: c1 e0 04 shl $0x4,%eax + 129df: 01 d0 add %edx,%eax + 129e1: 8d 50 64 lea 0x64(%eax),%edx + 129e4: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 129e7: 89 02 mov %eax,(%edx) + 129e9: 8b 55 0c mov 0xc(%ebp),%edx + 129ec: 8b 45 10 mov 0x10(%ebp),%eax + 129ef: 8a 40 12 mov 0x12(%eax),%al + 129f2: 25 ff 00 00 00 and $0xff,%eax + 129f7: c1 e0 04 shl $0x4,%eax + 129fa: 01 d0 add %edx,%eax + 129fc: 8d 50 68 lea 0x68(%eax),%edx + 129ff: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12a02: 8b 04 85 20 60 01 00 mov 0x16020(,%eax,4),%eax + 12a09: 89 02 mov %eax,(%edx) + 12a0b: e9 21 01 00 00 jmp 12b31 <_td_done+0x22e> + 12a10: 8b 45 0c mov 0xc(%ebp),%eax + 12a13: 8b 40 18 mov 0x18(%eax),%eax + 12a16: c1 e8 1e shr $0x1e,%eax + 12a19: 83 e0 03 and $0x3,%eax + 12a1c: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 12a1f: 8b 45 10 mov 0x10(%ebp),%eax + 12a22: 83 c0 0c add $0xc,%eax + 12a25: 8b 00 mov (%eax),%eax + 12a27: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 12a2a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12a2d: c1 e8 1c shr $0x1c,%eax + 12a30: 83 e0 0f and $0xf,%eax + 12a33: 89 45 ec mov %eax,0xffffffec(%ebp) + 12a36: 83 7d e4 02 cmpl $0x2,0xffffffe4(%ebp) + 12a3a: 74 51 je 12a8d <_td_done+0x18a> + 12a3c: 83 7d ec 04 cmpl $0x4,0xffffffec(%ebp) + 12a40: 75 4b jne 12a8d <_td_done+0x18a> + 12a42: 8b 45 0c mov 0xc(%ebp),%eax + 12a45: 8b 58 14 mov 0x14(%eax),%ebx + 12a48: 8b 45 0c mov 0xc(%ebp),%eax + 12a4b: 8b 40 18 mov 0x18(%eax),%eax + 12a4e: c1 e8 07 shr $0x7,%eax + 12a51: 83 f0 01 xor $0x1,%eax + 12a54: 89 c6 mov %eax,%esi + 12a56: 83 e6 01 and $0x1,%esi + 12a59: 8b 45 0c mov 0xc(%ebp),%eax + 12a5c: 8b 78 14 mov 0x14(%eax),%edi + 12a5f: 8b 45 0c mov 0xc(%ebp),%eax + 12a62: 8b 40 18 mov 0x18(%eax),%eax + 12a65: c1 e8 07 shr $0x7,%eax + 12a68: 83 f0 01 xor $0x1,%eax + 12a6b: 89 c2 mov %eax,%edx + 12a6d: 83 e2 01 and $0x1,%edx + 12a70: 8b 45 0c mov 0xc(%ebp),%eax + 12a73: 8b 40 18 mov 0x18(%eax),%eax + 12a76: c1 e8 0f shr $0xf,%eax + 12a79: 89 c1 mov %eax,%ecx + 12a7b: 83 e1 0f and $0xf,%ecx + 12a7e: b8 01 00 00 00 mov $0x1,%eax + 12a83: d3 e0 shl %cl,%eax + 12a85: 0b 44 97 30 or 0x30(%edi,%edx,4),%eax + 12a89: 89 44 b3 30 mov %eax,0x30(%ebx,%esi,4) + 12a8d: 83 7d ec 09 cmpl $0x9,0xffffffec(%ebp) + 12a91: 75 14 jne 12aa7 <_td_done+0x1a4> + 12a93: 8b 45 0c mov 0xc(%ebp),%eax + 12a96: 8b 40 20 mov 0x20(%eax),%eax + 12a99: 83 e0 01 and $0x1,%eax + 12a9c: 85 c0 test %eax,%eax + 12a9e: 75 07 jne 12aa7 <_td_done+0x1a4> + 12aa0: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 12aa7: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 12aab: 74 28 je 12ad5 <_td_done+0x1d2> + 12aad: 83 7d ec 0d cmpl $0xd,0xffffffec(%ebp) + 12ab1: 7f 22 jg 12ad5 <_td_done+0x1d2> + 12ab3: 8b 45 0c mov 0xc(%ebp),%eax + 12ab6: c7 00 01 00 00 00 movl $0x1,(%eax) + 12abc: 8b 45 0c mov 0xc(%ebp),%eax + 12abf: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 12ac3: 75 10 jne 12ad5 <_td_done+0x1d2> + 12ac5: 8b 45 0c mov 0xc(%ebp),%eax + 12ac8: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12acb: 8b 14 95 20 60 01 00 mov 0x16020(,%edx,4),%edx + 12ad2: 89 50 1c mov %edx,0x1c(%eax) + 12ad5: 83 7d e4 02 cmpl $0x2,0xffffffe4(%ebp) + 12ad9: 75 0b jne 12ae6 <_td_done+0x1e3> + 12adb: 8b 45 10 mov 0x10(%ebp),%eax + 12ade: 80 78 12 00 cmpb $0x0,0x12(%eax) + 12ae2: 75 02 jne 12ae6 <_td_done+0x1e3> + 12ae4: eb 45 jmp 12b2b <_td_done+0x228> + 12ae6: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 12aea: 74 3f je 12b2b <_td_done+0x228> + 12aec: 8b 45 10 mov 0x10(%ebp),%eax + 12aef: 83 78 04 00 cmpl $0x0,0x4(%eax) + 12af3: 75 1a jne 12b0f <_td_done+0x20c> + 12af5: 8b 5d 0c mov 0xc(%ebp),%ebx + 12af8: 8b 4d 0c mov 0xc(%ebp),%ecx + 12afb: 8b 45 10 mov 0x10(%ebp),%eax + 12afe: 8b 50 28 mov 0x28(%eax),%edx + 12b01: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 12b04: 29 d0 sub %edx,%eax + 12b06: 03 41 30 add 0x30(%ecx),%eax + 12b09: 40 inc %eax + 12b0a: 89 43 30 mov %eax,0x30(%ebx) + 12b0d: eb 1c jmp 12b2b <_td_done+0x228> + 12b0f: 8b 5d 0c mov 0xc(%ebp),%ebx + 12b12: 8b 75 0c mov 0xc(%ebp),%esi + 12b15: 8b 4d 10 mov 0x10(%ebp),%ecx + 12b18: 83 c1 04 add $0x4,%ecx + 12b1b: 8b 45 10 mov 0x10(%ebp),%eax + 12b1e: 8b 50 28 mov 0x28(%eax),%edx + 12b21: 8b 01 mov (%ecx),%eax + 12b23: 29 d0 sub %edx,%eax + 12b25: 03 46 30 add 0x30(%esi),%eax + 12b28: 89 43 30 mov %eax,0x30(%ebx) + 12b2b: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 12b2f: 74 00 je 12b31 <_td_done+0x22e> + 12b31: 8d 65 f4 lea 0xfffffff4(%ebp),%esp + 12b34: 5b pop %ebx + 12b35: 5e pop %esi + 12b36: 5f pop %edi + 12b37: 5d pop %ebp + 12b38: c3 ret + +00012b39 <_list_del>: + 12b39: 55 push %ebp + 12b3a: 89 e5 mov %esp,%ebp + 12b3c: 83 ec 08 sub $0x8,%esp + 12b3f: 83 ec 08 sub $0x8,%esp + 12b42: 8b 45 08 mov 0x8(%ebp),%eax + 12b45: ff 30 pushl (%eax) + 12b47: 8b 45 08 mov 0x8(%ebp),%eax + 12b4a: ff 70 04 pushl 0x4(%eax) + 12b4d: e8 18 00 00 00 call 12b6a <___list_del> + 12b52: 83 c4 10 add $0x10,%esp + 12b55: 8b 45 08 mov 0x8(%ebp),%eax + 12b58: c7 00 00 00 00 00 movl $0x0,(%eax) + 12b5e: 8b 45 08 mov 0x8(%ebp),%eax + 12b61: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) + 12b68: c9 leave + 12b69: c3 ret + +00012b6a <___list_del>: + 12b6a: 55 push %ebp + 12b6b: 89 e5 mov %esp,%ebp + 12b6d: 8b 55 0c mov 0xc(%ebp),%edx + 12b70: 8b 45 08 mov 0x8(%ebp),%eax + 12b73: 89 42 04 mov %eax,0x4(%edx) + 12b76: 8b 55 08 mov 0x8(%ebp),%edx + 12b79: 8b 45 0c mov 0xc(%ebp),%eax + 12b7c: 89 02 mov %eax,(%edx) + 12b7e: 5d pop %ebp + 12b7f: c3 ret + +00012b80 <_dl_reverse_done_list>: + 12b80: 55 push %ebp + 12b81: 89 e5 mov %esp,%ebp + 12b83: 83 ec 18 sub $0x18,%esp + 12b86: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 12b8d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 12b94: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 12b9b: 8b 45 08 mov 0x8(%ebp),%eax + 12b9e: 8b 40 08 mov 0x8(%eax),%eax + 12ba1: 05 84 00 00 00 add $0x84,%eax + 12ba6: 8b 00 mov (%eax),%eax + 12ba8: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12bab: 8b 45 08 mov 0x8(%ebp),%eax + 12bae: 8b 40 08 mov 0x8(%eax),%eax + 12bb1: c7 80 84 00 00 00 00 movl $0x0,0x84(%eax) + 12bb8: 00 00 00 + 12bbb: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12bbf: 0f 84 85 00 00 00 je 12c4a <_dl_reverse_done_list+0xca> + 12bc5: 83 ec 08 sub $0x8,%esp + 12bc8: ff 75 fc pushl 0xfffffffc(%ebp) + 12bcb: ff 75 08 pushl 0x8(%ebp) + 12bce: e8 59 01 00 00 call 12d2c <_dma_to_td> + 12bd3: 83 c4 10 add $0x10,%esp + 12bd6: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12bd9: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 12bdd: 75 02 jne 12be1 <_dl_reverse_done_list+0x61> + 12bdf: eb 69 jmp 12c4a <_dl_reverse_done_list+0xca> + 12be1: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 12be4: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12be7: 8b 00 mov (%eax),%eax + 12be9: 0d 00 00 02 00 or $0x20000,%eax + 12bee: 89 02 mov %eax,(%edx) + 12bf0: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12bf3: 8b 00 mov (%eax),%eax + 12bf5: c1 e8 1c shr $0x1c,%eax + 12bf8: 83 e0 0f and $0xf,%eax + 12bfb: 89 45 ec mov %eax,0xffffffec(%ebp) + 12bfe: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 12c02: 74 27 je 12c2b <_dl_reverse_done_list+0xab> + 12c04: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12c07: 8b 40 14 mov 0x14(%eax),%eax + 12c0a: 8b 40 08 mov 0x8(%eax),%eax + 12c0d: 83 e0 01 and $0x1,%eax + 12c10: 85 c0 test %eax,%eax + 12c12: 74 17 je 12c2b <_dl_reverse_done_list+0xab> + 12c14: ff 75 f8 pushl 0xfffffff8(%ebp) + 12c17: ff 75 ec pushl 0xffffffec(%ebp) + 12c1a: ff 75 f4 pushl 0xfffffff4(%ebp) + 12c1d: ff 75 08 pushl 0x8(%ebp) + 12c20: e8 2a 00 00 00 call 12c4f <_ed_halted> + 12c25: 83 c4 10 add $0x10,%esp + 12c28: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12c2b: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 12c2e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c31: 89 42 1c mov %eax,0x1c(%edx) + 12c34: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12c37: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12c3a: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12c3d: 83 c0 08 add $0x8,%eax + 12c40: 8b 00 mov (%eax),%eax + 12c42: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12c45: e9 71 ff ff ff jmp 12bbb <_dl_reverse_done_list+0x3b> + 12c4a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c4d: c9 leave + 12c4e: c3 ret + +00012c4f <_ed_halted>: + 12c4f: 55 push %ebp + 12c50: 89 e5 mov %esp,%ebp + 12c52: 83 ec 18 sub $0x18,%esp + 12c55: 8b 45 0c mov 0xc(%ebp),%eax + 12c58: 8b 40 20 mov 0x20(%eax),%eax + 12c5b: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12c5e: 8b 45 0c mov 0xc(%ebp),%eax + 12c61: 8b 40 14 mov 0x14(%eax),%eax + 12c64: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12c67: 8b 45 0c mov 0xc(%ebp),%eax + 12c6a: 8b 40 2c mov 0x2c(%eax),%eax + 12c6d: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12c70: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c73: 8b 40 08 mov 0x8(%eax),%eax + 12c76: 83 e0 02 and $0x2,%eax + 12c79: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12c7c: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 12c7f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c82: 8b 00 mov (%eax),%eax + 12c84: 80 cc 40 or $0x40,%ah + 12c87: 89 02 mov %eax,(%edx) + 12c89: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 12c8c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c8f: 8b 40 08 mov 0x8(%eax),%eax + 12c92: 83 e0 fe and $0xfffffffe,%eax + 12c95: 89 42 08 mov %eax,0x8(%edx) + 12c98: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c9b: 83 c0 20 add $0x20,%eax + 12c9e: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 12ca1: 74 7e je 12d21 <_ed_halted+0xd2> + 12ca3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12ca6: 83 e8 2c sub $0x2c,%eax + 12ca9: 89 45 ec mov %eax,0xffffffec(%ebp) + 12cac: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12caf: 8b 40 2c mov 0x2c(%eax),%eax + 12cb2: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12cb5: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12cb8: 8b 40 20 mov 0x20(%eax),%eax + 12cbb: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 12cbe: 74 02 je 12cc2 <_ed_halted+0x73> + 12cc0: eb 5f jmp 12d21 <_ed_halted+0xd2> + 12cc2: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12cc5: 8b 00 mov (%eax),%eax + 12cc7: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 12cca: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 12ccd: 81 08 00 00 02 00 orl $0x20000,(%eax) + 12cd3: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 12cd6: 81 20 ff ff ff 0f andl $0xfffffff,(%eax) + 12cdc: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12cdf: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 12ce2: 89 02 mov %eax,(%edx) + 12ce4: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12ce7: 8b 45 14 mov 0x14(%ebp),%eax + 12cea: 89 42 1c mov %eax,0x1c(%edx) + 12ced: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12cf0: 89 45 14 mov %eax,0x14(%ebp) + 12cf3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12cf6: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12cf9: 8b 40 04 mov 0x4(%eax),%eax + 12cfc: 3b 42 24 cmp 0x24(%edx),%eax + 12cff: 75 0c jne 12d0d <_ed_halted+0xbe> + 12d01: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12d04: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12d07: 8b 52 08 mov 0x8(%edx),%edx + 12d0a: 89 50 04 mov %edx,0x4(%eax) + 12d0d: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 12d10: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12d13: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12d16: 0b 42 08 or 0x8(%edx),%eax + 12d19: 89 41 08 mov %eax,0x8(%ecx) + 12d1c: e9 77 ff ff ff jmp 12c98 <_ed_halted+0x49> + 12d21: 83 7d 10 04 cmpl $0x4,0x10(%ebp) + 12d25: 75 00 jne 12d27 <_ed_halted+0xd8> + 12d27: 8b 45 14 mov 0x14(%ebp),%eax + 12d2a: c9 leave + 12d2b: c3 ret + +00012d2c <_dma_to_td>: + 12d2c: 55 push %ebp + 12d2d: 89 e5 mov %esp,%ebp + 12d2f: 83 ec 04 sub $0x4,%esp + 12d32: 8d 45 0c lea 0xc(%ebp),%eax + 12d35: 83 20 e0 andl $0xffffffe0,(%eax) + 12d38: 8b 55 08 mov 0x8(%ebp),%edx + 12d3b: 8b 45 0c mov 0xc(%ebp),%eax + 12d3e: c1 e8 06 shr $0x6,%eax + 12d41: 33 45 0c xor 0xc(%ebp),%eax + 12d44: 83 e0 3f and $0x3f,%eax + 12d47: 8b 84 82 a4 00 00 00 mov 0xa4(%edx,%eax,4),%eax + 12d4e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12d51: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12d55: 74 16 je 12d6d <_dma_to_td+0x41> + 12d57: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12d5a: 8b 40 24 mov 0x24(%eax),%eax + 12d5d: 3b 45 0c cmp 0xc(%ebp),%eax + 12d60: 74 0b je 12d6d <_dma_to_td+0x41> + 12d62: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12d65: 8b 40 18 mov 0x18(%eax),%eax + 12d68: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12d6b: eb e4 jmp 12d51 <_dma_to_td+0x25> + 12d6d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12d70: c9 leave + 12d71: c3 ret + +00012d72 <_finish_unlinks>: + 12d72: 55 push %ebp + 12d73: 89 e5 mov %esp,%ebp + 12d75: 83 ec 38 sub $0x38,%esp + 12d78: 8b 45 0c mov 0xc(%ebp),%eax + 12d7b: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 12d7f: 8b 45 08 mov 0x8(%ebp),%eax + 12d82: 83 c0 10 add $0x10,%eax + 12d85: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12d88: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12d8b: 8b 00 mov (%eax),%eax + 12d8d: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12d90: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 12d94: 0f 84 f0 01 00 00 je 12f8a <_finish_unlinks+0x218> + 12d9a: 0f bf 55 fe movswl 0xfffffffe(%ebp),%edx + 12d9e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12da1: 0f bf 40 32 movswl 0x32(%eax),%eax + 12da5: 29 c2 sub %eax,%edx + 12da7: 89 d0 mov %edx,%eax + 12da9: 85 c0 test %eax,%eax + 12dab: 79 1a jns 12dc7 <_finish_unlinks+0x55> + 12dad: 8b 45 08 mov 0x8(%ebp),%eax + 12db0: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 12db7: 75 0e jne 12dc7 <_finish_unlinks+0x55> + 12db9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12dbc: 83 c0 18 add $0x18,%eax + 12dbf: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12dc2: e9 b6 01 00 00 jmp 12f7d <_finish_unlinks+0x20b> + 12dc7: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 12dca: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12dcd: 8b 40 18 mov 0x18(%eax),%eax + 12dd0: 89 02 mov %eax,(%edx) + 12dd2: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12dd5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 12ddc: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 12de3: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 12dea: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12ded: 83 c0 08 add $0x8,%eax + 12df0: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 12df3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12df6: 83 c0 20 add $0x20,%eax + 12df9: 8b 00 mov (%eax),%eax + 12dfb: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12dfe: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12e01: 8b 00 mov (%eax),%eax + 12e03: 89 45 ec mov %eax,0xffffffec(%ebp) + 12e06: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12e09: 83 c0 20 add $0x20,%eax + 12e0c: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 12e0f: 0f 84 d1 00 00 00 je 12ee6 <_finish_unlinks+0x174> + 12e15: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12e18: 83 e8 2c sub $0x2c,%eax + 12e1b: 89 45 dc mov %eax,0xffffffdc(%ebp) + 12e1e: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 12e21: 8b 40 20 mov 0x20(%eax),%eax + 12e24: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 12e27: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 12e2a: 8b 40 20 mov 0x20(%eax),%eax + 12e2d: 8b 40 08 mov 0x8(%eax),%eax + 12e30: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 12e33: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 12e36: 83 78 08 01 cmpl $0x1,0x8(%eax) + 12e3a: 74 0e je 12e4a <_finish_unlinks+0xd8> + 12e3c: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 12e3f: 83 c0 08 add $0x8,%eax + 12e42: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 12e45: e9 89 00 00 00 jmp 12ed3 <_finish_unlinks+0x161> + 12e4a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12e4d: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 12e50: 8b 40 04 mov 0x4(%eax),%eax + 12e53: 3b 42 24 cmp 0x24(%edx),%eax + 12e56: 75 0c jne 12e64 <_finish_unlinks+0xf2> + 12e58: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12e5b: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 12e5e: 8b 52 08 mov 0x8(%edx),%edx + 12e61: 89 50 04 mov %edx,0x4(%eax) + 12e64: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 12e67: 8b 00 mov (%eax),%eax + 12e69: 83 e0 1f and $0x1f,%eax + 12e6c: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 12e6f: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx + 12e72: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 12e75: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 12e78: 0b 42 08 or 0x8(%edx),%eax + 12e7b: 89 01 mov %eax,(%ecx) + 12e7d: 83 ec 04 sub $0x4,%esp + 12e80: ff 75 dc pushl 0xffffffdc(%ebp) + 12e83: ff 75 d8 pushl 0xffffffd8(%ebp) + 12e86: ff 75 08 pushl 0x8(%ebp) + 12e89: e8 75 fa ff ff call 12903 <_td_done> + 12e8e: 83 c4 10 add $0x10,%esp + 12e91: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 12e94: 66 ff 40 06 incw 0x6(%eax) + 12e98: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 12e9b: 8b 55 d4 mov 0xffffffd4(%ebp),%edx + 12e9e: 66 8b 40 06 mov 0x6(%eax),%ax + 12ea2: 66 3b 42 04 cmp 0x4(%edx),%ax + 12ea6: 75 2b jne 12ed3 <_finish_unlinks+0x161> + 12ea8: c7 45 e8 01 00 00 00 movl $0x1,0xffffffe8(%ebp) + 12eaf: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 12eb6: 83 ec 04 sub $0x4,%esp + 12eb9: ff 75 10 pushl 0x10(%ebp) + 12ebc: ff 75 d8 pushl 0xffffffd8(%ebp) + 12ebf: ff 75 08 pushl 0x8(%ebp) + 12ec2: e8 80 ea ff ff call 11947 <_finish_urb> + 12ec7: 83 c4 10 add $0x10,%esp + 12eca: 8b 45 08 mov 0x8(%ebp),%eax + 12ecd: c7 00 01 00 00 00 movl $0x1,(%eax) + 12ed3: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12ed6: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12ed9: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12edc: 8b 00 mov (%eax),%eax + 12ede: 89 45 ec mov %eax,0xffffffec(%ebp) + 12ee1: e9 20 ff ff ff jmp 12e06 <_finish_unlinks+0x94> + 12ee6: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 12eea: 74 1b je 12f07 <_finish_unlinks+0x195> + 12eec: 83 ec 0c sub $0xc,%esp + 12eef: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12ef2: 83 c0 20 add $0x20,%eax + 12ef5: 50 push %eax + 12ef6: e8 6d 01 00 00 call 13068 <_list_empty> + 12efb: 83 c4 10 add $0x10,%esp + 12efe: 85 c0 test %eax,%eax + 12f00: 75 05 jne 12f07 <_finish_unlinks+0x195> + 12f02: e9 dc fe ff ff jmp 12de3 <_finish_unlinks+0x71> + 12f07: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f0a: c6 40 28 00 movb $0x0,0x28(%eax) + 12f0e: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 12f11: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f14: 8b 00 mov (%eax),%eax + 12f16: 25 ff bf ff f7 and $0xf7ffbfff,%eax + 12f1b: 89 02 mov %eax,(%edx) + 12f1d: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 12f20: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f23: 8b 40 08 mov 0x8(%eax),%eax + 12f26: 83 e0 fe and $0xfffffffe,%eax + 12f29: 89 42 08 mov %eax,0x8(%edx) + 12f2c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f2f: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 12f36: 83 ec 0c sub $0xc,%esp + 12f39: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f3c: 83 c0 20 add $0x20,%eax + 12f3f: 50 push %eax + 12f40: e8 23 01 00 00 call 13068 <_list_empty> + 12f45: 83 c4 10 add $0x10,%esp + 12f48: 85 c0 test %eax,%eax + 12f4a: 75 26 jne 12f72 <_finish_unlinks+0x200> + 12f4c: 8b 45 08 mov 0x8(%ebp),%eax + 12f4f: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 12f56: 75 1a jne 12f72 <_finish_unlinks+0x200> + 12f58: 8b 45 08 mov 0x8(%ebp),%eax + 12f5b: 83 b8 a8 01 00 00 00 cmpl $0x0,0x1a8(%eax) + 12f62: 75 0e jne 12f72 <_finish_unlinks+0x200> + 12f64: ff 75 f8 pushl 0xfffffff8(%ebp) + 12f67: ff 75 08 pushl 0x8(%ebp) + 12f6a: e8 43 ec ff ff call 11bb2 <_ed_schedule> + 12f6f: 83 c4 08 add $0x8,%esp + 12f72: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 12f76: 74 05 je 12f7d <_finish_unlinks+0x20b> + 12f78: e9 02 fe ff ff jmp 12d7f <_finish_unlinks+0xd> + 12f7d: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12f80: 8b 00 mov (%eax),%eax + 12f82: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12f85: e9 06 fe ff ff jmp 12d90 <_finish_unlinks+0x1e> + 12f8a: 8b 45 08 mov 0x8(%ebp),%eax + 12f8d: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 12f94: 0f 85 cc 00 00 00 jne 13066 <_finish_unlinks+0x2f4> + 12f9a: 8b 45 08 mov 0x8(%ebp),%eax + 12f9d: 83 78 10 00 cmpl $0x0,0x10(%eax) + 12fa1: 0f 85 bf 00 00 00 jne 13066 <_finish_unlinks+0x2f4> + 12fa7: c7 45 d0 00 00 00 00 movl $0x0,0xffffffd0(%ebp) + 12fae: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) + 12fb5: 8b 45 08 mov 0x8(%ebp),%eax + 12fb8: 83 78 18 00 cmpl $0x0,0x18(%eax) + 12fbc: 74 2e je 12fec <_finish_unlinks+0x27a> + 12fbe: 8d 45 d0 lea 0xffffffd0(%ebp),%eax + 12fc1: 83 08 02 orl $0x2,(%eax) + 12fc4: 8b 45 08 mov 0x8(%ebp),%eax + 12fc7: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 12fcd: c1 e8 04 shr $0x4,%eax + 12fd0: 83 e0 01 and $0x1,%eax + 12fd3: 85 c0 test %eax,%eax + 12fd5: 75 15 jne 12fec <_finish_unlinks+0x27a> + 12fd7: 8d 45 d4 lea 0xffffffd4(%ebp),%eax + 12fda: 83 08 10 orl $0x10,(%eax) + 12fdd: 8b 45 08 mov 0x8(%ebp),%eax + 12fe0: 8b 40 04 mov 0x4(%eax),%eax + 12fe3: 83 c0 24 add $0x24,%eax + 12fe6: c7 00 00 00 00 00 movl $0x0,(%eax) + 12fec: 8b 45 08 mov 0x8(%ebp),%eax + 12fef: 83 78 14 00 cmpl $0x0,0x14(%eax) + 12ff3: 74 2e je 13023 <_finish_unlinks+0x2b1> + 12ff5: 8d 45 d0 lea 0xffffffd0(%ebp),%eax + 12ff8: 83 08 04 orl $0x4,(%eax) + 12ffb: 8b 45 08 mov 0x8(%ebp),%eax + 12ffe: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13004: c1 e8 05 shr $0x5,%eax + 13007: 83 e0 01 and $0x1,%eax + 1300a: 85 c0 test %eax,%eax + 1300c: 75 15 jne 13023 <_finish_unlinks+0x2b1> + 1300e: 8d 45 d4 lea 0xffffffd4(%ebp),%eax + 13011: 83 08 20 orl $0x20,(%eax) + 13014: 8b 45 08 mov 0x8(%ebp),%eax + 13017: 8b 40 04 mov 0x4(%eax),%eax + 1301a: 83 c0 2c add $0x2c,%eax + 1301d: c7 00 00 00 00 00 movl $0x0,(%eax) + 13023: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) + 13027: 74 29 je 13052 <_finish_unlinks+0x2e0> + 13029: 8b 4d 08 mov 0x8(%ebp),%ecx + 1302c: 8b 55 08 mov 0x8(%ebp),%edx + 1302f: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 13032: 0b 82 2c 02 00 00 or 0x22c(%edx),%eax + 13038: 89 81 2c 02 00 00 mov %eax,0x22c(%ecx) + 1303e: 8b 45 08 mov 0x8(%ebp),%eax + 13041: 8b 50 04 mov 0x4(%eax),%edx + 13044: 83 c2 04 add $0x4,%edx + 13047: 8b 45 08 mov 0x8(%ebp),%eax + 1304a: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13050: 89 02 mov %eax,(%edx) + 13052: 83 7d d0 00 cmpl $0x0,0xffffffd0(%ebp) + 13056: 74 0e je 13066 <_finish_unlinks+0x2f4> + 13058: 8b 45 08 mov 0x8(%ebp),%eax + 1305b: 8b 50 04 mov 0x4(%eax),%edx + 1305e: 83 c2 08 add $0x8,%edx + 13061: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 13064: 89 02 mov %eax,(%edx) + 13066: c9 leave + 13067: c3 ret + +00013068 <_list_empty>: + 13068: 55 push %ebp + 13069: 89 e5 mov %esp,%ebp + 1306b: 8b 45 08 mov 0x8(%ebp),%eax + 1306e: 8b 00 mov (%eax),%eax + 13070: 3b 45 08 cmp 0x8(%ebp),%eax + 13073: 0f 94 c0 sete %al + 13076: 25 ff 00 00 00 and $0xff,%eax + 1307b: 5d pop %ebp + 1307c: c3 ret + +0001307d <_dl_done_list>: + 1307d: 55 push %ebp + 1307e: 89 e5 mov %esp,%ebp + 13080: 83 ec 18 sub $0x18,%esp + 13083: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1308a: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 1308e: 0f 84 d1 00 00 00 je 13165 <_dl_done_list+0xe8> + 13094: 8b 45 0c mov 0xc(%ebp),%eax + 13097: 8b 40 1c mov 0x1c(%eax),%eax + 1309a: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1309d: 8b 45 0c mov 0xc(%ebp),%eax + 130a0: 8b 40 20 mov 0x20(%eax),%eax + 130a3: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 130a6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 130a9: 8b 40 08 mov 0x8(%eax),%eax + 130ac: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 130af: 8b 45 0c mov 0xc(%ebp),%eax + 130b2: 8b 40 14 mov 0x14(%eax),%eax + 130b5: 89 45 ec mov %eax,0xffffffec(%ebp) + 130b8: 83 ec 04 sub $0x4,%esp + 130bb: ff 75 0c pushl 0xc(%ebp) + 130be: ff 75 f4 pushl 0xfffffff4(%ebp) + 130c1: ff 75 08 pushl 0x8(%ebp) + 130c4: e8 3a f8 ff ff call 12903 <_td_done> + 130c9: 83 c4 10 add $0x10,%esp + 130cc: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 130cf: 66 ff 40 06 incw 0x6(%eax) + 130d3: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 130d6: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 130d9: 66 8b 40 06 mov 0x6(%eax),%ax + 130dd: 66 3b 42 04 cmp 0x4(%edx),%ax + 130e1: 75 1d jne 13100 <_dl_done_list+0x83> + 130e3: 83 ec 04 sub $0x4,%esp + 130e6: ff 75 10 pushl 0x10(%ebp) + 130e9: ff 75 f4 pushl 0xfffffff4(%ebp) + 130ec: ff 75 08 pushl 0x8(%ebp) + 130ef: e8 53 e8 ff ff call 11947 <_finish_urb> + 130f4: 83 c4 10 add $0x10,%esp + 130f7: 8b 45 08 mov 0x8(%ebp),%eax + 130fa: c7 00 01 00 00 00 movl $0x1,(%eax) + 13100: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13103: 83 c0 20 add $0x20,%eax + 13106: 50 push %eax + 13107: e8 5c ff ff ff call 13068 <_list_empty> + 1310c: 83 c4 04 add $0x4,%esp + 1310f: 85 c0 test %eax,%eax + 13111: 74 10 je 13123 <_dl_done_list+0xa6> + 13113: ff 75 ec pushl 0xffffffec(%ebp) + 13116: ff 75 08 pushl 0x8(%ebp) + 13119: e8 6e ed ff ff call 11e8c <_ed_deschedule> + 1311e: 83 c4 08 add $0x8,%esp + 13121: eb 37 jmp 1315a <_dl_done_list+0xdd> + 13123: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13126: 8b 00 mov (%eax),%eax + 13128: c1 e8 1b shr $0x1b,%eax + 1312b: 83 e0 01 and $0x1,%eax + 1312e: 85 c0 test %eax,%eax + 13130: 75 28 jne 1315a <_dl_done_list+0xdd> + 13132: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13135: 8b 40 20 mov 0x20(%eax),%eax + 13138: 83 e8 2c sub $0x2c,%eax + 1313b: 89 45 0c mov %eax,0xc(%ebp) + 1313e: 8b 45 0c mov 0xc(%ebp),%eax + 13141: 8b 00 mov (%eax),%eax + 13143: c1 e8 11 shr $0x11,%eax + 13146: 83 e0 01 and $0x1,%eax + 13149: 85 c0 test %eax,%eax + 1314b: 75 0d jne 1315a <_dl_done_list+0xdd> + 1314d: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13150: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13153: 8b 12 mov (%edx),%edx + 13155: 80 e6 bf and $0xbf,%dh + 13158: 89 10 mov %edx,(%eax) + 1315a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1315d: 89 45 0c mov %eax,0xc(%ebp) + 13160: e9 25 ff ff ff jmp 1308a <_dl_done_list+0xd> + 13165: c9 leave + 13166: c3 ret + +00013167 <_ohci_urb_enqueue>: + 13167: 55 push %ebp + 13168: 89 e5 mov %esp,%ebp + 1316a: 56 push %esi + 1316b: 53 push %ebx + 1316c: 83 ec 50 sub $0x50,%esp + 1316f: 8b 45 08 mov 0x8(%ebp),%eax + 13172: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 13175: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13178: 2d 34 02 00 00 sub $0x234,%eax + 1317d: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13180: 8b 45 0c mov 0xc(%ebp),%eax + 13183: 8b 40 18 mov 0x18(%eax),%eax + 13186: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 13189: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) + 13190: c7 45 d8 00 00 00 00 movl $0x0,0xffffffd8(%ebp) + 13197: 8b 45 0c mov 0xc(%ebp),%eax + 1319a: ff 70 48 pushl 0x48(%eax) + 1319d: ff 75 e8 pushl 0xffffffe8(%ebp) + 131a0: 8b 45 0c mov 0xc(%ebp),%eax + 131a3: ff 70 14 pushl 0x14(%eax) + 131a6: ff 75 f4 pushl 0xfffffff4(%ebp) + 131a9: e8 02 ef ff ff call 120b0 <_ed_get> + 131ae: 83 c4 10 add $0x10,%esp + 131b1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 131b4: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 131b8: 75 0c jne 131c6 <_ohci_urb_enqueue+0x5f> + 131ba: c7 45 cc f4 ff ff ff movl $0xfffffff4,0xffffffcc(%ebp) + 131c1: e9 23 03 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> + 131c6: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 131c9: ba 00 00 00 00 mov $0x0,%edx + 131ce: 8a 50 29 mov 0x29(%eax),%dl + 131d1: 89 55 c0 mov %edx,0xffffffc0(%ebp) + 131d4: 83 7d c0 00 cmpl $0x0,0xffffffc0(%ebp) + 131d8: 0f 84 f7 00 00 00 je 132d5 <_ohci_urb_enqueue+0x16e> + 131de: 83 7d c0 02 cmpl $0x2,0xffffffc0(%ebp) + 131e2: 74 02 je 131e6 <_ohci_urb_enqueue+0x7f> + 131e4: eb 1f jmp 13205 <_ohci_urb_enqueue+0x9e> + 131e6: 8b 45 0c mov 0xc(%ebp),%eax + 131e9: 81 78 2c 00 10 00 00 cmpl $0x1000,0x2c(%eax) + 131f0: 7e 0c jle 131fe <_ohci_urb_enqueue+0x97> + 131f2: c7 45 cc a6 ff ff ff movl $0xffffffa6,0xffffffcc(%ebp) + 131f9: e9 eb 02 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> + 131fe: c7 45 e0 02 00 00 00 movl $0x2,0xffffffe0(%ebp) + 13205: 8b 45 0c mov 0xc(%ebp),%eax + 13208: 8b 40 2c mov 0x2c(%eax),%eax + 1320b: 89 45 c8 mov %eax,0xffffffc8(%ebp) + 1320e: 83 7d c8 00 cmpl $0x0,0xffffffc8(%ebp) + 13212: 79 07 jns 1321b <_ohci_urb_enqueue+0xb4> + 13214: 81 45 c8 ff 0f 00 00 addl $0xfff,0xffffffc8(%ebp) + 1321b: 8b 55 c8 mov 0xffffffc8(%ebp),%edx + 1321e: c1 fa 0c sar $0xc,%edx + 13221: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 13224: 01 10 add %edx,(%eax) + 13226: 8b 45 0c mov 0xc(%ebp),%eax + 13229: 8b 40 2c mov 0x2c(%eax),%eax + 1322c: 25 ff 0f 00 00 and $0xfff,%eax + 13231: 85 c0 test %eax,%eax + 13233: 74 05 je 1323a <_ohci_urb_enqueue+0xd3> + 13235: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 13238: ff 00 incl (%eax) + 1323a: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 1323e: 75 0a jne 1324a <_ohci_urb_enqueue+0xe3> + 13240: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 13243: ff 00 incl (%eax) + 13245: e9 94 00 00 00 jmp 132de <_ohci_urb_enqueue+0x177> + 1324a: 8b 45 0c mov 0xc(%ebp),%eax + 1324d: 8b 40 20 mov 0x20(%eax),%eax + 13250: c1 e8 06 shr $0x6,%eax + 13253: 83 e0 01 and $0x1,%eax + 13256: 85 c0 test %eax,%eax + 13258: 0f 84 80 00 00 00 je 132de <_ohci_urb_enqueue+0x177> + 1325e: 8b 45 0c mov 0xc(%ebp),%eax + 13261: 8b 40 2c mov 0x2c(%eax),%eax + 13264: 89 45 c4 mov %eax,0xffffffc4(%ebp) + 13267: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1326a: c1 e8 07 shr $0x7,%eax + 1326d: 83 e0 01 and $0x1,%eax + 13270: 85 c0 test %eax,%eax + 13272: 75 2e jne 132a2 <_ohci_urb_enqueue+0x13b> + 13274: 8b 45 0c mov 0xc(%ebp),%eax + 13277: 8b 40 14 mov 0x14(%eax),%eax + 1327a: 89 45 b8 mov %eax,0xffffffb8(%ebp) + 1327d: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13280: c1 e8 0f shr $0xf,%eax + 13283: 83 e0 0f and $0xf,%eax + 13286: 89 45 b4 mov %eax,0xffffffb4(%ebp) + 13289: 8b 45 c4 mov 0xffffffc4(%ebp),%eax + 1328c: 8b 4d b4 mov 0xffffffb4(%ebp),%ecx + 1328f: 8b 5d b8 mov 0xffffffb8(%ebp),%ebx + 13292: 99 cltd + 13293: f7 7c 8b 78 idivl 0x78(%ebx,%ecx,4) + 13297: 89 55 b8 mov %edx,0xffffffb8(%ebp) + 1329a: 83 7d b8 00 cmpl $0x0,0xffffffb8(%ebp) + 1329e: 75 3e jne 132de <_ohci_urb_enqueue+0x177> + 132a0: eb 2c jmp 132ce <_ohci_urb_enqueue+0x167> + 132a2: 8b 45 0c mov 0xc(%ebp),%eax + 132a5: 8b 40 14 mov 0x14(%eax),%eax + 132a8: 89 45 b8 mov %eax,0xffffffb8(%ebp) + 132ab: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 132ae: c1 e8 0f shr $0xf,%eax + 132b1: 83 e0 0f and $0xf,%eax + 132b4: 89 45 b4 mov %eax,0xffffffb4(%ebp) + 132b7: 8b 45 c4 mov 0xffffffc4(%ebp),%eax + 132ba: 8b 4d b4 mov 0xffffffb4(%ebp),%ecx + 132bd: 8b 5d b8 mov 0xffffffb8(%ebp),%ebx + 132c0: 99 cltd + 132c1: f7 7c 8b 38 idivl 0x38(%ebx,%ecx,4) + 132c5: 89 55 b8 mov %edx,0xffffffb8(%ebp) + 132c8: 83 7d b8 00 cmpl $0x0,0xffffffb8(%ebp) + 132cc: 75 10 jne 132de <_ohci_urb_enqueue+0x177> + 132ce: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 132d1: ff 00 incl (%eax) + 132d3: eb 09 jmp 132de <_ohci_urb_enqueue+0x177> + 132d5: 8b 45 0c mov 0xc(%ebp),%eax + 132d8: 8b 40 44 mov 0x44(%eax),%eax + 132db: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 132de: 83 ec 08 sub $0x8,%esp + 132e1: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 132e4: c1 e0 02 shl $0x2,%eax + 132e7: 83 c0 0c add $0xc,%eax + 132ea: 50 push %eax + 132eb: 6a 01 push $0x1 + 132ed: e8 7e 12 00 00 call 14570 <_ExAllocatePool@8> + 132f2: 83 c4 08 add $0x8,%esp + 132f5: 89 45 ec mov %eax,0xffffffec(%ebp) + 132f8: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 132fc: 75 0c jne 1330a <_ohci_urb_enqueue+0x1a3> + 132fe: c7 45 cc f4 ff ff ff movl $0xfffffff4,0xffffffcc(%ebp) + 13305: e9 df 01 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> + 1330a: 83 ec 04 sub $0x4,%esp + 1330d: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 13310: c1 e0 02 shl $0x2,%eax + 13313: 83 c0 0c add $0xc,%eax + 13316: 50 push %eax + 13317: 6a 00 push $0x0 + 13319: ff 75 ec pushl 0xffffffec(%ebp) + 1331c: e8 7f 12 00 00 call 145a0 <_memset> + 13321: 83 c4 10 add $0x10,%esp + 13324: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13327: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 1332a: 66 89 42 04 mov %ax,0x4(%edx) + 1332e: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13331: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13334: 89 02 mov %eax,(%edx) + 13336: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 1333d: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 13340: 3b 45 e0 cmp 0xffffffe0(%ebp),%eax + 13343: 7d 56 jge 1339b <_ohci_urb_enqueue+0x234> + 13345: 8b 5d ec mov 0xffffffec(%ebp),%ebx + 13348: 8b 75 e4 mov 0xffffffe4(%ebp),%esi + 1334b: 83 ec 08 sub $0x8,%esp + 1334e: ff 75 10 pushl 0x10(%ebp) + 13351: ff 75 f4 pushl 0xfffffff4(%ebp) + 13354: e8 28 e4 ff ff call 11781 <_td_alloc> + 13359: 83 c4 10 add $0x10,%esp + 1335c: 89 44 b3 0c mov %eax,0xc(%ebx,%esi,4) + 13360: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13363: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 13366: 83 7c 82 0c 00 cmpl $0x0,0xc(%edx,%eax,4) + 1336b: 75 27 jne 13394 <_ohci_urb_enqueue+0x22d> + 1336d: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13370: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 13373: 66 89 42 04 mov %ax,0x4(%edx) + 13377: 83 ec 08 sub $0x8,%esp + 1337a: ff 75 ec pushl 0xffffffec(%ebp) + 1337d: ff 75 f4 pushl 0xfffffff4(%ebp) + 13380: e8 5c e5 ff ff call 118e1 <_urb_free_priv> + 13385: 83 c4 10 add $0x10,%esp + 13388: c7 45 cc f4 ff ff ff movl $0xfffffff4,0xffffffcc(%ebp) + 1338f: e9 55 01 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> + 13394: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 13397: ff 00 incl (%eax) + 13399: eb a2 jmp 1333d <_ohci_urb_enqueue+0x1d6> + 1339b: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) + 133a2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 133a5: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 133ac: 75 0e jne 133bc <_ohci_urb_enqueue+0x255> + 133ae: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 133b1: 83 b8 a8 01 00 00 00 cmpl $0x0,0x1a8(%eax) + 133b8: 75 02 jne 133bc <_ohci_urb_enqueue+0x255> + 133ba: eb 0c jmp 133c8 <_ohci_urb_enqueue+0x261> + 133bc: c7 45 d8 ed ff ff ff movl $0xffffffed,0xffffffd8(%ebp) + 133c3: e9 04 01 00 00 jmp 134cc <_ohci_urb_enqueue+0x365> + 133c8: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 133cb: 80 78 28 00 cmpb $0x0,0x28(%eax) + 133cf: 0f 85 b0 00 00 00 jne 13485 <_ohci_urb_enqueue+0x31e> + 133d5: ff 75 f0 pushl 0xfffffff0(%ebp) + 133d8: ff 75 f4 pushl 0xfffffff4(%ebp) + 133db: e8 d2 e7 ff ff call 11bb2 <_ed_schedule> + 133e0: 83 c4 08 add $0x8,%esp + 133e3: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 133e6: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) + 133ea: 79 05 jns 133f1 <_ohci_urb_enqueue+0x28a> + 133ec: e9 db 00 00 00 jmp 134cc <_ohci_urb_enqueue+0x365> + 133f1: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 133f4: 80 78 29 00 cmpb $0x0,0x29(%eax) + 133f8: 0f 85 b4 00 00 00 jne 134b2 <_ohci_urb_enqueue+0x34b> + 133fe: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13401: 8b 40 08 mov 0x8(%eax),%eax + 13404: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax + 1340b: 66 89 45 d6 mov %ax,0xffffffd6(%ebp) + 1340f: 66 c7 45 d4 08 00 movw $0x8,0xffffffd4(%ebp) + 13415: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13418: 66 8b 40 2c mov 0x2c(%eax),%ax + 1341c: 66 89 45 d2 mov %ax,0xffffffd2(%ebp) + 13420: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 13423: 66 3b 45 d2 cmp 0xffffffd2(%ebp),%ax + 13427: 76 10 jbe 13439 <_ohci_urb_enqueue+0x2d2> + 13429: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 1342c: 89 c2 mov %eax,%edx + 1342e: 81 e2 ff ff 00 00 and $0xffff,%edx + 13434: 89 55 bc mov %edx,0xffffffbc(%ebp) + 13437: eb 0f jmp 13448 <_ohci_urb_enqueue+0x2e1> + 13439: 66 8b 45 d2 mov 0xffffffd2(%ebp),%ax + 1343d: 89 c1 mov %eax,%ecx + 1343f: 81 e1 ff ff 00 00 and $0xffff,%ecx + 13445: 89 4d bc mov %ecx,0xffffffbc(%ebp) + 13448: 8d 45 d6 lea 0xffffffd6(%ebp),%eax + 1344b: 8b 5d bc mov 0xffffffbc(%ebp),%ebx + 1344e: 66 01 18 add %bx,(%eax) + 13451: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13454: 66 8b 40 2c mov 0x2c(%eax),%ax + 13458: 48 dec %eax + 13459: 89 c2 mov %eax,%edx + 1345b: f7 d2 not %edx + 1345d: 8d 45 d6 lea 0xffffffd6(%ebp),%eax + 13460: 66 21 10 and %dx,(%eax) + 13463: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13466: ba 00 00 00 00 mov $0x0,%edx + 1346b: 8a 50 2a mov 0x2a(%eax),%dl + 1346e: 8d 45 d6 lea 0xffffffd6(%ebp),%eax + 13471: 66 09 10 or %dx,(%eax) + 13474: 8b 55 0c mov 0xc(%ebp),%edx + 13477: 66 8b 45 d6 mov 0xffffffd6(%ebp),%ax + 1347b: 25 ff ff 00 00 and $0xffff,%eax + 13480: 89 42 40 mov %eax,0x40(%edx) + 13483: eb 2d jmp 134b2 <_ohci_urb_enqueue+0x34b> + 13485: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13488: 80 78 29 00 cmpb $0x0,0x29(%eax) + 1348c: 75 24 jne 134b2 <_ohci_urb_enqueue+0x34b> + 1348e: 8b 4d 0c mov 0xc(%ebp),%ecx + 13491: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13494: 66 8b 40 30 mov 0x30(%eax),%ax + 13498: 89 c2 mov %eax,%edx + 1349a: 81 e2 ff ff 00 00 and $0xffff,%edx + 134a0: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 134a3: 66 8b 40 2c mov 0x2c(%eax),%ax + 134a7: 25 ff ff 00 00 and $0xffff,%eax + 134ac: 8d 04 02 lea (%edx,%eax,1),%eax + 134af: 89 41 40 mov %eax,0x40(%ecx) + 134b2: 8b 55 0c mov 0xc(%ebp),%edx + 134b5: 8b 45 ec mov 0xffffffec(%ebp),%eax + 134b8: 89 42 08 mov %eax,0x8(%edx) + 134bb: 83 ec 08 sub $0x8,%esp + 134be: ff 75 0c pushl 0xc(%ebp) + 134c1: ff 75 f4 pushl 0xfffffff4(%ebp) + 134c4: e8 a4 f0 ff ff call 1256d <_td_submit_urb> + 134c9: 83 c4 10 add $0x10,%esp + 134cc: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) + 134d0: 74 11 je 134e3 <_ohci_urb_enqueue+0x37c> + 134d2: 83 ec 08 sub $0x8,%esp + 134d5: ff 75 ec pushl 0xffffffec(%ebp) + 134d8: ff 75 f4 pushl 0xfffffff4(%ebp) + 134db: e8 01 e4 ff ff call 118e1 <_urb_free_priv> + 134e0: 83 c4 10 add $0x10,%esp + 134e3: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 134e6: 89 45 cc mov %eax,0xffffffcc(%ebp) + 134e9: 8b 45 cc mov 0xffffffcc(%ebp),%eax + 134ec: 8d 65 f8 lea 0xfffffff8(%ebp),%esp + 134ef: 5b pop %ebx + 134f0: 5e pop %esi + 134f1: 5d pop %ebp + 134f2: c3 ret + +000134f3 <_ohci_urb_dequeue>: + 134f3: 55 push %ebp + 134f4: 89 e5 mov %esp,%ebp + 134f6: 83 ec 18 sub $0x18,%esp + 134f9: 8b 45 08 mov 0x8(%ebp),%eax + 134fc: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 134ff: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13502: 2d 34 02 00 00 sub $0x234,%eax + 13507: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1350a: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 13511: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13514: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 1351b: 75 36 jne 13553 <_ohci_urb_dequeue+0x60> + 1351d: 8b 45 0c mov 0xc(%ebp),%eax + 13520: 8b 40 08 mov 0x8(%eax),%eax + 13523: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13526: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 1352a: 74 4c je 13578 <_ohci_urb_dequeue+0x85> + 1352c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1352f: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) + 13536: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13539: 8b 00 mov (%eax),%eax + 1353b: 80 78 28 02 cmpb $0x2,0x28(%eax) + 1353f: 75 37 jne 13578 <_ohci_urb_dequeue+0x85> + 13541: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13544: ff 30 pushl (%eax) + 13546: ff 75 fc pushl 0xfffffffc(%ebp) + 13549: e8 be ed ff ff call 1230c <_start_urb_unlink> + 1354e: 83 c4 08 add $0x8,%esp + 13551: eb 25 jmp 13578 <_ohci_urb_dequeue+0x85> + 13553: 8b 45 0c mov 0xc(%ebp),%eax + 13556: 83 78 08 00 cmpl $0x0,0x8(%eax) + 1355a: 74 1c je 13578 <_ohci_urb_dequeue+0x85> + 1355c: 83 ec 04 sub $0x4,%esp + 1355f: 6a 00 push $0x0 + 13561: ff 75 0c pushl 0xc(%ebp) + 13564: ff 75 fc pushl 0xfffffffc(%ebp) + 13567: e8 db e3 ff ff call 11947 <_finish_urb> + 1356c: 83 c4 10 add $0x10,%esp + 1356f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13572: c7 00 01 00 00 00 movl $0x1,(%eax) + 13578: b8 00 00 00 00 mov $0x0,%eax + 1357d: c9 leave + 1357e: c3 ret + +0001357f <_ohci_endpoint_disable>: + 1357f: 55 push %ebp + 13580: 89 e5 mov %esp,%ebp + 13582: 83 ec 18 sub $0x18,%esp + 13585: 8b 45 08 mov 0x8(%ebp),%eax + 13588: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1358b: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1358e: 2d 34 02 00 00 sub $0x234,%eax + 13593: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13596: 8b 45 10 mov 0x10(%ebp),%eax + 13599: 83 e0 0f and $0xf,%eax + 1359c: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1359f: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 135a2: d1 20 shll (%eax) + 135a4: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 135a8: 74 13 je 135bd <_ohci_endpoint_disable+0x3e> + 135aa: 8b 45 10 mov 0x10(%ebp),%eax + 135ad: c1 e8 07 shr $0x7,%eax + 135b0: 83 e0 01 and $0x1,%eax + 135b3: 85 c0 test %eax,%eax + 135b5: 75 06 jne 135bd <_ohci_endpoint_disable+0x3e> + 135b7: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 135ba: 83 08 01 orl $0x1,(%eax) + 135bd: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 135c4: 8b 45 0c mov 0xc(%ebp),%eax + 135c7: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 135ca: 8b 44 90 10 mov 0x10(%eax,%edx,4),%eax + 135ce: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 135d1: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 135d5: 75 05 jne 135dc <_ohci_endpoint_disable+0x5d> + 135d7: e9 ac 00 00 00 jmp 13688 <_ohci_endpoint_disable+0x109> + 135dc: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 135df: 8b 80 14 03 00 00 mov 0x314(%eax),%eax + 135e5: 83 e0 01 and $0x1,%eax + 135e8: 85 c0 test %eax,%eax + 135ea: 74 0e je 135fa <_ohci_endpoint_disable+0x7b> + 135ec: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 135ef: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 135f6: 75 02 jne 135fa <_ohci_endpoint_disable+0x7b> + 135f8: eb 07 jmp 13601 <_ohci_endpoint_disable+0x82> + 135fa: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 135fd: c6 40 28 00 movb $0x0,0x28(%eax) + 13601: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13604: ba 00 00 00 00 mov $0x0,%edx + 13609: 8a 50 28 mov 0x28(%eax),%dl + 1360c: 89 55 ec mov %edx,0xffffffec(%ebp) + 1360f: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 13613: 74 17 je 1362c <_ohci_endpoint_disable+0xad> + 13615: 83 7d ec 01 cmpl $0x1,0xffffffec(%ebp) + 13619: 74 02 je 1361d <_ohci_endpoint_disable+0x9e> + 1361b: eb 49 jmp 13666 <_ohci_endpoint_disable+0xe7> + 1361d: 83 ec 0c sub $0xc,%esp + 13620: 6a 01 push $0x1 + 13622: e8 9d 0d 00 00 call 143c4 <_my_schedule_timeout> + 13627: 83 c4 10 add $0x10,%esp + 1362a: eb 91 jmp 135bd <_ohci_endpoint_disable+0x3e> + 1362c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1362f: 83 c0 20 add $0x20,%eax + 13632: 50 push %eax + 13633: e8 30 fa ff ff call 13068 <_list_empty> + 13638: 83 c4 04 add $0x4,%esp + 1363b: 85 c0 test %eax,%eax + 1363d: 74 27 je 13666 <_ohci_endpoint_disable+0xe7> + 1363f: 83 ec 08 sub $0x8,%esp + 13642: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13645: ff 70 14 pushl 0x14(%eax) + 13648: ff 75 fc pushl 0xfffffffc(%ebp) + 1364b: e8 aa e1 ff ff call 117fa <_td_free> + 13650: 83 c4 10 add $0x10,%esp + 13653: 83 ec 08 sub $0x8,%esp + 13656: ff 75 f0 pushl 0xfffffff0(%ebp) + 13659: ff 75 fc pushl 0xfffffffc(%ebp) + 1365c: e8 6a e2 ff ff call 118cb <_ed_free> + 13661: 83 c4 10 add $0x10,%esp + 13664: eb 14 jmp 1367a <_ohci_endpoint_disable+0xfb> + 13666: 83 ec 08 sub $0x8,%esp + 13669: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1366c: ff 70 14 pushl 0x14(%eax) + 1366f: ff 75 fc pushl 0xfffffffc(%ebp) + 13672: e8 83 e1 ff ff call 117fa <_td_free> + 13677: 83 c4 10 add $0x10,%esp + 1367a: 8b 55 0c mov 0xc(%ebp),%edx + 1367d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13680: c7 44 82 10 00 00 00 movl $0x0,0x10(%edx,%eax,4) + 13687: 00 + 13688: c9 leave + 13689: c3 ret + +0001368a <_ohci_get_frame>: + 1368a: 55 push %ebp + 1368b: 89 e5 mov %esp,%ebp + 1368d: 83 ec 08 sub $0x8,%esp + 13690: 8b 45 08 mov 0x8(%ebp),%eax + 13693: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13696: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13699: 2d 34 02 00 00 sub $0x234,%eax + 1369e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 136a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 136a4: 8b 40 08 mov 0x8(%eax),%eax + 136a7: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax + 136ae: 25 ff ff 00 00 and $0xffff,%eax + 136b3: c9 leave + 136b4: c3 ret + +000136b5 <_hc_reset>: + 136b5: 55 push %ebp + 136b6: 89 e5 mov %esp,%ebp + 136b8: 83 ec 18 sub $0x18,%esp + 136bb: 8b 45 08 mov 0x8(%ebp),%eax + 136be: 8b 40 04 mov 0x4(%eax),%eax + 136c1: 83 c0 14 add $0x14,%eax + 136c4: c7 00 00 00 00 80 movl $0x80000000,(%eax) + 136ca: 8b 45 08 mov 0x8(%ebp),%eax + 136cd: 8b 40 04 mov 0x4(%eax),%eax + 136d0: 83 c0 0c add $0xc,%eax + 136d3: 8b 00 mov (%eax),%eax + 136d5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 136d8: 8b 45 08 mov 0x8(%ebp),%eax + 136db: 8b 50 04 mov 0x4(%eax),%edx + 136de: 83 c2 0c add $0xc,%edx + 136e1: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 136e4: 89 02 mov %eax,(%edx) + 136e6: 8b 45 08 mov 0x8(%ebp),%eax + 136e9: 8b 40 04 mov 0x4(%eax),%eax + 136ec: 83 c0 04 add $0x4,%eax + 136ef: 8b 00 mov (%eax),%eax + 136f1: c1 e8 08 shr $0x8,%eax + 136f4: 83 e0 01 and $0x1,%eax + 136f7: 85 c0 test %eax,%eax + 136f9: 74 1f je 1371a <_hc_reset+0x65> + 136fb: 8b 45 08 mov 0x8(%ebp),%eax + 136fe: 8b 40 04 mov 0x4(%eax),%eax + 13701: 83 c0 04 add $0x4,%eax + 13704: 8b 00 mov (%eax),%eax + 13706: 80 e4 fe and $0xfe,%ah + 13709: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1370c: 8b 45 08 mov 0x8(%ebp),%eax + 1370f: 8b 50 04 mov 0x4(%eax),%edx + 13712: 83 c2 04 add $0x4,%edx + 13715: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13718: 89 02 mov %eax,(%edx) + 1371a: 8b 55 08 mov 0x8(%ebp),%edx + 1371d: 8b 45 08 mov 0x8(%ebp),%eax + 13720: 8b 40 04 mov 0x4(%eax),%eax + 13723: 83 c0 04 add $0x4,%eax + 13726: 8b 00 mov (%eax),%eax + 13728: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 1372e: 8b 55 08 mov 0x8(%ebp),%edx + 13731: 8b 45 08 mov 0x8(%ebp),%eax + 13734: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 1373a: 25 00 02 00 00 and $0x200,%eax + 1373f: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 13745: 8b 45 08 mov 0x8(%ebp),%eax + 13748: 8b 50 04 mov 0x4(%eax),%edx + 1374b: 83 c2 04 add $0x4,%edx + 1374e: 8b 45 08 mov 0x8(%ebp),%eax + 13751: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13757: 89 02 mov %eax,(%edx) + 13759: 8b 45 08 mov 0x8(%ebp),%eax + 1375c: 8b 40 04 mov 0x4(%eax),%eax + 1375f: 83 c0 04 add $0x4,%eax + 13762: 8b 00 mov (%eax),%eax + 13764: 83 ec 0c sub $0xc,%esp + 13767: 6a 32 push $0x32 + 13769: e8 92 08 00 00 call 14000 <_wait_ms> + 1376e: 83 c4 10 add $0x10,%esp + 13771: 8b 45 08 mov 0x8(%ebp),%eax + 13774: 8b 40 04 mov 0x4(%eax),%eax + 13777: 83 c0 08 add $0x8,%eax + 1377a: c7 00 01 00 00 00 movl $0x1,(%eax) + 13780: c7 45 fc 1e 00 00 00 movl $0x1e,0xfffffffc(%ebp) + 13787: 8b 45 08 mov 0x8(%ebp),%eax + 1378a: 8b 40 04 mov 0x4(%eax),%eax + 1378d: 83 c0 08 add $0x8,%eax + 13790: 8b 00 mov (%eax),%eax + 13792: 83 e0 01 and $0x1,%eax + 13795: 85 c0 test %eax,%eax + 13797: 74 23 je 137bc <_hc_reset+0x107> + 13799: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1379c: ff 08 decl (%eax) + 1379e: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 137a2: 75 09 jne 137ad <_hc_reset+0xf8> + 137a4: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) + 137ab: eb 35 jmp 137e2 <_hc_reset+0x12d> + 137ad: 83 ec 0c sub $0xc,%esp + 137b0: 6a 01 push $0x1 + 137b2: e8 49 08 00 00 call 14000 <_wait_ms> + 137b7: 83 c4 10 add $0x10,%esp + 137ba: eb cb jmp 13787 <_hc_reset+0xd2> + 137bc: 8b 45 08 mov 0x8(%ebp),%eax + 137bf: 8b 50 04 mov 0x4(%eax),%edx + 137c2: 83 c2 04 add $0x4,%edx + 137c5: 8b 45 08 mov 0x8(%ebp),%eax + 137c8: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 137ce: 89 02 mov %eax,(%edx) + 137d0: 8b 45 08 mov 0x8(%ebp),%eax + 137d3: 8b 40 04 mov 0x4(%eax),%eax + 137d6: 83 c0 04 add $0x4,%eax + 137d9: 8b 00 mov (%eax),%eax + 137db: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 137e2: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 137e5: c9 leave + 137e6: c3 ret + +000137e7 <_hc_start>: + 137e7: 55 push %ebp + 137e8: 89 e5 mov %esp,%ebp + 137ea: 53 push %ebx + 137eb: 83 ec 14 sub $0x14,%esp + 137ee: 8b 45 08 mov 0x8(%ebp),%eax + 137f1: c7 80 a4 01 00 00 01 movl $0x1,0x1a4(%eax) + 137f8: 00 00 00 + 137fb: 8b 45 08 mov 0x8(%ebp),%eax + 137fe: c7 80 a8 01 00 00 00 movl $0x0,0x1a8(%eax) + 13805: 00 00 00 + 13808: 8b 45 08 mov 0x8(%ebp),%eax + 1380b: 8b 40 04 mov 0x4(%eax),%eax + 1380e: 83 c0 20 add $0x20,%eax + 13811: c7 00 00 00 00 00 movl $0x0,(%eax) + 13817: 8b 45 08 mov 0x8(%ebp),%eax + 1381a: 8b 40 04 mov 0x4(%eax),%eax + 1381d: 83 c0 28 add $0x28,%eax + 13820: c7 00 00 00 00 00 movl $0x0,(%eax) + 13826: 8b 45 08 mov 0x8(%ebp),%eax + 13829: 8b 50 04 mov 0x4(%eax),%edx + 1382c: 83 c2 18 add $0x18,%edx + 1382f: 8b 45 08 mov 0x8(%ebp),%eax + 13832: 8b 40 0c mov 0xc(%eax),%eax + 13835: 89 02 mov %eax,(%edx) + 13837: 8b 45 08 mov 0x8(%ebp),%eax + 1383a: 8b 40 04 mov 0x4(%eax),%eax + 1383d: 83 c0 34 add $0x34,%eax + 13840: c7 00 df 2e 78 27 movl $0x27782edf,(%eax) + 13846: 8b 45 08 mov 0x8(%ebp),%eax + 13849: 8b 40 04 mov 0x4(%eax),%eax + 1384c: 83 c0 40 add $0x40,%eax + 1384f: c7 00 2f 2a 00 00 movl $0x2a2f,(%eax) + 13855: 8b 45 08 mov 0x8(%ebp),%eax + 13858: 8b 40 04 mov 0x4(%eax),%eax + 1385b: 83 c0 44 add $0x44,%eax + 1385e: c7 00 28 06 00 00 movl $0x628,(%eax) + 13864: 8b 45 08 mov 0x8(%ebp),%eax + 13867: 8b 40 04 mov 0x4(%eax),%eax + 1386a: 83 c0 34 add $0x34,%eax + 1386d: 8b 00 mov (%eax),%eax + 1386f: 25 00 00 ff 3f and $0x3fff0000,%eax + 13874: 85 c0 test %eax,%eax + 13876: 74 0f je 13887 <_hc_start+0xa0> + 13878: 8b 45 08 mov 0x8(%ebp),%eax + 1387b: 8b 40 04 mov 0x4(%eax),%eax + 1387e: 83 c0 40 add $0x40,%eax + 13881: 8b 00 mov (%eax),%eax + 13883: 85 c0 test %eax,%eax + 13885: 75 0c jne 13893 <_hc_start+0xac> + 13887: c7 45 e8 b5 ff ff ff movl $0xffffffb5,0xffffffe8(%ebp) + 1388e: e9 22 02 00 00 jmp 13ab5 <_hc_start+0x2ce> + 13893: 8b 55 08 mov 0x8(%ebp),%edx + 13896: 8b 45 08 mov 0x8(%ebp),%eax + 13899: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 1389f: 25 00 02 00 00 and $0x200,%eax + 138a4: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 138aa: 8b 55 08 mov 0x8(%ebp),%edx + 138ad: 8b 45 08 mov 0x8(%ebp),%eax + 138b0: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 138b6: 0c 8f or $0x8f,%al + 138b8: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 138be: 8b 45 08 mov 0x8(%ebp),%eax + 138c1: c7 80 a4 01 00 00 00 movl $0x0,0x1a4(%eax) + 138c8: 00 00 00 + 138cb: 8b 45 08 mov 0x8(%ebp),%eax + 138ce: 8b 50 04 mov 0x4(%eax),%edx + 138d1: 83 c2 04 add $0x4,%edx + 138d4: 8b 45 08 mov 0x8(%ebp),%eax + 138d7: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 138dd: 89 02 mov %eax,(%edx) + 138df: c7 45 f8 12 00 00 80 movl $0x80000012,0xfffffff8(%ebp) + 138e6: 8b 45 08 mov 0x8(%ebp),%eax + 138e9: 8b 50 04 mov 0x4(%eax),%edx + 138ec: 83 c2 0c add $0xc,%edx + 138ef: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 138f2: 89 02 mov %eax,(%edx) + 138f4: 8b 45 08 mov 0x8(%ebp),%eax + 138f7: 8b 50 04 mov 0x4(%eax),%edx + 138fa: 83 c2 10 add $0x10,%edx + 138fd: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13900: 89 02 mov %eax,(%edx) + 13902: 83 ec 0c sub $0xc,%esp + 13905: ff 75 08 pushl 0x8(%ebp) + 13908: e8 f3 d6 ff ff call 11000 <__end__> + 1390d: 83 c4 10 add $0x10,%esp + 13910: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13913: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 13916: 81 20 ff f6 ff ff andl $0xfffff6ff,(%eax) + 1391c: 8b 45 08 mov 0x8(%ebp),%eax + 1391f: 8b 80 30 02 00 00 mov 0x230(%eax),%eax + 13925: d1 e8 shr %eax + 13927: 83 e0 01 and $0x1,%eax + 1392a: 85 c0 test %eax,%eax + 1392c: 74 14 je 13942 <_hc_start+0x15b> + 1392e: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 13931: 81 08 00 10 00 00 orl $0x1000,(%eax) + 13937: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 1393a: 81 20 ff fd ff 00 andl $0xfffdff,(%eax) + 13940: eb 09 jmp 1394b <_hc_start+0x164> + 13942: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 13945: 81 08 00 02 00 00 orl $0x200,(%eax) + 1394b: 8b 45 08 mov 0x8(%ebp),%eax + 1394e: 8b 50 04 mov 0x4(%eax),%edx + 13951: 83 c2 48 add $0x48,%edx + 13954: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13957: 89 02 mov %eax,(%edx) + 13959: 8b 45 08 mov 0x8(%ebp),%eax + 1395c: 8b 40 04 mov 0x4(%eax),%eax + 1395f: 83 c0 50 add $0x50,%eax + 13962: c7 00 00 00 01 00 movl $0x10000,(%eax) + 13968: 8b 45 08 mov 0x8(%ebp),%eax + 1396b: 8b 40 04 mov 0x4(%eax),%eax + 1396e: 83 c0 4c add $0x4c,%eax + 13971: c7 00 00 00 00 00 movl $0x0,(%eax) + 13977: 8b 45 08 mov 0x8(%ebp),%eax + 1397a: 8b 40 04 mov 0x4(%eax),%eax + 1397d: 83 c0 04 add $0x4,%eax + 13980: 8b 00 mov (%eax),%eax + 13982: 83 ec 0c sub $0xc,%esp + 13985: ff 75 08 pushl 0x8(%ebp) + 13988: e8 73 d6 ff ff call 11000 <__end__> + 1398d: 83 c4 04 add $0x4,%esp + 13990: 6a 00 push $0x0 + 13992: e8 69 06 00 00 call 14000 <_wait_ms> + 13997: 83 c4 10 add $0x10,%esp + 1399a: 8b 45 08 mov 0x8(%ebp),%eax + 1399d: 05 34 02 00 00 add $0x234,%eax + 139a2: 50 push %eax + 139a3: e8 d3 dc ff ff call 1167b <_hcd_to_bus> + 139a8: 83 c4 04 add $0x4,%esp + 139ab: 89 45 ec mov %eax,0xffffffec(%ebp) + 139ae: 8b 5d ec mov 0xffffffec(%ebp),%ebx + 139b1: 83 ec 08 sub $0x8,%esp + 139b4: ff 75 ec pushl 0xffffffec(%ebp) + 139b7: 6a 00 push $0x0 + 139b9: e8 22 0c 00 00 call 145e0 <_usb_alloc_dev@8> + 139be: 83 c4 08 add $0x8,%esp + 139c1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 139c4: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 139c7: 89 43 24 mov %eax,0x24(%ebx) + 139ca: 8b 45 08 mov 0x8(%ebp),%eax + 139cd: c7 80 14 03 00 00 03 movl $0x3,0x314(%eax) + 139d4: 00 00 00 + 139d7: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 139db: 75 3f jne 13a1c <_hc_start+0x235> + 139dd: ff 75 08 pushl 0x8(%ebp) + 139e0: e8 76 d6 ff ff call 1105b <_disable> + 139e5: 83 c4 04 add $0x4,%esp + 139e8: 8b 55 08 mov 0x8(%ebp),%edx + 139eb: 8b 45 08 mov 0x8(%ebp),%eax + 139ee: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 139f4: 24 3f and $0x3f,%al + 139f6: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 139fc: 8b 45 08 mov 0x8(%ebp),%eax + 139ff: 8b 50 04 mov 0x4(%eax),%edx + 13a02: 83 c2 04 add $0x4,%edx + 13a05: 8b 45 08 mov 0x8(%ebp),%eax + 13a08: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13a0e: 89 02 mov %eax,(%edx) + 13a10: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) + 13a17: e9 99 00 00 00 jmp 13ab5 <_hc_start+0x2ce> + 13a1c: 83 ec 0c sub $0xc,%esp + 13a1f: ff 75 f0 pushl 0xfffffff0(%ebp) + 13a22: e8 c9 0b 00 00 call 145f0 <_usb_connect@4> + 13a27: 83 c4 0c add $0xc,%esp + 13a2a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13a2d: c7 40 18 02 00 00 00 movl $0x2,0x18(%eax) + 13a34: 83 ec 0c sub $0xc,%esp + 13a37: 8b 45 08 mov 0x8(%ebp),%eax + 13a3a: 05 34 02 00 00 add $0x234,%eax + 13a3f: 50 push %eax + 13a40: e8 7d 00 00 00 call 13ac2 <_hcd_register_root> + 13a45: 83 c4 10 add $0x10,%esp + 13a48: 85 c0 test %eax,%eax + 13a4a: 74 54 je 13aa0 <_hc_start+0x2b9> + 13a4c: 83 ec 0c sub $0xc,%esp + 13a4f: ff 75 f0 pushl 0xfffffff0(%ebp) + 13a52: e8 a9 0b 00 00 call 14600 <_usb_put_dev@4> + 13a57: 83 c4 0c add $0xc,%esp + 13a5a: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13a5d: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) + 13a64: ff 75 08 pushl 0x8(%ebp) + 13a67: e8 ef d5 ff ff call 1105b <_disable> + 13a6c: 83 c4 04 add $0x4,%esp + 13a6f: 8b 55 08 mov 0x8(%ebp),%edx + 13a72: 8b 45 08 mov 0x8(%ebp),%eax + 13a75: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13a7b: 24 3f and $0x3f,%al + 13a7d: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 13a83: 8b 45 08 mov 0x8(%ebp),%eax + 13a86: 8b 50 04 mov 0x4(%eax),%edx + 13a89: 83 c2 04 add $0x4,%edx + 13a8c: 8b 45 08 mov 0x8(%ebp),%eax + 13a8f: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13a95: 89 02 mov %eax,(%edx) + 13a97: c7 45 e8 ed ff ff ff movl $0xffffffed,0xffffffe8(%ebp) + 13a9e: eb 15 jmp 13ab5 <_hc_start+0x2ce> + 13aa0: 83 ec 0c sub $0xc,%esp + 13aa3: ff 75 08 pushl 0x8(%ebp) + 13aa6: e8 12 00 00 00 call 13abd <_create_debug_files> + 13aab: 83 c4 10 add $0x10,%esp + 13aae: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 13ab5: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13ab8: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 13abb: c9 leave + 13abc: c3 ret + +00013abd <_create_debug_files>: + 13abd: 55 push %ebp + 13abe: 89 e5 mov %esp,%ebp + 13ac0: 5d pop %ebp + 13ac1: c3 ret + +00013ac2 <_hcd_register_root>: + 13ac2: 55 push %ebp + 13ac3: 89 e5 mov %esp,%ebp + 13ac5: 83 ec 08 sub $0x8,%esp + 13ac8: 83 ec 08 sub $0x8,%esp + 13acb: 8b 45 08 mov 0x8(%ebp),%eax + 13ace: ff b0 80 00 00 00 pushl 0x80(%eax) + 13ad4: ff 75 08 pushl 0x8(%ebp) + 13ad7: e8 9f db ff ff call 1167b <_hcd_to_bus> + 13adc: 83 c4 04 add $0x4,%esp + 13adf: ff 70 24 pushl 0x24(%eax) + 13ae2: e8 29 0b 00 00 call 14610 <_usb_register_root_hub@8> + 13ae7: 83 c4 08 add $0x8,%esp + 13aea: c9 leave + 13aeb: c3 ret + +00013aec <_ohci_irq>: + 13aec: 55 push %ebp + 13aed: 89 e5 mov %esp,%ebp + 13aef: 83 ec 18 sub $0x18,%esp + 13af2: 8b 45 08 mov 0x8(%ebp),%eax + 13af5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13af8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13afb: 2d 34 02 00 00 sub $0x234,%eax + 13b00: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13b03: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b06: 8b 40 04 mov 0x4(%eax),%eax + 13b09: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13b0c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b0f: 8b 40 08 mov 0x8(%eax),%eax + 13b12: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) + 13b19: 74 1d je 13b38 <_ohci_irq+0x4c> + 13b1b: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b1e: 8b 40 08 mov 0x8(%eax),%eax + 13b21: 05 84 00 00 00 add $0x84,%eax + 13b26: 8b 00 mov (%eax),%eax + 13b28: 83 e0 01 and $0x1,%eax + 13b2b: 85 c0 test %eax,%eax + 13b2d: 75 09 jne 13b38 <_ohci_irq+0x4c> + 13b2f: c7 45 f4 02 00 00 00 movl $0x2,0xfffffff4(%ebp) + 13b36: eb 39 jmp 13b71 <_ohci_irq+0x85> + 13b38: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13b3b: 83 c0 0c add $0xc,%eax + 13b3e: 8b 00 mov (%eax),%eax + 13b40: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13b43: 83 f8 ff cmp $0xffffffff,%eax + 13b46: 75 10 jne 13b58 <_ohci_irq+0x6c> + 13b48: ff 75 fc pushl 0xfffffffc(%ebp) + 13b4b: e8 0b d5 ff ff call 1105b <_disable> + 13b50: 83 c4 04 add $0x4,%esp + 13b53: e9 0d 01 00 00 jmp 13c65 <_ohci_irq+0x179> + 13b58: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13b5b: 83 c0 10 add $0x10,%eax + 13b5e: 8b 10 mov (%eax),%edx + 13b60: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 13b63: 21 10 and %edx,(%eax) + 13b65: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13b68: 85 c0 test %eax,%eax + 13b6a: 75 05 jne 13b71 <_ohci_irq+0x85> + 13b6c: e9 f4 00 00 00 jmp 13c65 <_ohci_irq+0x179> + 13b71: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13b74: c1 e8 04 shr $0x4,%eax + 13b77: 83 e0 01 and $0x1,%eax + 13b7a: 85 c0 test %eax,%eax + 13b7c: 74 29 je 13ba7 <_ohci_irq+0xbb> + 13b7e: ff 75 fc pushl 0xfffffffc(%ebp) + 13b81: e8 d5 d4 ff ff call 1105b <_disable> + 13b86: 83 c4 04 add $0x4,%esp + 13b89: 83 ec 08 sub $0x8,%esp + 13b8c: 6a 01 push $0x1 + 13b8e: ff 75 fc pushl 0xfffffffc(%ebp) + 13b91: e8 d1 00 00 00 call 13c67 <_ohci_dump> + 13b96: 83 c4 10 add $0x10,%esp + 13b99: 83 ec 0c sub $0xc,%esp + 13b9c: ff 75 fc pushl 0xfffffffc(%ebp) + 13b9f: e8 11 fb ff ff call 136b5 <_hc_reset> + 13ba4: 83 c4 10 add $0x10,%esp + 13ba7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13baa: d1 e8 shr %eax + 13bac: 83 e0 01 and $0x1,%eax + 13baf: 85 c0 test %eax,%eax + 13bb1: 74 38 je 13beb <_ohci_irq+0xff> + 13bb3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13bb6: 83 c0 14 add $0x14,%eax + 13bb9: c7 00 02 00 00 00 movl $0x2,(%eax) + 13bbf: 83 ec 04 sub $0x4,%esp + 13bc2: ff 75 0c pushl 0xc(%ebp) + 13bc5: 83 ec 04 sub $0x4,%esp + 13bc8: ff 75 fc pushl 0xfffffffc(%ebp) + 13bcb: e8 b0 ef ff ff call 12b80 <_dl_reverse_done_list> + 13bd0: 83 c4 08 add $0x8,%esp + 13bd3: 50 push %eax + 13bd4: ff 75 fc pushl 0xfffffffc(%ebp) + 13bd7: e8 a1 f4 ff ff call 1307d <_dl_done_list> + 13bdc: 83 c4 10 add $0x10,%esp + 13bdf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13be2: 83 c0 10 add $0x10,%eax + 13be5: c7 00 02 00 00 00 movl $0x2,(%eax) + 13beb: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13bee: c7 00 01 00 00 00 movl $0x1,(%eax) + 13bf4: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13bf7: 83 78 10 00 cmpl $0x0,0x10(%eax) + 13bfb: 74 24 je 13c21 <_ohci_irq+0x135> + 13bfd: 83 ec 04 sub $0x4,%esp + 13c00: ff 75 0c pushl 0xc(%ebp) + 13c03: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c06: 8b 40 08 mov 0x8(%eax),%eax + 13c09: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax + 13c10: 25 ff ff 00 00 and $0xffff,%eax + 13c15: 50 push %eax + 13c16: ff 75 fc pushl 0xfffffffc(%ebp) + 13c19: e8 54 f1 ff ff call 12d72 <_finish_unlinks> + 13c1e: 83 c4 10 add $0x10,%esp + 13c21: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13c24: c1 e8 02 shr $0x2,%eax + 13c27: 83 e0 01 and $0x1,%eax + 13c2a: 85 c0 test %eax,%eax + 13c2c: 74 15 je 13c43 <_ohci_irq+0x157> + 13c2e: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c31: 83 78 10 00 cmpl $0x0,0x10(%eax) + 13c35: 75 0c jne 13c43 <_ohci_irq+0x157> + 13c37: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13c3a: 83 c0 14 add $0x14,%eax + 13c3d: c7 00 04 00 00 00 movl $0x4,(%eax) + 13c43: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 13c46: 83 c2 0c add $0xc,%edx + 13c49: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13c4c: 89 02 mov %eax,(%edx) + 13c4e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13c51: 83 c0 10 add $0x10,%eax + 13c54: c7 00 00 00 00 80 movl $0x80000000,(%eax) + 13c5a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c5d: 8b 40 04 mov 0x4(%eax),%eax + 13c60: 83 c0 04 add $0x4,%eax + 13c63: 8b 00 mov (%eax),%eax + 13c65: c9 leave + 13c66: c3 ret + +00013c67 <_ohci_dump>: + 13c67: 55 push %ebp + 13c68: 89 e5 mov %esp,%ebp + 13c6a: 5d pop %ebp + 13c6b: c3 ret + +00013c6c <_ohci_stop>: + 13c6c: 55 push %ebp + 13c6d: 89 e5 mov %esp,%ebp + 13c6f: 83 ec 18 sub $0x18,%esp + 13c72: 8b 45 08 mov 0x8(%ebp),%eax + 13c75: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13c78: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13c7b: 2d 34 02 00 00 sub $0x234,%eax + 13c80: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13c83: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c86: 8b 40 04 mov 0x4(%eax),%eax + 13c89: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13c8c: 6a 01 push $0x1 + 13c8e: ff 75 fc pushl 0xfffffffc(%ebp) + 13c91: e8 d1 ff ff ff call 13c67 <_ohci_dump> + 13c96: 83 c4 08 add $0x8,%esp + 13c99: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c9c: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 13ca3: 75 0e jne 13cb3 <_ohci_stop+0x47> + 13ca5: 83 ec 0c sub $0xc,%esp + 13ca8: ff 75 fc pushl 0xfffffffc(%ebp) + 13cab: e8 05 fa ff ff call 136b5 <_hc_reset> + 13cb0: 83 c4 10 add $0x10,%esp + 13cb3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13cb6: 83 c0 14 add $0x14,%eax + 13cb9: c7 00 00 00 00 80 movl $0x80000000,(%eax) + 13cbf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13cc2: 83 c0 0c add $0xc,%eax + 13cc5: 8b 00 mov (%eax),%eax + 13cc7: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13cca: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 13ccd: 83 c2 0c add $0xc,%edx + 13cd0: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13cd3: 89 02 mov %eax,(%edx) + 13cd5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13cd8: 8b 40 04 mov 0x4(%eax),%eax + 13cdb: 83 c0 04 add $0x4,%eax + 13cde: 8b 00 mov (%eax),%eax + 13ce0: 83 ec 0c sub $0xc,%esp + 13ce3: ff 75 fc pushl 0xfffffffc(%ebp) + 13ce6: e8 3e 00 00 00 call 13d29 <_remove_debug_files> + 13ceb: 83 c4 10 add $0x10,%esp + 13cee: ff 75 fc pushl 0xfffffffc(%ebp) + 13cf1: e8 54 da ff ff call 1174a <_ohci_mem_cleanup> + 13cf6: 83 c4 04 add $0x4,%esp + 13cf9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13cfc: 83 78 08 00 cmpl $0x0,0x8(%eax) + 13d00: 74 25 je 13d27 <_ohci_stop+0xbb> + 13d02: 83 ec 0c sub $0xc,%esp + 13d05: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d08: ff 70 08 pushl 0x8(%eax) + 13d0b: e8 70 08 00 00 call 14580 <_ExFreePool@4> + 13d10: 83 c4 0c add $0xc,%esp + 13d13: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d16: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 13d1d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d20: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 13d27: c9 leave + 13d28: c3 ret + +00013d29 <_remove_debug_files>: + 13d29: 55 push %ebp + 13d2a: 89 e5 mov %esp,%ebp + 13d2c: 5d pop %ebp + 13d2d: c3 ret + +00013d2e <_ohci_pci_start>: + 13d2e: 55 push %ebp + 13d2f: 89 e5 mov %esp,%ebp + 13d31: 53 push %ebx + 13d32: 83 ec 14 sub $0x14,%esp + 13d35: 8b 45 08 mov 0x8(%ebp),%eax + 13d38: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13d3b: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13d3e: 2d 34 02 00 00 sub $0x234,%eax + 13d43: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13d46: 8b 45 08 mov 0x8(%ebp),%eax + 13d49: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) + 13d50: 0f 84 ff 00 00 00 je 13e55 <_ohci_pci_start+0x127> + 13d56: 8b 5d f8 mov 0xfffffff8(%ebp),%ebx + 13d59: 83 ec 04 sub $0x4,%esp + 13d5c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13d5f: 83 c0 0c add $0xc,%eax + 13d62: 50 push %eax + 13d63: 68 00 01 00 00 push $0x100 + 13d68: 8b 45 08 mov 0x8(%ebp),%eax + 13d6b: ff b0 84 00 00 00 pushl 0x84(%eax) + 13d71: e8 8e 01 00 00 call 13f04 <_my_pci_alloc_consistent> + 13d76: 83 c4 10 add $0x10,%esp + 13d79: 89 43 08 mov %eax,0x8(%ebx) + 13d7c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13d7f: 83 78 08 00 cmpl $0x0,0x8(%eax) + 13d83: 75 0c jne 13d91 <_ohci_pci_start+0x63> + 13d85: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) + 13d8c: e9 6b 01 00 00 jmp 13efc <_ohci_pci_start+0x1ce> + 13d91: 8b 45 08 mov 0x8(%ebp),%eax + 13d94: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13d9a: 81 38 22 10 00 00 cmpl $0x1022,(%eax) + 13da0: 75 24 jne 13dc6 <_ohci_pci_start+0x98> + 13da2: 8b 45 08 mov 0x8(%ebp),%eax + 13da5: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13dab: 81 78 04 0c 74 00 00 cmpl $0x740c,0x4(%eax) + 13db2: 75 12 jne 13dc6 <_ohci_pci_start+0x98> + 13db4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13db7: c7 80 30 02 00 00 01 movl $0x1,0x230(%eax) + 13dbe: 00 00 00 + 13dc1: e9 8f 00 00 00 jmp 13e55 <_ohci_pci_start+0x127> + 13dc6: 8b 45 08 mov 0x8(%ebp),%eax + 13dc9: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13dcf: 81 38 45 10 00 00 cmpl $0x1045,(%eax) + 13dd5: 75 14 jne 13deb <_ohci_pci_start+0xbd> + 13dd7: 8b 45 08 mov 0x8(%ebp),%eax + 13dda: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13de0: 81 78 04 61 c8 00 00 cmpl $0xc861,0x4(%eax) + 13de7: 75 02 jne 13deb <_ohci_pci_start+0xbd> + 13de9: eb 6a jmp 13e55 <_ohci_pci_start+0x127> + 13deb: 8b 45 08 mov 0x8(%ebp),%eax + 13dee: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13df4: 81 38 0b 10 00 00 cmpl $0x100b,(%eax) + 13dfa: 75 59 jne 13e55 <_ohci_pci_start+0x127> + 13dfc: 8b 45 08 mov 0x8(%ebp),%eax + 13dff: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13e05: 89 45 ec mov %eax,0xffffffec(%ebp) + 13e08: 83 ec 08 sub $0x8,%esp + 13e0b: 6a 00 push $0x0 + 13e0d: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13e10: 8b 40 08 mov 0x8(%eax),%eax + 13e13: 8a 00 mov (%eax),%al + 13e15: 25 ff 00 00 00 and $0xff,%eax + 13e1a: 50 push %eax + 13e1b: e8 bc 06 00 00 call 144dc <_my_pci_find_slot> + 13e20: 83 c4 10 add $0x10,%esp + 13e23: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 13e26: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 13e2a: 74 29 je 13e55 <_ohci_pci_start+0x127> + 13e2c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13e2f: 83 78 04 0e cmpl $0xe,0x4(%eax) + 13e33: 75 20 jne 13e55 <_ohci_pci_start+0x127> + 13e35: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13e38: 81 38 0b 10 00 00 cmpl $0x100b,(%eax) + 13e3e: 75 15 jne 13e55 <_ohci_pci_start+0x127> + 13e40: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13e43: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 13e46: 8b 92 30 02 00 00 mov 0x230(%edx),%edx + 13e4c: 83 ca 02 or $0x2,%edx + 13e4f: 89 90 30 02 00 00 mov %edx,0x230(%eax) + 13e55: 83 ec 04 sub $0x4,%esp + 13e58: 68 00 01 00 00 push $0x100 + 13e5d: 6a 00 push $0x0 + 13e5f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13e62: ff 70 08 pushl 0x8(%eax) + 13e65: e8 36 07 00 00 call 145a0 <_memset> + 13e6a: 83 c4 10 add $0x10,%esp + 13e6d: ff 75 f8 pushl 0xfffffff8(%ebp) + 13e70: e8 7f d8 ff ff call 116f4 <_ohci_mem_init> + 13e75: 83 c4 04 add $0x4,%esp + 13e78: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13e7b: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 13e7f: 79 16 jns 13e97 <_ohci_pci_start+0x169> + 13e81: 83 ec 0c sub $0xc,%esp + 13e84: ff 75 08 pushl 0x8(%ebp) + 13e87: e8 e0 fd ff ff call 13c6c <_ohci_stop> + 13e8c: 83 c4 10 add $0x10,%esp + 13e8f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13e92: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 13e95: eb 65 jmp 13efc <_ohci_pci_start+0x1ce> + 13e97: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 13e9a: 8b 45 08 mov 0x8(%ebp),%eax + 13e9d: 8b 40 7c mov 0x7c(%eax),%eax + 13ea0: 89 42 04 mov %eax,0x4(%edx) + 13ea3: 83 ec 0c sub $0xc,%esp + 13ea6: ff 75 f8 pushl 0xfffffff8(%ebp) + 13ea9: e8 07 f8 ff ff call 136b5 <_hc_reset> + 13eae: 83 c4 10 add $0x10,%esp + 13eb1: 85 c0 test %eax,%eax + 13eb3: 79 17 jns 13ecc <_ohci_pci_start+0x19e> + 13eb5: 83 ec 0c sub $0xc,%esp + 13eb8: ff 75 08 pushl 0x8(%ebp) + 13ebb: e8 ac fd ff ff call 13c6c <_ohci_stop> + 13ec0: 83 c4 10 add $0x10,%esp + 13ec3: c7 45 e8 ed ff ff ff movl $0xffffffed,0xffffffe8(%ebp) + 13eca: eb 30 jmp 13efc <_ohci_pci_start+0x1ce> + 13ecc: 83 ec 0c sub $0xc,%esp + 13ecf: ff 75 f8 pushl 0xfffffff8(%ebp) + 13ed2: e8 10 f9 ff ff call 137e7 <_hc_start> + 13ed7: 83 c4 10 add $0x10,%esp + 13eda: 85 c0 test %eax,%eax + 13edc: 79 17 jns 13ef5 <_ohci_pci_start+0x1c7> + 13ede: 83 ec 0c sub $0xc,%esp + 13ee1: ff 75 08 pushl 0x8(%ebp) + 13ee4: e8 83 fd ff ff call 13c6c <_ohci_stop> + 13ee9: 83 c4 10 add $0x10,%esp + 13eec: c7 45 e8 f0 ff ff ff movl $0xfffffff0,0xffffffe8(%ebp) + 13ef3: eb 07 jmp 13efc <_ohci_pci_start+0x1ce> + 13ef5: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 13efc: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13eff: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 13f02: c9 leave + 13f03: c3 ret + +00013f04 <_my_pci_alloc_consistent>: + 13f04: 55 push %ebp + 13f05: 89 e5 mov %esp,%ebp + 13f07: 83 ec 08 sub $0x8,%esp + 13f0a: 83 ec 08 sub $0x8,%esp + 13f0d: 8b 45 0c mov 0xc(%ebp),%eax + 13f10: 05 00 01 00 00 add $0x100,%eax + 13f15: 50 push %eax + 13f16: 6a 01 push $0x1 + 13f18: e8 53 06 00 00 call 14570 <_ExAllocatePool@8> + 13f1d: 83 c4 08 add $0x8,%esp + 13f20: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13f23: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13f26: 05 ff 00 00 00 add $0xff,%eax + 13f2b: b0 00 mov $0x0,%al + 13f2d: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13f30: 8b 55 10 mov 0x10(%ebp),%edx + 13f33: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13f36: 25 ff ff ff 0f and $0xfffffff,%eax + 13f3b: 89 02 mov %eax,(%edx) + 13f3d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13f40: c9 leave + 13f41: c3 ret + +00013f42 <_ohci_hcd_pci_init>: + 13f42: 55 push %ebp + 13f43: 89 e5 mov %esp,%ebp + 13f45: 83 ec 08 sub $0x8,%esp + 13f48: 83 ec 04 sub $0x4,%esp + 13f4b: 68 85 01 00 00 push $0x185 + 13f50: 68 38 61 01 00 push $0x16138 + 13f55: 68 43 61 01 00 push $0x16143 + 13f5a: e8 31 06 00 00 call 14590 <_DbgPrint> + 13f5f: 83 c4 10 add $0x10,%esp + 13f62: 83 ec 08 sub $0x8,%esp + 13f65: 68 00 60 01 00 push $0x16000 + 13f6a: 68 4c 61 01 00 push $0x1614c + 13f6f: e8 1c 06 00 00 call 14590 <_DbgPrint> + 13f74: 83 c4 10 add $0x10,%esp + 13f77: e8 c4 06 00 00 call 14640 <_usb_disabled@0> + 13f7c: 85 c0 test %eax,%eax + 13f7e: 74 09 je 13f89 <_ohci_hcd_pci_init+0x47> + 13f80: c7 45 fc ed ff ff ff movl $0xffffffed,0xfffffffc(%ebp) + 13f87: eb 43 jmp 13fcc <_ohci_hcd_pci_init+0x8a> + 13f89: 83 ec 04 sub $0x4,%esp + 13f8c: 68 8a 01 00 00 push $0x18a + 13f91: 68 38 61 01 00 push $0x16138 + 13f96: 68 43 61 01 00 push $0x16143 + 13f9b: e8 f0 05 00 00 call 14590 <_DbgPrint> + 13fa0: 83 c4 10 add $0x10,%esp + 13fa3: 6a 40 push $0x40 + 13fa5: 6a 40 push $0x40 + 13fa7: 68 00 60 01 00 push $0x16000 + 13fac: 68 98 61 01 00 push $0x16198 + 13fb1: e8 da 05 00 00 call 14590 <_DbgPrint> + 13fb6: 83 c4 10 add $0x10,%esp + 13fb9: 83 ec 0c sub $0xc,%esp + 13fbc: 68 20 50 01 00 push $0x15020 + 13fc1: e8 a5 04 00 00 call 1446b <_my_pci_module_init> + 13fc6: 83 c4 10 add $0x10,%esp + 13fc9: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13fcc: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13fcf: c9 leave + 13fd0: c3 ret + +00013fd1 <_module_init_ohci_hcd_pci_init>: + 13fd1: 55 push %ebp + 13fd2: 89 e5 mov %esp,%ebp + 13fd4: 83 ec 08 sub $0x8,%esp + 13fd7: e8 66 ff ff ff call 13f42 <_ohci_hcd_pci_init> + 13fdc: c9 leave + 13fdd: c3 ret + +00013fde <_ohci_hcd_pci_cleanup>: + 13fde: 55 push %ebp + 13fdf: 89 e5 mov %esp,%ebp + 13fe1: 5d pop %ebp + 13fe2: c3 ret + +00013fe3 <_module_exit_ohci_hcd_pci_cleanup>: + 13fe3: 55 push %ebp + 13fe4: 89 e5 mov %esp,%ebp + 13fe6: e8 f3 ff ff ff call 13fde <_ohci_hcd_pci_cleanup> + 13feb: 5d pop %ebp + 13fec: c3 ret + 13fed: 90 nop + 13fee: 90 nop + 13fef: 90 nop + +00013ff0 <_DriverEntry@8>: + 13ff0: 55 push %ebp + 13ff1: 89 e5 mov %esp,%ebp + 13ff3: b8 00 00 00 00 mov $0x0,%eax + 13ff8: 5d pop %ebp + 13ff9: c2 08 00 ret $0x8 + 13ffc: 90 nop + 13ffd: 90 nop + 13ffe: 90 nop + 13fff: 90 nop + +00014000 <_wait_ms>: + 14000: 55 push %ebp + 14001: 89 e5 mov %esp,%ebp + 14003: 83 ec 08 sub $0x8,%esp + 14006: 8b 55 08 mov 0x8(%ebp),%edx + 14009: 89 d0 mov %edx,%eax + 1400b: c1 e0 02 shl $0x2,%eax + 1400e: 01 d0 add %edx,%eax + 14010: 01 c0 add %eax,%eax + 14012: f7 d8 neg %eax + 14014: 99 cltd + 14015: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14018: 89 55 fc mov %edx,0xfffffffc(%ebp) + 1401b: 83 ec 04 sub $0x4,%esp + 1401e: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 14021: 50 push %eax + 14022: 6a 00 push $0x0 + 14024: 6a 00 push $0x0 + 14026: e8 85 05 00 00 call 145b0 <_KeDelayExecutionThread@12> + 1402b: 83 c4 04 add $0x4,%esp + 1402e: c9 leave + 1402f: c3 ret + +00014030 <_init_wrapper>: + 14030: 55 push %ebp + 14031: 89 e5 mov %esp,%ebp + 14033: 83 ec 04 sub $0x4,%esp + 14036: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1403d: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 14041: 7f 15 jg 14058 <_init_wrapper+0x28> + 14043: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14046: c7 04 85 c0 70 01 00 movl $0x0,0x170c0(,%eax,4) + 1404d: 00 00 00 00 + 14051: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14054: ff 00 incl (%eax) + 14056: eb e5 jmp 1403d <_init_wrapper+0xd> + 14058: c7 05 a0 71 01 00 00 movl $0x0,0x171a0 + 1405f: 00 00 00 + 14062: c7 05 a0 70 01 00 00 movl $0x0,0x170a0 + 14069: 00 00 00 + 1406c: c7 05 90 71 01 00 00 movl $0x17000,0x17190 + 14073: 70 01 00 + 14076: c7 05 08 70 01 00 00 movl $0x0,0x17008 + 1407d: 00 00 00 + 14080: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14087: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 1408b: 7f 33 jg 140c0 <_init_wrapper+0x90> + 1408d: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14090: 89 d0 mov %edx,%eax + 14092: 01 c0 add %eax,%eax + 14094: 01 d0 add %edx,%eax + 14096: c1 e0 02 shl $0x2,%eax + 14099: c7 80 30 71 01 00 00 movl $0x0,0x17130(%eax) + 140a0: 00 00 00 + 140a3: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 140a6: 89 d0 mov %edx,%eax + 140a8: 01 c0 add %eax,%eax + 140aa: 01 d0 add %edx,%eax + 140ac: c1 e0 02 shl $0x2,%eax + 140af: c7 80 34 71 01 00 ff movl $0xffffffff,0x17134(%eax) + 140b6: ff ff ff + 140b9: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 140bc: ff 00 incl (%eax) + 140be: eb c7 jmp 14087 <_init_wrapper+0x57> + 140c0: c7 05 38 70 01 00 00 movl $0x0,0x17038 + 140c7: 00 00 00 + 140ca: c7 05 20 71 01 00 00 movl $0x0,0x17120 + 140d1: 00 00 00 + 140d4: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 140db: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 140df: 7f 15 jg 140f6 <_init_wrapper+0xc6> + 140e1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 140e4: c7 04 85 18 70 01 00 movl $0x0,0x17018(,%eax,4) + 140eb: 00 00 00 00 + 140ef: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 140f2: ff 00 incl (%eax) + 140f4: eb e5 jmp 140db <_init_wrapper+0xab> + 140f6: c9 leave + 140f7: c3 ret + +000140f8 <_handle_irqs>: + 140f8: 55 push %ebp + 140f9: 89 e5 mov %esp,%ebp + 140fb: 83 ec 08 sub $0x8,%esp + 140fe: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14105: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 14109: 0f 8f 86 00 00 00 jg 14195 <_handle_irqs+0x9d> + 1410f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14112: 89 c2 mov %eax,%edx + 14114: 01 d2 add %edx,%edx + 14116: 01 c2 add %eax,%edx + 14118: 8d 04 95 00 00 00 00 lea 0x0(,%edx,4),%eax + 1411f: 83 b8 30 71 01 00 00 cmpl $0x0,0x17130(%eax) + 14126: 74 63 je 1418b <_handle_irqs+0x93> + 14128: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1412b: 89 d0 mov %edx,%eax + 1412d: 01 c0 add %eax,%eax + 1412f: 01 d0 add %edx,%eax + 14131: c1 e0 02 shl $0x2,%eax + 14134: 8b 80 34 71 01 00 mov 0x17134(%eax),%eax + 1413a: 3b 45 08 cmp 0x8(%ebp),%eax + 1413d: 74 08 je 14147 <_handle_irqs+0x4f> + 1413f: 83 7d 08 ff cmpl $0xffffffff,0x8(%ebp) + 14143: 74 02 je 14147 <_handle_irqs+0x4f> + 14145: eb 44 jmp 1418b <_handle_irqs+0x93> + 14147: 83 ec 04 sub $0x4,%esp + 1414a: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1414d: 89 d0 mov %edx,%eax + 1414f: 01 c0 add %eax,%eax + 14151: 01 d0 add %edx,%eax + 14153: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 1415a: 6a 00 push $0x0 + 1415c: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1415f: 89 d0 mov %edx,%eax + 14161: 01 c0 add %eax,%eax + 14163: 01 d0 add %edx,%eax + 14165: c1 e0 02 shl $0x2,%eax + 14168: ff b0 38 71 01 00 pushl 0x17138(%eax) + 1416e: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14171: 89 d0 mov %edx,%eax + 14173: 01 c0 add %eax,%eax + 14175: 01 d0 add %edx,%eax + 14177: c1 e0 02 shl $0x2,%eax + 1417a: ff b0 34 71 01 00 pushl 0x17134(%eax) + 14180: 8b 81 30 71 01 00 mov 0x17130(%ecx),%eax + 14186: ff d0 call *%eax + 14188: 83 c4 10 add $0x10,%esp + 1418b: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1418e: ff 00 incl (%eax) + 14190: e9 70 ff ff ff jmp 14105 <_handle_irqs+0xd> + 14195: c9 leave + 14196: c3 ret + +00014197 <_inc_jiffies>: + 14197: 55 push %ebp + 14198: 89 e5 mov %esp,%ebp + 1419a: 8b 45 08 mov 0x8(%ebp),%eax + 1419d: 01 05 a0 71 01 00 add %eax,0x171a0 + 141a3: 5d pop %ebp + 141a4: c3 ret + +000141a5 <_do_all_timers>: + 141a5: 55 push %ebp + 141a6: 89 e5 mov %esp,%ebp + 141a8: 83 ec 18 sub $0x18,%esp + 141ab: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 141b2: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 141b6: 0f 8f 82 00 00 00 jg 1423e <_do_all_timers+0x99> + 141bc: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141bf: 83 3c 85 c0 70 01 00 cmpl $0x0,0x170c0(,%eax,4) + 141c6: 00 + 141c7: 74 6b je 14234 <_do_all_timers+0x8f> + 141c9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141cc: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax + 141d3: 83 38 00 cmpl $0x0,(%eax) + 141d6: 74 5c je 14234 <_do_all_timers+0x8f> + 141d8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141db: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax + 141e2: 83 78 08 00 cmpl $0x0,0x8(%eax) + 141e6: 74 4c je 14234 <_do_all_timers+0x8f> + 141e8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141eb: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax + 141f2: 8b 00 mov (%eax),%eax + 141f4: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 141f7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141fa: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax + 14201: 8b 40 04 mov 0x4(%eax),%eax + 14204: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14207: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1420a: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax + 14211: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 14218: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1421b: c7 04 85 c0 70 01 00 movl $0x0,0x170c0(,%eax,4) + 14222: 00 00 00 00 + 14226: 83 ec 0c sub $0xc,%esp + 14229: ff 75 f4 pushl 0xfffffff4(%ebp) + 1422c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1422f: ff d0 call *%eax + 14231: 83 c4 10 add $0x10,%esp + 14234: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14237: ff 00 incl (%eax) + 14239: e9 74 ff ff ff jmp 141b2 <_do_all_timers+0xd> + 1423e: c9 leave + 1423f: c3 ret + +00014240 <_my_kernel_thread>: + 14240: 55 push %ebp + 14241: 89 e5 mov %esp,%ebp + 14243: 8b 45 08 mov 0x8(%ebp),%eax + 14246: a3 b0 70 01 00 mov %eax,0x170b0 + 1424b: 8b 45 0c mov 0xc(%ebp),%eax + 1424e: a3 10 71 01 00 mov %eax,0x17110 + 14253: b8 2a 00 00 00 mov $0x2a,%eax + 14258: 5d pop %ebp + 14259: c3 ret + +0001425a <_my_device_add>: + 1425a: 55 push %ebp + 1425b: 89 e5 mov %esp,%ebp + 1425d: 83 ec 18 sub $0x18,%esp + 14260: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14267: 8b 45 08 mov 0x8(%ebp),%eax + 1426a: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) + 14271: 74 32 je 142a5 <_my_device_add+0x4b> + 14273: 8b 45 08 mov 0x8(%ebp),%eax + 14276: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 1427c: 83 78 08 00 cmpl $0x0,0x8(%eax) + 14280: 0f 84 8d 00 00 00 je 14313 <_my_device_add+0xb9> + 14286: 83 ec 0c sub $0xc,%esp + 14289: 8b 45 08 mov 0x8(%ebp),%eax + 1428c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 14292: ff 75 08 pushl 0x8(%ebp) + 14295: 8b 40 08 mov 0x8(%eax),%eax + 14298: ff d0 call *%eax + 1429a: 83 c4 10 add $0x10,%esp + 1429d: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 142a0: e9 82 00 00 00 jmp 14327 <_my_device_add+0xcd> + 142a5: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 142ac: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 142af: 3b 05 38 70 01 00 cmp 0x17038,%eax + 142b5: 7d 4d jge 14304 <_my_device_add+0xaa> + 142b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 142ba: 8b 04 85 18 70 01 00 mov 0x17018(,%eax,4),%eax + 142c1: 83 78 08 00 cmpl $0x0,0x8(%eax) + 142c5: 74 36 je 142fd <_my_device_add+0xa3> + 142c7: 8b 55 08 mov 0x8(%ebp),%edx + 142ca: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 142cd: 8b 04 85 18 70 01 00 mov 0x17018(,%eax,4),%eax + 142d4: 89 82 98 00 00 00 mov %eax,0x98(%edx) + 142da: 83 ec 0c sub $0xc,%esp + 142dd: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 142e0: 8b 04 85 18 70 01 00 mov 0x17018(,%eax,4),%eax + 142e7: ff 75 08 pushl 0x8(%ebp) + 142ea: 8b 40 08 mov 0x8(%eax),%eax + 142ed: ff d0 call *%eax + 142ef: 83 c4 10 add $0x10,%esp + 142f2: 85 c0 test %eax,%eax + 142f4: 75 07 jne 142fd <_my_device_add+0xa3> + 142f6: c7 45 f8 01 00 00 00 movl $0x1,0xfffffff8(%ebp) + 142fd: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14300: ff 00 incl (%eax) + 14302: eb a8 jmp 142ac <_my_device_add+0x52> + 14304: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 14308: 74 09 je 14313 <_my_device_add+0xb9> + 1430a: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 14311: eb 14 jmp 14327 <_my_device_add+0xcd> + 14313: 8b 45 08 mov 0x8(%ebp),%eax + 14316: c7 80 98 00 00 00 00 movl $0x0,0x98(%eax) + 1431d: 00 00 00 + 14320: c7 45 f4 ed ff ff ff movl $0xffffffed,0xfffffff4(%ebp) + 14327: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1432a: c9 leave + 1432b: c3 ret + +0001432c <_my_driver_register>: + 1432c: 55 push %ebp + 1432d: 89 e5 mov %esp,%ebp + 1432f: 83 ec 04 sub $0x4,%esp + 14332: 83 3d 38 70 01 00 07 cmpl $0x7,0x17038 + 14339: 7f 20 jg 1435b <_my_driver_register+0x2f> + 1433b: a1 38 70 01 00 mov 0x17038,%eax + 14340: 89 c2 mov %eax,%edx + 14342: 8b 45 08 mov 0x8(%ebp),%eax + 14345: 89 04 95 18 70 01 00 mov %eax,0x17018(,%edx,4) + 1434c: ff 05 38 70 01 00 incl 0x17038 + 14352: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14359: eb 07 jmp 14362 <_my_driver_register+0x36> + 1435b: c7 45 fc ff ff ff ff movl $0xffffffff,0xfffffffc(%ebp) + 14362: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14365: c9 leave + 14366: c3 ret + +00014367 <_my_device_unregister>: + 14367: 55 push %ebp + 14368: 89 e5 mov %esp,%ebp + 1436a: 83 ec 08 sub $0x8,%esp + 1436d: 8b 45 08 mov 0x8(%ebp),%eax + 14370: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) + 14377: 74 26 je 1439f <_my_device_unregister+0x38> + 14379: 8b 45 08 mov 0x8(%ebp),%eax + 1437c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 14382: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 14386: 74 17 je 1439f <_my_device_unregister+0x38> + 14388: 83 ec 0c sub $0xc,%esp + 1438b: 8b 45 08 mov 0x8(%ebp),%eax + 1438e: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 14394: ff 75 08 pushl 0x8(%ebp) + 14397: 8b 40 0c mov 0xc(%eax),%eax + 1439a: ff d0 call *%eax + 1439c: 83 c4 10 add $0x10,%esp + 1439f: b8 00 00 00 00 mov $0x0,%eax + 143a4: c9 leave + 143a5: c3 ret + +000143a6 <_my_get_device>: + 143a6: 55 push %ebp + 143a7: 89 e5 mov %esp,%ebp + 143a9: b8 00 00 00 00 mov $0x0,%eax + 143ae: 5d pop %ebp + 143af: c3 ret + +000143b0 <_my_device_initialize>: + 143b0: 55 push %ebp + 143b1: 89 e5 mov %esp,%ebp + 143b3: 5d pop %ebp + 143b4: c3 ret + +000143b5 <_my_wake_up>: + 143b5: 55 push %ebp + 143b6: 89 e5 mov %esp,%ebp + 143b8: c7 05 20 71 01 00 01 movl $0x1,0x17120 + 143bf: 00 00 00 + 143c2: 5d pop %ebp + 143c3: c3 ret + +000143c4 <_my_schedule_timeout>: + 143c4: 55 push %ebp + 143c5: 89 e5 mov %esp,%ebp + 143c7: 83 ec 08 sub $0x8,%esp + 143ca: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) + 143d1: 83 45 08 0a addl $0xa,0x8(%ebp) + 143d5: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 143d9: 7e 3e jle 14419 <_my_schedule_timeout+0x55> + 143db: e8 c5 fd ff ff call 141a5 <_do_all_timers> + 143e0: 83 ec 0c sub $0xc,%esp + 143e3: 6a ff push $0xffffffff + 143e5: e8 0e fd ff ff call 140f8 <_handle_irqs> + 143ea: 83 c4 10 add $0x10,%esp + 143ed: 83 3d 20 71 01 00 00 cmpl $0x0,0x17120 + 143f4: 74 02 je 143f8 <_my_schedule_timeout+0x34> + 143f6: eb 21 jmp 14419 <_my_schedule_timeout+0x55> + 143f8: 83 ec 0c sub $0xc,%esp + 143fb: ff 75 fc pushl 0xfffffffc(%ebp) + 143fe: e8 fd fb ff ff call 14000 <_wait_ms> + 14403: 83 c4 10 add $0x10,%esp + 14406: ff 75 fc pushl 0xfffffffc(%ebp) + 14409: e8 89 fd ff ff call 14197 <_inc_jiffies> + 1440e: 83 c4 04 add $0x4,%esp + 14411: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14414: 29 45 08 sub %eax,0x8(%ebp) + 14417: eb bc jmp 143d5 <_my_schedule_timeout+0x11> + 14419: c7 05 20 71 01 00 00 movl $0x0,0x17120 + 14420: 00 00 00 + 14423: 8b 45 08 mov 0x8(%ebp),%eax + 14426: c9 leave + 14427: c3 ret + +00014428 <_my_wait_for_completion>: + 14428: 55 push %ebp + 14429: 89 e5 mov %esp,%ebp + 1442b: 83 ec 08 sub $0x8,%esp + 1442e: c7 45 fc 64 00 00 00 movl $0x64,0xfffffffc(%ebp) + 14435: 8b 45 08 mov 0x8(%ebp),%eax + 14438: 83 38 00 cmpl $0x0,(%eax) + 1443b: 75 2c jne 14469 <_my_wait_for_completion+0x41> + 1443d: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 14441: 7e 26 jle 14469 <_my_wait_for_completion+0x41> + 14443: e8 5d fd ff ff call 141a5 <_do_all_timers> + 14448: 83 ec 0c sub $0xc,%esp + 1444b: 6a ff push $0xffffffff + 1444d: e8 a6 fc ff ff call 140f8 <_handle_irqs> + 14452: 83 c4 10 add $0x10,%esp + 14455: 83 ec 0c sub $0xc,%esp + 14458: 6a 0a push $0xa + 1445a: e8 a1 fb ff ff call 14000 <_wait_ms> + 1445f: 83 c4 10 add $0x10,%esp + 14462: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14465: ff 08 decl (%eax) + 14467: eb cc jmp 14435 <_my_wait_for_completion+0xd> + 14469: c9 leave + 1446a: c3 ret + +0001446b <_my_pci_module_init>: + 1446b: 55 push %ebp + 1446c: 89 e5 mov %esp,%ebp + 1446e: 83 ec 18 sub $0x18,%esp + 14471: a1 08 70 01 00 mov 0x17008,%eax + 14476: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14479: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14480: 83 3d 08 70 01 00 00 cmpl $0x0,0x17008 + 14487: 75 33 jne 144bc <_my_pci_module_init+0x51> + 14489: 83 ec 04 sub $0x4,%esp + 1448c: 68 ef 00 00 00 push $0xef + 14491: 68 c0 61 01 00 push $0x161c0 + 14496: 68 d6 61 01 00 push $0x161d6 + 1449b: e8 f0 00 00 00 call 14590 <_DbgPrint> + 144a0: 83 c4 10 add $0x10,%esp + 144a3: 83 ec 0c sub $0xc,%esp + 144a6: 68 df 61 01 00 push $0x161df + 144ab: e8 e0 00 00 00 call 14590 <_DbgPrint> + 144b0: 83 c4 10 add $0x10,%esp + 144b3: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 144ba: eb 1b jmp 144d7 <_my_pci_module_init+0x6c> + 144bc: 83 ec 08 sub $0x8,%esp + 144bf: 8b 45 08 mov 0x8(%ebp),%eax + 144c2: ff 75 f8 pushl 0xfffffff8(%ebp) + 144c5: ff 75 fc pushl 0xfffffffc(%ebp) + 144c8: 8b 40 10 mov 0x10(%eax),%eax + 144cb: ff d0 call *%eax + 144cd: 83 c4 10 add $0x10,%esp + 144d0: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 144d7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 144da: c9 leave + 144db: c3 ret + +000144dc <_my_pci_find_slot>: + 144dc: 55 push %ebp + 144dd: 89 e5 mov %esp,%ebp + 144df: b8 00 00 00 00 mov $0x0,%eax + 144e4: 5d pop %ebp + 144e5: c3 ret + +000144e6 <_my_request_irq>: + 144e6: 55 push %ebp + 144e7: 89 e5 mov %esp,%ebp + 144e9: 83 ec 04 sub $0x4,%esp + 144ec: 83 3d a0 70 01 00 07 cmpl $0x7,0x170a0 + 144f3: 7f 63 jg 14558 <_my_request_irq+0x72> + 144f5: 8b 15 a0 70 01 00 mov 0x170a0,%edx + 144fb: 89 d0 mov %edx,%eax + 144fd: 01 c0 add %eax,%eax + 144ff: 01 d0 add %edx,%eax + 14501: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 14508: 8b 45 0c mov 0xc(%ebp),%eax + 1450b: 89 82 30 71 01 00 mov %eax,0x17130(%edx) + 14511: 8b 15 a0 70 01 00 mov 0x170a0,%edx + 14517: 89 d0 mov %edx,%eax + 14519: 01 c0 add %eax,%eax + 1451b: 01 d0 add %edx,%eax + 1451d: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 14524: 8b 45 08 mov 0x8(%ebp),%eax + 14527: 89 82 34 71 01 00 mov %eax,0x17134(%edx) + 1452d: 8b 15 a0 70 01 00 mov 0x170a0,%edx + 14533: 89 d0 mov %edx,%eax + 14535: 01 c0 add %eax,%eax + 14537: 01 d0 add %edx,%eax + 14539: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 14540: 8b 45 18 mov 0x18(%ebp),%eax + 14543: 89 82 38 71 01 00 mov %eax,0x17138(%edx) + 14549: ff 05 a0 70 01 00 incl 0x170a0 + 1454f: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14556: eb 07 jmp 1455f <_my_request_irq+0x79> + 14558: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) + 1455f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14562: c9 leave + 14563: c3 ret + +00014564 <_my_free_irq>: + 14564: 55 push %ebp + 14565: 89 e5 mov %esp,%ebp + 14567: b8 00 00 00 00 mov $0x0,%eax + 1456c: 5d pop %ebp + 1456d: c3 ret + 1456e: 90 nop + 1456f: 90 nop + +00014570 <_ExAllocatePool@8>: + 14570: ff 25 8c 80 01 00 jmp *0x1808c + 14576: 90 nop + 14577: 90 nop + ... + +00014580 <_ExFreePool@4>: + 14580: ff 25 90 80 01 00 jmp *0x18090 + 14586: 90 nop + 14587: 90 nop + ... + +00014590 <_DbgPrint>: + 14590: ff 25 88 80 01 00 jmp *0x18088 + 14596: 90 nop + 14597: 90 nop + ... + +000145a0 <_memset>: + 145a0: ff 25 98 80 01 00 jmp *0x18098 + 145a6: 90 nop + 145a7: 90 nop + ... + +000145b0 <_KeDelayExecutionThread@12>: + 145b0: ff 25 94 80 01 00 jmp *0x18094 + 145b6: 90 nop + 145b7: 90 nop + ... + +000145c0 <_usb_hcd_giveback_urb@12>: + 145c0: ff 25 b4 80 01 00 jmp *0x180b4 + 145c6: 90 nop + 145c7: 90 nop + ... + +000145d0 <_usb_calc_bus_time@16>: + 145d0: ff 25 a8 80 01 00 jmp *0x180a8 + 145d6: 90 nop + 145d7: 90 nop + ... + +000145e0 <_usb_alloc_dev@8>: + 145e0: ff 25 a4 80 01 00 jmp *0x180a4 + 145e6: 90 nop + 145e7: 90 nop + ... + +000145f0 <_usb_connect@4>: + 145f0: ff 25 ac 80 01 00 jmp *0x180ac + 145f6: 90 nop + 145f7: 90 nop + ... + +00014600 <_usb_put_dev@4>: + 14600: ff 25 c0 80 01 00 jmp *0x180c0 + 14606: 90 nop + 14607: 90 nop + ... + +00014610 <_usb_register_root_hub@8>: + 14610: ff 25 c4 80 01 00 jmp *0x180c4 + 14616: 90 nop + 14617: 90 nop + ... + +00014620 <_usb_hcd_pci_probe@8>: + 14620: ff 25 b8 80 01 00 jmp *0x180b8 + 14626: 90 nop + 14627: 90 nop + ... + +00014630 <_usb_hcd_pci_remove@4>: + 14630: ff 25 bc 80 01 00 jmp *0x180bc + 14636: 90 nop + 14637: 90 nop + ... + +00014640 <_usb_disabled@0>: + 14640: ff 25 b0 80 01 00 jmp *0x180b0 + 14646: 90 nop + 14647: 90 nop + ... + +00014650 <__CTOR_LIST__>: + 14650: ff (bad) + 14651: ff (bad) + 14652: ff (bad) + 14653: ff 00 incl (%eax) + 14655: 00 00 add %al,(%eax) + ... + +00014658 <__DTOR_LIST__>: + 14658: ff (bad) + 14659: ff (bad) + 1465a: ff (bad) + 1465b: ff 00 incl (%eax) + 1465d: 00 00 add %al,(%eax) + ... + +00014660 : + ... diff --git a/reactos/drivers/usb/cromwell/host/ohci.nostrip.sys b/reactos/drivers/usb/cromwell/host/ohci.nostrip.sys new file mode 100644 index 00000000000..4bb663b0192 Binary files /dev/null and b/reactos/drivers/usb/cromwell/host/ohci.nostrip.sys differ diff --git a/reactos/drivers/usb/cromwell/host/ohci.rc b/reactos/drivers/usb/cromwell/host/ohci.rc new file mode 100644 index 00000000000..fa183242a97 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci.rc @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "USB OHCI Device Driver\0" +#define REACTOS_STR_INTERNAL_NAME "ohci\0" +#define REACTOS_STR_ORIGINAL_FILENAME "ohci.sys\0" +#include diff --git a/reactos/drivers/usb/cromwell/host/ohci.sym b/reactos/drivers/usb/cromwell/host/ohci.sym new file mode 100644 index 00000000000..4c3182f92e2 Binary files /dev/null and b/reactos/drivers/usb/cromwell/host/ohci.sym differ diff --git a/reactos/drivers/usb/cromwell/host/ohci.sys b/reactos/drivers/usb/cromwell/host/ohci.sys new file mode 100644 index 00000000000..3392cfad9c7 Binary files /dev/null and b/reactos/drivers/usb/cromwell/host/ohci.sys differ diff --git a/reactos/drivers/usb/cromwell/host/ohci_config.h b/reactos/drivers/usb/cromwell/host/ohci_config.h new file mode 100644 index 00000000000..ec73b9099f3 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci_config.h @@ -0,0 +1,5 @@ +/* + * Configs for OHCI + */ + +#define CONFIG_PCI diff --git a/reactos/drivers/usb/cromwell/host/ohci_main.c b/reactos/drivers/usb/cromwell/host/ohci_main.c new file mode 100644 index 00000000000..ffb37c81999 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci_main.c @@ -0,0 +1,16 @@ +/* + ReactOS specific functions for ohci module + by Aleksey Bragin (aleksey@reactos.com) +*/ + +#include + + +/* + * Standard DriverEntry method. + */ +NTSTATUS STDCALL +DriverEntry(IN PVOID Context1, IN PVOID Context2) +{ + return STATUS_SUCCESS; +} diff --git a/reactos/drivers/usb/cromwell/linux/asm/bitops.h b/reactos/drivers/usb/cromwell/linux/asm/bitops.h new file mode 100644 index 00000000000..f16396ad4ac --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/asm/bitops.h @@ -0,0 +1,384 @@ +#ifndef _I386_BITOPS_H +#define _I386_BITOPS_H + +/* + * Copyright 1992, Linus Torvalds. + */ + +//#include + +/* + * These have to be done with inline assembly: that way the bit-setting + * is guaranteed to be atomic. All bit operations return 0 if the bit + * was cleared before the operation and != 0 if it was not. + * + * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). + */ + +#ifdef CONFIG_SMP +#define LOCK_PREFIX "lock ; " +#else +#define LOCK_PREFIX "" +#endif + +#define ADDR (*(volatile long *) addr) + +/** + * set_bit - Atomically set a bit in memory + * @nr: the bit to set + * @addr: the address to start counting from + * + * This function is atomic and may not be reordered. See __set_bit() + * if you do not require the atomic guarantees. + * Note that @nr may be almost arbitrarily large; this function is not + * restricted to acting on a single-word quantity. + */ +static __inline__ void set_bit(int nr, volatile void * addr) +{ + __asm__ __volatile__( LOCK_PREFIX + "btsl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} + +/** + * __set_bit - Set a bit in memory + * @nr: the bit to set + * @addr: the address to start counting from + * + * Unlike set_bit(), this function is non-atomic and may be reordered. + * If it's called on the same region of memory simultaneously, the effect + * may be that only one operation succeeds. + */ +static __inline__ void __set_bit(int nr, volatile void * addr) +{ + __asm__( + "btsl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} + +/** + * clear_bit - Clears a bit in memory + * @nr: Bit to clear + * @addr: Address to start counting from + * + * clear_bit() is atomic and may not be reordered. However, it does + * not contain a memory barrier, so if it is used for locking purposes, + * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() + * in order to ensure changes are visible on other processors. + */ +static __inline__ void clear_bit(int nr, volatile void * addr) +{ + __asm__ __volatile__( LOCK_PREFIX + "btrl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} +#define smp_mb__before_clear_bit() barrier() +#define smp_mb__after_clear_bit() barrier() + +/** + * __change_bit - Toggle a bit in memory + * @nr: the bit to set + * @addr: the address to start counting from + * + * Unlike change_bit(), this function is non-atomic and may be reordered. + * If it's called on the same region of memory simultaneously, the effect + * may be that only one operation succeeds. + */ +static __inline__ void __change_bit(int nr, volatile void * addr) +{ + __asm__ __volatile__( + "btcl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} + +/** + * change_bit - Toggle a bit in memory + * @nr: Bit to clear + * @addr: Address to start counting from + * + * change_bit() is atomic and may not be reordered. + * Note that @nr may be almost arbitrarily large; this function is not + * restricted to acting on a single-word quantity. + */ +static __inline__ void change_bit(int nr, volatile void * addr) +{ + __asm__ __volatile__( LOCK_PREFIX + "btcl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} + +/** + * test_and_set_bit - Set a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is atomic and cannot be reordered. + * It also implies a memory barrier. + */ +static __inline__ int test_and_set_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( LOCK_PREFIX + "btsl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr) : "memory"); + return oldbit; +} + +/** + * __test_and_set_bit - Set a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static __inline__ int __test_and_set_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__( + "btsl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr)); + return oldbit; +} + +/** + * test_and_clear_bit - Clear a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is atomic and cannot be reordered. + * It also implies a memory barrier. + */ +static __inline__ int test_and_clear_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( LOCK_PREFIX + "btrl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr) : "memory"); + return oldbit; +} + +/** + * __test_and_clear_bit - Clear a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__( + "btrl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr)); + return oldbit; +} + +/* WARNING: non atomic and it can be reordered! */ +static __inline__ int __test_and_change_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( + "btcl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr) : "memory"); + return oldbit; +} + +/** + * test_and_change_bit - Change a bit and return its new value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is atomic and cannot be reordered. + * It also implies a memory barrier. + */ +static __inline__ int test_and_change_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( LOCK_PREFIX + "btcl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr) : "memory"); + return oldbit; +} + +#if 0 /* Fool kernel-doc since it doesn't do macros yet */ +/** + * test_bit - Determine whether a bit is set + * @nr: bit number to test + * @addr: Address to start counting from + */ +static int test_bit(int nr, const volatile void * addr); +#endif + +static __inline__ int constant_test_bit(int nr, const volatile void * addr) +{ + return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; +} + +static __inline__ int variable_test_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( + "btl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit) + :"m" (ADDR),"Ir" (nr)); + return oldbit; +} + +#define test_bit(nr,addr) \ +(__builtin_constant_p(nr) ? \ + constant_test_bit((nr),(addr)) : \ + variable_test_bit((nr),(addr))) + +/** + * find_first_zero_bit - find the first zero bit in a memory region + * @addr: The address to start the search at + * @size: The maximum size to search + * + * Returns the bit-number of the first zero bit, not the number of the byte + * containing a bit. + */ +static __inline__ int find_first_zero_bit(void * addr, unsigned size) +{ + int d0, d1, d2; + int res; + + if (!size) + return 0; + /* This looks at memory. Mark it volatile to tell gcc not to move it around */ + __asm__ __volatile__( + "movl $-1,%%eax\n\t" + "xorl %%edx,%%edx\n\t" + "repe; scasl\n\t" + "je 1f\n\t" + "xorl -4(%%edi),%%eax\n\t" + "subl $4,%%edi\n\t" + "bsfl %%eax,%%edx\n" + "1:\tsubl %%ebx,%%edi\n\t" + "shll $3,%%edi\n\t" + "addl %%edi,%%edx" + :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2) + :"1" ((size + 31) >> 5), "2" (addr), "b" (addr)); + return res; +} + +/** + * find_next_zero_bit - find the first zero bit in a memory region + * @addr: The address to base the search on + * @offset: The bitnumber to start searching at + * @size: The maximum size to search + */ +static __inline__ int find_next_zero_bit (void * addr, int size, int offset) +{ + unsigned long * p = ((unsigned long *) addr) + (offset >> 5); + int set = 0, bit = offset & 31, res; + + if (bit) { + /* + * Look for zero in first byte + */ + __asm__("bsfl %1,%0\n\t" + "jne 1f\n\t" + "movl $32, %0\n" + "1:" + : "=r" (set) + : "r" (~(*p >> bit))); + if (set < (32 - bit)) + return set + offset; + set = 32 - bit; + p++; + } + /* + * No zero yet, search remaining full bytes for a zero + */ + res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr)); + return (offset + set + res); +} + +/** + * ffz - find first zero in word. + * @word: The word to search + * + * Undefined if no zero exists, so code should check against ~0UL first. + */ +static __inline__ unsigned long ffz(unsigned long word) +{ + __asm__("bsfl %1,%0" + :"=r" (word) + :"r" (~word)); + return word; +} + +#ifdef __KERNEL__ + +/** + * ffs - find first bit set + * @x: the word to search + * + * This is defined the same way as + * the libc and compiler builtin ffs routines, therefore + * differs in spirit from the above ffz (man ffs). + */ +static __inline__ int ffs(int x) +{ + int r; + + __asm__("bsfl %1,%0\n\t" + "jnz 1f\n\t" + "movl $-1,%0\n" + "1:" : "=r" (r) : "rm" (x)); + return r+1; +} + +/** + * hweightN - returns the hamming weight of a N-bit word + * @x: the word to weigh + * + * The Hamming Weight of a number is the total number of bits set in it. + */ + +#define hweight32(x) generic_hweight32(x) +#define hweight16(x) generic_hweight16(x) +#define hweight8(x) generic_hweight8(x) + +#endif /* __KERNEL__ */ + +#ifdef __KERNEL__ + +#define ext2_set_bit __test_and_set_bit +#define ext2_clear_bit __test_and_clear_bit +#define ext2_test_bit test_bit +#define ext2_find_first_zero_bit find_first_zero_bit +#define ext2_find_next_zero_bit find_next_zero_bit + +/* Bitmap functions for the minix filesystem. */ +#define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) __set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) __test_and_clear_bit(nr,addr) +#define minix_test_bit(nr,addr) test_bit(nr,addr) +#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) + +#endif /* __KERNEL__ */ + +#endif /* _I386_BITOPS_H */ diff --git a/reactos/drivers/usb/cromwell/linux/bitops.h b/reactos/drivers/usb/cromwell/linux/bitops.h new file mode 100644 index 00000000000..6509d07ba90 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/bitops.h @@ -0,0 +1,72 @@ +#ifndef _LINUX_BITOPS_H +#define _LINUX_BITOPS_H + + +/* + * ffs: find first bit set. This is defined the same way as + * the libc and compiler builtin ffs routines, therefore + * differs in spirit from the above ffz (man ffs). + */ + +static inline int generic_ffs(int x) +{ + int r = 1; + + if (!x) + return 0; + if (!(x & 0xffff)) { + x >>= 16; + r += 16; + } + if (!(x & 0xff)) { + x >>= 8; + r += 8; + } + if (!(x & 0xf)) { + x >>= 4; + r += 4; + } + if (!(x & 3)) { + x >>= 2; + r += 2; + } + if (!(x & 1)) { + x >>= 1; + r += 1; + } + return r; +} + +/* + * hweightN: returns the hamming weight (i.e. the number + * of bits set) of a N-bit word + */ + +static inline unsigned int generic_hweight32(unsigned int w) +{ + unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555); + res = (res & 0x33333333) + ((res >> 2) & 0x33333333); + res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F); + res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF); + return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF); +} + +static inline unsigned int generic_hweight16(unsigned int w) +{ + unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555); + res = (res & 0x3333) + ((res >> 2) & 0x3333); + res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F); + return (res & 0x00FF) + ((res >> 8) & 0x00FF); +} + +static inline unsigned int generic_hweight8(unsigned int w) +{ + unsigned int res = (w & 0x55) + ((w >> 1) & 0x55); + res = (res & 0x33) + ((res >> 2) & 0x33); + return (res & 0x0F) + ((res >> 4) & 0x0F); +} + +#include "asm/bitops.h" + + +#endif diff --git a/reactos/drivers/usb/cromwell/linux/boot.h b/reactos/drivers/usb/cromwell/linux/boot.h new file mode 100644 index 00000000000..d99b7f22427 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/boot.h @@ -0,0 +1,337 @@ +#ifndef _Boot_H_ +#define _Boot_H_ + +#include "config.h" + +/*************************************************************************** + Includes used by XBox boot code + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +///////////////////////////////// +// configuration + +#include "consts.h" +#include "stdint.h" +#include "cromwell_types.h" + + +unsigned int cromwell_config; +unsigned int cromwell_retryload; +unsigned int cromwell_loadbank; +unsigned int cromwell_Biostype; + +unsigned int xbox_ram; + +#define XROMWELL 0 +#define CROMWELL 1 + +#define ICON_WIDTH 64 +#define ICON_HEIGHT 64 +/* +static double min (double a, double b) +{ + if (a < b) return a; else return b; +} + +static inline double max (double a, double b) +{ + if (a > b) return a; else return b; +} +*/ +//#include "iso_fs.h" +//#include "BootVideo.h" + +//#define ASSERT(exp) { if(!(exp)) { bprintf("Assert failed file " __FILE__ " line %d\n", __LINE__); } } + +#if 0 +extern volatile CURRENT_VIDEO_MODE_DETAILS vmode; +unsigned int video_encoder; + +volatile u32 VIDEO_CURSOR_POSX; +volatile u32 VIDEO_CURSOR_POSY; +volatile u32 VIDEO_ATTR; +volatile u32 VIDEO_LUMASCALING; +volatile u32 VIDEO_RSCALING; +volatile u32 VIDEO_BSCALING; +volatile u32 BIOS_TICK_COUNT; +volatile u32 VIDEO_VSYNC_POSITION; +volatile u32 VIDEO_VSYNC_DIR; +volatile u32 DVD_TRAY_STATE; + +u8 VIDEO_AV_MODE ; + +#define DVD_CLOSED 0 +#define DVD_CLOSING 1 +#define DVD_OPEN 2 +#define DVD_OPENING 3 + +///////////////////////////////// +// Superfunky i386 internal structures + +typedef struct gdt_t { + unsigned short m_wSize __attribute__ ((packed)); + unsigned long m_dwBase32 __attribute__ ((packed)); + unsigned short m_wDummy __attribute__ ((packed)); +} ts_descriptor_pointer; + +typedef struct { // inside an 8-byte protected mode interrupt vector + u16 m_wHandlerHighAddressLow16; + u16 m_wSelector; + u16 m_wType; + u16 m_wHandlerLinearAddressHigh16; +} ts_pm_interrupt; + +typedef enum { + EDT_UNKNOWN= 0, + EDT_XBOXFS +} enumDriveType; + +typedef struct tsHarddiskInfo { // this is the retained knowledge about an IDE device after init + unsigned short m_fwPortBase; + unsigned short m_wCountHeads; + unsigned short m_wCountCylinders; + unsigned short m_wCountSectorsPerTrack; + unsigned long m_dwCountSectorsTotal; /* total */ + unsigned char m_bLbaMode; /* am i lba (0x40) or chs (0x00) */ + unsigned char m_szIdentityModelNumber[40]; + unsigned char term_space_1[2]; + unsigned char m_szSerial[20]; + unsigned char term_space_2[2]; + char m_szFirmware[8]; + unsigned char term_space_3[2]; + unsigned char m_fDriveExists; + unsigned char m_fAtapi; // true if a CDROM, etc + enumDriveType m_enumDriveType; + unsigned char m_bCableConductors; // valid for device 0 if present + unsigned short m_wAtaRevisionSupported; + unsigned char s_length; + unsigned char m_length; + unsigned char m_fHasMbr; + unsigned short m_securitySettings; //This contains the contents of the ATA security regs +} tsHarddiskInfo; + +///////////////////////////////// +// LED-flashing codes +// or these together as argument to I2cSetFrontpanelLed + +enum { + I2C_LED_RED0 = 0x80, + I2C_LED_RED1 = 0x40, + I2C_LED_RED2 = 0x20, + I2C_LED_RED3 = 0x10, + I2C_LED_GREEN0 = 0x08, + I2C_LED_GREEN1 = 0x04, + I2C_LED_GREEN2 = 0x02, + I2C_LED_GREEN3 = 0x01 +}; + +/////////////////////////////// +/* BIOS-wide error codes all have b31 set */ + +enum { + ERR_SUCCESS = 0, // completed without error + + ERR_I2C_ERROR_TIMEOUT = 0x80000001, // I2C action failed because it did not complete in a reasonable time + ERR_I2C_ERROR_BUS = 0x80000002, // I2C action failed due to non retryable bus error + + ERR_BOOT_PIC_ALG_BROKEN = 0x80000101 // PIC algorithm did not pass its self-test +}; + +///////////////////////////////// +// some Boot API prototypes + +//////// BootPerformPicChallengeResponseAction.c + +/* ---------------------------- IO primitives ----------------------------------------------------------- +*/ + +static __inline void IoOutputByte(u16 wAds, u8 bValue) { +// __asm__ (" out %%al,%%dx" : : "edx" (dwAds), "al" (bValue) ); + __asm__ __volatile__ ("outb %b0,%w1": :"a" (bValue), "Nd" (wAds)); +} + +static __inline void IoOutputWord(u16 wAds, u16 wValue) { +// __asm__ (" out %%ax,%%dx " : : "edx" (dwAds), "ax" (wValue) ); + __asm__ __volatile__ ("outw %0,%w1": :"a" (wValue), "Nd" (wAds)); + } + +static __inline void IoOutputDword(u16 wAds, u32 dwValue) { +// __asm__ (" out %%eax,%%dx " : : "edx" (dwAds), "ax" (wValue) ); + __asm__ __volatile__ ("outl %0,%w1": :"a" (dwValue), "Nd" (wAds)); +} + + +static __inline u8 IoInputByte(u16 wAds) { + unsigned char _v; + + __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (wAds)); + return _v; +} + +static __inline u16 IoInputWord(u16 wAds) { + u16 _v; + + __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (wAds)); + return _v; +} + +static __inline u32 IoInputDword(u16 wAds) { + u32 _v; + + __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (wAds)); + return _v; +} + +#define rdmsr(msr,val1,val2) \ + __asm__ __volatile__("rdmsr" \ + : "=a" (val1), "=d" (val2) \ + : "c" (msr)) + +#define wrmsr(msr,val1,val2) \ + __asm__ __volatile__("wrmsr" \ + : /* no outputs */ \ + : "c" (msr), "a" (val1), "d" (val2)) + + +void BootPciInterruptEnable(void); + + // boot process +int BootPerformPicChallengeResponseAction(void); + // LED control (see associated enum above) +int I2cSetFrontpanelLed(u8 b); + +#define bprintf(...) + +#if PRINT_TRACE +#define TRACE bprintf(__FILE__ " :%d\n\r",__LINE__); +#else +#define TRACE +#endif + +typedef struct _LIST_ENTRY { + struct _LIST_ENTRY *m_plistentryNext; + struct _LIST_ENTRY *m_plistentryPrevious; +} LIST_ENTRY; + +void ListEntryInsertAfterCurrent(LIST_ENTRY *plistentryCurrent, LIST_ENTRY *plistentryNew); +void ListEntryRemove(LIST_ENTRY *plistentryCurrent); + +////////// BootPerformXCodeActions.c + +int BootPerformXCodeActions(void); + +#include "BootEEPROM.h" +#include "BootParser.h" + +////////// BootStartBios.c + +void StartBios(CONFIGENTRY *config,int nActivePartition, int nFATXPresent,int bootfrom); +int BootMenu(CONFIGENTRY *config,int nDrive,int nActivePartition, int nFATXPresent); + +////////// BootResetActions.c +void ClearIDT (void); +void BootResetAction(void); +void BootCpuCache(bool fEnable) ; +int printk(const char *szFormat, ...); +void BiosCmosWrite(u8 bAds, u8 bData); +u8 BiosCmosRead(u8 bAds); + + +///////// BootPciPeripheralInitialization.c +void BootPciPeripheralInitialization(void); +void BootAGPBUSInitialization(void); +void BootDetectMemorySize(void); +extern void ReadPCIByte(unsigned int bus, unsigned int dev, unsigned intfunc, unsigned int reg_off, unsigned char *pbyteval); +extern void WritePCIByte(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned char byteval); +extern void ReadPCIDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned int *pdwordval); +extern void WritePCIDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned int dwordval); +extern void ReadPCIBlock(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned char *buf, unsigned int nbytes); +extern void WritePCIBlock(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned char *buf, unsigned int nbytes); + +void PciWriteByte (unsigned int bus, unsigned int dev, unsigned int func, + unsigned int reg_off, unsigned char byteval); +u8 PciReadByte(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off); +u32 PciWriteDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, u32 dw); +u32 PciReadDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off); + +///////// BootPerformPicChallengeResponseAction.c + +int I2CTransmitWord(u8 bPicAddressI2cFormat, u16 wDataToWrite); +int I2CTransmitByteGetReturn(u8 bPicAddressI2cFormat, u8 bDataToWrite); +bool I2CGetTemperature(int *, int *); +void I2CModifyBits(u8 bAds, u8 bReg, u8 bData, u8 bMask); + +///////// BootIde.c + +extern tsHarddiskInfo tsaHarddiskInfo[]; // static struct stores data about attached drives +int BootIdeInit(void); +int BootIdeReadSector(int nDriveIndex, void * pbBuffer, unsigned int block, int byte_offset, int n_bytes); +int BootIdeBootSectorHddOrElTorito(int nDriveIndex, u8 * pbaResult); +int BootIdeAtapiAdditionalSenseCode(int nDrive, u8 * pba, int nLengthMaxReturn); +int BootIdeSetTransferMode(int nIndexDrive, int nMode); +int BootIdeWaitNotBusy(unsigned uIoBase); +bool BootIdeAtapiReportFriendlyError(int nDriveIndex, char * szErrorReturn, int nMaxLengthError); +void BootIdeAtapiPrintkFriendlyError(int nDriveIndex); + +///////// BootUSB.c + +void BootStopUSB(void); +void BootStartUSB(void); +void USBGetEvents(void); + +#include "xpad.h" + +extern struct xpad_data XPAD_current[4]; +extern struct xpad_data XPAD_last[4]; + +extern void wait_ms(u32 ticks); +extern void wait_us(u32 ticks); +extern void wait_smalldelay(void); + + +void * memcpy(void *dest, const void *src, size_t size); +void * memset(void *dest, int data, size_t size); +int memcmp(const void *buffer1, const void *buffer2, size_t num); +int _strncmp(const char *sz1, const char *sz2, int nMax); +char * strcpy(char *sz, const char *szc); +char * _strncpy (char * dest, const char * src, size_t n); +void chrreplace(char *string, char search, char ch); + +#define printf printk +#define sleep wait_ms +int tolower(int ch); +int isspace (int c); + +void MemoryManagementInitialization(void * pvStartAddress, u32 dwTotalMemoryAllocLength); +void * malloc(size_t size); +void free(void *); + +extern volatile int nCountI2cinterrupts, nCountUnusedInterrupts, nCountUnusedInterruptsPic2, nCountInterruptsSmc, nCountInterruptsIde; +extern volatile bool fSeenPowerdown; +typedef enum { + ETS_OPEN_OR_OPENING=0, + ETS_CLOSING, + ETS_CLOSED +} TRAY_STATE; +extern volatile TRAY_STATE traystate; + + +extern void BootInterruptsWriteIdt(void); +#endif +int copy_swap_trim(unsigned char *dst, unsigned char *src, int len); +void HMAC_SHA1( unsigned char *result, + unsigned char *key, int key_length, + unsigned char *text1, int text1_length, + unsigned char *text2, int text2_length ); + +char *strrchr0(char *string, char ch); + +#endif // _Boot_H_ diff --git a/reactos/drivers/usb/cromwell/linux/consts.h b/reactos/drivers/usb/cromwell/linux/consts.h new file mode 100644 index 00000000000..755bf6a5128 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/consts.h @@ -0,0 +1,70 @@ +#ifndef _Consts_H_ +#define _Consts_H_ + +/* + * + * includes for startup code in a form usable by the .S files + * + */ + + /*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#define PCI_CFG_ADDR 0x0CF8 +#define PCI_CFG_DATA 0x0CFC + + +#define I2C_IO_BASE 0xc000 + +#define BUS_0 0 +#define BUS_1 1 + +#define DEV_0 0 +#define DEV_1 1 +#define DEV_2 2 +#define DEV_3 3 +#define DEV_4 4 +#define DEV_5 5 +#define DEV_6 6 +#define DEV_7 7 +#define DEV_8 8 +#define DEV_9 9 +#define DEV_a 0xa +#define DEV_b 0xb +#define DEV_c 0xc +#define DEV_d 0xd +#define DEV_e 0xe +#define DEV_f 0xf +#define DEV_10 0x10 +#define DEV_11 0x11 +#define DEV_12 0x12 +#define DEV_13 0x13 +#define DEV_14 0x14 +#define DEV_15 0x15 +#define DEV_16 0x16 +#define DEV_17 0x17 +#define DEV_18 0x18 +#define DEV_19 0x19 +#define DEV_1a 0x1a +#define DEV_1b 0x1b +#define DEV_1c 0x1c +#define DEV_1d 0x1d +#define DEV_1e 0x1e +#define DEV_1f 0x1f + +#define FUNC_0 0 +/* +#define boot_post_macro(value) \ + movb $(value), %al ;\ + outb %al, $0x80 +*/ + +#endif // _Consts_H_ + + diff --git a/reactos/drivers/usb/cromwell/linux/cromwell_types.h b/reactos/drivers/usb/cromwell/linux/cromwell_types.h new file mode 100644 index 00000000000..d03e9158393 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/cromwell_types.h @@ -0,0 +1,27 @@ +#ifndef cromwell_types_h +#define cromwell_types_h + +///////////////////////////////// +// some typedefs to make for easy sizing + +//typedef unsigned long ULONG; +typedef unsigned int u32; +typedef unsigned short u16; +typedef unsigned char u8; +#ifndef bool_already_defined_ + typedef int bool; +#endif +typedef unsigned long RGBA; // LSB=R -> MSB = A +//typedef long long __int64; + +#define guint int +#define guint8 unsigned char + +#define true 1 +#define false 0 + +#ifndef NULL +#define NULL ((void *)0) +#endif + +#endif /* #ifndef cromwell_types_h */ diff --git a/reactos/drivers/usb/cromwell/linux/errno.h b/reactos/drivers/usb/cromwell/linux/errno.h new file mode 100644 index 00000000000..dcd2ede98d7 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/errno.h @@ -0,0 +1,132 @@ +#ifndef _I386_ERRNO_H +#define _I386_ERRNO_H + +#define EPERM 1 /* Operation not permitted */ +#define ENOENT 2 /* No such file or directory */ +#define ESRCH 3 /* No such process */ +#define EINTR 4 /* Interrupted system call */ +#define EIO 5 /* I/O error */ +#define ENXIO 6 /* No such device or address */ +#define E2BIG 7 /* Argument list too long */ +#define ENOEXEC 8 /* Exec format error */ +#define EBADF 9 /* Bad file number */ +#define ECHILD 10 /* No child processes */ +#define EAGAIN 11 /* Try again */ +#define ENOMEM 12 /* Out of memory */ +#define EACCES 13 /* Permission denied */ +#define EFAULT 14 /* Bad address */ +#define ENOTBLK 15 /* Block device required */ +#define EBUSY 16 /* Device or resource busy */ +#define EEXIST 17 /* File exists */ +#define EXDEV 18 /* Cross-device link */ +#define ENODEV 19 /* No such device */ +#define ENOTDIR 20 /* Not a directory */ +#define EISDIR 21 /* Is a directory */ +#define EINVAL 22 /* Invalid argument */ +#define ENFILE 23 /* File table overflow */ +#define EMFILE 24 /* Too many open files */ +#define ENOTTY 25 /* Not a typewriter */ +#define ETXTBSY 26 /* Text file busy */ +#define EFBIG 27 /* File too large */ +#define ENOSPC 28 /* No space left on device */ +#define ESPIPE 29 /* Illegal seek */ +#define EROFS 30 /* Read-only file system */ +#define EMLINK 31 /* Too many links */ +#define EPIPE 32 /* Broken pipe */ +#define EDOM 33 /* Math argument out of domain of func */ +#define ERANGE 34 /* Math result not representable */ +#define EDEADLK 35 /* Resource deadlock would occur */ +#define ENAMETOOLONG 36 /* File name too long */ +#define ENOLCK 37 /* No record locks available */ +#define ENOSYS 38 /* Function not implemented */ +#define ENOTEMPTY 39 /* Directory not empty */ +#define ELOOP 40 /* Too many symbolic links encountered */ +#define EWOULDBLOCK EAGAIN /* Operation would block */ +#define ENOMSG 42 /* No message of desired type */ +#define EIDRM 43 /* Identifier removed */ +#define ECHRNG 44 /* Channel number out of range */ +#define EL2NSYNC 45 /* Level 2 not synchronized */ +#define EL3HLT 46 /* Level 3 halted */ +#define EL3RST 47 /* Level 3 reset */ +#define ELNRNG 48 /* Link number out of range */ +#define EUNATCH 49 /* Protocol driver not attached */ +#define ENOCSI 50 /* No CSI structure available */ +#define EL2HLT 51 /* Level 2 halted */ +#define EBADE 52 /* Invalid exchange */ +#define EBADR 53 /* Invalid request descriptor */ +#define EXFULL 54 /* Exchange full */ +#define ENOANO 55 /* No anode */ +#define EBADRQC 56 /* Invalid request code */ +#define EBADSLT 57 /* Invalid slot */ + +#define EDEADLOCK EDEADLK + +#define EBFONT 59 /* Bad font file format */ +#define ENOSTR 60 /* Device not a stream */ +#define ENODATA 61 /* No data available */ +#define ETIME 62 /* Timer expired */ +#define ENOSR 63 /* Out of streams resources */ +#define ENONET 64 /* Machine is not on the network */ +#define ENOPKG 65 /* Package not installed */ +#define EREMOTE 66 /* Object is remote */ +#define ENOLINK 67 /* Link has been severed */ +#define EADV 68 /* Advertise error */ +#define ESRMNT 69 /* Srmount error */ +#define ECOMM 70 /* Communication error on send */ +#define EPROTO 71 /* Protocol error */ +#define EMULTIHOP 72 /* Multihop attempted */ +#define EDOTDOT 73 /* RFS specific error */ +#define EBADMSG 74 /* Not a data message */ +#define EOVERFLOW 75 /* Value too large for defined data type */ +#define ENOTUNIQ 76 /* Name not unique on network */ +#define EBADFD 77 /* File descriptor in bad state */ +#define EREMCHG 78 /* Remote address changed */ +#define ELIBACC 79 /* Can not access a needed shared library */ +#define ELIBBAD 80 /* Accessing a corrupted shared library */ +#define ELIBSCN 81 /* .lib section in a.out corrupted */ +#define ELIBMAX 82 /* Attempting to link in too many shared libraries */ +#define ELIBEXEC 83 /* Cannot exec a shared library directly */ +#define EILSEQ 84 /* Illegal byte sequence */ +#define ERESTART 85 /* Interrupted system call should be restarted */ +#define ESTRPIPE 86 /* Streams pipe error */ +#define EUSERS 87 /* Too many users */ +#define ENOTSOCK 88 /* Socket operation on non-socket */ +#define EDESTADDRREQ 89 /* Destination address required */ +#define EMSGSIZE 90 /* Message too long */ +#define EPROTOTYPE 91 /* Protocol wrong type for socket */ +#define ENOPROTOOPT 92 /* Protocol not available */ +#define EPROTONOSUPPORT 93 /* Protocol not supported */ +#define ESOCKTNOSUPPORT 94 /* Socket type not supported */ +#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ +#define EPFNOSUPPORT 96 /* Protocol family not supported */ +#define EAFNOSUPPORT 97 /* Address family not supported by protocol */ +#define EADDRINUSE 98 /* Address already in use */ +#define EADDRNOTAVAIL 99 /* Cannot assign requested address */ +#define ENETDOWN 100 /* Network is down */ +#define ENETUNREACH 101 /* Network is unreachable */ +#define ENETRESET 102 /* Network dropped connection because of reset */ +#define ECONNABORTED 103 /* Software caused connection abort */ +#define ECONNRESET 104 /* Connection reset by peer */ +#define ENOBUFS 105 /* No buffer space available */ +#define EISCONN 106 /* Transport endpoint is already connected */ +#define ENOTCONN 107 /* Transport endpoint is not connected */ +#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ +#define ETOOMANYREFS 109 /* Too many references: cannot splice */ +#define ETIMEDOUT 110 /* Connection timed out */ +#define ECONNREFUSED 111 /* Connection refused */ +#define EHOSTDOWN 112 /* Host is down */ +#define EHOSTUNREACH 113 /* No route to host */ +#define EALREADY 114 /* Operation already in progress */ +#define EINPROGRESS 115 /* Operation now in progress */ +#define ESTALE 116 /* Stale NFS file handle */ +#define EUCLEAN 117 /* Structure needs cleaning */ +#define ENOTNAM 118 /* Not a XENIX named type file */ +#define ENAVAIL 119 /* No XENIX semaphores available */ +#define EISNAM 120 /* Is a named type file */ +#define EREMOTEIO 121 /* Remote I/O error */ +#define EDQUOT 122 /* Quota exceeded */ + +#define ENOMEDIUM 123 /* No medium found */ +#define EMEDIUMTYPE 124 /* Wrong medium type */ + +#endif diff --git a/reactos/drivers/usb/cromwell/linux/linux_wrapper.h b/reactos/drivers/usb/cromwell/linux/linux_wrapper.h new file mode 100644 index 00000000000..4518f9dcada --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/linux_wrapper.h @@ -0,0 +1,762 @@ +/* + * linux-wrapper.h + * + * Hard coded Linux kernel replacements for x86 + * + * (c) 2003 Georg Acher (georg@acher.org) + * + * Emulation of: + * typedefs + * structs + * macros + * + * All structs and prototypes are based on kernel source 2.5.72 + * + * #include + */ + +/*------------------------------------------------------------------------*/ +/* Typedefs */ +/*------------------------------------------------------------------------*/ +#include "cromwell_types.h" + +typedef unsigned int __u32; +//typedef __u32 u32; +typedef unsigned short __u16; +//typedef __u16 u16; +typedef unsigned char __u8; +//typedef __u8 u8; + +typedef short s16; + +typedef u32 dma_addr_t; + +typedef int spinlock_t; +typedef int atomic_t; +#ifndef STANDALONE +typedef int mode_t; +typedef int pid_t; +typedef int ssize_t; + +#endif +typedef int irqreturn_t; +typedef unsigned long kernel_ulong_t; + +typedef int wait_queue_head_t; +/*------------------------------------------------------------------------*/ +/* Stuff from xbox/linux environment */ +/*------------------------------------------------------------------------*/ + +#include "list.h" + +#ifndef STANDALONE +#ifdef MODULE +typedef int size_t; +#define NULL ((void*)0) +extern void * memset(void *,int,unsigned int); +extern void * memcpy(void *,const void *,unsigned int); +#if 0 +extern char * strcpy(char *,const char *); +#else +static inline char * strcpy(char * dest,const char *src) +{ +int d0, d1, d2; +__asm__ __volatile__( + "1:\tlodsb\n\t" + "stosb\n\t" + "testb %%al,%%al\n\t" + "jne 1b" + : "=&S" (d0), "=&D" (d1), "=&a" (d2) + :"0" (src),"1" (dest) : "memory"); +return dest; +} +#endif +extern size_t strlen(const char *); + +extern int memcmp(const void *,const void *,unsigned int); + +#else +#include "boot.h" +#include "config.h" +#endif +#else +#include +#include +#include +#include "consts.h" +#include +#endif + +/*------------------------------------------------------------------------*/ +/* General structs */ +/*------------------------------------------------------------------------*/ + +struct timer_list { + void (*function)(unsigned long); + unsigned long data; + int expires; + struct list_head timer_list; +}; + +struct work_struct { + void (*func)(void *); +}; +struct device { + char name[128]; + struct bus_type *bus; + int dma_mask; + char bus_id[16]; + struct device_driver* driver; + void *driver_data; + struct device *parent; + struct list_head driver_list; + void (*release)(struct device * dev); +}; +struct class_device{int a;}; +struct semaphore{int a;}; + +struct device_driver{ + char *name; + struct bus_type *bus; + int (*probe) (struct device * dev); + int (*remove) (struct device * dev); + struct list_head devices; +}; + +struct bus_type { + char * name; + int (*match)(struct device * dev, struct device_driver * drv); + struct device * (*add) (struct device * parent, char * bus_id); + int (*hotplug) (struct device *dev, char **envp, + int num_envp, char *buffer, int buffer_size); +}; + +struct dummy_process +{ + int flags; +}; + +struct pt_regs +{ + int a; +}; +struct completion { + unsigned int done; + wait_queue_head_t wait; +}; + +/* from mod_devicetable.h */ + +struct usb_device_id { + /* which fields to match against? */ + __u16 match_flags; + + /* Used for product specific matches; range is inclusive */ + __u16 idVendor; + __u16 idProduct; + __u16 bcdDevice_lo; + __u16 bcdDevice_hi; + + /* Used for device class matches */ + __u8 bDeviceClass; + __u8 bDeviceSubClass; + __u8 bDeviceProtocol; + + /* Used for interface class matches */ + __u8 bInterfaceClass; + __u8 bInterfaceSubClass; + __u8 bInterfaceProtocol; + + /* not matched against */ + kernel_ulong_t driver_info; +}; + +/* Some useful macros to use to create struct usb_device_id */ +#define USB_DEVICE_ID_MATCH_VENDOR 0x0001 +#define USB_DEVICE_ID_MATCH_PRODUCT 0x0002 +#define USB_DEVICE_ID_MATCH_DEV_LO 0x0004 +#define USB_DEVICE_ID_MATCH_DEV_HI 0x0008 +#define USB_DEVICE_ID_MATCH_DEV_CLASS 0x0010 +#define USB_DEVICE_ID_MATCH_DEV_SUBCLASS 0x0020 +#define USB_DEVICE_ID_MATCH_DEV_PROTOCOL 0x0040 +#define USB_DEVICE_ID_MATCH_INT_CLASS 0x0080 +#define USB_DEVICE_ID_MATCH_INT_SUBCLASS 0x0100 +#define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200 + +/*------------------------------------------------------------------------*/ +/* imported functions from top-level */ +/*------------------------------------------------------------------------*/ + +//void zxprintf(char* fmt, ...); +//void zxsprintf(char *buffer, char* fmt, ...); +//int zxsnprintf(char *buffer, size_t s, char* fmt, ...); + +/*------------------------------------------------------------------------*/ +/* PCI structs (taken from linux/pci.h et al., but slightly modified) */ +/*------------------------------------------------------------------------*/ + +struct pci_dev { + int vendor; + int device; + struct pci_bus *bus; + int irq; + char *slot_name; + struct device dev; + int base[4]; + int flags[4]; + void * data; +}; + +struct pci_bus { + unsigned char number; +}; + +struct pci_device_id { + __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/ + __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */ + __u32 class, class_mask; /* (class,subclass,prog-if) triplet */ + kernel_ulong_t driver_data; /* Data private to the driver */ +}; + +struct pci_driver { + struct list_head node; + char *name; + const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */ + int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ + void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ + int (*save_state) (struct pci_dev *dev, u32 state); /* Save Device Context */ + int (*suspend) (struct pci_dev *dev, u32 state); /* Device suspended */ + int (*resume) (struct pci_dev *dev); /* Device woken up */ + int (*enable_wake) (struct pci_dev *dev, u32 state, int enable); /* Enable wake event */ +}; + +struct scatterlist +{ + int page; + int offset; + int length; +}; + +struct usbdevfs_hub_portinfo +{ + int nports; + int port[8]; +}; + +/*------------------------------------------------------------------------*/ +/* constant defines */ +/*------------------------------------------------------------------------*/ + +#define TASK_UNINTERRUPTIBLE 0 +#define HZ 100 /* Don't rely on that... */ +#define KERN_DEBUG "DBG: " +#define KERN_ERR "ERR: " +#define KERN_WARNING "WRN: " +#define KERN_INFO "INF: " +#define GFP_KERNEL 0 +#define GFP_ATOMIC 0 +#define GFP_NOIO 0 +#define SLAB_ATOMIC 0 +#define PCI_ANY_ID (~0) +#define SIGKILL 9 +#define THIS_MODULE 0 +//#define PAGE_SIZE 4096 + + +#define CLONE_FS 0 +#define CLONE_FILES 0 +#define CLONE_SIGHAND 0 +#define PF_FREEZE 0 +#define PF_IOTHREAD 0 + + +#define USBDEVFS_HUB_PORTINFO 1234 +#define SA_SHIRQ 0 + +#undef PCI_COMMAND +#define PCI_COMMAND 0 +#undef PCI_COMMAND_MASTER +#define PCI_COMMAND_MASTER 0 +/*------------------------------------------------------------------------*/ +/* Module/export macros */ +/*------------------------------------------------------------------------*/ + +#define MODULE_AUTHOR(a) +#define MODULE_DESCRIPTION(a) +#define MODULE_LICENSE(a) +#define MODULE_DEVICE_TABLE(type,name) void* module_table_##name=&name + +#define __devinit +#define __exit +#define __init +#define __devinitdata +#define module_init(x) static void module_init_##x(void){ x();} +#define module_exit(x) void module_exit_##x(void){ x();} +#define EXPORT_SYMBOL_GPL(x) +#define EXPORT_SYMBOL(x) + +#define __setup(x,y) int setup_##y=(int)y +#define subsys_initcall(x) void subsys_##x(void){x();} + +/*------------------------------------------------------------------------*/ +/* Access macros */ +/*------------------------------------------------------------------------*/ + +#define dev_get_drvdata(a) (a)->driver_data +#define dev_set_drvdata(a,b) (a)->driver_data=(b) + +#define __io_virt(x) ((void *)(x)) +#define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) +#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) +#define likely(x) (x) +#define unlikely(x) (x) +#define prefetch(x) 1 + +/* The kernel macro for list_for_each_entry makes nonsense (have no clue + * why, this is just the same definition...) */ + +#undef list_for_each_entry +#define list_for_each_entry(pos, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member), \ + prefetch(pos->member.next); \ + &pos->member != (head); \ + pos = list_entry(pos->member.next, typeof(*pos), member), \ + prefetch(pos->member.next)) + +/*------------------------------------------------------------------------*/ +/* function wrapper macros */ +/*------------------------------------------------------------------------*/ +#define kmalloc(x,y) ExAllocatePool(PagedPool,x) +#define kfree(x) ExFreePool(x) + +//#define sprintf(a,b,format, arg...) zxsprintf((a),(b),format, ## arg) +//#define snprintf(a,b,format, arg...) zxsnprintf((a),(b),format, ##arg) +//#define printk(format, arg...) zxprintf(format, ## arg) +#define snprintf(a,b,format, arg...) _snprintf((a),(b),format, ##arg) +#define printk(format, arg...) DPRINT1(format, ## arg) +#define BUG(...) do {} while(0) + +/* Locks & friends */ + +#define DECLARE_MUTEX(x) struct semaphore x +#define init_MUTEX(x) + +#define SPIN_LOCK_UNLOCKED 0 +#define spin_lock_init(a) do {} while(0) +#define spin_lock(a) *(int*)a=1 +#define spin_unlock(a) do {} while(0) + +#define spin_lock_irqsave(a,b) b=0 +#define spin_unlock_irqrestore(a,b) + +#if 0 +#define local_irq_save(x) __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory") +#define local_irq_restore(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory", "cc") +#else +#define local_irq_save(x) do {} while(0) +#define local_irq_restore(x) do {} while(0) +#endif + +#define atomic_inc(x) *(x)+=1 +#define atomic_dec(x) *(x)-=1 +#define atomic_dec_and_test(x) (*(x)-=1,(*(x))==0) +#define atomic_set(x,a) *(x)=a +#define atomic_read(x) *(x) +#define ATOMIC_INIT(x) (x) + +#define down(x) do {} while(0) +#define up(x) do {} while(0) +#define down_trylock(a) 0 + +#define down_read(a) do {} while(0) +#define up_read(a) do {} while(0) + +#define DECLARE_WAIT_QUEUE_HEAD(x) int x + +#define DECLARE_COMPLETION(x) struct completion x + +/* driver */ + +#define driver_unregister(a) do {} while(0) +#define put_device(a) do {} while(0) + + +/* PCI */ +#define pci_pool_create(a,b,c,d,e) (void*)1 + +#define pci_pool_alloc(a,b,c) my_pci_pool_alloc(a,b,c) + +static void __inline__ *my_pci_pool_alloc(void* pool, size_t size, + dma_addr_t *dma_handle) +{ + void* a; + a=kmalloc(size,0); //FIXME +#ifdef MODULE + *dma_handle=((u32)a)&0xfffffff; +#else + *dma_handle=(u32)a; +#endif + return a; +} + + +#define pci_pool_free(a,b,c) kfree(b) +#define pci_alloc_consistent(a,b,c) my_pci_alloc_consistent(a,b,c) + +static void __inline__ *my_pci_alloc_consistent(struct pci_dev *hwdev, size_t size, + dma_addr_t *dma_handle) +{ + void* a; + + a=kmalloc(size+256,0); //FIXME + a=(void*)(((int)a+255)&~255); // 256 alignment + *dma_handle=((u32)a)&0xfffffff; + + return a; +} + +#define pci_free_consistent(a,b,c,d) kfree(c) +#define pci_pool_destroy(a) do {} while(0) + +#define pci_module_init(x) my_pci_module_init(x) +int my_pci_module_init(struct pci_driver *x); + +#define pci_unregister_driver(a) do {} while(0) + +#define bus_register(a) do {} while(0) +#define bus_unregister(a) do {} while(0) + +#define dma_map_single(a,b,c,d) ((u32)(b)&0xfffffff) +#define dma_unmap_single(a,b,c,d) do {} while(0) +#define pci_unmap_single(a,b,c,d) do {} while(0) +#define dma_sync_single(a,b,c,d) do {} while(0) +#define dma_sync_sg(a,b,c,d) do {} while(0) +#define dma_map_sg(a,b,c,d) 0 +#define dma_unmap_sg(a,b,c,d) do {} while(0) + +#define usb_create_driverfs_dev_files(a) do {} while(0) +#define usb_create_driverfs_intf_files(a) do {} while(0) +#define sg_dma_address(x) ((u32)((x)->page*4096 + (x)->offset)) +#define sg_dma_len(x) ((x)->length) + +#define page_address(x) ((void*)(x/4096)) + +#define DMA_TO_DEVICE 0 +#define DMA_FROM_DEVICE 0 +#define PCI_DMA_TODEVICE +#define PCI_DMA_FROMDEVICE +#define PCI_DMA_TODEVICE + +#define PCI_ROM_RESOURCE 0 +#define IORESOURCE_IO 1 + +#define DECLARE_WAITQUEUE(a,b) wait_queue_head_t a=0 +#define init_waitqueue_head(a) do {} while(0) +#define add_wait_queue(a,b) do {} while(0) +#define remove_wait_queue(a,b) do {} while(0) + +#define wmb() __asm__ __volatile__ ("": : :"memory") +#define rmb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory") + +#define in_interrupt() 0 + +#define init_completion(x) (x)->done=0 +#define wait_for_completion(x) my_wait_for_completion(x) +void my_wait_for_completion(struct completion*); + +#define IRQ_NONE 0 +#define IRQ_HANDLED 1 + +#define INIT_WORK(a,b,c) (a)->func=b + +#define set_current_state(a) do {} while(0) + +#define might_sleep() do {} while(0) +#define daemonize(a) do {} while(0) +#define allow_signal(a) do {} while(0) +#define wait_event_interruptible(x,y) do {} while(0) +#define flush_scheduled_work() do {} while(0) +#define refrigerator(x) do {} while(0) +#define signal_pending(x) 1 // fall through threads +#define complete_and_exit(a,b) return 0 + +#define kill_proc(a,b,c) 0 +#define yield() do {} while(0) +#define cpu_relax() do {} while(0) + +/*------------------------------------------------------------------------*/ +/* Kernel macros */ +/*------------------------------------------------------------------------*/ + +#define LINUX_VERSION_CODE 0x020572 +#define UTS_SYSNAME "XBOX" +#define UTS_RELEASE "----" + +/* from linux/kernel.h */ +#define max_t(type,x,y) \ + ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) + +#define min_t(type,x,y) \ + ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) + +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + +/* from linux/stddef.h */ + +#undef offsetof +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + +/*------------------------------------------------------------------------*/ +/* Conversion macros */ +/*------------------------------------------------------------------------*/ + +#define __constant_cpu_to_le32(x) (x) +#define cpu_to_le16(x) (x) +#define le16_to_cpu(x) (x) +#define cpu_to_le32(x) (x) +#define cpu_to_le32p(x) (*(__u32*)(x)) +#define le32_to_cpup(x) (*(__u32*)(x)) +#define le32_to_cpu(x) ((u32)x) +#define le16_to_cpus(x) do {} while (0) +#define le16_to_cpup(x) (*(__u16*)(x)) +#define cpu_to_le16p(x) (*(__u16*)(x)) + +/*------------------------------------------------------------------------*/ +/* Debug output */ +/*------------------------------------------------------------------------*/ +#ifdef DEBUG_MODE +#define dev_printk(lvl,x,f,arg...) printk(f, ## arg) +#define dev_dbg(x,f,arg...) do {} while (0) //printk(f, ## arg) +#define dev_info(x,f,arg...) printk(f,## arg) +#define dev_warn(x,f,arg...) printk(f,## arg) +#define dev_err(x,f,arg...) printk(f,## arg) +#define pr_debug(x,f,arg...) printk(f,## arg) +#define usbprintk printk +#endif + +#ifndef DEBUG_MODE +#define dev_printk(lvl,x,f,arg...) do {} while (0) +#define dev_dbg(x,f,arg...) do {} while (0) //printk(f, ## arg) +#define dev_info(x,f,arg...) do {} while (0) +#define dev_warn(x,f,arg...) do {} while (0) +#define dev_err(x,f,arg...) do {} while (0) +#define pr_debug(x,f,arg...) do {} while (0) +#define usbprintk +#endif + + + +#define PCI_DEVFN(a,b) 0 +#define PCI_SLOT(a) 0 + +/*------------------------------------------------------------------------*/ +/* Stuff from kernel */ +/*------------------------------------------------------------------------*/ + +#include "errno.h" +#include "bitops.h" +//#include "linux/pci_ids.h" + +/*------------------------------------------------------------------------*/ +/* global variables */ +/*------------------------------------------------------------------------*/ + +#define jiffies my_jiffies +extern int my_jiffies; +#define current my_current +extern struct dummy_process *my_current; + +extern struct list_head interrupt_list; + +/*------------------------------------------------------------------------*/ +/* Function prototypes */ +/*------------------------------------------------------------------------*/ +void STDCALL usb_hcd_pci_remove (struct pci_dev *dev); + +#define my_wait_ms(x) wait_ms(x) + +#define my_udelay(x) wait_ms(x) +#define udelay(x) my_udelay(x) + +#define my_mdelay(x) wait_ms(1+x/1000); +#define mdelay(x) my_mdelay(x); + +#define pci_find_slot(a,b) my_pci_find_slot(a,b) +struct pci_dev *my_pci_find_slot(int a,int b); + +/*------------------------------------------------------------------------*/ +/* Timer management */ +/*------------------------------------------------------------------------*/ + +#define MAX_TIMERS 20 +extern struct timer_list *main_timer_list[MAX_TIMERS]; + +static void __inline__ init_timer(struct timer_list* t) +{ + INIT_LIST_HEAD(&t->timer_list); + t->function=NULL; + t->expires=0; +} + +static void __inline__ add_timer(struct timer_list* t) +{ + int n; + for(n=0;nexpires=ex; + add_timer(t); +} + +/*------------------------------------------------------------------------*/ +/* Device driver and process related stuff */ +/*------------------------------------------------------------------------*/ + +static int __inline__ usb_major_init(void){return 0;} +static void __inline__ usb_major_cleanup(void){} +static void __inline__ schedule_work(void* p){} + +#define device_initialize(x) my_device_initialize(x) +void my_device_initialize(struct device *dev); + +#define get_device(x) my_get_device(x) +struct device *my_get_device(struct device *dev); + +#define device_add(x) my_device_add(x) +int my_device_add(struct device *dev); + +#define driver_register(x) my_driver_register(x) +int my_driver_register(struct device_driver *driver); + +#define device_unregister(a) my_device_unregister(a) +int my_device_unregister(struct device *dev); + +#define DEVICE_ATTR(a,b,c,d) int xxx_##a +#define device_create_file(a,b) do {} while(0) +#define device_remove_file(a,b) do {} while(0) + +#define schedule_timeout(x) my_schedule_timeout(x) +int my_schedule_timeout(int x); + +#define wake_up(x) my_wake_up(x) +void my_wake_up(void*); + +// cannot be mapped via macro due to collision with urb->complete +static void __inline__ complete(struct completion *p) +{ + /* Wake up x->wait */ + p->done++; + wake_up(&p->wait); +} + +#define kernel_thread(a,b,c) my_kernel_thread(a,b,c) +int my_kernel_thread(int (*handler)(void*), void* parm, int flags); + +/*------------------------------------------------------------------------*/ +/* PCI, simple and inlined... */ +/*------------------------------------------------------------------------*/ +static int __inline__ pci_enable_device(struct pci_dev *dev) {return 0;} + +static unsigned long __inline__ pci_resource_start (struct pci_dev *dev, int x) +{ + return dev->base[x]; +} + +static unsigned long __inline__ pci_resource_len (struct pci_dev *dev, int x){return 0;} + +static int __inline__ request_mem_region(unsigned long addr, unsigned long len, const char * d){return 1;} + +static void __inline__ *ioremap_nocache(unsigned long addr, unsigned long len) +{ + return (void*)addr; +} + +static int __inline__ release_mem_region(unsigned long addr, unsigned long len){return 0;} + +static int __inline__ pci_resource_flags(struct pci_dev *dev, int x) +{ + return dev->flags[x]; +} + +static int __inline__ request_region(unsigned long addr, unsigned long len, const char * d){return 0;} + +static int __inline__ pci_set_master(struct pci_dev *dev){return 0;} + +static int __inline__ iounmap(void* p){return 0;} + +static int __inline__ release_region(unsigned long addr, unsigned long len){return 0;} + +static int __inline__ pci_set_drvdata(struct pci_dev *dev, void* d) +{ + dev->data=(void*)d; + return 0; +} + +static void __inline__ *pci_get_drvdata(struct pci_dev *dev) +{ + return dev->data; +} + +/*------------------------------------------------------------------------*/ +/* IRQ handling */ +/*------------------------------------------------------------------------*/ + +#define request_irq(a,b,c,d,e) my_request_irq(a,b,c,d,e) +int my_request_irq(unsigned int irq, + int (*handler)(int, void *, struct pt_regs *), + unsigned long mode, const char *desc, void *data); + +#define free_irq(a,b) my_free_irq(a,b) +int free_irq(int irq, void* p); + + + +struct my_irqs { + int (*handler)(int, void *, struct pt_regs *); + int irq; + void* data; +}; + +#define MAX_IRQS 8 + +// Exported to top level + +void handle_irqs(int irq); +void inc_jiffies(int); +void init_wrapper(void); +void do_all_timers(void); + +#define __KERNEL_DS 0x18 + + diff --git a/reactos/drivers/usb/cromwell/linux/list.h b/reactos/drivers/usb/cromwell/linux/list.h new file mode 100644 index 00000000000..fbbfabed39a --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/list.h @@ -0,0 +1,224 @@ +#ifndef _BOOT_LIST_H +#define _BOOT_LIST_H + +/* + * Simple doubly linked list implementation. + * + * Some of the internal functions ("__xxx") are useful when + * manipulating whole lists rather than single entries, as + * sometimes we already know the next/prev entries and we can + * generate better code by using them directly rather than + * using the generic single-entry routines. + */ + +struct list_head { + struct list_head *next, *prev; +}; + +#define LIST_HEAD_INIT(name) { &(name), &(name) } + +#define LIST_HEAD(name) \ + struct list_head name = LIST_HEAD_INIT(name) + +#define INIT_LIST_HEAD(ptr) do { \ + (ptr)->next = (ptr); (ptr)->prev = (ptr); \ +} while (0) + +/* + * Insert a new entry between two known consecutive entries. + * + * This is only for internal list manipulation where we know + * the prev/next entries already! + */ +static inline void __list_add(struct list_head *new, + struct list_head *prev, + struct list_head *next) +{ + next->prev = new; + new->next = next; + new->prev = prev; + prev->next = new; +} + +/** + * list_add - add a new entry + * @new: new entry to be added + * @head: list head to add it after + * + * Insert a new entry after the specified head. + * This is good for implementing stacks. + */ +static inline void list_add(struct list_head *new, struct list_head *head) +{ + __list_add(new, head, head->next); +} + +/** + * list_add_tail - add a new entry + * @new: new entry to be added + * @head: list head to add it before + * + * Insert a new entry before the specified head. + * This is useful for implementing queues. + */ +static inline void list_add_tail(struct list_head *new, struct list_head *head) +{ + __list_add(new, head->prev, head); +} + +/* + * Delete a list entry by making the prev/next entries + * point to each other. + * + * This is only for internal list manipulation where we know + * the prev/next entries already! + */ +static inline void __list_del(struct list_head *prev, struct list_head *next) +{ + next->prev = prev; + prev->next = next; +} + +/** + * list_del - deletes entry from list. + * @entry: the element to delete from the list. + * Note: list_empty on entry does not return true after this, the entry is in an undefined state. + */ +static inline void list_del(struct list_head *entry) +{ + __list_del(entry->prev, entry->next); + entry->next = (void *) 0; + entry->prev = (void *) 0; +} + +/** + * list_del_init - deletes entry from list and reinitialize it. + * @entry: the element to delete from the list. + */ +static inline void list_del_init(struct list_head *entry) +{ + __list_del(entry->prev, entry->next); + INIT_LIST_HEAD(entry); +} + +/** + * list_move - delete from one list and add as another's head + * @list: the entry to move + * @head: the head that will precede our entry + */ +static inline void list_move(struct list_head *list, struct list_head *head) +{ + __list_del(list->prev, list->next); + list_add(list, head); +} + +/** + * list_move_tail - delete from one list and add as another's tail + * @list: the entry to move + * @head: the head that will follow our entry + */ +static inline void list_move_tail(struct list_head *list, + struct list_head *head) +{ + __list_del(list->prev, list->next); + list_add_tail(list, head); +} + +/** + * list_empty - tests whether a list is empty + * @head: the list to test. + */ +static inline int list_empty(struct list_head *head) +{ + return head->next == head; +} + +static inline void __list_splice(struct list_head *list, + struct list_head *head) +{ + struct list_head *first = list->next; + struct list_head *last = list->prev; + struct list_head *at = head->next; + + first->prev = head; + head->next = first; + + last->next = at; + at->prev = last; +} + +/** + * list_splice - join two lists + * @list: the new list to add. + * @head: the place to add it in the first list. + */ +static inline void list_splice(struct list_head *list, struct list_head *head) +{ + if (!list_empty(list)) + __list_splice(list, head); +} + +/** + * list_splice_init - join two lists and reinitialise the emptied list. + * @list: the new list to add. + * @head: the place to add it in the first list. + * + * The list at @list is reinitialised + */ +static inline void list_splice_init(struct list_head *list, + struct list_head *head) +{ + if (!list_empty(list)) { + __list_splice(list, head); + INIT_LIST_HEAD(list); + } +} + +/** + * list_entry - get the struct for this entry + * @ptr: the &struct list_head pointer. + * @type: the type of the struct this is embedded in. + * @member: the name of the list_struct within the struct. + */ +#define list_entry(ptr, type, member) \ + ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) + +/** + * list_for_each - iterate over a list + * @pos: the &struct list_head to use as a loop counter. + * @head: the head for your list. + */ +#define list_for_each(pos, head) \ + for (pos = (head)->next; pos != (head); \ + pos = pos->next) +/** + * list_for_each_prev - iterate over a list backwards + * @pos: the &struct list_head to use as a loop counter. + * @head: the head for your list. + */ +#define list_for_each_prev(pos, head) \ + for (pos = (head)->prev; pos != (head); \ + pos = pos->prev) + +/** + * list_for_each_safe - iterate over a list safe against removal of list entry + * @pos: the &struct list_head to use as a loop counter. + * @n: another &struct list_head to use as temporary storage + * @head: the head for your list. + */ +#define list_for_each_safe(pos, n, head) \ + for (pos = (head)->next, n = pos->next; pos != (head); \ + pos = n, n = pos->next) + +/** + * list_for_each_entry - iterate over list of given type + * @pos: the type * to use as a loop counter. + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + */ +#define list_for_each_entry(pos, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member) \ + &pos->member != (head); \ + pos = list_entry(pos->member.next, typeof(*pos), member)) + +#endif diff --git a/reactos/drivers/usb/cromwell/linux/pci_ids.h b/reactos/drivers/usb/cromwell/linux/pci_ids.h new file mode 100644 index 00000000000..73c93372e04 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/pci_ids.h @@ -0,0 +1,11 @@ +#ifndef PCI_IDS__H +#define PCI_IDS__H + +#define PCI_VENDOR_ID_NS 0x100b +#define PCI_DEVICE_ID_NS_87560_LIO 0x000e +#define PCI_VENDOR_ID_AMD 0x1022 +#define PCI_VENDOR_ID_OPTI 0x1045 + +#define PCI_CLASS_SERIAL_USB (PCI_CLASS_SERIAL_BUS_CTLR << 8 + PCI_SUBCLASS_SB_USB) + +#endif \ No newline at end of file diff --git a/reactos/drivers/usb/cromwell/linux/usb.h b/reactos/drivers/usb/cromwell/linux/usb.h new file mode 100644 index 00000000000..530d7ad1f7b --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/usb.h @@ -0,0 +1,1032 @@ +#ifndef __LINUX_USB_H +#define __LINUX_USB_H + + +#include "usb_ch9.h" + +#define USB_MAJOR 180 + + +#ifdef __KERNEL__ +#if 0 +#include +#include /* for -ENODEV */ +#include /* for mdelay() */ +#include /* for in_interrupt() */ +#include /* for struct list_head */ +#include /* for struct device */ +#include /* for struct file_operations */ +#include /* for struct completion */ +#include /* for current && schedule_timeout */ + + +static __inline__ void wait_ms(unsigned int ms) +{ + if(!in_interrupt()) { + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(1 + ms * HZ / 1000); + } + else + mdelay(ms); +} +#endif +struct usb_device; + +/*-------------------------------------------------------------------------*/ + +/* + * Host-side wrappers for standard USB descriptors ... these are parsed + * from the data provided by devices. Parsing turns them from a flat + * sequence of descriptors into a hierarchy: + * + * - devices have one (usually) or more configs; + * - configs have one (often) or more interfaces; + * - interfaces have one (usually) or more settings; + * - each interface setting has zero or (usually) more endpoints. + * + * And there might be other descriptors mixed in with those. + * + * Devices may also have class-specific or vendor-specific descriptors. + */ + +/* host-side wrapper for parsed endpoint descriptors */ +struct usb_host_endpoint { + struct usb_endpoint_descriptor desc; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +/* host-side wrapper for one interface setting's parsed descriptors */ +struct usb_host_interface { + struct usb_interface_descriptor desc; + + /* array of desc.bNumEndpoint endpoints associated with this + * interface setting. these will be in no particular order. + */ + struct usb_host_endpoint *endpoint; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +/** + * struct usb_interface - what usb device drivers talk to + * @altsetting: array of interface descriptors, one for each alternate + * setting that may be selected. Each one includes a set of + * endpoint configurations and will be in numberic order, + * 0..num_altsetting. + * @num_altsetting: number of altsettings defined. + * @act_altsetting: index of current altsetting. this number is always + * less than num_altsetting. after the device is configured, each + * interface uses its default setting of zero. + * @max_altsetting: + * @minor: the minor number assigned to this interface, if this + * interface is bound to a driver that uses the USB major number. + * If this interface does not use the USB major, this field should + * be unused. The driver should set this value in the probe() + * function of the driver, after it has been assigned a minor + * number from the USB core by calling usb_register_dev(). + * @dev: driver model's view of this device + * @class_dev: driver model's class view of this device. + * + * USB device drivers attach to interfaces on a physical device. Each + * interface encapsulates a single high level function, such as feeding + * an audio stream to a speaker or reporting a change in a volume control. + * Many USB devices only have one interface. The protocol used to talk to + * an interface's endpoints can be defined in a usb "class" specification, + * or by a product's vendor. The (default) control endpoint is part of + * every interface, but is never listed among the interface's descriptors. + * + * The driver that is bound to the interface can use standard driver model + * calls such as dev_get_drvdata() on the dev member of this structure. + * + * Each interface may have alternate settings. The initial configuration + * of a device sets the first of these, but the device driver can change + * that setting using usb_set_interface(). Alternate settings are often + * used to control the the use of periodic endpoints, such as by having + * different endpoints use different amounts of reserved USB bandwidth. + * All standards-conformant USB devices that use isochronous endpoints + * will use them in non-default settings. + */ +struct usb_interface { + /* array of alternate settings for this interface. + * these will be in numeric order, 0..num_altsettting + */ + struct usb_host_interface *altsetting; + + unsigned act_altsetting; /* active alternate setting */ + unsigned num_altsetting; /* number of alternate settings */ + unsigned max_altsetting; /* total memory allocated */ + + struct usb_driver *driver; /* driver */ + int minor; /* minor number this interface is bound to */ + struct device dev; /* interface specific device info */ + struct class_device class_dev; +}; +#define to_usb_interface(d) container_of(d, struct usb_interface, dev) +#define class_dev_to_usb_interface(d) container_of(d, struct usb_interface, class_dev) +#define interface_to_usbdev(intf) \ + container_of(intf->dev.parent, struct usb_device, dev) + +static inline void *usb_get_intfdata (struct usb_interface *intf) +{ + return dev_get_drvdata (&intf->dev); +} + +static inline void usb_set_intfdata (struct usb_interface *intf, void *data) +{ + dev_set_drvdata(&intf->dev, data); +} + +/* USB_DT_CONFIG: Configuration descriptor information. + * + * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the + * descriptor type is different. Highspeed-capable devices can look + * different depending on what speed they're currently running. Only + * devices with a USB_DT_DEVICE_QUALIFIER have an OTHER_SPEED_CONFIG. + */ +struct usb_host_config { + struct usb_config_descriptor desc; + + /* the interfaces associated with this configuration + * these will be in numeric order, 0..desc.bNumInterfaces + */ + struct usb_interface *interface; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +// FIXME remove; exported only for drivers/usb/misc/auserwald.c +// prefer usb_device->epnum[0..31] +extern struct usb_endpoint_descriptor * + usb_epnum_to_ep_desc(struct usb_device *dev, unsigned epnum); + +int __usb_get_extra_descriptor(char *buffer, unsigned size, + unsigned char type, void **ptr); +#define usb_get_extra_descriptor(ifpoint,type,ptr)\ + __usb_get_extra_descriptor((ifpoint)->extra,(ifpoint)->extralen,\ + type,(void**)ptr) + +/* -------------------------------------------------------------------------- */ + +struct usb_operations; + +/* USB device number allocation bitmap */ +struct usb_devmap { + unsigned long devicemap[128 / (8*sizeof(unsigned long))]; +}; + +/* + * Allocated per bus (tree of devices) we have: + */ +struct usb_bus { + struct device *controller; /* host/master side hardware */ + int busnum; /* Bus number (in order of reg) */ + char *bus_name; /* stable id (PCI slot_name etc) */ + + int devnum_next; /* Next open device number in round-robin allocation */ + + struct usb_devmap devmap; /* device address allocation map */ + struct usb_operations *op; /* Operations (specific to the HC) */ + struct usb_device *root_hub; /* Root hub */ + struct list_head bus_list; /* list of busses */ + void *hcpriv; /* Host Controller private data */ + + int bandwidth_allocated; /* on this bus: how much of the time + * reserved for periodic (intr/iso) + * requests is used, on average? + * Units: microseconds/frame. + * Limits: Full/low speed reserve 90%, + * while high speed reserves 80%. + */ + int bandwidth_int_reqs; /* number of Interrupt requests */ + int bandwidth_isoc_reqs; /* number of Isoc. requests */ + + struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ + struct dentry *usbdevfs_dentry; /* usbdevfs dentry entry for the bus */ + + atomic_t refcnt; +}; + + +/* -------------------------------------------------------------------------- */ + +/* This is arbitrary. + * From USB 2.0 spec Table 11-13, offset 7, a hub can + * have up to 255 ports. The most yet reported is 10. + */ +#define USB_MAXCHILDREN (16) + +struct usb_tt; + +struct usb_device { + int devnum; /* Address on USB bus */ + char devpath [16]; /* Use in messages: /port/port/... */ + enum usb_device_state state; /* configured, not attached, etc */ + enum usb_device_speed speed; /* high/full/low (or error) */ + + struct usb_tt *tt; /* low/full speed dev, highspeed hub */ + int ttport; /* device port on that tt hub */ + + struct semaphore serialize; + + unsigned int toggle[2]; /* one bit for each endpoint ([0] = IN, [1] = OUT) */ + unsigned int halted[2]; /* endpoint halts; one bit per endpoint # & direction; */ + /* [0] = IN, [1] = OUT */ + int epmaxpacketin[16]; /* INput endpoint specific maximums */ + int epmaxpacketout[16]; /* OUTput endpoint specific maximums */ + + struct usb_device *parent; /* our hub, unless we're the root */ + struct usb_bus *bus; /* Bus we're part of */ + + struct device dev; /* Generic device interface */ + + struct usb_device_descriptor descriptor;/* Descriptor */ + struct usb_host_config *config; /* All of the configs */ + struct usb_host_config *actconfig;/* the active configuration */ + + char **rawdescriptors; /* Raw descriptors for each config */ + + int have_langid; /* whether string_langid is valid yet */ + int string_langid; /* language ID for strings */ + + void *hcpriv; /* Host Controller private data */ + + struct list_head filelist; + struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ + struct dentry *usbdevfs_dentry; /* usbdevfs dentry entry for the device */ + + /* + * Child devices - these can be either new devices + * (if this is a hub device), or different instances + * of this same device. + * + * Each instance needs its own set of data structures. + */ + + int maxchild; /* Number of ports if hub */ + struct usb_device *children[USB_MAXCHILDREN]; +}; +#define to_usb_device(d) container_of(d, struct usb_device, dev) + +extern struct usb_device STDCALL *usb_alloc_dev(struct usb_device *parent, struct usb_bus *); +extern struct usb_device *usb_get_dev(struct usb_device *dev); +extern void STDCALL usb_put_dev(struct usb_device *dev); + +/* mostly for devices emulating SCSI over USB */ +extern int usb_reset_device(struct usb_device *dev); + +extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); + +/* for drivers using iso endpoints */ +extern int usb_get_current_frame_number (struct usb_device *usb_dev); + +/* used these for multi-interface device registration */ +extern void usb_driver_claim_interface(struct usb_driver *driver, + struct usb_interface *iface, void* priv); +extern int usb_interface_claimed(struct usb_interface *iface); +extern void usb_driver_release_interface(struct usb_driver *driver, + struct usb_interface *iface); +const struct usb_device_id *usb_match_id(struct usb_interface *interface, + const struct usb_device_id *id); + +extern struct usb_interface *usb_find_interface(struct usb_driver *drv, int minor); +extern struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, unsigned ifnum); + + +/** + * usb_make_path - returns stable device path in the usb tree + * @dev: the device whose path is being constructed + * @buf: where to put the string + * @size: how big is "buf"? + * + * Returns length of the string (> 0) or negative if size was too small. + * + * This identifier is intended to be "stable", reflecting physical paths in + * hardware such as physical bus addresses for host controllers or ports on + * USB hubs. That makes it stay the same until systems are physically + * reconfigured, by re-cabling a tree of USB devices or by moving USB host + * controllers. Adding and removing devices, including virtual root hubs + * in host controller driver modules, does not change these path identifers; + * neither does rebooting or re-enumerating. These are more useful identifiers + * than changeable ("unstable") ones like bus numbers or device addresses. + * + * With a partial exception for devices connected to USB 2.0 root hubs, these + * identifiers are also predictable. So long as the device tree isn't changed, + * plugging any USB device into a given hub port always gives it the same path. + * Because of the use of "companion" controllers, devices connected to ports on + * USB 2.0 root hubs (EHCI host controllers) will get one path ID if they are + * high speed, and a different one if they are full or low speed. + */ +static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size) +{ + int actual; + actual = snprintf (buf, size, "usb-%s-%s", dev->bus->bus_name, dev->devpath); + return (actual >= size) ? -1 : actual; +} + +/*-------------------------------------------------------------------------*/ + +#define USB_DEVICE_ID_MATCH_DEVICE (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) +#define USB_DEVICE_ID_MATCH_DEV_RANGE (USB_DEVICE_ID_MATCH_DEV_LO | USB_DEVICE_ID_MATCH_DEV_HI) +#define USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_RANGE) +#define USB_DEVICE_ID_MATCH_DEV_INFO \ + (USB_DEVICE_ID_MATCH_DEV_CLASS | USB_DEVICE_ID_MATCH_DEV_SUBCLASS | USB_DEVICE_ID_MATCH_DEV_PROTOCOL) +#define USB_DEVICE_ID_MATCH_INT_INFO \ + (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS | USB_DEVICE_ID_MATCH_INT_PROTOCOL) + +/** + * USB_DEVICE - macro used to describe a specific usb device + * @vend: the 16 bit USB Vendor ID + * @prod: the 16 bit USB Product ID + * + * This macro is used to create a struct usb_device_id that matches a + * specific device. + */ +#define USB_DEVICE(vend,prod) \ + .match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = (vend), .idProduct = (prod) +/** + * USB_DEVICE_VER - macro used to describe a specific usb device with a version range + * @vend: the 16 bit USB Vendor ID + * @prod: the 16 bit USB Product ID + * @lo: the bcdDevice_lo value + * @hi: the bcdDevice_hi value + * + * This macro is used to create a struct usb_device_id that matches a + * specific device, with a version range. + */ +#define USB_DEVICE_VER(vend,prod,lo,hi) \ + .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION, .idVendor = (vend), .idProduct = (prod), .bcdDevice_lo = (lo), .bcdDevice_hi = (hi) + +/** + * USB_DEVICE_INFO - macro used to describe a class of usb devices + * @cl: bDeviceClass value + * @sc: bDeviceSubClass value + * @pr: bDeviceProtocol value + * + * This macro is used to create a struct usb_device_id that matches a + * specific class of devices. + */ +#define USB_DEVICE_INFO(cl,sc,pr) \ + .match_flags = USB_DEVICE_ID_MATCH_DEV_INFO, .bDeviceClass = (cl), .bDeviceSubClass = (sc), .bDeviceProtocol = (pr) + +/** + * USB_INTERFACE_INFO - macro used to describe a class of usb interfaces + * @cl: bInterfaceClass value + * @sc: bInterfaceSubClass value + * @pr: bInterfaceProtocol value + * + * This macro is used to create a struct usb_device_id that matches a + * specific class of interfaces. + */ +#define USB_INTERFACE_INFO(cl,sc,pr) \ + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) + +/* -------------------------------------------------------------------------- */ + +/** + * struct usb_driver - identifies USB driver to usbcore + * @owner: Pointer to the module owner of this driver; initialize + * it using THIS_MODULE. + * @name: The driver name should be unique among USB drivers, + * and should normally be the same as the module name. + * @probe: Called to see if the driver is willing to manage a particular + * interface on a device. If it is, probe returns zero and uses + * dev_set_drvdata() to associate driver-specific data with the + * interface. It may also use usb_set_interface() to specify the + * appropriate altsetting. If unwilling to manage the interface, + * return a negative errno value. + * @disconnect: Called when the interface is no longer accessible, usually + * because its device has been (or is being) disconnected or the + * driver module is being unloaded. + * @ioctl: Used for drivers that want to talk to userspace through + * the "usbfs" filesystem. This lets devices provide ways to + * expose information to user space regardless of where they + * do (or don't) show up otherwise in the filesystem. + * @id_table: USB drivers use ID table to support hotplugging. + * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set + * or your driver's probe function will never get called. + * + * USB drivers must provide a name, probe() and disconnect() methods, + * and an id_table. Other driver fields are optional. + * + * The id_table is used in hotplugging. It holds a set of descriptors, + * and specialized data may be associated with each entry. That table + * is used by both user and kernel mode hotplugging support. + * + * The probe() and disconnect() methods are called in a context where + * they can sleep, but they should avoid abusing the privilege. Most + * work to connect to a device should be done when the device is opened, + * and undone at the last close. The disconnect code needs to address + * concurrency issues with respect to open() and close() methods, as + * well as forcing all pending I/O requests to complete (by unlinking + * them as necessary, and blocking until the unlinks complete). + */ +struct usb_driver { + struct module *owner; + + const char *name; + + int (*probe) (struct usb_interface *intf, + const struct usb_device_id *id); + + void (*disconnect) (struct usb_interface *intf); + + int (*ioctl) (struct usb_interface *intf, unsigned int code, void *buf); + + const struct usb_device_id *id_table; + + struct device_driver driver; + + struct semaphore serialize; +}; +#define to_usb_driver(d) container_of(d, struct usb_driver, driver) + +extern struct bus_type usb_bus_type; + +/** + * struct usb_class_driver - identifies a USB driver that wants to use the USB major number + * @name: devfs name for this driver. Will also be used by the driver + * class code to create a usb class device. + * @fops: pointer to the struct file_operations of this driver. + * @mode: the mode for the devfs file to be created for this driver. + * @minor_base: the start of the minor range for this driver. + * + * This structure is used for the usb_register_dev() and + * usb_unregister_dev() functions, to consolodate a number of the + * paramaters used for them. + */ +struct usb_class_driver { + char *name; + struct file_operations *fops; + mode_t mode; + int minor_base; +}; + +/* + * use these in module_init()/module_exit() + * and don't forget MODULE_DEVICE_TABLE(usb, ...) + */ +extern int usb_register(struct usb_driver *); +extern void usb_deregister(struct usb_driver *); + +extern int usb_register_dev(struct usb_interface *intf, + struct usb_class_driver *class_driver); +extern void usb_deregister_dev(struct usb_interface *intf, + struct usb_class_driver *class_driver); + +extern int usb_device_probe(struct device *dev); +extern int usb_device_remove(struct device *dev); +extern int STDCALL usb_disabled(void); + +/* -------------------------------------------------------------------------- */ + +/* + * URB support, for asynchronous request completions + */ + +/* + * urb->transfer_flags: + */ +#define URB_SHORT_NOT_OK 0x0001 /* report short reads as errors */ +#define URB_ISO_ASAP 0x0002 /* iso-only, urb->start_frame ignored */ +#define URB_NO_DMA_MAP 0x0004 /* urb->*_dma are valid on submit */ +#define URB_ASYNC_UNLINK 0x0008 /* usb_unlink_urb() returns asap */ +#define URB_NO_FSBR 0x0020 /* UHCI-specific */ +#define URB_ZERO_PACKET 0x0040 /* Finish bulk OUTs with short packet */ +#define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt needed */ + +struct usb_iso_packet_descriptor { + unsigned int offset; + unsigned int length; /* expected length */ + unsigned int actual_length; + unsigned int status; +}; + +struct urb; +struct pt_regs; + +typedef void (*usb_complete_t)(struct urb *, struct pt_regs *); + +/** + * struct urb - USB Request Block + * @urb_list: For use by current owner of the URB. + * @pipe: Holds endpoint number, direction, type, and more. + * Create these values with the eight macros available; + * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the type is "ctrl" + * (control), "bulk", "int" (interrupt), or "iso" (isochronous). + * For example usb_sndbulkpipe() or usb_rcvintpipe(). Endpoint + * numbers range from zero to fifteen. Note that "in" endpoint two + * is a different endpoint (and pipe) from "out" endpoint two. + * The current configuration controls the existence, type, and + * maximum packet size of any given endpoint. + * @dev: Identifies the USB device to perform the request. + * @status: This is read in non-iso completion functions to get the + * status of the particular request. ISO requests only use it + * to tell whether the URB was unlinked; detailed status for + * each frame is in the fields of the iso_frame-desc. + * @transfer_flags: A variety of flags may be used to affect how URB + * submission, unlinking, or operation are handled. Different + * kinds of URB can use different flags. + * @transfer_buffer: This identifies the buffer to (or from) which + * the I/O request will be performed (unless URB_NO_DMA_MAP is set). + * This buffer must be suitable for DMA; allocate it with kmalloc() + * or equivalent. For transfers to "in" endpoints, contents of + * this buffer will be modified. This buffer is used for data + * phases of control transfers. + * @transfer_dma: When transfer_flags includes URB_NO_DMA_MAP, the device + * driver is saying that it provided this DMA address, which the host + * controller driver should use instead of the transfer_buffer. + * @transfer_buffer_length: How big is transfer_buffer. The transfer may + * be broken up into chunks according to the current maximum packet + * size for the endpoint, which is a function of the configuration + * and is encoded in the pipe. When the length is zero, neither + * transfer_buffer nor transfer_dma is used. + * @actual_length: This is read in non-iso completion functions, and + * it tells how many bytes (out of transfer_buffer_length) were + * transferred. It will normally be the same as requested, unless + * either an error was reported or a short read was performed. + * The URB_SHORT_NOT_OK transfer flag may be used to make such + * short reads be reported as errors. + * @setup_packet: Only used for control transfers, this points to eight bytes + * of setup data. Control transfers always start by sending this data + * to the device. Then transfer_buffer is read or written, if needed. + * (Not used when URB_NO_DMA_MAP is set.) + * @setup_dma: For control transfers with URB_NO_DMA_MAP set, the device + * driver has provided this DMA address for the setup packet. The + * host controller driver should use this instead of setup_buffer. + * If there is a data phase, its buffer is identified by transfer_dma. + * @start_frame: Returns the initial frame for interrupt or isochronous + * transfers. + * @number_of_packets: Lists the number of ISO transfer buffers. + * @interval: Specifies the polling interval for interrupt or isochronous + * transfers. The units are frames (milliseconds) for for full and low + * speed devices, and microframes (1/8 millisecond) for highspeed ones. + * @error_count: Returns the number of ISO transfers that reported errors. + * @context: For use in completion functions. This normally points to + * request-specific driver context. + * @complete: Completion handler. This URB is passed as the parameter to the + * completion function. The completion function may then do what + * it likes with the URB, including resubmitting or freeing it. + * @iso_frame_desc: Used to provide arrays of ISO transfer buffers and to + * collect the transfer status for each buffer. + * + * This structure identifies USB transfer requests. URBs must be allocated by + * calling usb_alloc_urb() and freed with a call to usb_free_urb(). + * Initialization may be done using various usb_fill_*_urb() functions. URBs + * are submitted using usb_submit_urb(), and pending requests may be canceled + * using usb_unlink_urb(). + * + * Data Transfer Buffers: + * + * Normally drivers provide I/O buffers allocated with kmalloc() or otherwise + * taken from the general page pool. That is provided by transfer_buffer + * (control requests also use setup_packet), and host controller drivers + * perform a dma mapping (and unmapping) for each buffer transferred. Those + * mapping operations can be expensive on some platforms (perhaps using a dma + * bounce buffer or talking to an IOMMU), + * although they're cheap on commodity x86 and ppc hardware. + * + * Alternatively, drivers may pass the URB_NO_DMA_MAP transfer flag, which + * tells the host controller driver that no such mapping is needed since + * the device driver is DMA-aware. For example, they might allocate a DMA + * buffer with usb_buffer_alloc(), or call usb_buffer_map(). + * When this transfer flag is provided, host controller drivers will use the + * dma addresses found in the transfer_dma and/or setup_dma fields rather than + * determing a dma address themselves. + * + * Initialization: + * + * All URBs submitted must initialize dev, pipe, + * transfer_flags (may be zero), complete, timeout (may be zero). + * The URB_ASYNC_UNLINK transfer flag affects later invocations of + * the usb_unlink_urb() routine. + * + * All URBs must also initialize + * transfer_buffer and transfer_buffer_length. They may provide the + * URB_SHORT_NOT_OK transfer flag, indicating that short reads are + * to be treated as errors; that flag is invalid for write requests. + * + * Bulk URBs may + * use the URB_ZERO_PACKET transfer flag, indicating that bulk OUT transfers + * should always terminate with a short packet, even if it means adding an + * extra zero length packet. + * + * Control URBs must provide a setup_packet. + * + * Interrupt UBS must provide an interval, saying how often (in milliseconds + * or, for highspeed devices, 125 microsecond units) + * to poll for transfers. After the URB has been submitted, the interval + * and start_frame fields reflect how the transfer was actually scheduled. + * The polling interval may be more frequent than requested. + * For example, some controllers have a maximum interval of 32 microseconds, + * while others support intervals of up to 1024 microseconds. + * Isochronous URBs also have transfer intervals. (Note that for isochronous + * endpoints, as well as high speed interrupt endpoints, the encoding of + * the transfer interval in the endpoint descriptor is logarithmic.) + * + * Isochronous URBs normally use the URB_ISO_ASAP transfer flag, telling + * the host controller to schedule the transfer as soon as bandwidth + * utilization allows, and then set start_frame to reflect the actual frame + * selected during submission. Otherwise drivers must specify the start_frame + * and handle the case where the transfer can't begin then. However, drivers + * won't know how bandwidth is currently allocated, and while they can + * find the current frame using usb_get_current_frame_number () they can't + * know the range for that frame number. (Ranges for frame counter values + * are HC-specific, and can go from 256 to 65536 frames from "now".) + * + * Isochronous URBs have a different data transfer model, in part because + * the quality of service is only "best effort". Callers provide specially + * allocated URBs, with number_of_packets worth of iso_frame_desc structures + * at the end. Each such packet is an individual ISO transfer. Isochronous + * URBs are normally queued, submitted by drivers to arrange that + * transfers are at least double buffered, and then explicitly resubmitted + * in completion handlers, so + * that data (such as audio or video) streams at as constant a rate as the + * host controller scheduler can support. + * + * Completion Callbacks: + * + * The completion callback is made in_interrupt(), and one of the first + * things that a completion handler should do is check the status field. + * The status field is provided for all URBs. It is used to report + * unlinked URBs, and status for all non-ISO transfers. It should not + * be examined before the URB is returned to the completion handler. + * + * The context field is normally used to link URBs back to the relevant + * driver or request state. + * + * When completion callback is invoked for non-isochronous URBs, the + * actual_length field tells how many bytes were transferred. + * + * ISO transfer status is reported in the status and actual_length fields + * of the iso_frame_desc array, and the number of errors is reported in + * error_count. Completion callbacks for ISO transfers will normally + * (re)submit URBs to ensure a constant transfer rate. + */ +struct urb +{ + spinlock_t lock; /* lock for the URB */ + atomic_t count; /* reference count of the URB */ + void *hcpriv; /* private data for host controller */ + struct list_head urb_list; /* list pointer to all active urbs */ + struct usb_device *dev; /* (in) pointer to associated device */ + unsigned int pipe; /* (in) pipe information */ + int status; /* (return) non-ISO status */ + unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ + void *transfer_buffer; /* (in) associated data buffer */ + dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ + int transfer_buffer_length; /* (in) data buffer length */ + int actual_length; /* (return) actual transfer length */ + int bandwidth; /* bandwidth for INT/ISO request */ + unsigned char *setup_packet; /* (in) setup packet (control only) */ + dma_addr_t setup_dma; /* (in) dma addr for setup_packet */ + int start_frame; /* (modify) start frame (INT/ISO) */ + int number_of_packets; /* (in) number of ISO packets */ + int interval; /* (in) transfer interval (INT/ISO) */ + int error_count; /* (return) number of ISO errors */ + int timeout; /* (in) timeout, in jiffies */ + void *context; /* (in) context for completion */ + usb_complete_t complete; /* (in) completion routine */ + struct usb_iso_packet_descriptor iso_frame_desc[0]; /* (in) ISO ONLY */ +}; + +/* -------------------------------------------------------------------------- */ + +/** + * usb_fill_control_urb - initializes a control urb + * @urb: pointer to the urb to initialize. + * @dev: pointer to the struct usb_device for this urb. + * @pipe: the endpoint pipe + * @setup_packet: pointer to the setup_packet buffer + * @transfer_buffer: pointer to the transfer buffer + * @buffer_length: length of the transfer buffer + * @complete: pointer to the usb_complete_t function + * @context: what to set the urb context to. + * + * Initializes a control urb with the proper information needed to submit + * it to a device. + */ +static inline void usb_fill_control_urb (struct urb *urb, + struct usb_device *dev, + unsigned int pipe, + unsigned char *setup_packet, + void *transfer_buffer, + int buffer_length, + usb_complete_t complete, + void *context) +{ + spin_lock_init(&urb->lock); + urb->dev = dev; + urb->pipe = pipe; + urb->setup_packet = setup_packet; + urb->transfer_buffer = transfer_buffer; + urb->transfer_buffer_length = buffer_length; + urb->complete = complete; + urb->context = context; +} + +/** + * usb_fill_bulk_urb - macro to help initialize a bulk urb + * @urb: pointer to the urb to initialize. + * @dev: pointer to the struct usb_device for this urb. + * @pipe: the endpoint pipe + * @transfer_buffer: pointer to the transfer buffer + * @buffer_length: length of the transfer buffer + * @complete: pointer to the usb_complete_t function + * @context: what to set the urb context to. + * + * Initializes a bulk urb with the proper information needed to submit it + * to a device. + */ +static inline void usb_fill_bulk_urb (struct urb *urb, + struct usb_device *dev, + unsigned int pipe, + void *transfer_buffer, + int buffer_length, + usb_complete_t complete, + void *context) +{ + spin_lock_init(&urb->lock); + urb->dev = dev; + urb->pipe = pipe; + urb->transfer_buffer = transfer_buffer; + urb->transfer_buffer_length = buffer_length; + urb->complete = complete; + urb->context = context; +} + +/** + * usb_fill_int_urb - macro to help initialize a interrupt urb + * @urb: pointer to the urb to initialize. + * @dev: pointer to the struct usb_device for this urb. + * @pipe: the endpoint pipe + * @transfer_buffer: pointer to the transfer buffer + * @buffer_length: length of the transfer buffer + * @complete: pointer to the usb_complete_t function + * @context: what to set the urb context to. + * @interval: what to set the urb interval to, encoded like + * the endpoint descriptor's bInterval value. + * + * Initializes a interrupt urb with the proper information needed to submit + * it to a device. + * Note that high speed interrupt endpoints use a logarithmic encoding of + * the endpoint interval, and express polling intervals in microframes + * (eight per millisecond) rather than in frames (one per millisecond). + */ +static inline void usb_fill_int_urb (struct urb *urb, + struct usb_device *dev, + unsigned int pipe, + void *transfer_buffer, + int buffer_length, + usb_complete_t complete, + void *context, + int interval) +{ + spin_lock_init(&urb->lock); + urb->dev = dev; + urb->pipe = pipe; + urb->transfer_buffer = transfer_buffer; + urb->transfer_buffer_length = buffer_length; + urb->complete = complete; + urb->context = context; + if (dev->speed == USB_SPEED_HIGH) + urb->interval = 1 << (interval - 1); + else + urb->interval = interval; + urb->start_frame = -1; +} + +extern void STDCALL usb_init_urb(struct urb *urb); +extern struct urb STDCALL *usb_alloc_urb(int iso_packets, int mem_flags); +extern void STDCALL usb_free_urb(struct urb *urb); +#define usb_put_urb usb_free_urb +extern struct urb STDCALL *usb_get_urb(struct urb *urb); +extern int STDCALL usb_submit_urb(struct urb *urb, int mem_flags); +extern int STDCALL usb_unlink_urb(struct urb *urb); + +#define HAVE_USB_BUFFERS +void *usb_buffer_alloc (struct usb_device *dev, size_t size, + int mem_flags, dma_addr_t *dma); +void usb_buffer_free (struct usb_device *dev, size_t size, + void *addr, dma_addr_t dma); + +struct urb *usb_buffer_map (struct urb *urb); +void usb_buffer_dmasync (struct urb *urb); +void usb_buffer_unmap (struct urb *urb); + +struct scatterlist; +int usb_buffer_map_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int nents); +void usb_buffer_dmasync_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int n_hw_ents); +void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int n_hw_ents); + +/*-------------------------------------------------------------------* + * SYNCHRONOUS CALL SUPPORT * + *-------------------------------------------------------------------*/ + +extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, + __u8 request, __u8 requesttype, __u16 value, __u16 index, + void *data, __u16 size, int timeout); +extern int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, + void *data, int len, int *actual_length, + int timeout); + +/* wrappers around usb_control_msg() for the most common standard requests */ +extern int usb_get_descriptor(struct usb_device *dev, unsigned char desctype, + unsigned char descindex, void *buf, int size); +extern int usb_get_device_descriptor(struct usb_device *dev); +extern int usb_get_status(struct usb_device *dev, + int type, int target, void *data); +extern int usb_get_string(struct usb_device *dev, + unsigned short langid, unsigned char index, void *buf, int size); +extern int usb_string(struct usb_device *dev, int index, + char *buf, size_t size); + +/* wrappers that also update important state inside usbcore */ +extern int usb_clear_halt(struct usb_device *dev, int pipe); +extern int usb_set_configuration(struct usb_device *dev, int configuration); +extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); + +/* + * timeouts, in seconds, used for sending/receiving control messages + * they typically complete within a few frames (msec) after they're issued + * USB identifies 5 second timeouts, maybe more in a few cases, and a few + * slow devices (like some MGE Ellipse UPSes) actually push that limit. + */ +#define USB_CTRL_GET_TIMEOUT 5 +#define USB_CTRL_SET_TIMEOUT 5 + + +/** + * struct usb_sg_request - support for scatter/gather I/O + * @status: zero indicates success, else negative errno + * @bytes: counts bytes transferred. + * + * These requests are initialized using usb_sg_init(), and then are used + * as request handles passed to usb_sg_wait() or usb_sg_cancel(). Most + * members of the request object aren't for driver access. + * + * The status and bytecount values are valid only after usb_sg_wait() + * returns. If the status is zero, then the bytecount matches the total + * from the request. + * + * After an error completion, drivers may need to clear a halt condition + * on the endpoint. + */ +struct usb_sg_request { + int status; + size_t bytes; + + // members not documented above are private to usbcore, + // and are not provided for driver access! + spinlock_t lock; + + struct usb_device *dev; + int pipe; + struct scatterlist *sg; + int nents; + + int entries; + struct urb **urbs; + + int count; + struct completion complete; +}; + +int usb_sg_init ( + struct usb_sg_request *io, + struct usb_device *dev, + unsigned pipe, + unsigned period, + struct scatterlist *sg, + int nents, + size_t length, + int mem_flags +); +void usb_sg_cancel (struct usb_sg_request *io); +void usb_sg_wait (struct usb_sg_request *io); + + +/* -------------------------------------------------------------------------- */ + +/* + * Calling this entity a "pipe" is glorifying it. A USB pipe + * is something embarrassingly simple: it basically consists + * of the following information: + * - device number (7 bits) + * - endpoint number (4 bits) + * - current Data0/1 state (1 bit) [Historical; now gone] + * - direction (1 bit) + * - speed (1 bit) [Historical and specific to USB 1.1; now gone.] + * - max packet size (2 bits: 8, 16, 32 or 64) [Historical; now gone.] + * - pipe type (2 bits: control, interrupt, bulk, isochronous) + * + * That's 18 bits. Really. Nothing more. And the USB people have + * documented these eighteen bits as some kind of glorious + * virtual data structure. + * + * Let's not fall in that trap. We'll just encode it as a simple + * unsigned int. The encoding is: + * + * - max size: bits 0-1 [Historical; now gone.] + * - direction: bit 7 (0 = Host-to-Device [Out], + * 1 = Device-to-Host [In] ... + * like endpoint bEndpointAddress) + * - device: bits 8-14 ... bit positions known to uhci-hcd + * - endpoint: bits 15-18 ... bit positions known to uhci-hcd + * - Data0/1: bit 19 [Historical; now gone. ] + * - lowspeed: bit 26 [Historical; now gone. ] + * - pipe type: bits 30-31 (00 = isochronous, 01 = interrupt, + * 10 = control, 11 = bulk) + * + * Why? Because it's arbitrary, and whatever encoding we select is really + * up to us. This one happens to share a lot of bit positions with the UHCI + * specification, so that much of the uhci driver can just mask the bits + * appropriately. + */ + +/* NOTE: these are not the standard USB_ENDPOINT_XFER_* values!! */ +#define PIPE_ISOCHRONOUS 0 +#define PIPE_INTERRUPT 1 +#define PIPE_CONTROL 2 +#define PIPE_BULK 3 + +#define usb_maxpacket(dev, pipe, out) (out \ + ? (dev)->epmaxpacketout[usb_pipeendpoint(pipe)] \ + : (dev)->epmaxpacketin [usb_pipeendpoint(pipe)] ) + +#define usb_pipein(pipe) ((pipe) & USB_DIR_IN) +#define usb_pipeout(pipe) (!usb_pipein(pipe)) +#define usb_pipedevice(pipe) (((pipe) >> 8) & 0x7f) +#define usb_pipeendpoint(pipe) (((pipe) >> 15) & 0xf) +#define usb_pipetype(pipe) (((pipe) >> 30) & 3) +#define usb_pipeisoc(pipe) (usb_pipetype((pipe)) == PIPE_ISOCHRONOUS) +#define usb_pipeint(pipe) (usb_pipetype((pipe)) == PIPE_INTERRUPT) +#define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == PIPE_CONTROL) +#define usb_pipebulk(pipe) (usb_pipetype((pipe)) == PIPE_BULK) + +/* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */ +#define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> (ep)) & 1) +#define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << (ep))) +#define usb_settoggle(dev, ep, out, bit) ((dev)->toggle[out] = ((dev)->toggle[out] & ~(1 << (ep))) | ((bit) << (ep))) + +/* Endpoint halt control/status ... likewise USE WITH CAUTION */ +#define usb_endpoint_running(dev, ep, out) ((dev)->halted[out] &= ~(1 << (ep))) +#define usb_endpoint_halted(dev, ep, out) ((dev)->halted[out] & (1 << (ep))) + + +static inline unsigned int __create_pipe(struct usb_device *dev, unsigned int endpoint) +{ + return (dev->devnum << 8) | (endpoint << 15); +} + +/* Create various pipes... */ +#define usb_sndctrlpipe(dev,endpoint) ((PIPE_CONTROL << 30) | __create_pipe(dev,endpoint)) +#define usb_rcvctrlpipe(dev,endpoint) ((PIPE_CONTROL << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) +#define usb_sndisocpipe(dev,endpoint) ((PIPE_ISOCHRONOUS << 30) | __create_pipe(dev,endpoint)) +#define usb_rcvisocpipe(dev,endpoint) ((PIPE_ISOCHRONOUS << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) +#define usb_sndbulkpipe(dev,endpoint) ((PIPE_BULK << 30) | __create_pipe(dev,endpoint)) +#define usb_rcvbulkpipe(dev,endpoint) ((PIPE_BULK << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) +#define usb_sndintpipe(dev,endpoint) ((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint)) +#define usb_rcvintpipe(dev,endpoint) ((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) + +/* -------------------------------------------------------------------------- */ + +/* + * Debugging and troubleshooting/diagnostic helpers. + */ +void usb_show_device_descriptor(struct usb_device_descriptor *); +void usb_show_config_descriptor(struct usb_config_descriptor *); +void usb_show_interface_descriptor(struct usb_interface_descriptor *); +void usb_show_endpoint_descriptor(struct usb_endpoint_descriptor *); +void usb_show_device(struct usb_device *); +void usb_show_string(struct usb_device *dev, char *id, int index); + +#ifdef DEBUG +#define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg) +#else +#define dbg(format, arg...) do {} while (0) +#endif + + + +#ifdef DEBUG_MODE +#define info(format, arg...) printk(KERN_INFO __FILE__ ": " format "\n" , ## arg) +#define err(format, arg...) printk(KERN_ERR __FILE__ ": " format "\n" , ## arg) +#define warn(format, arg...) printk(KERN_WARNING __FILE__ ": " format "\n" , ## arg) +#endif + +#ifndef DEBUG_MODE +#define info(format, arg...) do {} while (0) +#define err(format, arg...) do {} while (0) +#define warn(format, arg...) do {} while (0) +#endif + +#endif /* __KERNEL__ */ + +#endif diff --git a/reactos/drivers/usb/cromwell/linux/usb_ch9.h b/reactos/drivers/usb/cromwell/linux/usb_ch9.h new file mode 100644 index 00000000000..a679168973a --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/usb_ch9.h @@ -0,0 +1,315 @@ +/* + * This file holds USB constants and structures that are needed for USB + * device APIs. These are used by the USB device model, which is defined + * in chapter 9 of the USB 2.0 specification. Linux has several APIs in C + * that need these: + * + * - the master/host side Linux-USB kernel driver API; + * - the "usbfs" user space API; and + * - (eventually) a Linux "gadget" slave/device side driver API. + * + * USB 2.0 adds an additional "On The Go" (OTG) mode, which lets systems + * act either as a USB master/host or as a USB slave/device. That means + * the master and slave side APIs will benefit from working well together. + */ + +#ifndef __LINUX_USB_CH9_H +#define __LINUX_USB_CH9_H +#if 0 +#include /* __u8 etc */ +#endif +/*-------------------------------------------------------------------------*/ + +/* CONTROL REQUEST SUPPORT */ + +/* + * USB directions + * + * This bit flag is used in endpoint descriptors' bEndpointAddress field. + * It's also one of three fields in control requests bRequestType. + */ +#define USB_DIR_OUT 0 /* to device */ +#define USB_DIR_IN 0x80 /* to host */ + +/* + * USB types, the second of three bRequestType fields + */ +#define USB_TYPE_MASK (0x03 << 5) +#define USB_TYPE_STANDARD (0x00 << 5) +#define USB_TYPE_CLASS (0x01 << 5) +#define USB_TYPE_VENDOR (0x02 << 5) +#define USB_TYPE_RESERVED (0x03 << 5) + +/* + * USB recipients, the third of three bRequestType fields + */ +#define USB_RECIP_MASK 0x1f +#define USB_RECIP_DEVICE 0x00 +#define USB_RECIP_INTERFACE 0x01 +#define USB_RECIP_ENDPOINT 0x02 +#define USB_RECIP_OTHER 0x03 + +/* + * Standard requests, for the bRequest field of a SETUP packet. + * + * These are qualified by the bRequestType field, so that for example + * TYPE_CLASS or TYPE_VENDOR specific feature flags could be retrieved + * by a GET_STATUS request. + */ +#define USB_REQ_GET_STATUS 0x00 +#define USB_REQ_CLEAR_FEATURE 0x01 +#define USB_REQ_SET_FEATURE 0x03 +#define USB_REQ_SET_ADDRESS 0x05 +#define USB_REQ_GET_DESCRIPTOR 0x06 +#define USB_REQ_SET_DESCRIPTOR 0x07 +#define USB_REQ_GET_CONFIGURATION 0x08 +#define USB_REQ_SET_CONFIGURATION 0x09 +#define USB_REQ_GET_INTERFACE 0x0A +#define USB_REQ_SET_INTERFACE 0x0B +#define USB_REQ_SYNCH_FRAME 0x0C + + +/** + * struct usb_ctrlrequest - SETUP data for a USB device control request + * @bRequestType: matches the USB bmRequestType field + * @bRequest: matches the USB bRequest field + * @wValue: matches the USB wValue field (le16 byte order) + * @wIndex: matches the USB wIndex field (le16 byte order) + * @wLength: matches the USB wLength field (le16 byte order) + * + * This structure is used to send control requests to a USB device. It matches + * the different fields of the USB 2.0 Spec section 9.3, table 9-2. See the + * USB spec for a fuller description of the different fields, and what they are + * used for. + * + * Note that the driver for any interface can issue control requests. + * For most devices, interfaces don't coordinate with each other, so + * such requests may be made at any time. + */ +struct usb_ctrlrequest { + __u8 bRequestType; + __u8 bRequest; + __u16 wValue; + __u16 wIndex; + __u16 wLength; +} __attribute__ ((packed)); + +/*-------------------------------------------------------------------------*/ + +/* + * STANDARD DESCRIPTORS ... as returned by GET_DESCRIPTOR, or + * (rarely) accepted by SET_DESCRIPTOR. + * + * Note that all multi-byte values here are encoded in little endian + * byte order "on the wire". But when exposed through Linux-USB APIs, + * they've been converted to cpu byte order. + */ + +/* + * Descriptor types ... USB 2.0 spec table 9.5 + */ +#define USB_DT_DEVICE 0x01 +#define USB_DT_CONFIG 0x02 +#define USB_DT_STRING 0x03 +#define USB_DT_INTERFACE 0x04 +#define USB_DT_ENDPOINT 0x05 +#define USB_DT_DEVICE_QUALIFIER 0x06 +#define USB_DT_OTHER_SPEED_CONFIG 0x07 +#define USB_DT_INTERFACE_POWER 0x08 + +/* All standard descriptors have these 2 fields at the beginning */ +struct usb_descriptor_header { + __u8 bLength; + __u8 bDescriptorType; +} __attribute__ ((packed)); + + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_DEVICE: Device descriptor */ +struct usb_device_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u16 bcdUSB; + __u8 bDeviceClass; + __u8 bDeviceSubClass; + __u8 bDeviceProtocol; + __u8 bMaxPacketSize0; + __u16 idVendor; + __u16 idProduct; + __u16 bcdDevice; + __u8 iManufacturer; + __u8 iProduct; + __u8 iSerialNumber; + __u8 bNumConfigurations; +} __attribute__ ((packed)); + +#define USB_DT_DEVICE_SIZE 18 + + +/* + * Device and/or Interface Class codes + * as found in bDeviceClass or bInterfaceClass + * and defined by www.usb.org documents + */ +#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ +#define USB_CLASS_AUDIO 1 +#define USB_CLASS_COMM 2 +#define USB_CLASS_HID 3 +#define USB_CLASS_PHYSICAL 5 +#define USB_CLASS_STILL_IMAGE 6 +#define USB_CLASS_PRINTER 7 +#define USB_CLASS_MASS_STORAGE 8 +#define USB_CLASS_HUB 9 +#define USB_CLASS_CDC_DATA 0x0a +#define USB_CLASS_CSCID 0x0b /* chip+ smart card */ +#define USB_CLASS_CONTENT_SEC 0x0d /* content security */ +#define USB_CLASS_APP_SPEC 0xfe +#define USB_CLASS_VENDOR_SPEC 0xff + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_CONFIG: Configuration descriptor information. + * + * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the + * descriptor type is different. Highspeed-capable devices can look + * different depending on what speed they're currently running. Only + * devices with a USB_DT_DEVICE_QUALIFIER have any OTHER_SPEED_CONFIG + * descriptors. + */ +struct usb_config_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u16 wTotalLength; + __u8 bNumInterfaces; + __u8 bConfigurationValue; + __u8 iConfiguration; + __u8 bmAttributes; + __u8 bMaxPower; +} __attribute__ ((packed)); + +#define USB_DT_CONFIG_SIZE 9 + +/* from config descriptor bmAttributes */ +#define USB_CONFIG_ATT_ONE (1 << 7) /* must be set */ +#define USB_CONFIG_ATT_SELFPOWER (1 << 6) /* self powered */ +#define USB_CONFIG_ATT_WAKEUP (1 << 5) /* can wakeup */ + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_STRING: String descriptor */ +struct usb_string_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u16 wData[1]; /* UTF-16LE encoded */ +} __attribute__ ((packed)); + +/* note that "string" zero is special, it holds language codes that + * the device supports, not Unicode characters. + */ + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_INTERFACE: Interface descriptor */ +struct usb_interface_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u8 bInterfaceNumber; + __u8 bAlternateSetting; + __u8 bNumEndpoints; + __u8 bInterfaceClass; + __u8 bInterfaceSubClass; + __u8 bInterfaceProtocol; + __u8 iInterface; +} __attribute__ ((packed)); + +#define USB_DT_INTERFACE_SIZE 9 + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_ENDPOINT: Endpoint descriptor */ +struct usb_endpoint_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u8 bEndpointAddress; + __u8 bmAttributes; + __u16 wMaxPacketSize; + __u8 bInterval; + + // NOTE: these two are _only_ in audio endpoints. + // use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. + __u8 bRefresh; + __u8 bSynchAddress; +} __attribute__ ((packed)); + +#define USB_DT_ENDPOINT_SIZE 7 +#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ + + +/* + * Endpoints + */ +#define USB_ENDPOINT_NUMBER_MASK 0x0f /* in bEndpointAddress */ +#define USB_ENDPOINT_DIR_MASK 0x80 + +#define USB_ENDPOINT_XFERTYPE_MASK 0x03 /* in bmAttributes */ +#define USB_ENDPOINT_XFER_CONTROL 0 +#define USB_ENDPOINT_XFER_ISOC 1 +#define USB_ENDPOINT_XFER_BULK 2 +#define USB_ENDPOINT_XFER_INT 3 + + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_DEVICE_QUALIFIER: Device Qualifier descriptor */ +struct usb_qualifier_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u16 bcdUSB; + __u8 bDeviceClass; + __u8 bDeviceSubClass; + __u8 bDeviceProtocol; + __u8 bMaxPacketSize0; + __u8 bNumConfigurations; + __u8 bRESERVED; +} __attribute__ ((packed)); + + +/*-------------------------------------------------------------------------*/ + +/* USB 2.0 defines three speeds, here's how Linux identifies them */ + +enum usb_device_speed { + USB_SPEED_UNKNOWN = 0, /* enumerating */ + USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ + USB_SPEED_HIGH /* usb 2.0 */ +}; + +enum usb_device_state { + /* NOTATTACHED isn't in the USB spec, and this state acts + * the same as ATTACHED ... but it's clearer this way. + */ + USB_STATE_NOTATTACHED = 0, + + /* the chapter 9 device states */ + USB_STATE_ATTACHED, + USB_STATE_POWERED, + USB_STATE_DEFAULT, /* limited function */ + USB_STATE_ADDRESS, + USB_STATE_CONFIGURED, /* most functions */ + + USB_STATE_SUSPENDED + + /* NOTE: there are actually four different SUSPENDED + * states, returning to POWERED, DEFAULT, ADDRESS, or + * CONFIGURED respectively when SOF tokens flow again. + */ +}; + +#endif /* __LINUX_USB_CH9_H */ diff --git a/reactos/drivers/usb/cromwell/sys/BootUSB.c b/reactos/drivers/usb/cromwell/sys/BootUSB.c new file mode 100644 index 00000000000..2f582c5925a --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/BootUSB.c @@ -0,0 +1,90 @@ +/* + * USB support for XBOX, based on Linux kernel source + * + * 2003-06-21 Georg Acher (georg@acher.org) + * +*/ + +#include "../usb_wrapper.h" + +void subsys_usb_init(void); +void module_exit_usb_exit(void); + +extern struct pci_device_id *module_table_pci_ids; + +// straigth call... +int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id); +void usb_hcd_pci_remove (struct pci_dev *dev); + +void XPADInit(void); +void XPADRemove(void); +void XRemoteInit(void); +void XRemoteRemove(void); + +extern int (*thread_handler)(void*); +int (*hub_thread_handler)(void*); + +extern int nousb; +extern int xpad_num; + +struct pci_dev xx_ohci_dev={ + .vendor = 0, + .device = 0, + .bus = NULL, + .irq = 1, // currently not used... + .slot_name = "OHCI", + .dev = {.name = "PCI",.dma_mask=1}, + .base = {0xfed00000}, + .flags = {} +}; + +/*------------------------------------------------------------------------*/ +void BootStartUSB(void) +{ + int n; + + nousb=0; + + init_wrapper(); + subsys_usb_init(); + hub_thread_handler=thread_handler; + usb_hcd_pci_probe(&xx_ohci_dev, module_table_pci_ids); + XPADInit(); + + XRemoteInit(); + + UsbKeyBoardInit(); + + for(n=0;n<30;n++) { + USBGetEvents(); + wait_ms(1); + } +} +/*------------------------------------------------------------------------*/ +void USBGetEvents(void) +{ + inc_jiffies(1); + do_all_timers(); + hub_thread_handler(NULL); + handle_irqs(-1); +} +/*------------------------------------------------------------------------*/ +void BootStopUSB(void) +{ + int n; + + XPADRemove(); + XRemoteRemove(); + UsbKeyBoardRemove(); + + for(n=0;n<100;n++) + { + USBGetEvents(); + wait_ms(1); + } + + module_exit_usb_exit(); + usb_hcd_pci_remove(&xx_ohci_dev); + +} +/*------------------------------------------------------------------------*/ diff --git a/reactos/drivers/usb/cromwell/sys/Makefile b/reactos/drivers/usb/cromwell/sys/Makefile new file mode 100644 index 00000000000..a57d8cec5c6 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/Makefile @@ -0,0 +1,4 @@ + +O_TARGET := usbwrapper.o BootUSB.o linuxwrapper.o xpad.o xremote.o usbkey.o risefall.o + +include $(TOPDIR)/Rules.make diff --git a/reactos/drivers/usb/cromwell/sys/linuxwrapper.c b/reactos/drivers/usb/cromwell/sys/linuxwrapper.c new file mode 100644 index 00000000000..fce04d21250 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/linuxwrapper.c @@ -0,0 +1,271 @@ +/* + * USB support based on Linux kernel source + * + * 2003-06-21 Georg Acher (georg@acher.org) + * + * Concept: + * + * 1) Forget all device interrupts, scheduling, semaphores, threads etc. + * 1a) Forget all DMA and PCI helper functions + * 2) Forget usbdevfs, procfs and ioctls + * 3) Emulate OHCI interrupts and root hub timer by polling + * 4) Emulate hub kernel thread by polling + * 5) Emulate synchronous USB-messages (usb_*_msg) with busy waiting + * + * To be done: + * 6) Remove code bloat + * + */ + +#include "../usb_wrapper.h" + +/* internal state */ + +static struct pci_dev *pci_probe_dev; +extern int (*thread_handler)(void*); +extern void* thread_parm; + +struct my_irqs reg_irqs[MAX_IRQS]; +int num_irqs; +int need_wakeup; + +int my_jiffies; + +struct timer_list *main_timer_list[MAX_TIMERS]; +struct dummy_process act_cur={0}; +struct dummy_process *my_current; + +int (*thread_handler)(void*); +void* thread_parm; + +#define MAX_DRVS 8 +static struct device_driver *m_drivers[MAX_DRVS]; +static int drvs_num; + +/*------------------------------------------------------------------------*/ +/* + * Helper functions for top-level system + */ +/*------------------------------------------------------------------------*/ +void init_wrapper(void) +{ + int n; + for(n=0;nfunction && main_timer_list[n]->expires) + { + void (*function)(unsigned long)=main_timer_list[n]->function; + unsigned long data=main_timer_list[n]->data; + main_timer_list[n]->expires=0; + + main_timer_list[n]=NULL; // remove timer +// printk("do timer %i fn %p\n",n,function); + + function(data); + } + } +} +/*------------------------------------------------------------------------*/ +// Purpose: Remember thread procedure and data in global var +int my_kernel_thread(int (*handler)(void*), void* parm, int flags) +{ + thread_handler=handler; + thread_parm=parm; + return 42; // PID :-) +} +/*------------------------------------------------------------------------*/ +/* Device management + * As simple as possible, but as complete as necessary ... + */ +/*------------------------------------------------------------------------*/ + + +/* calls probe function for hotplug (which does device matching), this is the +only link between usbcore and the registered device drivers! */ +int my_device_add(struct device *dev) +{ + int n,found=0; +// printk("drv_num %i %p %p\n",drvs_num,m_drivers[0]->probe,m_drivers[1]->probe); + if (dev->driver) + { + if (dev->driver->probe) + return dev->driver->probe(dev); + } + else + { + for(n=0;nprobe) + { + dev->driver=m_drivers[n]; +// printk("probe%i %p ",n,m_drivers[n]->probe); + if (m_drivers[n]->probe(dev) == 0) + { +// return 0; + found=1; + } + } + } + if (found) return 0; + } + dev->driver=NULL; + return -ENODEV; +} +/*------------------------------------------------------------------------*/ +int my_driver_register(struct device_driver *driver) +{ + + if (drvs_numprobe); + m_drivers[drvs_num++]=driver; + return 0; + } + return -1; +} +/*------------------------------------------------------------------------*/ +int my_device_unregister(struct device *dev) +{ + if (dev->driver && dev->driver->remove) + dev->driver->remove(dev); + return 0; + +} +/*------------------------------------------------------------------------*/ +struct device *my_get_device(struct device *dev) +{ + return NULL; +} +/*------------------------------------------------------------------------*/ +void my_device_initialize(struct device *dev) +{ +} +/*------------------------------------------------------------------------*/ +void my_wake_up(void* p) +{ + need_wakeup=1; +} +/*------------------------------------------------------------------------*/ +/* wait until woken up (only one wait allowed!) */ +int my_schedule_timeout(int x) +{ + int wait=1; + x+=10; // safety +// printk("schedule_timeout %i\n",x); + while(x>0) + { + do_all_timers(); +#ifndef HAVE_IRQS + handle_irqs(-1); + +#endif + if (need_wakeup) + break; + wait_ms(wait); + inc_jiffies(wait); + x-=wait; + } + need_wakeup=0; +// printk("schedule DONE!!!!!!\n"); + return x; +} +/*------------------------------------------------------------------------*/ +void my_wait_for_completion(struct completion *x) +{ + int n=100; +// printk("wait for completion\n"); + while(!x->done && (n>0)) + { + do_all_timers(); +#ifndef HAVE_IRQS + handle_irqs(-1); + +#endif + wait_ms(10); + n--; + } +// printk("wait for completion done %i\n",x->done); +} +/*------------------------------------------------------------------------*/ +// Helper for pci_module_init +/*------------------------------------------------------------------------*/ +int my_pci_module_init(struct pci_driver *x) +{ + struct pci_dev *dev=pci_probe_dev; + const struct pci_device_id *id=NULL; + if (!pci_probe_dev) + { + printk(KERN_ERR "PCI device not set!\n"); + return 0; + } + x->probe(dev, id); + return 0; +} +/*------------------------------------------------------------------------*/ +struct pci_dev *my_pci_find_slot(int a,int b) +{ + return NULL; +} +/*------------------------------------------------------------------------*/ +int my_request_irq(unsigned int irq, + int (*handler)(int,void *, struct pt_regs *), + unsigned long mode, const char *desc, void *data) +{ + if (num_irqs0x30)&&(xpad_button_history[selected_Button]==0)) { + // Button Rising Edge + xpad_button_history[selected_Button] = 1; + return 1; + } + + if ((Button==0x00)&&(xpad_button_history[selected_Button]==1)) { + // Button Falling Edge + xpad_button_history[selected_Button] = 0; + return -1; + } + } + + if ((selected_Button > 5) & (selected_Button < 10) ) { + + unsigned char Buttonmask; + + switch (selected_Button) { + case TRIGGER_XPAD_PAD_UP : + Buttonmask = XPAD_PAD_UP; + break; + case TRIGGER_XPAD_PAD_DOWN : + Buttonmask = XPAD_PAD_DOWN; + break; + case TRIGGER_XPAD_PAD_LEFT : + Buttonmask = XPAD_PAD_LEFT; + break; + case TRIGGER_XPAD_PAD_RIGHT : + Buttonmask = XPAD_PAD_RIGHT; + break; + } + + // Rising Edge + if (((XPAD_current[0].pad&Buttonmask) != 0) & ((xpad_button_history[6]&Buttonmask) == 0)) { + xpad_button_history[6] ^= Buttonmask; // Flip the Bit + return 1; + } + // Falling Edge + if (((XPAD_current[0].pad&Buttonmask) == 0) & ((xpad_button_history[6]&Buttonmask) != 0)) { + xpad_button_history[6] ^= Buttonmask; // Flip the Bit + return -1; + } + } + return 0; +} diff --git a/reactos/drivers/usb/cromwell/sys/ros_wrapper.c b/reactos/drivers/usb/cromwell/sys/ros_wrapper.c new file mode 100644 index 00000000000..d97f1c6aa40 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/ros_wrapper.c @@ -0,0 +1,10 @@ +#include "../usb_wrapper.h" + + +void wait_ms(int mils) +{ + LARGE_INTEGER Interval; + + Interval.QuadPart = -mils*10; + KeDelayExecutionThread(KernelMode, FALSE, &Interval); +} diff --git a/reactos/drivers/usb/cromwell/sys/usbkey.c b/reactos/drivers/usb/cromwell/sys/usbkey.c new file mode 100644 index 00000000000..efb237d49a9 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/usbkey.c @@ -0,0 +1,123 @@ +#include "../usb_wrapper.h" + +#define keyboarddebug 0 + +#if keyboarddebug +extern int printe(const char *szFormat, ...); +int ycoffset = 0; +#endif + +unsigned int current_keyboard_key; + +struct usb_kbd_info { + struct urb *urb; + unsigned char kbd_pkt[8]; + unsigned char old[8]; + + /* + struct input_dev dev; + struct usb_device *usbdev; + struct urb irq, led; + struct usb_ctrlrequest dr; + unsigned char leds, newleds; + char name[128]; + int open; + */ +}; + +static void usb_kbd_irq(struct urb *urb, struct pt_regs *regs) +{ + struct usb_kbd_info *kbd = urb->context; + int i; + + if (urb->status) return; + + memcpy(kbd->kbd_pkt, urb->transfer_buffer, 8); + + current_keyboard_key = kbd->kbd_pkt[2]; + + + #if keyboarddebug + ycoffset += 15; + ycoffset = ycoffset % 600; + VIDEO_CURSOR_POSX=20; + VIDEO_CURSOR_POSY=ycoffset; + printe(" -%02x %02x %02x %02x %02x %02x\n",kbd->kbd_pkt[0],kbd->kbd_pkt[1],kbd->kbd_pkt[2],kbd->kbd_pkt[3],kbd->kbd_pkt[4],kbd->kbd_pkt[5]); + #endif + + usb_submit_urb(urb,GFP_ATOMIC); + +} + +static int usb_kbd_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + struct urb *urb; + struct usb_device *udev = interface_to_usbdev (intf); + struct usb_endpoint_descriptor *ep_irq_in; + struct usb_endpoint_descriptor *ep_irq_out; + struct usb_kbd_info *usbk; + + int i, pipe, maxp; + char *buf; + + usbk=(struct usb_kbd_info *)kmalloc(sizeof(struct usb_kbd_info),0); + if (!usbk) return -1; + + urb=usb_alloc_urb(0,0); + if (!urb) return -1; + + usbk->urb=urb; + + ep_irq_in = &intf->altsetting[0].endpoint[0].desc; + usb_fill_int_urb(urb, udev, + usb_rcvintpipe(udev, ep_irq_in->bEndpointAddress), + usbk->kbd_pkt, 8, usb_kbd_irq, + usbk, 8); + + usb_submit_urb(urb,GFP_ATOMIC); + usb_set_intfdata(intf,usbk); + #if keyboarddebug + printe("USB Keyboard Connected\n"); + #endif +} + + +static void usb_kbd_disconnect(struct usb_interface *intf) +{ + struct usb_kbd_info *usbk = usb_get_intfdata (intf); + usbprintk("Keyboard disconnected\n "); + usb_unlink_urb(usbk->urb); + usb_free_urb(usbk->urb); + kfree(usbk); +} + +static struct usb_device_id usb_kbd_id_table [] = { + { USB_INTERFACE_INFO(3, 1, 1) }, + { } /* Terminating entry */ +}; + + +static struct usb_driver usb_kbd_driver = { + .owner = THIS_MODULE, + .name = "keyboard", + .probe = usb_kbd_probe, + .disconnect = usb_kbd_disconnect, + .id_table = usb_kbd_id_table, +}; + +void UsbKeyBoardInit(void) +{ + + //current_remote_key=0; + //sbprintk("Keyboard probe %p ",xremote_probe); + if (usb_register(&usb_kbd_driver) < 0) { + #if keyboarddebug + printe("Unable to register Keyboard driver"); + #endif + return; + } +} + +void UsbKeyBoardRemove(void) { + usb_deregister(&usb_kbd_driver); +} diff --git a/reactos/drivers/usb/cromwell/sys/usbwrapper.c b/reactos/drivers/usb/cromwell/sys/usbwrapper.c new file mode 100644 index 00000000000..f2de2204543 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/usbwrapper.c @@ -0,0 +1,65 @@ +/* + * Interface calls to BIOS + * + * 2003-06-21 Georg Acher (georg@acher.org) + * + */ + +#include "boot.h" +#include +#include "video.h" + +/*------------------------------------------------------------------------*/ +// Output window for USB messages +int usb_curs_x=0; +int usb_curs_y=0; + +void zxprintf(char* fmt, ...) +{ + va_list ap; + char buffer[1024]; + int tmp_x, tmp_y; + tmp_x=VIDEO_CURSOR_POSX; + tmp_y=VIDEO_CURSOR_POSY; + + VIDEO_CURSOR_POSX=usb_curs_x; + VIDEO_CURSOR_POSY=usb_curs_y; + + if ((VIDEO_CURSOR_POSY==0) || (VIDEO_CURSOR_POSY > (vmode.height -16))) + { + BootVideoClearScreen(&jpegBackdrop, 3*vmode.height/4, + vmode.height); + VIDEO_CURSOR_POSY=3*vmode.height/4; + } + + va_start(ap, fmt); + vsprintf(buffer,fmt,ap); + //printk(buffer); + va_end(ap); + + usb_curs_x=VIDEO_CURSOR_POSX; + usb_curs_y=VIDEO_CURSOR_POSY; + VIDEO_CURSOR_POSX=tmp_x; + VIDEO_CURSOR_POSY=tmp_y; +} +/*------------------------------------------------------------------------*/ +int zxsnprintf(char *buffer, size_t s, char* fmt, ...) +{ + va_list ap; + int x; + va_start(ap, fmt); + x=vsprintf(buffer,fmt,ap); + va_end(ap); + return x; +} +/*------------------------------------------------------------------------*/ +int zxsprintf(char *buffer, char* fmt, ...) +{ + va_list ap; + int x; + va_start(ap, fmt); + x=vsprintf(buffer,fmt,ap); + va_end(ap); + return x; +} +/*------------------------------------------------------------------------*/ diff --git a/reactos/drivers/usb/cromwell/sys/xpad.c b/reactos/drivers/usb/cromwell/sys/xpad.c new file mode 100644 index 00000000000..e6d3122c80f --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/xpad.c @@ -0,0 +1,183 @@ +/* + * Simple XPAD driver for XBOX + * + * (c) 2003-07-04, Georg Acher (georg@acher.org) + * + * Inspired by linux/drivers/usb/input/xpad.c + * by Marko Friedemann + * + */ + + + +#include "../usb_wrapper.h" +#include "config.h" + +// history for the Rising - falling events +unsigned char xpad_button_history[7]; + +/* Stores time and XPAD state */ +struct xpad_data XPAD_current[4]; +struct xpad_data XPAD_last[4]; + +struct xpad_info +{ + struct urb *urb; + int num; + unsigned char data[32]; +}; + +int xpad_num=0; +/*------------------------------------------------------------------------*/ +static void xpad_irq(struct urb *urb, struct pt_regs *regs) +{ + struct xpad_info *xpi = urb->context; + unsigned char* data= urb->transfer_buffer; + +// struct xpad_data *xp=&XPAD_current[xpi->num]; +// struct xpad_data *xpo=&XPAD_last[xpi->num]; + + /* This hack means the xpad event always gets posted to the + * first xpad - avoids problems iterating over multiple xpads + * as the xpi->num entries are not reused when xpads are + * connected, then removed */ + + struct xpad_data *xp=&XPAD_current[0]; + struct xpad_data *xpo=&XPAD_last[0]; + + if (xpi->num<0 || xpi->num>3) + return; + + memcpy(xpo,xp,sizeof(struct xpad_data)); + + xp->stick_left_x=(short) (((short)data[13] << 8) | data[12]); + xp->stick_left_y=(short) (((short)data[15] << 8) | data[14]); + xp->stick_right_x=(short) (((short)data[17] << 8) | data[16]); + xp->stick_right_y=(short) (((short)data[19] << 8) | data[18]); + xp->trig_left= data[10]; + xp->trig_right= data[11]; + xp->pad = data[2]&0xf; + xp->state = (data[2]>>4)&0xf; + xp->keys[0] = data[4]; // a + xp->keys[1] = data[5]; // b + xp->keys[2] = data[6]; // x + xp->keys[3] = data[7]; // y + xp->keys[4] = data[8]; // black + xp->keys[5] = data[9]; // white + xp->timestamp=jiffies; // FIXME: A more uniform flowing time would be better... + usb_submit_urb(urb,GFP_ATOMIC); + +} +/*------------------------------------------------------------------------*/ +static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + struct urb *urb; + struct usb_device *udev = interface_to_usbdev (intf); + struct usb_endpoint_descriptor *ep_irq_in; + struct usb_endpoint_descriptor *ep_irq_out; + struct xpad_info *xpi; + + xpi=kmalloc(sizeof(struct xpad_info),GFP_KERNEL); + if (!xpi) return -1; + + urb=usb_alloc_urb(0,0); + if (!urb) return -1; + + xpi->urb=urb; + xpi->num=xpad_num; + ep_irq_in = &intf->altsetting[0].endpoint[0].desc; + usb_fill_int_urb(urb, udev, + usb_rcvintpipe(udev, ep_irq_in->bEndpointAddress), + xpi->data, 32, xpad_irq, + xpi, 32); + + usb_submit_urb(urb,GFP_ATOMIC); + + usb_set_intfdata(intf,xpi); + usbprintk("XPAD #%i connected\n",xpad_num); + #ifdef XPAD_VIBRA_STARTUP + { + // Brum Brum + char data1[6]={0,6,0,120,0,120}; + char data2[6]={0,6,0,0,0,0}; + int dummy; + + usb_bulk_msg(udev, usb_sndbulkpipe(udev,2), + data1, 6, &dummy, 500); + wait_ms(500); + usb_bulk_msg(udev, usb_sndbulkpipe(udev,2), + data2, 6, &dummy, 500); + } + #endif + xpad_num++; + return 0; +} +/*------------------------------------------------------------------------*/ +static void xpad_disconnect(struct usb_interface *intf) +{ + struct xpad_info *xpi=usb_get_intfdata (intf); + usb_unlink_urb(xpi->urb); + usb_free_urb(xpi->urb); + kfree(xpi); + xpad_num--; +} +/*------------------------------------------------------------------------*/ +static struct usb_device_id xpad_ids [] = { + { USB_DEVICE(0x044f, 0x0f07) },//Thrustmaster, Inc. Controller + { USB_DEVICE(0x045e, 0x0202) },//Microsoft Xbox Controller + { USB_DEVICE(0x045e, 0x0285) },//Microsoft Xbox Controller S + { USB_DEVICE(0x045e, 0x0289) },//Microsoft Xbox Controller S + { USB_DEVICE(0x046d, 0xca88) },//Logitech Compact Controller for Xbox + { USB_DEVICE(0x05fd, 0x1007) },//???Mad Catz Controller??? + { USB_DEVICE(0x05fd, 0x107a) },//InterAct PowerPad Pro + { USB_DEVICE(0x0738, 0x4516) },//Mad Catz Control Pad + { USB_DEVICE(0x0738, 0x4522) },//Mad Catz LumiCON + { USB_DEVICE(0x0738, 0x4526) },//Mad Catz Control Pad Pro + { USB_DEVICE(0x0738, 0x4536) },//Mad Catz MicroCON + { USB_DEVICE(0x0738, 0x4556) },//Mad Catz Lynx Wireless Controller + { USB_DEVICE(0x0c12, 0x9902) },//HAMA VibraX - *FAULTY HARDWARE* + { USB_DEVICE(0x0e4c, 0x1097) },//Radica Gamester Controller + { USB_DEVICE(0x0e4c, 0x2390) },//Radica Games Jtech Controller + { USB_DEVICE(0x0e6f, 0x0003) },//Logic3 Freebird wireless Controller + { USB_DEVICE(0x0e6f, 0x0005) },//Eclipse wireless Controlle + { USB_DEVICE(0x0f30, 0x0202) },//Joytech Advanced Controller + { USB_DEVICE(0xffff, 0xffff) },//Chinese-made Xbox Controller + { USB_DEVICE(0x0000, 0x0000) }, // nothing detected - FAIL + { } /* Terminating entry */ +}; + + +static struct usb_driver xpad_driver = { + .owner = THIS_MODULE, + .name = "XPAD", + .probe = xpad_probe, + .disconnect = xpad_disconnect, + .id_table = xpad_ids, +}; + +/*------------------------------------------------------------------------*/ +void XPADInit(void) +{ + int n; + for(n=0;n<4;n++) + { + memset(&XPAD_current[n], 0, sizeof(struct xpad_data)); + memset(&XPAD_last[n], 0, sizeof(struct xpad_data)); + } + memset(&xpad_button_history, 0, sizeof(xpad_button_history)); + + usbprintk("XPAD probe %p ",xpad_probe); + if (usb_register(&xpad_driver) < 0) { + err("Unable to register XPAD driver"); + return; + } +} +/*------------------------------------------------------------------------*/ +void XPADRemove(void) { + usb_deregister(&xpad_driver); +} + +/*------------------------------------------------------------------------*/ + + + diff --git a/reactos/drivers/usb/cromwell/sys/xremote.c b/reactos/drivers/usb/cromwell/sys/xremote.c new file mode 100644 index 00000000000..7f53f211cc7 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/xremote.c @@ -0,0 +1,142 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * $Id: xremote.c,v 1.5 2004/11/22 19:10:57 davidmpye Exp $ + * + * Copyright (c) 2002 Steven Toth + * + * XBOX DVD dongle infrared device driver for the input driver suite. + * + * This work was derived from the usbkbd.c kernel module. + * + * History: + * + * 2002_08_31 - 0.1 - Initial release + * 2002_09_02 - 0.2 - Added IOCTL support enabling user space administration + * of the translation matrix. + * + */ + +#include "../usb_wrapper.h" + + +u16 current_remote_key; +u8 remotekeyIsRepeat; + +struct xremote_info +{ + struct urb *urb; + unsigned char irpkt[8]; +}; + +/* USB callback completion handler + * Code in transfer_buffer is received as six unsigned chars + * Example PLAY=00 06 ea 0a 40 00 + * The command is located in byte[2], the rest are ignored. + * Key position is byte[4] bit0 (7-0 format) 0=down, 1=up + * All other bits are unknown / now required. + */ + +static void xremote_irq(struct urb *urb, struct pt_regs *regs) +{ + struct xremote_info *xri = urb->context; + + if (urb->status) return; + if (urb->actual_length < 6) return; + + /* Messy/unnecessary, fix this */ + memcpy(xri->irpkt, urb->transfer_buffer, 6); + + /* Set the key action based in the sent action */ + current_remote_key = ((xri->irpkt[2] & 0xff)<<8) | (xri->irpkt[3] & 0xff); + + if (((xri->irpkt[4] & 0xff) + ((xri->irpkt[5] & 0xff ) << 8))>0x41) { + remotekeyIsRepeat=0; + } + else remotekeyIsRepeat=1; + + usb_submit_urb(urb,GFP_ATOMIC); +} + +static int xremote_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + struct urb *urb; + struct usb_device *udev = interface_to_usbdev (intf); + struct usb_endpoint_descriptor *ep_irq_in; + struct usb_endpoint_descriptor *ep_irq_out; + struct xremote_info *xri; + + xri=(struct xremote_info *)kmalloc(sizeof(struct xremote_info),0); + if (!xri) return -1; + + urb=usb_alloc_urb(0,0); + if (!urb) return -1; + + xri->urb=urb; + + ep_irq_in = &intf->altsetting[0].endpoint[0].desc; + usb_fill_int_urb(urb, udev, + usb_rcvintpipe(udev, ep_irq_in->bEndpointAddress), + xri->irpkt, 8, xremote_irq, + xri, 8); + + usb_submit_urb(urb,GFP_ATOMIC); + usb_set_intfdata(intf,xri); + + usbprintk("DVD Remote connected\n"); + return 0; +} + +static void xremote_disconnect(struct usb_interface *intf) +{ + struct xremote_info *xri = usb_get_intfdata (intf); + usbprintk("DVD Remote disconnected\n "); + usb_unlink_urb(xri->urb); + usb_free_urb(xri->urb); + kfree(xri); +} + +static struct usb_device_id xremote_id_table [] = { + { USB_DEVICE(0x040b, 0x6521) }, /* Gamester Xbox DVD Movie Playback Kit IR */ + { USB_DEVICE(0x045e, 0x0284) }, /* Microsoft Xbox DVD Movie Playback Kit IR */ + { USB_DEVICE(0x0000, 0x0000) }, // nothing detected - FAIL + { } /* Terminating entry */ +}; + +static struct usb_driver xremote_driver = { + .owner = THIS_MODULE, + .name = "XRemote", + .probe = xremote_probe, + .disconnect = xremote_disconnect, + .id_table = xremote_id_table, +}; + +void XRemoteInit(void) +{ + + current_remote_key=0; + usbprintk("XRemote probe %p ",xremote_probe); + if (usb_register(&xremote_driver) < 0) { + err("Unable to register XRemote driver"); + return; + } +} + +void XRemoteRemove(void) { + usb_deregister(&xremote_driver); +} diff --git a/reactos/drivers/usb/cromwell/usb_wrapper.h b/reactos/drivers/usb/cromwell/usb_wrapper.h new file mode 100644 index 00000000000..47e0d9bbb83 --- /dev/null +++ b/reactos/drivers/usb/cromwell/usb_wrapper.h @@ -0,0 +1,14 @@ +//#include +//#include +//#include +#include +#include + +void wait_ms(int mils); + +#include "linux/linux_wrapper.h" +#define __KERNEL__ +#undef CONFIG_PCI +#define CONFIG_PCI + +#include "linux/usb.h"