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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
===================================================================
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>
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
===================================================================
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!