aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hcd.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-12-01usb hub: fix root hub code so it takes more than 15 devices per root hubinaky@linux.intel.com1-1/+3
Wireless USB Host Controllers accept a large number of devices per host, which shows up as a large number of ports in its root hub. When the number of ports in a hub device goes over 16, the activation of the hub fails with the cryptic message in klogd. hub 2-0:1.0: activate --> -22 Following this further, it was seen that: hub_probe() hub_configure() generates pipe number pseudo allocates buffer 'maxp' bytes in size using usb_maxpacket() The endpoint descriptor for a root hub interrupt endpoint is declared in drivers/usb/core/hcd.c:hs_rh_config_descriptor and declares it to be size two (supporting 15 devices max). hub_activate() usb_hcd_submit_urb() rh_urb_enqueue() urb->pipe is neither int nor ctl, so it errors out rh_queue_status() Returns -EINVAL because the buffer length is smaller than the minimum needed to report all the hub port bits as in accordance with USB2.0[11.12.3]. There has to be trunc((PORTS + 1 + 7) / 8) bytes of space at least. Alan Stern confirmed that the reason for reading maxpktsize and not the right amount is because some hubs are known to return more data and thus cause overflow. So this patch simply changes the code to make the interrupt endpoint's max packet size be at least the minimum required by USB_MAXCHILDREN (instead of a fixed magic number) and add documentation for that. This way we are always ahead of the limit. Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells1-8/+7
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-02[PATCH] namespaces: utsname: use init_utsname when appropriateSerge E. Hallyn1-2/+2
In some places, particularly drivers and __init code, the init utsns is the appropriate one to use. This patch replaces those with a the init_utsname helper. Changes: Removed several uses of init_utsname(). Hope I picked all the right ones in net/ipv4/ipconfig.c. These are now changed to utsname() (the per-process namespace utsname) in the previous patch (2/7) [akpm@osdl.org: CIFS fix] Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Cc: Kirill Korotaev <dev@openvz.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Andrey Savochkin <saw@sw.ru> Cc: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-28USB: allow both root-hub interrupts and pollingAlan Stern1-2/+1
Originally I didn't think any host controller driver would ever use interrupts and polling at the same time, but it turns out ohci-hcd wants to do exactly that. This patch (as788) makes it possible. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28USB: Fix alignment of buffer passed down to ->hub_control()Mikael Pettersson1-1/+2
Implementations assume the buffer is at least 4 byte aligned. Signed-off-by: David S. Miller <davem@davemloft.net> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27usbcore: remove usb_suspend_root_hubAlan Stern1-44/+0
This patch (as740) removes the existing support for autosuspend of root hubs. That support fit in rather awkwardly with the rest of usbcore and it was used only by ohci-hcd. It won't be needed any more since the hub driver will take care of autosuspending all hubs, root or external. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27usbcore: trim down usb_bus structureAlan Stern1-44/+23
As part of the ongoing program to flatten out the HCD bus-glue layer, this patch (as771b) eliminates the hcpriv, release, and kref fields from struct usb_bus. hcpriv and release were not being used for anything worthwhile, and kref has been moved into the enclosing usb_hcd structure. Along with those changes, the patch gets rid of usb_bus_get and usb_bus_put, replacing them with usb_get_hcd and usb_put_hcd. The one interesting aspect is that the dev_set_drvdata call was removed from usb_put_hcd, where it clearly doesn't belong. This means the driver private data won't get reset to NULL. It shouldn't cause any problems, since the private data is undefined when no driver is bound. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27usbcore: Add flag for whether a host controller uses DMAAlan Stern1-3/+5
This patch (as770b) introduces a new field to usb_bus: a flag indicating whether or not the host controller uses DMA. This serves to encapsulate the computation. It also means we will have only one spot to update if the DMA API changes. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27USB: remove struct usb_operationsAlan Stern1-44/+5
All of the currently-supported USB host controller drivers use the HCD bus-glue framework. As part of the program for flattening out the glue layer, this patch (as769) removes the usb_operations structure. All function calls now go directly to the HCD routines (slightly renamed to remain within the "usb_" namespace). The patch also removes usb_alloc_bus(), because it's not useful in the HCD framework and it wasn't referenced anywhere. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27usbcore: make hcd_endpoint_disable wait for queue to drainAlan Stern1-30/+35
The inconsistent lock state problem in usbcore (the one that shows up when an HCD is unloaded) comes down to two inter-related problems: usb_rh_urb_dequeue() isn't set up to be called with interrupts disabled. hcd_endpoint_disable() doesn't wait for all URBs on the endpoint's queue to complete. The two problems are related because the one type of URB that isn't likely to be complete when hcd_endpoint_disable() returns is a root-hub URB. Right now usb_rh_urb_dequeue() waits for them to complete, and it assumes interrupts are enabled so it can wait. But hcd_endpoint_disable() calls it with interrupts disabled. Now, it should be legal to unlink root-hub URBs with interrupts disabled. The solution is to move the waiting into hcd_endpoint_disable(), where it belongs. This patch (as754) does that. It turns out to be completely safe to replace the del_timer_sync() with a simple del_timer(). It doesn't matter if the timer routine is running; hcd_root_hub_lock will synchronize the two threads and the status URB will complete with an unlink error, as it should. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27USB: Properly unregister reboot notifier in case of failure in ehci hcdAleksey Gorelov1-0/+11
If some problem occurs during ehci startup, for instance, request_irq fails, echi hcd driver tries it best to cleanup, but fails to unregister reboot notifier, which in turn leads to crash on reboot/poweroff. The following patch resolves this problem by not using reboot notifiers anymore, but instead making ehci/ohci driver get its own shutdown method. For PCI, it is done through pci glue, for everything else through platform driver glue. One downside: sa1111 does not use platform driver stuff, and does not have its own shutdown hook, so no 'shutdown' is called for it now. I'm not sure if it is really necessary on that platform, though. Signed-off-by: Aleks Gorelov <dared1st@yahoo.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-20[SPARC]: Kill __irq_itoa().David S. Miller1-10/+2
This ugly hack was long overdue to die. It was a way to print out Sparc interrupts in a more freindly format, since IRQ numbers were arbitrary opaque 32-bit integers which vectored into PIL levels. These 32-bit integers were not necessarily in the 0-->NR_IRQS range, but the PILs they vectored to were. The idea now is that we will increase NR_IRQS a little bit and use a virtual<-->real IRQ number mapping scheme similar to PowerPC. That makes this IRQ printing hack irrelevant, and furthermore only a handful of drivers actually used __irq_itoa() making it even less useful. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-08[PATCH] USB: fix OHCI PM regressionDavid Brownell1-7/+6
This fixes a small regression in USB controller power usage for many OHCI controllers, notably including every non-PCI version of OHCI: on those systems, the runtime autosuspend mechanism is no longer enabled. The change moves to saner defaults. All root hubs are expected to handle remote wakeup (and hence autosuspend), although drivers for buggy silicon may override that default. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20[PATCH] USB core and HCDs: don't put_device while atomicAlan Stern1-2/+0
This patch (as640) removes several put_device and the corresponding get_device calls from the USB core and HCDs. Some of the puts were done in atomic contexts, and none of them are needed since the core now guarantees that every endpoint will be disabled and every URB completed before a USB device is released. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20[PATCH] USB: remove usbcore-specific wakeup flagsDavid Brownell1-14/+26
This makes usbcore use the driver model wakeup flags for host controllers and for their root hubs. Since previous patches have removed all users of the HCD flags they replace, this converts the last users of those flags. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20[PATCH] USB: usbcore sets up root hubs earlierDavid Brownell1-49/+55
Make the HCD initialization sequence more sane ... notably, setting up root hubs before HCDs are asked to do their one-time init. Among other things, that lets the HCDs do custom root hub init along with all the other one-time initialization done in the (now misnamed) reset() method. This also copies the controller wakeup flags into the root hub; it's done a bit later than would be ideal, but that'll be necessary until the PCI code initializes them correctly. (The PCI patch breaks on PPC due to how it sequences PCI initialization.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20[PATCH] USB: convert a bunch of USB semaphores to mutexesArjan van de Ven1-12/+13
the patch below converts a bunch of semaphores-used-as-mutex in the USB code to mutexes Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04[PATCH] USB: Consider power budget when choosing configurationAlan Stern1-2/+3
This patch (as609) changes the way we keep track of power budgeting for USB hubs and devices, and it updates the choose_configuration routine to take this information into account. (This is something we should have been doing all along.) A new field in struct usb_device holds the amount of bus current available from the upstream port, and the usb_hub structure keeps track of the current available for each downstream port. Two new rules for configuration selection are added: Don't select a self-powered configuration when only bus power is available. Don't select a configuration requiring more bus power than is available. However the first rule is #if-ed out, because I found that the internal hub in my HP USB keyboard claims that its only configuration is self-powered. The rule would prevent the configuration from being chosen, leaving the hub & keyboard unconfigured. Since similar descriptor errors may turn out to be fairly common, it seemed wise not to include a rule that would break automatic configuration unnecessarily for such devices. The second rule may also trigger unnecessarily, although this should be less common. More likely it will annoy people by sometimes failing to accept configurations that should never have been chosen in the first place. The patch also changes usbcore's reaction when no configuration is suitable. Instead of raising an error and rejecting the device, now the core will simply leave the device unconfigured. People can always work around such problems by installing configurations manually through sysfs. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04[PATCH] USB: Remove USB private semaphoreAlan Stern1-2/+3
This patch (as605) removes the private udev->serialize semaphore, relying instead on the locking provided by the embedded struct device's semaphore. The changes are confined to the core, except that the usb_trylock_device routine now uses the return convention of down_trylock rather than down_read_trylock (they return opposite values for no good reason). A couple of other associated changes are included as well: Now that we aren't concerned about HCDs that avoid using the hcd glue layer, usb_disconnect no longer needs to acquire the usb_bus_lock -- that can be done by usb_remove_hcd where it belongs. Devices aren't locked over the same scope of code in usb_new_device and hub_port_connect_change as they used to be. This shouldn't cause any trouble. Along with the preceding driver core patch, this needs a lot of testing. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-29[PATCH] USB: Fix USB suspend/resume crasher (#2)Benjamin Herrenschmidt1-5/+10
This patch closes the IRQ race and makes various other OHCI & EHCI code path safer vs. suspend/resume. I've been able to (finally !) successfully suspend and resume various Mac models, with or without USB mouse plugged, or plugging while asleep, or unplugging while asleep etc... all without a crash. Alan, please verify the UHCI bit I did, I only verified that it builds. It's very simple so I wouldn't expect any issue there. If you aren't confident, then just drop the hunks that change uhci-hcd.c I also made the patch a little bit more "safer" by making sure the store to the interrupt register that disables interrupts is not posted before I set the flag and drop the spinlock. Without this patch, you cannot reliably sleep/wakeup any recent Mac, and I suspect PCs have some more sneaky issues too (they don't frankly crash with machine checks because x86 tend to silently swallow PCI errors but that won't last afaik, at least PCI Express will blow up in those situations, but the USB code may still misbehave). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-17[PATCH] USB: move CONFIG_USB_DEBUG checks into the MakefileGreg Kroah-Hartman1-5/+0
This lets us remove a lot of code in the drivers that were all checking the same thing. It also found some bugs in a few of the drivers, which has been fixed up. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28[PATCH] USB: Fix maxpacket length for ep0 on root hubsAlan Stern1-2/+2
This patch (as591) fixes a rather innocuous bug that has been around for quite a long time: Virtual root hubs should have a maxpacket length of 64 for endpoint 0. I didn't realize it was wrong until I started looking through the endpoint attribute files. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] usbcore: Use kzalloc instead of kmalloc/memsetAlan Stern1-2/+1
This patch (as590) fixes up all the remaining places where usbcore can use kzalloc rather than kmalloc/memset. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] USB: convert usbmon to use usb notifiersGreg Kroah-Hartman1-2/+0
This also removes 2 usbmon callbacks. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] USB: convert usbfs/inode.c to use usb notifiersGreg Kroah-Hartman1-2/+0
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] USB: add notifier functions to the USB core for devices and bussesGreg Kroah-Hartman1-0/+2
This should let us get rid of all of the different hooks in the USB core for when something has changed. Also, some other parts of the kernel have wanted to know this kind of information at times. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] USB: Rename hcd->hub_suspend to hcd->bus_suspendAlan Stern1-10/+6
This patch (as580) is perhaps the only result from the long discussion I had with David about his changes to the root-hub suspend/resume code. It renames the hub_suspend and hub_resume methods in struct usb_hcd to bus_suspend and bus_resume. These are more descriptive names, since the methods really do suspend or resume an entire USB bus, and less likely to be confused with the hub_suspend and hub_resume routines in hub.c. It also takes David's advice about removing the layer of bus glue, where those methods are called. And it implements a related change that David made to the other HCDs but forgot to put into dummy_hcd. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] updates for "controller suspended" handlingDavid Brownell1-16/+12
Reject URBs to _all_ devices when their host controllers are suspended; even root hub registers will be unavailable. Also, don't reject urbs to root hubs in other cases; the only upstream link is through that controller (on PCI or whatever SOC bus is in use). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> drivers/usb/core/hcd.c | 28 ++++++++++++---------------- drivers/usb/core/urb.c | 3 ++- 2 files changed, 14 insertions(+), 17 deletions(-)
2005-10-28[PATCH] root hub changes (lesser half)David Brownell1-7/+57
This patch collects various small updates related to root hubs, to shrink later patches which build on them. - For root hub suspend/resume support: * Make the existing usb_hcd_resume_root_hub() routine respect pmcore locking, exporting and using the dpm_runtime_resume() method. * Add a new usb_hcd_suspend_root_hub() to pair with that routine. (Essential to make OHCI autosuspend behave again...) * HC_SUSPENDED by itself only refers to the root hub's downstream ports. So let HCDs see root hub URBs unless the parent device is suspended. - Remove an assertion we no longer need (and now, also don't want). - Generic suspend/resume updates to work better with swsusp. * Ignore the FREEZE vs SUSPEND distinction for hardware; trying to use it breaks the swsusp snapshots it's supposed to help (sigh). * On resume, mark devices as resumed right away, but then do nothing else if the device is marked NOTATTACHED. These changes shouldn't be very noticable by themselves. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> drivers/base/power/runtime.c | 1 drivers/usb/core/hcd.c | 64 ++++++++++++++++++++++++++++++++++++++----- drivers/usb/core/hcd.h | 1 drivers/usb/core/hub.c | 45 ++++++++++++++++++++++++------ drivers/usb/core/usb.c | 20 +++++++++---- drivers/usb/core/usb.h | 1 6 files changed, 111 insertions(+), 21 deletions(-)
2005-10-28[PATCH] all HCDs provide root hub suspend/resume methodsDavid Brownell1-15/+27
This cleans up a small recent FIXME, ensuring that all the HCDs provide root hub suspend/resume methods. It also wraps the calls to those root suspend routines just like on the PCI "USB_SUSPEND not defined" cases, so non-PCI bus glue won't be as tempted to behave very differently. Several of the SOC based OHCI drivers forgot to list those methods; the patch also adds those missing declarations. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> drivers/usb/core/hcd.c | 42 +++++++++++++++++++++++++--------------- drivers/usb/host/ohci-au1xxx.c | 5 ++++ drivers/usb/host/ohci-lh7a404.c | 5 ++++ drivers/usb/host/ohci-pxa27x.c | 1 drivers/usb/host/ohci-s3c2410.c | 1 drivers/usb/host/ohci-sa1111.c | 1 6 files changed, 40 insertions(+), 15 deletions(-)
2005-10-28[PATCH] remove some USB_SUSPEND dependenciesDavid Brownell1-0/+2
This simplifies some of the PM-related #ifdeffing by recognizing that USB_SUSPEND depends on PM. Also, OHCI drivers were often testing for USB_SUSPEND when they should have tested just PM. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> drivers/usb/core/hcd.c | 2 ++ drivers/usb/host/ohci-hcd.c | 2 +- drivers/usb/host/ohci-hub.c | 4 ++-- drivers/usb/host/ohci-omap.c | 2 +- drivers/usb/host/ohci-pci.c | 2 +- drivers/usb/host/ohci-ppc-soc.c | 4 ++-- drivers/usb/host/ohci-pxa27x.c | 2 +- drivers/usb/host/ohci-s3c2410.c | 3 +-- drivers/usb/host/ohci-sa1111.c | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-)
2005-10-28Merge ../bleed-2.6Greg KH1-1/+1
2005-10-28[PATCH] Driver Core: fix up all callers of class_device_create()Greg Kroah-Hartman1-1/+2
The previous patch adding the ability to nest struct class_device changed the paramaters to the call class_device_create(). This patch fixes up all in-kernel users of the function. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] gfp_t: drivers/usbAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-12[PATCH] usbcore: small changes to HCD glue layerAlan Stern1-2/+1
This patch (as549) introduces two small changes in the HCD glue layer. The first simply removes a redundant test. The second allows root-hub polling to continue for a single iteration after a host controller dies; this is needed for the patch that follows. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-07[PATCH] USB: convert kcalloc to kzallocPekka Enberg1-1/+1
This patch converts kcalloc(1, ...) calls to use the new kzalloc() function. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05[PATCH] Driver core: link device and all class devices derived from it.Dmitry Torokhov1-1/+1
Driver core: link device and all class devices derived from it. To ease the task of locating class devices derived from a certain device create symlinks from parent device to its class devices. Change USB host class device name from usbX to usb_hostX to avoid conflict when creating aforementioned links. Tweaked by Greg to have the symlink be "class_name:class_device_name" in order to prevent duplicate links. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-29[PATCH] USB: fix in usb_calc_bus_timeDan Streetman1-2/+2
This patch does the same swap, i.e. use the ISO macro if (isoc). Additionally, it fixes the return value - the usb_calc_bus_time function returns the time in nanoseconds (I didn't notice that before) while the HS_USECS and HS_USECS_ISO are microseconds. This fixes the function to return nanoseconds always, and adjusts ehci-q.c (the only high-speed caller of the function) to wrap the call in NS_TO_US(). Signed-off-by: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-12[PATCH] USB: Fix kmalloc's flags type in USBOlav Kongas1-1/+1
Greg, This patch fixes the kmalloc() flags argument type in USB subsystem; hopefully all of its occurences. The patch was made against patch-2.6.12-git2 from Jun 20. Cleanup of flags for kmalloc() in USB subsystem. Signed-off-by: Olav Kongas <ok@artecdesign.ee> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27[PATCH] usbcore: register root hub in usb_add_hcdAlan Stern1-23/+49
This patch makes usbcore automatically allocate and register the root hub device for a new host controller when the controller is registered. This way the HCDs don't all have to include the same boilerplate code. As a pleasant side benefit, the register_root_hub routine can now be made static and not EXPORTed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27[PATCH] usbcore support for root-hub IRQ instead of pollingAlan Stern1-86/+121
This is a revised version of an earlier patch to add support to usbcore for driving root hubs by interrupts rather than polling. There's a temporary flag added to struct usb_hcd, marking devices whose drivers are aware of the new mechanism. By default that flag doesn't get set so drivers will continue to see the same polling behavior as before. This way we can convert the HCDs one by one to use interrupt-based event reporting, and the temporary flag can be removed when they're all done. Also included is a small change to the hcd_disable_endpoint routine. Although endpoints normally shouldn't be disabled while a controller is suspended, it's legal to do so when the controller's driver is being rmmod'ed. Lastly the patch adds a new callback, .hub_irq_enable, for use by HCDs where the root hub's port-change interrupts are level-triggered rather than edge-triggered. The callback is invoked each time khubd has finished processing a root hub, to let the HCD know that the interrupt can safely be re-enabled. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-23[PATCH] better USB_MON dependenciesAdrian Bunk1-1/+1
This makes the USB_MON less confusing. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-20[PATCH] USB: move the usb hcd code to use the new class code.gregkh@suse.de1-34/+27
This moves a kref into the main hcd structure, which detaches it from the class device structure. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+1840
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!