This patch makes usbcore automatically allocate and register the root hub
device for a new host controller when the controller is registered. This
way the HCDs don't all have to include the same boilerplate code. As a
pleasant side benefit, the register_root_hub routine can now be made
static and not EXPORTed.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
This patch removes the hub_set_power_budget routine, which was used by a
couple of HCDs to indicate that the root hub was running on battery power.
In its place is a new field added to struct usb_hcd, which HCDs can set
before the root hub is registered. Special-case code in the hub driver
knows to look at this field when configuring a root hub.
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>
My patch adding PM support for zd1201 didn't check for the device on
resume, which can oops if the device has been removed.
This patch fixes it.
Signed-off-by: Colin Leroy <colin@colino.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch enables power management (suspend, resume) support for zd1201.
It fixes problems after wakeup for me, but these problems did not appear
everytime without this patch. it's a bit empirical, based on what the
usbnet does, so maybe not correct... Maybe someone can give it a look
before it's applied.
Signed-off-by: Colin Leroy <colin@colino.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
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>
Updates to "usbtest" driver:
* Improve some diagnostics. One path that never generated diagnostics
before should now generate two ... unless you hit a GCC bug that
all my compilers seem to have, go figure.
* Add suspend/resume support, so this behaves when the Linux host
being used for testing suspends.
* Don't test the "zero byte ep0 read" case unless real-world relevance
for the testing is is irrelevant.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes lost LF when ACM device is used with getty/login/bash,
in case of a modem which takes calls.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a revised version of an earlier patch to add support to usbcore
for driving root hubs by interrupts rather than polling.
There's a temporary flag added to struct usb_hcd, marking devices whose
drivers are aware of the new mechanism. By default that flag doesn't get
set so drivers will continue to see the same polling behavior as before.
This way we can convert the HCDs one by one to use interrupt-based event
reporting, and the temporary flag can be removed when they're all done.
Also included is a small change to the hcd_disable_endpoint routine.
Although endpoints normally shouldn't be disabled while a controller is
suspended, it's legal to do so when the controller's driver is being
rmmod'ed.
Lastly the patch adds a new callback, .hub_irq_enable, for use by HCDs
where the root hub's port-change interrupts are level-triggered rather
than edge-triggered. The callback is invoked each time khubd has finished
processing a root hub, to let the HCD know that the interrupt can safely
be re-enabled.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 turns a user mode driver error into a hard error, and updates
the relevant diagnostic slightly to help troubleshooting. gphoto was
known to have this problem, hopefully it is now fixed (they have had
plenty of warning...)
This had been left as a soft error to give various user mode drivers a
change to be properly fixed, with the statement that starting in about
2.6.10 it would be changed. It had been mostly safe as a soft error ...
but that can not be guaranteed. Now that a year has passed, it's time to
really insist that the user mode drivers finally fix their relevant bugs.
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>
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>
Various USB patches, mostly for portability:
- Fifo mode 1 didn't work previously (oopsed), so now it's fixed and
(why not) defines even more endpoints for composite devices.
- OMAP 1710 doesn't have an internal transceiver.
- Small PM update: if the USB link is suspended, don't disconnect on
entry to deep sleep.
- Be more correct about handling zero length control reads. OMAP
seems to mis-handle that protocol peculiarity though; best avoided.
- Platform device resources (for UDC and OTG controllers) now use
physical addresses, so /proc/iomem is more consistent.
- Minor cleanups, notably (by volume) for "sparse" NULL warnings.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
This patch changes the g_file_storage driver to make the "stall" module
parameter generally available; currently it is available only if the
testing version of the module has been configured. It also fixes a typo
in a comment -- thanks, Pat!
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch simplifies the g_file_storage driver by consolidating a bunch
of min() calculations at a single spot.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
CONFIG_CONFIG_TUNER_MULTI_I2C probably isn't what the
author meant to create.
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
If cfq is managing a queue and a new scheduler is later selected, it is
possible for the cfqd unplug_work work to be queued after the kblockd
work struct has been flushed. The problem is the ordering of
cfq_shutdown_timer_wq() and blk_put_queue() in cfq_put_cfqd(). The
latter may rearm the work, leaving cfq_kick_queue() with dead data.
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
- Adjust slice values
- Instead of one async queue, one is defined per priority level. This
prevents kernel threads (such as reiserfs/x and others) that run at
higher io priority from conflicting with others. Previously, it was a
coin toss what io prio the async queue got, it was defined by who
first set up the queue.
- Let a time slice only begin, when the previous slice is completely
done. Previously we could be somewhat unfair to a new sync slice, if
the previous slice was async and had several ios queued. This might
need a little tweaking if throughput suffers a little due to this,
allowing perhaps an overlap of a single request or so.
- Optimize the calling of kblockd_schedule_work() by doing it only when
it is strictly necessary (no requests in driver and work left to do).
- Correct sync vs async logic. A 'normal' process can be purely async as
well, and a flusher can be purely sync as well. Sync or async is now a
property of the class defined and requests pending. Previously writers
could be considered sync, when they were really async.
- Get rid of the bit fields in cfqq and crq, use flags instead.
- Various other cleanups and fixes
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
In cfq_find_next_crq(), cfq tries to find the next request by choosing
one of two requests before and after the current one. Currently, when
choosing the next request, if there's no next request, the next
candidate is NULL, resulting in selection of the previous request. This
results in weird scheduling. Once we reach the end, we always seek
backward.
The correct behavior is using the first request as the next candidate.
cfq_choose_req() already has logics for handling wrapped requests.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This updates the CFQ io scheduler to the new time sliced design (cfq
v3). It provides full process fairness, while giving excellent
aggregate system throughput even for many competing processes. It
supports io priorities, either inherited from the cpu nice value or set
directly with the ioprio_get/set syscalls. The latter closely mimic
set/getpriority.
This import is based on my latest from -mm.
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Patch from Deepak Saxena
Accidently swapped the order of movne and orrne. Bad.
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Patch from Michael Burian
This does not look like an include file for "i386", so use "ARM" instead.
Signed-off-by: Michael Burian <dynmail1@gassner-waagen.at>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
It doesn't make sense for this to be in mm-armv.c now that 26-bit
ARM support is no longer integrated into arch/arm.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
It doesn't make sense to have the PGD kernel pointers initialisation
separate from the PGD user pointers, especially when we clean the
data cache over the whole range.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This call allows the dynamic tick support to reprogram the timer
immediately before the CPU idles.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add separate files for the different 8250 ISA-based serial boards.
Looking across all the various architectures, it seems reasonable that
we can key the availability of the configuration options for these
beasts to the bus-related symbols (iow, CONFIG_ISA). We also standardise
the base baud/uart clock rate for these boards - I'm sure that isn't
architecture specific, but is solely dependent on the crystal fitted
on the board (which should be the same no matter what type of machine
its fitted into.)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
68328serial.c does not make use of register_serial/unregister_serial,
which is traditionally used to register 8250-compatible UARTs with
the 8250-compatible serial driver.
Acked-by: David McCullough
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Use the DMA_32BIT_MASK constant from dma-mapping.h
when calling pci_set_dma_mask() or pci_set_consistent_dma_mask()
See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Domen Puncer <domen@coderock.org>
Check the link state during b44_open. This closes a 1 HZ window
that existed after b44_open ran but before the b44_timer handler ran,
during which ethtool would report "Link detected: yes" no matter what
the link state actually was.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch allows the tulip driver to suspend and resume properly. It was
originally written by Karsten Keil and then modified by Adam Belay.
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Adam Belay <abelay@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
drivers/net/wireless/prism54/isl_38xx.c:131: warning: 'current_time.tv_sec' is used uninitialized in this function
drivers/net/wireless/prism54/isl_38xx.c:131: warning: 'current_time.tv_usec' is used uninitialized in this function
Signed-off-by: Olaf Hering <olh@suse.de>
Some USB ethernet drivers did not accept multicast frames appropriately.
IPv6 did not work with those drivers without this patch.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Jeff,
Just incase this got lost in the recent netdev mailing list transition
here is a nicer version of Andy's patch for gianfar.
- kumar
* TCP/IP/UDP checksumming and verification
* VLAN tag insertion/extraction
* Larger multicast hash-table
* Padding to align IP headers
Also added:
* msg lvl support
* Some whitespace cleanup
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>