With CONFIG_IRQSOFF_TRACER the trace_hardirqs_off() function includes
a call to __builtin_return_address(1). But we calltrace_hardirqs_off()
from early entry code. There we have just a single stack frame.
So this results in a kernel stack backchain walk that would walk beyond
the kernel stack. Following the NULL terminated backchain this results
in a lowcore read access.
To fix this we simply call trace_hardirqs_off_caller() and pass the
current instruction pointer.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Disable tracing on idle psw. Otherwise it would give us huge
preempt off times for idle. Which is rather pointless.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/built-in.o: In function `cleanup_io_leave_insn':
mem_detect.c:(.text+0x10592): undefined reference to `lockdep_sys_exit'
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
The current virtio model on s390 has the descriptor page above the main
memory. The guest virtio detection will oops if the mem= parameter is
used to reduce/change the memory size.
We have to use real_memory_size instead of max_pfn to detect the virtio
descriptor pages.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
add_active_range() expects start_pfn + size as end_pfn value, i.e. not
the pfn of the last page frame but the one behind that.
We used the pfn of the last page frame so far, which can lead to a
BUG_ON in move_freepages(), when the kernelcore parameter is specified
(page_zone(start_page) != page_zone(end_page)).
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Before the patch, the used ioctl were printed as an hexadecimal code,
hard to be understand without consulting the way _IO macros work.
Instead, use the V4L default handler for printing such errors into a way
that would be easier to understand.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Some comments are not clear enough. Improve it to allow a better
understanding of the driver behavior.
While there, remove an unneeded struct prototype.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There were no check about the limits of shadow.bytes array. This offers
a risk of writing values outside the limits, overriding other data
areas.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Instead of storing the pointer for the proper entry at chip description
table, the driver were storing an indirect reference, by using an index.
Better to reference directly the data.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
A driver used on several bttv boards since 2000 is not experimental
anymore ;) Remove it from the comments.
While there, update copyrights addind a quick note about the "recent"
updates since 2005.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch checks for volume, bass, treble, set mode and get mode
callbacks before actually enabling the code that would use them.
Instead of aborting the driver for load, this patch will allow it to
load with a reduced number of functionatities.
This prevents OOPS if some board entry is missing a needed callback.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
generic_checkmode() were called, via a callback, for some tvaudio chips.
There's just one callback code used on all those boards. So, it makes no
sense on keeping this as a callback.
Since there were some OOPS reported on tvaudio on kerneloops.org, this
patch removes this callback, adding the code at the only place were it
is called: inside chip_tread. A flag were added to indicate the need for
a kernel thread to set stereo mode on cards that needs it.
Using this more direct approach simplifies the code, making it more
robust against human errors.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (25 commits)
USB: net: asix: add support for Cables-to-Go USB Ethernet adapter
USB: gadget: cdc-acm deadlock fix
USB: EHCI: fix divide-by-zero bug
USB: EHCI: fix handling of dead controllers
usb: r8a66597-hcd: fix wrong data access in SuperH on-chip USB
ub: stub pre_reset and post_reset to fix oops
USB: SISUSB2VGA driver: add 0x0711, 0x0903
usb: unusual devs patch for Nokia 7610 Supernova
USB: remove optional bus bindings in isp1760, fixing runtime warning
+ usb-serial-cp2101-add-enfora-gsm2228.patch added to -mm tree
USB: storage: adjust comment in Kconfig
USB: Fix PS3 USB shutdown problems
USB: unusual_devs entry for Argosy USB mass-storage interface
USB: cdc-acm.c: fix recursive lock in acm_start_wb error path
USB: CP2101 Add device ID for AMB2560
USB: mention URB_FREE_BUFFER in usb_free_urb documentation
USB: Add YISO u893 usb modem vendor and product IDs to option driver
usb: musb: fix BULK request on different available endpoints
usb: musb: fix debug global variable name
usb: musb: Removes compilation warning in gadget mode
...
dm_any_congested() just checks for the DMF_BLOCK_IO and has no
code to make sure that suspend waits for dm_any_congested() to
complete. This patch adds such a check.
Without it, a race can occur with dm_table_put() attempting to
destroying the table in the wrong thread, the one running
dm_any_congested() which is meant to be quick and return
immediately.
Two examples of problems:
1. Sleeping functions called from congested code, the caller
of which holds a spin lock.
2. An ABBA deadlock between pdflush and multipathd. The two locks
in contention are inode lock and kernel lock.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This doesn't fix any bug, just moves wake_up immediately after decrementing
md->pending, for better code readability.
It must be clear to anyone manipulating md->pending to wake up
the queue if md->pending reaches zero, so move the wakeup as close to
the decrementing as possible.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Currently dm ignores the parameters provided to hardware handlers
without providing any notifications to the user.
This patch just prints a warning message so that the user knows that
the arguments are ignored.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Path activation code is called even when the pgpath is NULL. This could
lead to a panic in activate_path(). Such a panic is seen in -rt kernel.
This problem has been there before the pg_init() was moved to a
workqueue.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Don't proceed if dm_stripe_init() fails to register itself as a dm target.
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
We queue work on keventd queue --- so this queue must be flushed in the
destructor. Otherwise, keventd could access mirror_set after it was freed.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: stable@kernel.org
Add support to drivers/net/usb/asix.c for the Cables-to-Go "USB 2.0 to
10/100 Ethernet Adapter". USB id 0b95:772a.
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes a deadlock appearing with some USB peripheral drivers
when running CDC ACM gadget code.
The newish (2.6.27) CDC ACM event notification mechanism sends
messages (IN to the host) which are short enough to fit in most
FIFOs. That means that with some peripheral controller drivers
(evidently not the ones used to verify the notification code!!)
the completion callback can be issued before queue() returns.
The deadlock would come because the completion callback and the
event-issuing code shared a spinlock. Fix is trivial: drop
that lock while queueing the message.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1164) fixes a bug in the EHCI scheduler. The interval
value it uses is already in linear format, not logarithmically coded.
The existing code can sometimes crash the system by trying to divide
by zero.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1165) makes a few small changes in the logic used by
ehci-hcd when it encounters a controller error:
Instead of printing out the masked status, it prints the
original status as read directly from the hardware.
It doesn't check for the STS_HALT status bit before taking
action. The mere fact that the STS_FATAL bit is set means
that something bad has happened and the controller needs to
be reset. With the old code this test could never succeed
because the STS_HALT bit was masked out from the status.
I anticipate that this will prevent the occasional "irq X: nobody cared"
problem people encounter when their EHCI controllers die.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
When I used SuperH on-chip USB, there was the problem that accessed
r8a66597_root_hub which was not allocated.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Due to recent changes to usb_reset_device, the following hang occurs:
events/0 D 0000000000000000 0 6 2
ffff880037477cc0 0000000000000046 ffff880037477c50 ffffffff80237434
ffffffff80574c80 00000001000a015c 0000000000000286 ffff8800374757d0
ffff88002a31c860 ffff880037475a00 0000000036779140 ffff880037475a00
Call Trace:
[<ffffffff80237434>] try_to_del_timer_sync+0x52/0x5b
[<ffffffff8026f86c>] dma_pool_free+0x1a7/0x1ec
[<ffffffffa02a928a>] ub_disconnect+0x8e/0x1ad [ub]
[<ffffffff802407c9>] autoremove_wake_function+0x0/0x2e
[<ffffffff80378959>] usb_unbind_interface+0x5c/0xb7
[<ffffffff8036ab70>] __device_release_driver+0x95/0xbd
[<ffffffff8036ac70>] device_release_driver+0x21/0x2d
[<ffffffff803789f8>] usb_driver_release_interface+0x44/0x83
[<ffffffff80378ab9>] usb_forced_unbind_intf+0x17/0x1d
[<ffffffff80371ba4>] usb_reset_device+0x7d/0x114
[<ffffffffa02aaffd>] ub_reset_task+0x0/0x293 [ub]
[<ffffffffa02ab1c1>] ub_reset_task+0x1c4/0x293 [ub]
[<ffffffff8033dd1e>] flush_to_ldisc+0x0/0x1cd
[<ffffffffa02aaffd>] ub_reset_task+0x0/0x293 [ub]
[<ffffffff8023d302>] run_workqueue+0x87/0x114
[<ffffffff8023d467>] worker_thread+0xd8/0xe7
[<ffffffff802407c9>] autoremove_wake_function+0x0/0x2e
[<ffffffff8023d38f>] worker_thread+0x0/0xe7
[<ffffffff802404c1>] kthread+0x47/0x73
[<ffffffff8022c8dd>] schedule_tail+0x27/0x60
[<ffffffff8020c249>] child_rip+0xa/0x11
[<ffffffff8024047a>] kthread+0x0/0x73
[<ffffffff8020c23f>] child_rip+0x0/0x11
This is because usb_reset_device now unbinds, and that calls disconnect,
which in case of ub waits until the reset completes... which deadlocks.
Worse, this deadlocks keventd and this takes whole box down.
I'm going to fix this properly later, but let's unbreak the driver
quickly for non-composite devices at least.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Additional sectors were reported by the Nokia 7610 Supernova phone in
usb storage mode. The following patch rectifies the aforementioned
problem.
Signed-off-by: Ricky Wong Yung Fei <evilbladewarrior@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Reported the following:
| kmem_cache_create: duplicate cache isp1760_qtd
| Pid: 461, comm: modprobe Tainted: G W 2.6.28-rc2-git3-default #4
| Call Trace:
| [<c017540e>] kmem_cache_create+0xc9/0x3a3
| [<c0159a8d>] free_pages_bulk+0x16c/0x1c9
| [<f165c05f>] isp1760_init+0x0/0xb [isp1760]
| [<f165c018>] init_kmem_once+0x18/0x5f [isp1760]
| [<f165c064>] isp1760_init+0x5/0xb [isp1760]
| [<c010113d>] _stext+0x4d/0x148
| [<c0142936>] load_module+0x12cd/0x142e
| [<c01743c4>] kmem_cache_destroy+0x0/0xd7
| [<c0142b1e>] sys_init_module+0x87/0x176
| [<c01039eb>] sysenter_do_call+0x12/0x2f
The reason, is that ret is initialized with ENODEV instead of 0 _or_
the kmem cache is not freed in error case with no bus binding.
The difference between OF+PCI and OF only is
| 15148 804 32 15984 3e70 isp1760-of-pci.o
| 13748 676 8 14432 3860 isp1760-of.o
about 1.5 KiB.
Until there is a checkbox where the user *must* select atleast one item,
and may select multiple entries I don't make it selectable anymore.
Having a driver which can't be used under any circumstances is broken
anyway and I've seen distros shipping it that way.
Reported-by: Roland Kletzing <devzero@web.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>a
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Enfora GSM2228 based on Cygnal Integrated Products chip uses the same
cp2101 driver.
Signed-off-by: Damir N Abdullin <damir@mimas.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Since commit 65934a9 ("Make USB storage depend on SCSI rather than selecting
it [try #6]") the comment at the top of drivers/usb/storage/Kconfig is
incorrect. Adjust it to the current situation.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add ehci_shutdown() or ohci_shutdown() calls to the USB
PS3 bus glue. ehci_shutdown() and ohci_shutdown() do some
controller specific cleanups not done by usb_remove_hcd().
Fixes errors on shutdown or reboot similar to these:
ps3-ehci-driver sb_07: HC died; cleaning up
irq 51: nobody cared (try booting with the "irqpoll" option)
Related bugzilla reports:
http://bugzilla.kernel.org/show_bug.cgi?id=11819http://bugzilla.terrasoftsolutions.com/show_bug.cgi?id=317
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The usb_free_urb comment says that the transfer buffer will not be
freed, but this is not the case when URB_FREE_BUFFER is set.
Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds YISO u893 usb modem vendor and product ID to option.c.
I had a better experience using this modification and the same system.
Signed-off-by: Leslie Harlley Watter <leslie@watter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixes co-working issue of usb serial device with usb/net devices while
oter endpoints are free and can be used.This patch implements the policy
that if endpoint resources are available then different BULK request goes
to different endpoint otherwise they are multiplexed to one reserved
endpoint as currently done.
Switch statement case is reordered in musb_giveback() to take care of
bulk request both in multiplex scenario and otherwise.
NAK limit scheme has to be added for multiplexed BULK request scenario
to avoid endpoint starvation due to usb/net devices.
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
In order to avoid namespace conflicts, add a prefix
to our kernel-wise symbol.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixes blurred capture images in dma mode. Isochronous error field in
urb and source data buffer pointer were not updated properly in dma
mode.
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1155) fixes a bug in usbcore. When interfaces are
deleted, either because the device was disconnected or because of a
configuration change, the extra attribute files and child endpoint
devices may get left behind. This is because the core removes them
before calling device_del(). But during device_del(), after the
driver is unbound the core will reinstall altsetting 0 and recreate
those extra attributes and children.
The patch prevents this by adding a flag to record when the interface
is in the midst of being unregistered. When the flag is set, the
attribute files and child devices will not be created.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org> [2.6.27, 2.6.26, 2.6.25]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>