1
0
Fork 0
Commit Graph

342 Commits (0e6b9c98be1b517bf99a21d8a7036a8a21e47dd1)

Author SHA1 Message Date
Tim Schmielau de25968cc8 [PATCH] fix more missing includes
Include fixes for 2.6.14-git11.  Should allow to remove sched.h from
module.h on i386, x86_64, arm, ia64, ppc, ppc64, and s390.  Probably more
to come since I haven't yet checked the other archs.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:13:45 -08:00
Russell King f8ce25476d [ARM] Move asm/hardware/clock.h to linux/clk.h
This is needs to be visible to other architectures using the AMBA
bus and peripherals.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-07 16:15:52 +00:00
Russell King 123656d4cc Merge with Linus' kernel. 2006-01-07 14:40:05 +00:00
Dominik Brodowski f8cfa618dc [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback
Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
probe() callback. As all in-kernel drivers are changed to this new
callback, there will be no temporary backwards-compatibility. Inside a
probe() function, each driver _must_ set struct pcmcia_device
*p_dev->instance and instance->handle correctly.

With these patches, the basic driver interface for 16-bit PCMCIA drivers
now has the classic four callbacks known also from other buses:

        int (*probe)            (struct pcmcia_device *dev);
        void (*remove)          (struct pcmcia_device *dev);

        int (*suspend)          (struct pcmcia_device *dev);
        int (*resume)           (struct pcmcia_device *dev);

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:24 +01:00
Dominik Brodowski b463581154 [PATCH] pcmcia: remove dev_list from drivers
The linked list of devices managed by each PCMCIA driver is, in very most
cases, unused. Therefore, remove it from many drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:20 +01:00
Dominik Brodowski cc3b4866be [PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callback
Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function.
Old functionality is preserved, for the moment.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:10 +01:00
Dominik Brodowski 98e4c28b7e [PATCH] pcmcia: new suspend core
Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.

Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew Morton <akpm@osdl.org>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-05 23:59:02 +01:00
Linus Torvalds db9edfd7e3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Trivial manual merge fixup for usb_find_interface clashes.
2006-01-04 18:44:12 -08:00
Kay Sievers 312c004d36 [PATCH] driver core: replace "hotplug" by "uevent"
Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 16:18:08 -08:00
Daniel Marjamäki 6b495f4c5a [PATCH] USB: isp116x-hcd.c: Removed unused variable
Removed unused variable

Signed-off-by: Daniel Marjamäki <daniel.marjamaki@comhem.se>
Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Alan Stern 687f5f3428 [PATCH] USB: UHCI: edit some comments
This patch (as615b) edits a large number of comments in the uhci-hcd code,
mainly removing excess apostrophes.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Alan Stern fa3465689f [PATCH] USB: UHCI: change uhci_explen macro
This patch (as616) changed the uhci_explen macro in uhci-hcd.h so that
it now accepts the desired length, rather than length - 1 with special
handling for 0.  This also fixes a minor bug that would show up only
when a driver submits a 0-length bulk URB.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:41 -08:00
Richard Purdie a5e36d2089 [PATCH] USB: Correct ohci-pxa27x suspend/resume struct confusion
The device data in ohci-pxa27x is a struct hcd, not a struct ohci_hcd.
This correct the suspend/resume calls to account for this and adds some
code to invalidate the platform data when the module is removed.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:40 -08:00
Arjan van de Ven 4c4c9432a6 [PATCH] USB: mark various usb tables const
patch below marks various USB tables and variables as const so that they
end up in .rodata section and don't cacheline share with things that get
written to. For the non-array variables it also allows gcc to optimize
more.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:40 -08:00
Olav Kongas 717f736d93 [PATCH] USB: isp116x-hcd: minor cleanup
When going to suspend, there's no point in setting HC state in
host controller driver as USB core takes care of this.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:35 -08:00
Alan Stern 9ad3d6ccf5 [PATCH] USB: Remove USB private semaphore
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>
2006-01-04 13:48:34 -08:00
Alan Stern 1c50c317e2 [PATCH] USB: central handling for host controllers that were reset during suspend/resume
This patch (as515b) adds a routine to usbcore to simplify handling of
host controllers that lost power or were reset during suspend/resume.
The new core routine marks all the child devices of the root hub as
NOTATTACHED and tells khubd to disconnect the device structures as soon
as possible.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:31 -08:00
David Brownell c9a50cc931 [PATCH] USB: hcd uses EXTRA_CFLAGS for -DDEBUG
This modifies the HCD builds to automatically "-DDEBUG" if
CONFIG_USB_DEBUG is selected.  It's just a minor source code cleanup,
guaranteeing consistency.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:30 -08:00
David Brownell 704aa0b7a9 [PATCH] USB: wakeup flag updates (3/3) isp116x-hcd
This makes the ISP116x HCD use the driver model wakeup flags for its
controller, not the flags in the HCD glue (which will be removed).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:30 -08:00
David Brownell baefbc39d8 [PATCH] USB: wakeup flag updates (2/3) uhci-hcd
This makes UHCI stop using the HCD glue wakeup flags to report whether
the controller can wake the system.  The existing code was wrong anyway;
having a PCI PM capability doesn't imply it reports PME# is supported.

I skimmed Intel's ICH7 datasheet and that basically says the wakeup
signaling gets routed only through ACPI registers.  (On the other hand,
many VIA chips provide the PCI PM capabilities...)  I think that doing
this correctly with UHCI is going to require the ACPI folk to associate
the /proc/acpi/wakeup identifiers (and wakeup enable/disable flags)
with the relevant /sys/devices/pci*/...  devices.

From: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:30 -08:00
David Brownell 0c8624f91d [PATCH] USB: wakeup flag updates (1/3) sl811-hcd
This makes the SL811 HCD use the driver model wakeup flags for its
controller, not the flags in the HCD glue (which will be removed).

From: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/host/sl811-hcd.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
2006-01-04 13:48:30 -08:00
David Brownell d97cc2f2e9 [PATCH] USB: ehci fix driver model wakeup flags
On some systems, EHCI seems to be getting IRQs too early during driver
setup ... before the root hub is allocated, in particular, making trouble
for any code chasing down root hub pointers!  In this case, it seems to
be safe to just ignore the root hub setting.  Thanks to Rafael J. Wysocki
for getting this properly tested.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:30 -08:00
David Brownell 2c1c3c4cd5 [PATCH] USB: EHCI updates (4/4) driver model wakeup flags
This teaches the EHCI driver to use the new driver model wakeup flags,
replacing the similar ones in the HCD glue.  It also adds a workaround
for the current glitch whereby PCI init doesn't init the wakeup flags
from the PCI PM capabilities.  (EHCI controllers don't worry about
legacy mode; the PCI PM capability would always do the job.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:30 -08:00
Alan Stern 6912354a89 [PATCH] USB: EHCI: fix conflation of buf == 0 with len == 0
When the ehci-hcd driver prepares a control URB, it tests for a
zero-length data stage by looking at the transfer_dma value instead of
the transfer_buffer_length.  (In fact it does this even for non-control
URBs, which is an additional aspect of the same bug.)

However, under certain circumstances it's possible for transfer_dma to
be 0 while transfer_buffer_length is non-zero.  This can happen when a
freshly allocated page (mapped to address 0 and marked Copy-On-Write,
but never written to) is used as the source buffer for an OUT transfer.
This patch (as598) fixes the problem.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:29 -08:00
Olav Kongas 959eea2191 [PATCH] USB: isp116x-hcd: cleanup
The attached patch makes a cleanup of isp116x-hcd. Most of the volume of
the patch comes from 2 sources: moving the code around to get rid of a
few function prototypes and reworking register dumping functions/macros.
Among other things, switched over from using procfs to debugfs.

Cleanup. The following changes were made:

- Rework register dumping code so it can be used for dumping
  to both syslog and debugfs.
- Switch from procfs to debugfs..
- Die gracefully on Unrecoverable Error interrupt.
- Fix memory leak in isp116x_urb_enqueue(), if HC happens to
  die in a narrow time window.
- Fix a 'sparce' warning (unnecessary cast).
- Report Devices Removable for root hub ports by default
  (was Devices Permanently Attached).
- Move bus suspend/resume functions down in code to get rid of
  a few function prototypes.
- A number of one-line cleanups.
- Add an entry to MAINTAINERS.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 MAINTAINERS                    |    6
 drivers/usb/host/isp116x-hcd.c |  429 ++++++++++++++++-------------------------
 drivers/usb/host/isp116x.h     |   83 +++++--
 3 files changed, 230 insertions(+), 288 deletions(-)
2006-01-04 13:48:29 -08:00
Olav Kongas 535488fcf1 [PATCH] USB: isp116x-hcd: support reiniting HC on resume
Until now the isp116x-hcd had no support to reinitialize the HC on
resume, if the controller lost its state during suspend. This patch,
generated against your Oct 26 git tree, adds that support. The patch is
basically the same as the one tested by Ivan Kalatchev, who reported the
problem, on 2.6.13.

Please apply,

Support reinitializing the isp116x host controller from scratch on
resume, if the controller has lost its state.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:29 -08:00
Richard Purdie 2e1dcc1600 [PATCH] USB: Add pxa27x OHCI PM functions
Add power management functions for the pxa27x USB OHCI host controller.
This is a totally rewritten version of the patch by Nicolas Pitre and
Todd Poynor which accounts for recent USB changes.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:29 -08:00
Richard Purdie 81f280e22f [PATCH] USB: pxa27x OHCI - Separate platform code from main driver
To allow multiple platforms to use the PXA27x OHCI driver, the platform
code needs to be moved into the board specific files in
arch/arm/mach-pxa. This patch does this for mainstone and adds
preliminary hooks to allow other boards to use the driver.

This has been compile tested for mainstone and successfully run on Spitz
(Sharp Zaurus SL-C3000) with the addition of an appropriate board
support file.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:28 -08:00
Russell King a8d3584a2d [ARM] Remove clk_use()/clk_unuse()
It seems that clk_use() and clk_unuse() are additional complexity
which isn't required anymore.  Remove them from the clock framework
to avoid the additional confusion which they cause, and update all
ARM machine types except for OMAP.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-03 18:41:37 +00:00
Alan Stern 42245e65f3 [PATCH] UHCI: add missing memory barriers
This patch (as617) adds a couple of memory barriers that Ben H. forgot in
his recent suspend/resume fix.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-16 11:25:25 -08:00
David Brownell 8926bfa746 [PATCH] USB: ehci fixups
Rename the EHCI "reset" routine so it better matches what it does (setup);
and move the one-time data structure setup earlier, before doing anything
that implicitly relies on it having been completed already.

From: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-29 21:39:23 -08:00
Benjamin Herrenschmidt 8de9840265 [PATCH] USB: Fix USB suspend/resume crasher (#2)
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-29 21:39:23 -08:00
David Brownell 21b1861fb2 [PATCH] USB: ohci, move ppc asic tweaks nearer pci
This should fix a suspend/resume issues that appear with OHCI on some
PPC hardware.  The PCI layer should doesn't have the hooks needed for
such ASIC-specific hooks (in this case, software clock gating), so
this moves the code to do that into hcd-pci.c ... where it can be
done after the relevant PCI PM state transition (to/from D3).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 23:04:28 -08:00
David Brownell 188075211c [PATCH] USB: EHCI updates split init/reinit logic for resume
Moving the PCI-specific parts of the EHCI driver into their own file
created a few issues ... notably on resume paths which (like swsusp)
require re-initializing the controller.  This patch:

 - Splits the EHCI startup code into run-once HCD setup code and
   separate "init the hardware" reinit code.  (That reinit code is
   a superset of the "early usb handoff" code.)

 - Then it makes the PCI init code run both, and the resume code only
   run the reinit code.

 - It also removes needless pci wrappers around EHCI start/stop methods.

 - Removes a byteswap issue that would be seen on big-endian hardware.

The HCD glue still doesn't actually provide a good way to do all this
run-one init stuff in one place though.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 23:04:28 -08:00
David Brownell abcc944806 [PATCH] USB: EHCI updates mostly whitespace cleanups
This cleans up the recent updates to EHCI PCI support:

  - Gets rid of checks for "is this a PCI device", they're no
    longer needed since this is now all PCI-only code.

  - Reduce log spamming:  MWI is only interesting in the atypical
    case that it can actually be used.

  - Whitespace cleanup, as appropriate for a new file with no
    other pending patches.

So other than that minor logging change, no functional updates.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 23:04:28 -08:00
David Brownell f03c17fc9a [PATCH] USB: EHCI updates
This fixes some bugs in EHCI suspend/resume that joined us over the past
few releases (as usbcore, PCI, pmcore, and other components evolved):

  - Removes suspend and resume recursion from the EHCI driver, getting
    rid of the USB_SUSPEND special casing.

  - Updates the wakeup mechanism to work again; there's a newish usbcore
    call it needs to use.

  - Provide simpler tests for "do we need to restart from scratch", to
    address another case where PCI Vaux was lost.  (In this case it was
    restoring a swsusp snapshot, but there could be others.)

Un-exports a symbol that was temporarily exported.

A notable change from previous version is that this doesn't move
the spinlock init, so there's still a resume/reinit path bug.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 23:04:28 -08:00
Andrey Volkov 2463ade2cb [PATCH] Fix copy-paste bug in ohci-ppc-soc.c
Fix copy-paste bug in ohci-ppc-soc.c(ohci_hcd_ppc_soc_drv_remove)

Signed-off-by: Andrey Volkov <avolkov@varma-el.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-18 07:49:45 -08:00
Richard Purdie 87cf203935 [PATCH] USB: OHCI lh7a404 platform device conversion fixup
Fix an error in the OHCI lh7a404 driver after the platform device
conversion.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-17 11:29:55 -08:00
Linus Torvalds 5643f000c1 Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-11-11 09:24:26 -08:00
Greg Kroah-Hartman 249bb070f5 [PATCH] PCI: removed unneeded .owner field from struct pci_driver
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-10 16:09:17 -08:00
Russell King 3ae5eaec1d [DRIVER MODEL] Convert platform drivers to use struct platform_driver
This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-09 22:32:44 +00:00
Olaf Hering 733482e445 [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason
This patch removes almost all inclusions of linux/version.h.  The 3
#defines are unused in most of the touched files.

A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
unfortunatly in linux/version.h.

There are also lots of #ifdef for long obsolete kernels, this was not
touched.  In a few places, the linux/version.h include was move to where
the LINUX_VERSION_CODE was used.

quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`

search pattern:
/UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09 07:55:57 -08:00
David S. Miller 462aae65f6 [USB]: Make early handoff a final fixup instead of a header one.
At header fixup time, it is not yet legal to ioremap() PCI
device registers, yet that is what this quirk code needs to
do.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-04 11:17:24 -08:00
Linus Torvalds 541ab4af11 Don't touch USB controller IO registers when they are disabled
The USB "handoff" code is an early PCI quirk to make sure we own the USB
controller (as opposed to the BIOS/SMM).  But if the controller isn't
even enabled yet, don't try to access it.

Acked-by: Paul Mackerras <paulus@samba.org> (who had an alternate patch)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-31 21:12:40 -08:00
Linus Torvalds 4fd5f8267d Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
Manual #include fixups for clashes - there may be some unnecessary
2005-10-31 07:32:56 -08:00
Tim Schmielau 4e57b68178 [PATCH] fix missing includes
I recently picked up my older work to remove unnecessary #includes of
sched.h, starting from a patch by Dave Jones to not include sched.h
from module.h. This reduces the number of indirect includes of sched.h
by ~300. Another ~400 pointless direct includes can be removed after
this disentangling (patch to follow later).
However, quite a few indirect includes need to be fixed up for this.

In order to feed the patches through -mm with as little disturbance as
possible, I've split out the fixes I accumulated up to now (complete for
i386 and x86_64, more archs to follow later) and post them before the real
patch.  This way this large part of the patch is kept simple with only
adding #includes, and all hunks are independent of each other.  So if any
hunk rejects or gets in the way of other patches, just drop it.  My scripts
will pick it up again in the next round.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:32 -08:00
Russell King d052d1beff Create platform_device.h to contain all the platform device details.
Convert everyone who uses platform_bus_type to include
linux/platform_device.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-29 19:07:23 +01:00
Greg Kroah-Hartman 4303fc6f05 USB: fix up some odd parts due to partial merges
Thanks to Andrew for doing the hard work on this.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 19:59:31 -07:00
Alan Stern 478a3bab8c [PATCH] USB: Always do usb-handoff
This revised patch (as586b) makes usb-handoff permanently true and no
longer a kernel boot parameter.  It also removes the piix3_usb quirk code;
that was nothing more than an early version of the USB handoff code
(written at a time when Intel's PIIX3 was about the only motherboard with
USB support).  And it adds identifiers for the three PCI USB controller
classes to pci_ids.h.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:49 -07:00
Ben Dooks efa400db53 [PATCH] USB: add owner initialisation to host drivers
Add .owner initialisation to the device drivers
in drivers/usb/host so that when built as module
the device_driver refers to the owning module

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:45 -07:00
Ben Dooks a85ee6b50c [PATCH] USB: S3C2410 OHCI - add driver owner field
Initialise the .owner field of the driver with
the module that owns it, to aid in linking
drivers to modules.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:45 -07:00
Alan Stern f37be9b9be [PATCH] Fix hcd->state assignments in uhci-hcd
This patch (as581) changes the assignments to hcd->state in the uhci-hcd
driver.  It fixes part of bugzilla entry #5227.  The problem was revealed
by David's large suite of USB suspend/resume patches; this patch should go
to Linus at the same time those do.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:45 -07:00
Alan Stern b81d34363c [PATCH] UHCI: Improve handling of iso TDs
The uhci-hcd driver is fairly lax about the way it handles isochronous
transfers.  This patch (as579) improves it in three respects:

	TDs for a new URB aren't added to the schedule until all of
	them have been allocated.  This way there's no risk of the
	controller executing some of them when an allocation fails.

	TDs for an unlinked URB are removed from the schedule as soon
	as the URB is unlinked, rather than waiting until the URB is
	given back.  This way there's no risk of the controller still
	executing a TD after the URB completes.

	The urb->error_count values are now reported correctly.
	Although since they aren't used in any drivers except for
	debug messages in the system log, probably nobody cares.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:44 -07:00
Alan Stern 0c0382e32d [PATCH] USB: Rename hcd->hub_suspend to hcd->bus_suspend
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 16:47:44 -07:00
Alan Stern bb200f6eac [PATCH] UHCI: unify BIOS handoff and driver reset code
This patch (as574) updates the PCI BIOS usb-handoff code for UHCI
controllers, making it work like the reset routines in uhci-hcd.  This
allows uhci-hcd to drop its own routines in favor of the new ones
(code-sharing).

Once the patch is merged we can turn the usb-handoff option on
permanently, as far as UHCI is concerned.  OHCI and EHCI may still have
some issues.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:44 -07:00
Alan Stern 8b262bd255 [PATCH] USB: UHCI: Spruce up some comments
This patch (as570) changes some comments in the uhci-hcd header file and
removes an unused declaration (something I forgot to erase in an earlier
patch).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/host/uhci-hcd.h |   91 +++++++++++++++++++++++---------------------
 1 file changed, 49 insertions(+), 42 deletions(-)
2005-10-28 16:47:41 -07:00
David Brownell ccdcf77ae3 [PATCH] ISP116x PM updates
This makes the isp116x driver stop using usb_suspend_device() and
usb_resume_device() ... usbcore now calls to the root hub methods,
removing the need for this.  It also switches from keventd to khubd
for remote wakeup.  (Compile tested.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/host/isp116x-hcd.c |   29 ++++-------------------------
 drivers/usb/host/isp116x.h     |    1 -
 2 files changed, 4 insertions(+), 26 deletions(-)
2005-10-28 16:47:41 -07:00
David Brownell a7f72abe8f [PATCH] UHCI PM updates
This removes suspend and resume path recursion in UHCI.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/host/uhci-hcd.c |    9 ---------
 1 file changed, 9 deletions(-)
2005-10-28 16:47:40 -07:00
David Brownell f2cb36c1df [PATCH] update PCI early-handoff handling for OHCI
The PCI "early usb handoff" quirk logic didn't work like "ohci-hcd" ...
This patch makes it do so by:

  - Resetting the controller after kicking BIOS off, matching the
    normal "chip in hardware reset" startup mode;

  - Reporting any BIOS that borks this simple handoff; it's likely
    got a few other surprises for us too.

  - Ignoring that handoff on HPPA;

The diagnostic string is mostly shared with EHCI, saving a few bytes.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/host/pci-quirks.c |   22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)
2005-10-28 16:47:40 -07:00
David Brownell f197b2c54b [PATCH] OHCI PM updates
This simplifies the OHCI root hub suspend logic:

 - Uses new usbcore root hub calls to make autosuspend work again:
	* Uses a newish usbcore root hub wakeup mechanism,
	  making requests to khubd not keventd.
	* Uses an even newer sibling suspend hook.

 - Expect someone always made usbcore call ohci_hub_suspend() before bus
   glue fires; and that ohci_hub_resume() is only called after that bus
   glue ran.  Previously, only CONFIG_USB_SUSPEND promised those things.
   (Includes updates to PCI and OMAP bus glue.)

 - Handle a not-noticed-before special case during resume from one of
   the swsusp snapshots when using "usb-handoff":  the controller isn't
   left in RESET state.  (A bug to fix in the usb-handoff code...)

Also cleans up a minor debug printk glitch, and switches an mdelay over
to an msleep (how did that stick around for so long?).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/host/ohci-dbg.c  |    4 ----
 drivers/usb/host/ohci-hcd.c  |    2 +-
 drivers/usb/host/ohci-hub.c  |   42 ++++++++++++------------------------------
 drivers/usb/host/ohci-mem.c  |    1 -
 drivers/usb/host/ohci-omap.c |   36 ++++++++++++------------------------
 drivers/usb/host/ohci-pci.c  |   40 ++++++++--------------------------------
 drivers/usb/host/ohci.h      |    1 -
 7 files changed, 33 insertions(+), 93 deletions(-)
2005-10-28 16:47:40 -07:00
David Brownell 9293677af3 [PATCH] all HCDs provide root hub suspend/resume methods
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 16:47:40 -07:00
Matt Porter 7ff71d6adf [PATCH] EHCI, split out PCI glue
This splits BIOS and PCI specific support out of ehci-hcd.c into
ehci-pci.c.  It follows the model already used in the OHCI driver
so support for non-PCI EHCI controllers can be more easily added.

Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/host/ehci-hcd.c |  543 ++++++--------------------------------------
 drivers/usb/host/ehci-pci.c |  414 +++++++++++++++++++++++++++++++++
 drivers/usb/host/ehci.h     |    1
 3 files changed, 492 insertions(+), 466 deletions(-)
2005-10-28 16:47:39 -07:00
Alan Stern a1d59ce842 [PATCH] USB: UHCI: Split apart the physical and logical framelist arrays
This patch (as563) splits the physical and logical framelist arrays in
uhci-hcd into two separate pieces.  This will allow slightly better memory
utilization, since each piece is no larger than a single page whereas
before the whole thing was a little bigger than two pages.  It also allows
the logical array to be allocated in non-DMA-coherent memory.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:39 -07:00
Alan Stern 8b4cd42134 [PATCH] USB: UHCI: Remove unused fields and unneeded tests for NULL
This patch (as562) removes from the uhci-hcd driver a few unused fields
and some unnecessary tests against NULL and assignments to NULL.  In fact
it wasn't until fairly recently that the tests became unnecessary.
Before last winter it was possible that the driver's stop() routine would
get called even if the start() routine returned an error, but now that
can't happen.  Hence there's no longer any need to check for partial
initialization.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:39 -07:00
David Brownell 8ad7fe16df [PATCH] remove some USB_SUSPEND dependencies
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-28 16:47:39 -07:00
David Brownell 390a8c345e [PATCH] remove usb_suspend_device() parameter
This patch removes the extra usb_suspend_device() parameter.  The original
reason to pass that parameter was so that this routine could suspend any
active children.  A previous patch removed that functionality ... leaving
no reason to pass the parameter.  A close analogy is pci_set_power_state,
which doesn't need a pm_message_t either.

On the internal code path that comes through the driver model, the parameter
is now used to distinguish cases where USB devices need to "freeze" but not
suspend.   It also checks for an error case that's accessible through sysfs:
attempting to suspend a device before its interfaces (or for hubs, ports).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/core/hub.c         |   34 +++++++++++++++++++++-------------
 drivers/usb/core/usb.c         |   23 +++++++++++++++++++++--
 drivers/usb/host/ehci-hcd.c    |    2 +-
 drivers/usb/host/isp116x-hcd.c |    2 +-
 drivers/usb/host/ohci-pci.c    |    2 +-
 include/linux/usb.h            |    2 +-
 6 files changed, 46 insertions(+), 19 deletions(-)
2005-10-28 16:47:38 -07:00
David Brownell 7586269c0b [PATCH] USB: move handoff code
This moves the PCI quirk handling for USB host controllers from the
PCI directory to the USB directory.  Follow-on patches will need to:

(a) merge these copies with the originals in the HCD reset methods.
they don't wholly agree, despite doing the very same thing; and

(b) eventually change it so "usb-handoff" is the default, to help
get more robust USB/BIOS/input/... interactions.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/Makefile              |    2
 drivers/pci/quirks.c          |  253 ---------------------------------------
 drivers/usb/Makefile          |    1
 drivers/usb/host/Makefile     |    5
 drivers/usb/host/pci-quirks.c |  272 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 280 insertions(+), 253 deletions(-)
2005-10-28 16:47:38 -07:00
David Brownell 72f30b6f2f [PATCH] USB: ehci.patch (earlier irq disable)
This tweaks the EHCI reboot notifier to also halt the EHCI controller, and
makes that halt code force IRQs off.  Both should always have been done.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/host/ehci-hcd.c |    8 ++++++++
 1 file changed, 8 insertions(+)
2005-10-28 16:47:37 -07:00
Greg KH 6fbfddcb52 Merge ../bleed-2.6 2005-10-28 10:13:16 -07:00
Russell King 9480e307cd [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level.  Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level.  However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.

Since this is obsolete infrastructure which is no longer necessary,
we can remove it.  Here's an (untested) patch to do exactly that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 09:52:56 -07:00
Al Viro 55016f10e3 [PATCH] gfp_t: drivers/usb
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:49 -07:00
Olav Kongas e9b765decf [PATCH] isp116x-hcd: fix handling of short transfers
Increased use of scatter-gather by usb-storage driver after 2.6.13 has
exposed a buggy codepath in isp116x-hcd, which was probably never
visited before: bug happened only for those urbs, for which
URB_SHORT_NOT_OK was set AND short transfer occurred.

The fix attached was tested in 2 ways: (a) it fixed failing
initialization of a flash drive with an embedded hub; (b) the fix was
tested with 'usbtest' against a modified g_zero driver (on top of
net2280), which generated short bulk IN transfers of various lengths
including multiples and non-multiples of max_packet_length.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-17 14:45:49 -07:00
Russell King fc611a1a50 [ARM] Don't include mach-types.h unnecessarily
It's pointless to include mach-types.h if you're not going to use
anything from it.  These references were removed as a result of:

grep -lr 'asm/mach-types\.h' . | xargs grep -L 'machine_is_\|MACH_TYPE_\|MACHINE_START\|machine_type'

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-29 11:15:51 +01:00
Russell King d087790447 [ARM] Don't include asm/arch/hardware.h directly
Since asm/hardware.h's only reason for existing is to include
asm/arch/hardware.h, it's completely pointless to include both.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-29 11:12:52 +01:00
David Brownell 4b2e790a4d [PATCH] USB: sl811-hcd minor fixes
Three minor sl811-hcd fixes:

 - Elminate memory leak on one (rare) disable/shutdown path.

 - For periodic transfers that don't need to be scheduled, update
   urb->start_frame to represent the transfer phase correctly.

 - Report the (single) port as removable, by default.

Since no drivers yet use start_frame or that part of the hub descriptor,
only that leak is likely to ever matter.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

 drivers/usb/host/sl811-hcd.c |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
2005-09-22 07:58:25 -07:00
David Brownell 155faf5e1e [PATCH] USB: OHCI, pxa27x OHCI port power tweaks
Now that it's in use on other boards, a bug in the original code needs fixing.

There is no need for the PXA27x OHCI to set usb power during init, since
the hub driver in usbcore handles that. Those platform-specific power
control functions are also incorrect, and should therefore be removed.

Add a check to clear the OTG pin hold bit until such times OTG is
properly implemented.

Signed-Off-By: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-12 12:23:46 -07:00
David Brownell fdd13b36c4 [PATCH] USB: OHCI relies less on NDP register
Some OHCI implementations have differences in the way the NDP register
(in roothub_a) reports the number of ports present. This patch allows the
platform specific code to optionally supply the number of ports. The
driver just reads the value at init (if not supplied) instead of reading
it every time its needed (except for an AMD756 bug workaround).

It also sets the value correctly for the ARM pxa27x architecture.

Signed-Off-By: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-12 12:23:46 -07:00
David Brownell e0fd3cbc50 [PATCH] USB: OHCI irq tweak
Evidently there are some boards which care a lot about this, but
as a rule it's been hard to notice.

OHCI_INTR_RD wasn't always cleared in the ohci irq handler.  On some
systems this means certain remote wakeup scenarios could seem to hang
(in an interrupt storm, RD never clearing).

From: "William Morrow" <William.Morrow@amd.com>
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-12 12:23:45 -07:00
Nishanth Aravamudan 22c4386328 [PATCH] drivers/usb: fix-up schedule_timeout() usage
Description: Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-12 12:23:44 -07:00
David Brownell f7201c3dcd [PATCH] USB: EHCI workaround for NForce and mem > 2GB
NVidia reports (via Mark Overby) that some of their EHCI controllers
don't like certain data structure addresses beyond the 2GB mark.
He provided an earlier version of this patch.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-12 12:23:43 -07:00
David Brownell 10f6524a8e [PATCH] USB: EHCI port tweaks
One change may improve some S1 or S3 resume cases, and the other
seems mostly to explain some strange state "lsusb" would show.
Two fixes:

  - On resume, don't think about resuming any unpowered port, or
    resetting any port with OWNER set to the OHCI/UHCI companion.
    This will make some S1 and S3 resume scenarios work better.

  - PORT_CSC was not being cleared correctly in ehci_hub_status_data.
    This was visible at least through current versions of "lsusb",
    and might have caused some other hub related strangeness.

    The fix addresses all three write-to-clear bits, using the same
    approach that UHCI happens to use:  a mask of bits that are
    cleared in most writes to that port status register.

Original patch seems to have been from from William.Morrow@amd.com
and this version (from David) finishes the write-to-clear changes.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-12 12:23:42 -07:00
Alan Stern 1f09df8bfe [PATCH] USB UHCI: remove the FSBR kernel timer
This patch (as558) removes from the UHCI driver a kernel timer used for
checking Full Speed Bandwidth Reclamation (FSBR).  The checking can be
done during normal root-hub polling; it doesn't need a separate timer.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-12 12:23:40 -07:00
Ingo Molnar 8d06afab73 [PATCH] timer initialization cleanup: DEFINE_TIMER
Clean up timer initialization by introducing DEFINE_TIMER a'la
DEFINE_SPINLOCK.  Build and boot-tested on x86.  A similar patch has been
been in the -RT tree for some time.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 14:03:48 -07:00
Linus Torvalds 5420520973 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6 2005-09-08 17:21:02 -07:00
david-b@pacbell.net d0384200f6 [PATCH] ehci: add tt_usecs
This adds the field tt_usecs to ehci_qh and ehci_iso_stream, and sets it
appropriately when setting them up as periodic endpoints.  It records
the transation translator's think_time (added in last patch) plus the
downstream (i.e. low or full speed) bustime of the transfer associated
with each interrupt or iso frame, as calculated by usb_calc_bus_time.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 16:28:36 -07:00
Dale Farnsworth 4fbd55f03e [PATCH] USB: remove include of asm/usb.h in ohci-ppc-soc.c
ohci-ppc-soc.c provides for a platform-specific callback mechanism for
when the HC is successfully probed or removed.  It turned out that none
of the 3 platforms using it need this facility. Also the required
include/asm-ppc/usb.h has never been accepted.  This patch removes the
callback feature and the include of <asm/usb.h>.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 16:28:26 -07:00
Dale Farnsworth e52b1d3afe [PATCH] USB: Fix typo in ohci-ppc-soc.c: usb_hcd_put => usb_put_hcd
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 16:28:20 -07:00
Ben Dooks ba44e7c407 [PATCH] USB: S3C24XX port numbering fix
Fix the port numbering confusion for the S3C24XX platform device
information as reported by Rudy <rudyboy168@gmail.com>

This patch ensurs that the the ports are numbered 0 and 1.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 16:28:20 -07:00
Olav Kongas 9a57116bc9 [PATCH] USB: Switch isp116x-hcd over to root hub interrupt
Switch isp116x-hcd over from root hub polling to interrupt.  This change closes
also a race that was present with the old polling scheme: status polling could
happen in a time window, where root hub status bits were not stable.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 16:22:48 -07:00
Olav Kongas f8d23d3098 [PATCH] USB: isp116x-hcd: remove clock() and reset()
This patch removes support for user-provided platform-specific hardware reset
and clock starting/stopping functions. Hardware reset was needed earlier as
getting the software reset working was tricky due to the lack of documentation.
Recently, a number of people using isp116x have said the software reset is
working for them.

I haven't heard of anybody using the clock starting/stopping.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 16:22:48 -07:00
Olav Kongas 9d233d9fae [PATCH] USB: isp116x-hcd: per-port overcurrent reporting
This patch sets the isp116x to report overcurrent always per-port.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 16:22:48 -07:00
Olav Kongas 165c0f3939 [PATCH] USB: isp116x-hcd: support only per-port power switching
The isp116x chip will now always be in per-port power switching mode. Remove
conf options to set any other mode.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 16:22:47 -07:00
Olav Kongas d4d62861b5 [PATCH] USB: isp116x-hcd: remove unnecessary ClockNotStop configuration option
Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 16:22:47 -07:00
Olav Kongas dc5bed091a [PATCH] USB: isp116x-hcd: use fixed power-on-to-power-good-time
This patch removes the power-on-to-power-good-time configuration option for
isp116x-hcd.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 16:22:47 -07:00
Greg Kroah-Hartman 95a629657d [PATCH] PCI: start paying attention to a lot of pci function return values
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 14:57:25 -07:00
Pekka Enberg 7b842b6e37 [PATCH] USB: convert kcalloc to kzalloc
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-07 16:57:46 -07:00
Pavel Machek ca078bae81 [PATCH] swsusp: switch pm_message_t to struct
This adds type-checking to pm_message_t, so that people can't confuse it
with int or u32.  It also allows us to fix "disk yoyo" during suspend (disk
spinning down/up/down).

[We've tried that before; since that cpufreq problems were fixed and I've
tried make allyes config and fixed resulting damage.]

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Alexander Nyberg <alexn@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:16 -07:00
Olav Kongas f10eff2683 [PATCH] USB: Fix setup packet initialization in isp116x-hcd
When recently addressing remarks by Alexey Dobriyan about
the isp116x-hcd, I introduced a bug in the driver. Please
apply the attached patch to fix it.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-04 21:32:46 -07:00
David Brownell 7dedacf427 [PATCH] USB: ehci: microframe handling fix
This patch has a one line oops fix, plus related cleanups.

 - The bugfix uses microframe scheduling data given to the hardware to
   test "is this a periodic QH", rather than testing for nonzero period.
   (Prevents an oops by providing the correct answer.)

 - The cleanup going along with the patch should make it clearer what's
   going on whenever those bitfields are accessed.

The bug came about when, around January, two new kinds of EHCI interrupt
scheduling operation were added, involving both the high speed (24 KBytes
per millisec) and low/full speed (1-64 bytes per millisec) microframe
scheduling.  A driver for the Edirol UA-1000 Audio Capture Unit ran into
the oops; it used one of the newly supported high speed modes.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-04 21:32:46 -07:00
Dan Streetman 498f78e6fc [PATCH] USB: fix in usb_calc_bus_time
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-29 13:12:54 -07:00
Ben Dooks 3eb0c5f4b5 [PATCH] USB: add S3C24XX USB Host driver support
USB (OHCI) Host driver for S3C2410/S3C2440 based systems

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-29 13:12:53 -07:00
david-b@pacbell.net edfd6aee1f [PATCH] USB: fix ohci merge glitch
A patch re-organizing some parts of root hub initialization deleted the
code initializing the bus-neutral reboot/shutdown notifier for OHCI.
This patch just restores that deleted code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-12 11:52:57 -07:00
david-b@pacbell.net b404a5b02a [PATCH] USB: ohci-omap pm updates
The recent "pm_message_t" changes removed functionality from the Linux
PM framework.  This patch removes it from the OMAP OHCI too, removing
the distinction between (previous) PM_SUSPEND_MEM and PM_SUSPEND_DISK
state transitions ... now the only suspend semantics supportable are
what was previously PM_SUSPEND_DISK (4) and is now "PMSG_SUSPEND" (3).

From: Todd Poynor <tpoynor@mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-12 11:52:57 -07:00
KAMBAROV, ZAUR b2134bcd2e [PATCH] USB: coverity: (desc->bitmap)[] overrun fix
The length of the array desc->bitmap is 3, and not 4:

Definitions involved:

In drivers/usb/core/hcd.h

464  	#define bitmap 	DeviceRemovable

In drivers/usb/host/ohci-hub.c

395  		struct usb_hub_descriptor	*desc

In drivers/usb/core/hub.h

130  	struct usb_hub_descriptor {
131  		__u8  bDescLength;
132  		__u8  bDescriptorType;
133  		__u8  bNbrPorts;
134  		__u16 wHubCharacteristics;
135  		__u8  bPwrOn2PwrGood;
136  		__u8  bHubContrCurrent;
137  		    	/* add 1 bit for hub status change; round to bytes */
138  		__u8  DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8];
139  		__u8  PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8];
140  	} __attribute__ ((packed));

In include/linux/usb.h

306  	#define USB_MAXCHILDREN		(16)

This defect was found automatically by Coverity Prevent, a static analysis
tool.

(akpm: this code should be shot.  Field `bitmap' doesn't exist in struct
usb_hub_descriptor.  And this .c file is #included in
drivers/usb/host/ohci-hcd.c, and someone somewhere #defines `bitmap' to
`DeviceRemovable'.

>From a maintainability POV it would be better to memset the whole array
beforehand - I changed the patch to do that)

Signed-off-by: Zaur Kambarov <zkambarov@coverity.com>
Cc: <linux-usb-devel@lists.sourceforge.net?
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-12 11:52:56 -07:00
Olav Kongas 5db539e49f [PATCH] USB: Fix kmalloc's flags type in USB
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-07-12 11:52:56 -07:00
Olav Kongas 17f8bb7312 [PATCH] USB: isp116x-hcd cleanup
Sorry that it took so long. Here comes a cleanup patch that
addresses the remarks by Alexey Dobriyan about
gregkh-usb-usb-isp116x-hcd-add.patch EXCEPT the remark about
the typecasting of mem_flags argument for kcalloc; this will
be addressed in a later patch.

OlavCleanup of isp116x-hcd.

Signed off by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-12 11:52:55 -07:00
Dominik Brodowski 44670d2b50 [PATCH] pcmcia: remove references to pcmcia/version.h
As a follow-up, remove the inclusion of pcmcia/version.h in many files.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 18:24:07 -07:00
Dominik Brodowski 1e212f3645 [PATCH] pcmcia: move event handler
Move the "event handler" to struct pcmcia_driver -- the unified event handler
will disappear really soon, but switching it to struct pcmcia_driver in the
meantime allows for better "step-by-step" patches.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 18:24:05 -07:00
David Brownell 22f3a8f5fc [PATCH] pcmcia id_table for sl811.cs
Catch up with some PCMCIA API changes:

 - Docs say that as of 2.6.11 the PCMCIA IRQInfo2 field is ignored,
   but it's not yet removed from the API; stop using it anyway.

 - As of 2.6.13 PCMCIA finally hotplugs and does driver binding
   without "cardmgr"; add a MODULE_DEVICE_TABLE to support this.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-27 18:03:17 -07:00
Linus Torvalds d3b8a1a849 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6 2005-06-27 15:13:26 -07:00
Benjamin Herrenschmidt 8c8709334c [PATCH] ppc32: Remove CONFIG_PMAC_PBOOK
This patch removes CONFIG_PMAC_PBOOK (PowerBook support).  This is now
split into CONFIG_PMAC_MEDIABAY for the actual hotswap bay that some
powerbooks have, CONFIG_PM for power management related code, and just left
out of any CONFIG_* option for some generally useful stuff that can be used
on non-laptops as well.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-27 15:11:43 -07:00
David Brownell 77078570ab [PATCH] USB: ehci-hcd - fix page pointer allocation in itd_patch()
The itd_patch() function is responsible for allocating entries in the
buffer page pointer list of the iTD.  Particularly, a new page pointer
is needed every time when buffer data crosses a page boundary.

However, there is a bug in the allocation logic: the function does not
allocate a new entry when the current transaction is the first
transaction in the iTD (as indicated by first!=0).

The consequence is that, when the data of the first transaction begins
somewhere at the end of a page so that it actually does cross the page
boundary, no new page pointer is allocated.  This means that the data
at the end of the first transaction (beyond the page boundary) will be
accessed by the HC using the second page pointer, which is zero.
Furthermore, the first page pointer will be later overwritten by the
page pointers of the other transactions, which will garble it because
the value is or-ed into the iTD field.

All this particular check (for !first) does is cause incorrect
behaviour, so it should be entirely removed (and with it the variable
first that is not used for anything else).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:44:00 -07:00
Alan Stern e07fefa6b2 [PATCH] USB UHCI: Detect invalid ports
This patch changes the way uhci-hcd detects valid ports.  The
specification doesn't mention any way to find out how many ports a
controller has, so the driver has to use some heuristics, reading the port
status and control register and deciding whether the value makes sense.
With this patch the driver will recognize a typical failure mode (all bits
set to one) for nonexistent ports and won't assume there are always at
least 2 ports -- such an assumption seems silly if the heuristics have
already shown that the ports don't exist.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:44:00 -07:00
David Brownell d49d431744 [PATCH] USB: misc ehci updates
Various minor EHCI updates

   * Dump some more info in the debug dumps, notably the product
     description (e.g. chip vendor), BIOS handhake flags, and
     debug port status (when it's not managed by the HCD).

   * Minor updates to the BIOS handoff code:  always flag the HCD
     as owned by Linux (in case BIOS doesn't grab it "early"),
     and on the buggy-BIOS path always match the "early handoff"
     code and forcibly disable SMI IRQs.

   * For the disabled 64bit DMA support, there's now a constant
     to use for the mask; use it.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:55 -07:00
Alan Stern 247f310563 [PATCH] USB HCDs: no longer need to register root hub
This patch changes the host controller drivers; they no longer need to
register their root hubs because usbcore will take care of it for them.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:49 -07:00
Alan Stern bc96c0ad1e [PATCH] ohci-omap, sl811, dummy: remove hub_set_power_budget
This patch changes the HCDs that used the old hub_set_power_budget call,
making them use the new hcd->power_budget field instead.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:49 -07:00
Alan Stern 2532178a68 [PATCH] UHCI: Don't store device pointer in QH or TD
This patch simplifies the uhci-hcd driver by removing the device pointer
currently stored in the QH and TD structures.  Those pointers weren't
being used for anything other than to increment the device's reference
count, which is unnecessary since the device is used only when an URB
completes, and outstanding URBs take their own reference to the device.
As a useful side effect, this change means that uhci-hcd no longer needs
to have the root-hub device available in the start routine.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:48 -07:00
David Brownell f4df0e334a [PATCH] USB: add reboot notifier to ohci
Adds a reboot notifier to OHCI, mostly to benefit kexec; plus
minor #include tweaks.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:46 -07:00
Alan Stern 02597d2dee [PATCH] USB UHCI: Add shutdown method
After all the discussion you might not be interested in this still, but
nevertheless here it is.  This patch adds a shutdown method to the
uhci-hcd driver.  Its prerequisite is the patch you wrote adding shutdown
support for PCI.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:45 -07:00
Alan Stern c074b416b9 [PATCH] USB UHCI: improved reset handling
This patch improves the strategy uhci-hcd uses for performing controller
resets and checking whether they are needed.

	The HCRESET command doesn't affect the Suspend, Resume,
	or Reset bits in the port status & control registers, so
	the driver must clear them by itself.  This means the
	code to figure out how many ports there are has to be moved
	to an earlier spot in the driver.

	The R/WC bits in the USBLEGSUP register can be set by the
	hardware even in the absence of BIOS meddling with legacy
	support features.  Hence it's not a good idea to check them
	while trying to determine whether the BIOS has altered the
	controller's state.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:44 -07:00
Alan Stern 6c1b445c22 [PATCH] USB UHCI: Use root-hub IRQs while suspended
This patch, which has as478b as a prerequisite, enables the uhci-hcd
driver to take advantage of root-hub IRQs rather than polling during the
time it is suspended.  (Unfortunately the hardware doesn't support
port-change interrupts while the controller is running.)  It also turns
off the driver's private timer while the controller is suspended, as it
isn't needed then.  The combined elimination of polling interrupts and
timer interrupts ought to be enough to allow some systems to save a
noticeable amount of power while they are otherwise idle.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:44 -07:00
Alan Stern 4daaa87c8f [PATCH] USB UHCI: Fix up loose ends
This patch tidies up a few loose ends left by the preceding patches.
It indicates the controller supports remote wakeup whenever the PM
capability is present -- which shouldn't cause any harm if the
assumption turns out to be wrong.  It refuses to suspend the
controller if the root hub is still active, and it refuses to resume
the root hub if the controller is suspended.  It adds checks for a
dead controller in several spots, and it adds memory barriers as
needed to insure that I/O operations are completed before moving on.

Actually I'm not certain the last part is being done correctly.  With
code like this:

	outw(..., ...);
	mb();
	udelay(5);

do we know for certain that the outw() will complete _before_ the
delay begins?  If not, how should this be written?

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:44 -07:00
Alan Stern a8bed8b6be [PATCH] USB UHCI: Add root-hub suspend/resume support
This patch implements (finally!) separate suspend and resume routines
for the root hub and the controller in the UHCI driver.  It also
changes the sequence used to reset the controller during initial
probing, so as to preserve the existing state during a Resume-From-Disk.
(This new sequence is what should be used in the PCI Quirks code for
early USB handoffs, incidentally.)  Lastly it adds a notion of the
controller being "inaccessible" while in a PCI low-power state, when
normal I/O operations shouldn't be allowed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:43 -07:00
Alan Stern c8f4fe4358 [PATCH] USB UHCI: Add root hub states
This patch starts making some serious changes to the UHCI driver.
There's a set of private states for the root hub, and the internal
routines for suspending and resuming work completely differently, with
transitions based on the new states.  Now the driver distinguishes
between a privately auto-stopped state and a publicly suspended state,
and it will properly suspend controllers with broken resume-detect
interrupts instead of resetting them.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:43 -07:00
Alan Stern f5946f8220 [PATCH] USB UHCI: Minor improvements
This patch makes a few small improvements in the UHCI driver.  Some
code is moved between different source files and a more useful pointer
is passed to a callback routine.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:43 -07:00
Alan Stern 014e73c99a [PATCH] USB UHCI: subroutine reordering
This patch moves a few subroutines around in the uhci-hcd source file.
Nothing else is changed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:42 -07:00
Olav Kongas 589a0083a3 [PATCH] USB: Fix oops at rmmod after failed probe in isp116x-hcd
This patch fixes an oops triggered at rmmod of isp116x-hcd
after the probe() has failed.

Also, it extends the error message printed, if the driver
cannot detect "Chip's Clock Ready" after a software reset.
As Ian Campbell recently reported, this happens if the
chip's H_WAKEUP pin is not pulled low during software reset.
Several people have already had this issue, hence the update
to the error message.

Also, extend the error message about the failed clock
detection after the software reset.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
2005-06-27 14:43:42 -07:00
Olav Kongas 4808a1c026 [PATCH] USB: Add isp116x-hcd USB host controller driver
This patch provides an "isp116x-hcd" driver for Philips'
ISP1160/ISP1161 USB host controllers.

The driver:
 - is relatively small, meant for use on embedded platforms.
 - runs usbtests 1-14 without problems for days.
 - has been in use by 6-7 different people on ARM and PPC platforms,
   running a range of devices including USB hubs.
 - supports suspend/resume of both the platform device and the root hub;
   supports remote wakeup of the root hub (but NOT the platform device)
   by USB devices.
 - does NOT support ISO transfers (nobody has asked for them).
 - is PIO-only.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27 14:43:42 -07:00
gregkh@suse.de 8561b10f6e [PATCH] USB: move the usb hcd code to use the new class code.
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-06-20 15:15:07 -07:00
David Brownell c22fa3acbc [PATCH] spin longer for ehci port reset completion
This makes the EHCI driver spin a bit longer before concluding that the
port reset failed.  "Obviously safe."

It allows some devices to enumerate that previously didn't.  We've seen
a bunch of these problem reports recently, this will make some go away.

As reported by Michael Zapf <Michael.Zapf@uni-kassel.de>, some EHCI
controllers seem to take forever to finish port resets and produce
"port N reset error -110" type errors.  Spinning a bit longer helps.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-13 08:20:41 -07:00
David Brownell c6de2b64eb [PATCH] USB: add sl811_cs support
This adds support for a CF-card USB Host adapter, the Ratoc REX-CFU1U, by
wrapping a PCMCIA driver around the existing "sl811-hcd" platform driver.

This CF card is especially useful for PDAs, which currently tend to have
no other solution for USB host capability.

From: Botond Botyanszki <boti@rocketmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-05-31 14:13:58 -07:00
David Brownell 1e9a47b62f [PATCH] USB: sl811-hcd fixes
Various fixes to the sl811-hcd driver:

  * Fix small glitches that crept in during recent evolution of usbcore's hcd
    glue layer, coupling endpoint state records to usbcore and active urbs.
    (As noted by folk whose boards weren't stuck on 2.6.9 kernels...)

  * Cope with various system-specific issues:
      - Some configurations (e.g. a CF-card uses this chip) have iospace
        addresses for the two registers, rather than memory mapped ones.
      - Some configurations do interesting things with IRQs; maybe the
        line is shared, or it doesn't support level triggering.
      - Not all boards can drive the chip reset line in software.

  * Address a potential race during unlinking.

  * Tweak probe/remove section info to handle the case where this segment
    of a platform bus is hotpluggable (e.g. CF card).  (The basic problem
    is that CONFIG_HOTPLUG is global, which is wrong since not all busses
    can hotplug even on hotplug-friendly systems...)  Also export the
    driver, so that the CF driver can depend on it.

Also removed some annoying end-of-line whitespace.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-05-31 14:13:58 -07:00
David Brownell 4756ae5b52 [PATCH] USB: ehci suspend must stop timer
Force the EHCI watchdog timer off during suspend, in case for some
reason it was still running after the root hub suspended.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-05-16 21:44:25 -07:00
Steven Cole 093cf723b2 [PATCH] USB: Spelling fixes for drivers/usb.
Here are some spelling corrections for drivers/usb.

cancelation -> cancellation
succesful -> successful
cancelation -> cancellation
decriptor -> descriptor
Initalize -> Initialize
wierd -> weird
Protocoll -> Protocol
occured -> occurred
successfull -> successful
Procesing -> Processing
devide -> divide
Isochronuous -> Isochronous
noticable -> noticeable
Basicly -> Basically
transfering -> transferring
intialize -> initialize
Incomming -> Incoming
additionnal -> additional
asume -> assume
Unfortunatly -> Unfortunately
retreive -> retrieve
tranceiver -> transceiver
Compatiblity -> Compatibility
Incorprated -> Incorporated
existance -> existence
Ununsual -> Unusual

Signed-off-by: Steven Cole <elenstev@mesatop.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-05-03 23:31:52 -07:00
David Brownell 56c1e26d75 [PATCH] USB: ehci power fixes
Miscellaneous updates for EHCI.

 - Mostly updates the power switching on EHCI controllers.  One routine
   centralizes the "power on/off all ports" logic, and the capability to
   do that is reported more correctly.

 - Courtesy Colin Leroy, a patch to always power up ports after resumes
   which didn't keep a USB device suspended.  The reset-everything logic
   powers down those ports (on some hardware) so something needs to turn
   them back on.

 - Minor tweaks/bugfixes for the debug port support.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-05-03 23:31:49 -07:00
Linus Torvalds 9f6c6fc505 Merge with kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6.git/
for 13 driver core, sysfs, and debugfs fixes.
2005-04-19 13:14:28 -07:00
kay.sievers@vrfy.org 089d42b013 [PATCH] kobject/hotplug split - usb cris
kobject_add() and kobject_del() don't emit hotplug events anymore.
We need to do it ourselves now.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-04-18 21:57:37 -07:00
Jesper Juhl 1bc3c9e1e4 [PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL
Get rid of a bunch of redundant NULL pointer checks in drivers/usb/*,
there's no need to check a pointer for NULL before calling kfree() on it.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


Index: gregkh-2.6/drivers/usb/class/audio.c
===================================================================
2005-04-18 17:39:34 -07:00
David Brownell 0e4987639a [PATCH] USB: OHCI on Compaq Aramada 7400
This adds a quirk to the OHCI driver that lets it work with an old
Compaq implementation.  It also removes some needless strings from
the non-debug version of the driver.

Signed-off-by: Chris Clayton <chris_clayton@f1internet.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-04-18 17:39:30 -07:00
Pavel Machek ba9d35fb01 [PATCH] USB: fix up remaining pm_message_t usages
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-04-18 17:39:24 -07:00
David Brownell 9a5d3e98dd [PATCH] USB: hcd suspend uses pm_message_t
This patch includes minor "sparse -Wbitwise" updates for the PCI based
HCDs.  Almost all of them involve just changing the second parameter of the
suspend() method to a pm_message_t ...  the others relate to how the EHCI
code walks in-memory data structures.  (There's a minor bug fixed there too
...  affecting the big-endian sysfs async schedule dump.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


Index: gregkh-2.6/drivers/usb/core/hcd.h
===================================================================
2005-04-18 17:39:23 -07:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
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!
2005-04-16 15:20:36 -07:00