An error occurred fetching the project authors.
- 24 Jun, 2004 1 commit
-
-
Alan Stern authored
A tricky problem the dummy_hcd driver has to solve is keeping track of the usb_device structure that corresponds to a registered gadget. Right now that's not done very robustly. This patch stores the address of the structure when a new URB is submitted and also acquires a reference to make sure that completing the final URB won't deallocate the structure before dummy_hcd is through with it. Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Greg Kroah-Hartman <greg@kroah.com>
-
- 23 Jun, 2004 1 commit
-
-
Alan Stern authored
This patch fixes another bug in the dummy_hcd driver. When a gadget driver unregisters (simulating a device disconnect), dummy_hcd stops the timer that it uses for processing outstanding URBs. Unfortunately this means that those URBs will never be given back. The patch lets the timer continue running; when it expires all the remaining URBs will fail so the timer won't be reinitialized. Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Greg Kroah-Hartman <greg@kroah.com>
-
- 18 Jun, 2004 1 commit
-
-
Alan Stern authored
This patch for the dummy_hcd driver prevents it from rejecting SET-ADDRESS requests when the address is already set. The USB 2.0 spec states that if a device is in the ADDRESS state, it should accept and start using the new address. Behavior in the CONFIGURED state is undefined, but since dummy_hcd doesn't keep track of the difference between the two states we might as well accept the new address in any case. Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Greg Kroah-Hartman <greg@kroah.com>
-
- 09 Jun, 2004 1 commit
-
-
Alan Stern authored
There are a few places where the code enumerates through all the USB devices on all the buses, starting with each bus's root hub and working down. However a bus does not always have a root hub, and the code does not check that the root_hub pointer is non-NULL. This patch fixes the problem, using the usb_bus_list_lock semaphore to synchronize access when root hubs are added or removed. In addition it seemed like a good idea to minimize the time that a non-fully-configured root hub is accessible through the bus's pointer. So this patch delays setting the pointer and holds usb_bus_list_lock while configuring a root hub. It turned out that a bunch of things needed to be changed for all this to work: Check for NULL root_hub pointer in usb_device_read() and usb_find_device(). Pass the root-hub device as a separate argument to hcd_register_root(). Make usb_register_root_hub() acquire the usb_bus_list_lock and set the bus->root_hub pointer. For consistency's sake, move the place where the children[] pointer to a non-root-hub device gets stored as close as possible to where usb_new_device() is called. Make usb_disconnect() acquire the usb_bus_list_lock when removing a root hub. Change usb_hcd_pci_remove() and the non-PCI host drivers so that they call usb_disconnect() with a pointer to the bus's root_hub pointer, not a pointer to a temporary variable. Change all the host controller drivers not to store the root_hub pointer in the bus structure but instead to pass it as a new argument to hcd_register_root(). I made some attempt to update the hc_sl811 driver along with the rest, but it's pretty clear that driver won't work in the current framework. Among other things, it never reads the root hub's device descriptor. To what extent is the driver really supported? Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Greg Kroah-Hartman <greg@kroah.com>
-
- 08 Jun, 2004 1 commit
-
-
David Brownell authored
This adds hub_set_power_budget(), mostly so that HCDs for low powered ports (cell phone, PDA, etc) can more easily report their true power budgets. It's not always 500mA per root hub port; this makes dummy_hcd report the minimum, 8mA. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <greg@kroah.com>
-
- 02 Jun, 2004 1 commit
-
-
Alan Stern authored
Greg: This patch fixes a bug in disconnect handling for the dummy_hcd driver. After a disconnect the driver would still accept URBs for endpoint 0, leading to an oops. It also improves the ad-hoc technique used by the driver to track its gadget's struct usb_device and fixes the way port-power changes are handled. Please apply. Alan Stern Signed-off-by:
Greg Kroah-Hartman <greg@kroah.com>
-
- 01 May, 2004 1 commit
-
-
David Brownell authored
Here's what's in my tree to make dummy_hcd do suspend and wakeup correctly ... that is, making its emulated root hub and gadget work more like real ones. It's easier to do this for fake hardware than the real stuff. But real drivers tend to need very similar changes ... :) - Dave p.s. This does not depend on the suspend/resume patch. And it doesn't do "global" suspend (of root hub).
-
- 31 Mar, 2004 1 commit
-
-
Alan Stern authored
When David added an entry to the gadget_chips.h file for the dummy_hcd driver, he mistakenly used the name "dummy_udc" rather than "dummy_hcd". The mistake is understandable, since other controllers use "_udc" in their names and it is illogical to put "_hcd" in a _device_ controller's name. This patch updates the dummy_hcd driver and changes the gadget name to agree with the gadget_chips.h entry.
-
- 26 Mar, 2004 1 commit
-
-
Alan Stern authored
This is a resubmission of as225, together with appropriate changes for the g_serial driver. David Brownell's latest g_ether update makes it unnecessary to change that file or gadget_chips.h. dummy_hcd is simultaneously a host controller driver and a device controller driver. It creates a simulated HC together with a simulated UDC plugged into it. Gadget drivers can run under the simulated UDC and will appear as regular USB devices on the simulated HC. The simulation is reasonably (although not totally) realistic. It's a wonderful tool for testing and developing gadget drivers without the need for lots of additional hardware: Both the host driver and the gadget driver can run on the same computer. It's been available for quite some time in David's gadget-2.6 tree and it works well. I couldn't have gotten the file-storage gadget running in any reasonable length of time without it.
-