Dan Carpenter [Wed, 26 May 2010 10:46:39 +0000 (12:46 +0200)]
PCI: hotplug/shpchp_hpc: add parenthesis in SLOT_REG_RSVDZ_MASK
The SLOT_REG_RSVDZ_MASK macro is normally used like this:
slot_reg &= ~SLOT_REG_RSVDZ_MASK;
The ~ operator has higher precedence than the | operator from inside the
macro, so it needs parenthesis.
Linus Torvalds [Thu, 27 May 2010 02:21:11 +0000 (11:21 +0900)]
PCI aerdrv: fix annoying warnings
Some compiler generates following warnings:
In function 'aer_isr':
warning: 'e_src.id' may be used uninitialized in this function
warning: 'e_src.status' may be used uninitialized in this function
Avoid status flag "int ret" and return constants instead, so that
gcc sees the return value matching "it is initialized" better.
Jiri Slaby [Tue, 15 Jun 2010 13:43:19 +0000 (15:43 +0200)]
x86/PCI: pci, fix section mismatch
pcibios_scan_specific_bus calls pci_scan_bus_on_node which is
__devinit. Mark pcibios_scan_specific_bus __devinit as well since
all users are now __init or __devinit.
Alan Stern [Tue, 8 Jun 2010 19:23:51 +0000 (15:23 -0400)]
PCI: change device runtime PM settings for probe and remove
This patch (as1388) changes the way the PCI core handles runtime PM
settings when probing or unbinding drivers. Now the core will make
sure the device is enabled for runtime PM, with a usage count >= 1,
when a driver is probed. It does the same when calling a driver's
remove method.
If the driver wants to use runtime PM, all it has to do is call
pm_runtime_pu_noidle() near the end of its probe routine (to cancel
the core's usage increment) and pm_runtime_get_noresume() near the
start of its remove routine (to restore the usage count). It does not
need to mess around with setting the runtime state to enabled,
disabled, active, or suspended.
The patch updates e1000e and r8169, the only PCI drivers that already
use the existing runtime PM interface.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Add a PC-beep workaround for ASUS P5-V
ALSA: hda - Assume PC-beep as default for Realtek
ALSA: hda - Don't register beep input device when no beep is available
ALSA: hda - Fix pin-detection of Nvidia HDMI
David Howells [Thu, 29 Jul 2010 11:45:55 +0000 (12:45 +0100)]
CRED: Fix __task_cred()'s lockdep check and banner comment
Fix __task_cred()'s lockdep check by removing the following validation
condition:
lockdep_tasklist_lock_is_held()
as commit_creds() does not take the tasklist_lock, and nor do most of the
functions that call it, so this check is pointless and it can prevent
detection of the RCU lock not being held if the tasklist_lock is held.
Instead, add the following validation condition:
task->exit_state >= 0
to permit the access if the target task is dead and therefore unable to change
its own credentials.
Fix __task_cred()'s comment to:
(1) discard the bit that says that the caller must prevent the target task
from being deleted. That shouldn't need saying.
(2) Add a comment indicating the result of __task_cred() should not be passed
directly to get_cred(), but rather than get_task_cred() should be used
instead.
Also put a note into the documentation to enforce this point there too.
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Thu, 29 Jul 2010 11:45:49 +0000 (12:45 +0100)]
CRED: Fix get_task_cred() and task_state() to not resurrect dead credentials
It's possible for get_task_cred() as it currently stands to 'corrupt' a set of
credentials by incrementing their usage count after their replacement by the
task being accessed.
What happens is that get_task_cred() can race with commit_creds():
However, since a tasks credentials are generally not changed very often, we can
reasonably make use of a loop involving reading the creds pointer and using
atomic_inc_not_zero() to attempt to increment it if it hasn't already hit zero.
If successful, we can safely return the credentials in the knowledge that, even
if the task we're accessing has released them, they haven't gone to the RCU
cleanup code.
We then change task_state() in procfs to use get_task_cred() rather than
calling get_cred() on the result of __task_cred(), as that suffers from the
same problem.
Without this change, a BUG_ON in __put_cred() or in put_cred_rcu() can be
tripped when it is noticed that the usage count is not zero as it ought to be,
for example:
ALSA: hda - Add a PC-beep workaround for ASUS P5-V
ASUS P5-V provides a SSID that unexpectedly matches with the value
compilant with Realtek's specification. Thus the driver interprets
it badly, resulting in non-working PC beep.
This patch adds a white-list for such a case; a white-list of known
devices with working PC beep.
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] ibmvscsi: Fix oops when an interrupt is pending during probe
[SCSI] zfcp: Update status read mempool
[SCSI] zfcp: Do not wait for SBALs on stopped queue
[SCSI] zfcp: Fix check whether unchained ct_els is possible
[SCSI] ipr: fix resource path display and formatting
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
davinci: da850/omap-l138 evm: account for DEFDCDC{2,3} being tied high
regulator: tps6507x: allow driver to use DEFDCDC{2,3}_HIGH register
wm8350-regulator: fix wm8350_register_regulator error handling
ab3100: fix off-by-one value range checking for voltage selector
Andre Osterhues [Tue, 13 Jul 2010 20:59:17 +0000 (15:59 -0500)]
ecryptfs: Bugfix for error related to ecryptfs_hash_buckets
The function ecryptfs_uid_hash wrongly assumes that the
second parameter to hash_long() is the number of hash
buckets instead of the number of hash bits.
This patch fixes that and renames the variable
ecryptfs_hash_buckets to ecryptfs_hash_bits to make it
clearer.
Jason Wessel [Thu, 29 Jul 2010 00:10:30 +0000 (19:10 -0500)]
x86,kgdb: Fix hw breakpoint regression
HW breakpoints events stopped working correctly with kgdb
as a result of commit: 018cbffe6819f6f8db20a0a3acd9bab9bfd667e4
(Merge commit 'v2.6.33' into perf/core).
The regression occurred because the behavior changed for setting
NOTIFY_STOP as the return value to the die notifier if the breakpoint
was known to the HW breakpoint API. Because kgdb is using the HW
breakpoint API to register HW breakpoints slots, it must also now
implement the overflow_handler call back else kgdb does not get to see
the events from the die notifier.
The kgdb_ll_trap function will be changed to be general purpose code
which can allow an easy way to implement the hw_breakpoint API
overflow call back.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Acked-by: Dongdong Deng <dongdong.deng@windriver.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
If we don't need a huge amount of memory in ->readdir() then
we can use kmalloc rather than vmalloc to allocate it. This
should cut down on the greater overheads associated with
vmalloc for smaller directories.
We may be able to eliminate vmalloc entirely at some stage,
but this is easy to do right away.
Also using GFP_NOFS to avoid any issues wrt to deleting inodes
while under a glock, and suggestion from Linus to factor out
the alloc/dealloc.
I've given this a test with a variety of different sized
directories and it seems to work ok.
Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Nick Piggin <npiggin@suse.de> Cc: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Enable PC-beep as default for hardwares that aren't compliant with the
SSID value Realtek requires. In such a case, better to enable the beep
to avoid a regression.
ALSA: hda - Don't register beep input device when no beep is available
We check now the availability of PC beep and skip the build of beep
mixers, but the driver still registers the input device. This should
be checked as well.
Sekhar Nori [Mon, 12 Jul 2010 12:26:21 +0000 (17:56 +0530)]
davinci: da850/omap-l138 evm: account for DEFDCDC{2,3} being tied high
Per the da850/omap-l138 Beta EVM SOM schematic, the DEFDCDC2 and DEFDCDC3 lines are tied high. This leads to a 3.3V IO and 1.2V CVDD
voltage.
Pass the right platform data to the TPS6507x driver so it can operate
on the DEFDCDC{2,3}_HIGH register to read and change voltage levels.
Signed-off-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
regulator: tps6507x: allow driver to use DEFDCDC{2,3}_HIGH register
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In TPS6507x, depending on the status of DEFDCDC{2,3} pin either DEFDCDC{2,3}_LOW or DEFDCDC{2,3}_HIGH register needs to be read or
programmed to change the output voltage.
The current driver assumes DEFDCDC{2,3} pins are always tied low
and thus operates only on DEFDCDC{2,3}_LOW register. This need
not always be the case (as is found on OMAP-L138 EVM).
Unfortunately, software cannot read the status of DEFDCDC{2,3} pins.
So, this information is passed through platform data depending on
how the board is wired.
The behavior of Nvidia HDMI codec regarding the pin-detection unsol events
is based on the old HD-audio spec, i.e. PD bit indicates only the update
and doesn't show the current state. Since the current code assumes the
new behavior, the pin-detection doesn't work relialby with these h/w.
This patch adds a flag for indicating the old spec, and fixes the issue
by checking the pin-detection explicitly for such hardware.
Tested-by: Wei Ni <wni@nvidia.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
The MPC85xx EDAC driver is missing module device aliases, so the driver
won't load automatically on boot. This patch fixes the issue by adding
proper MODULE_DEVICE_TABLE() macros.
Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Cc: Doug Thompson <dougthompson@xmission.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Dave Jiang <djiang@mvista.com> Cc: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rudolf Marek [Tue, 27 Jul 2010 20:18:02 +0000 (13:18 -0700)]
drivers/rtc/rtc-rx8581.c: fix setdatetime
Fix the logic while writing new date/time to the chip. The driver
incorrectly wrote back register values to different registers and even
with wrong mask. The patch adds clearing of the VLF register, which
should be cleared if all date/time values are set.
Signed-off-by: Rudolf Marek <rudolf.marek@sysgo.com> Acked-by: Wan ZongShun <mcuos.com@gmail.com> Cc: Martyn Welch <martyn.welch@gefanuc.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Move the call to ddebug_remove_module() down into free_module(). In this
way it should be called from all error paths. Currently, we are missing
the remove if the module init routine fails.
Signed-off-by: Jason Baron <jbaron@redhat.com> Reported-by: Thomas Renninger <trenn@suse.de> Tested-by: Thomas Renninger <trenn@suse.de> Cc: <stable@kernel.org> [2.6.32+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This fixes an issue triggered by running concurrent syncs. One of the syncs
would go through while the other would just hang indefinitely. In any case, we
never actually want to wake a single waiter, so the *_all functions should
be used.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
The etr events switch-to-local and sync-check disable the synchronous clock
and schedule a work queue that tries to get the clock back into sync.
If another switch-to-local or sync-check event occurs while the work queue
function etr_work_fn still runs the eacr.es bit and the clock_sync_word can
become inconsistent because check_sync_clock only uses the clock_sync_word
to determine if the clock is in sync or not. The second pass of the
etr_work_fn will reset the eacr.es bit but will leave the clock_sync_word
intact. Fix this race by moving the reset of the eacr.es bit into the
switch-to-local and sync-check functions and by checking the eacr.es bit
as well to decide if the clock needs to be synced.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
In case user space is single stepped (PER) the program check handler
claims too early that IRQs are enabled on the return path.
Subsequent checks will notice that the IRQ mask in the PSW and
what lockdep thinks the IRQ mask should be do not correlate and
therefore will print a warning to the console and disable lockdep.
Fix this by doing all the work within the correct context.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
srp_task needs to be setup before request_irq. The patch below fixes the oops.
Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
s2io: fixing DBG_PRINT() macro
ath9k: fix dma direction for map/unmap in ath_rx_tasklet
net: dev_forward_skb should call nf_reset
net sched: fix race in mirred device removal
tun: avoid BUG, dump packet on GSO errors
bonding: set device in RLB ARP packet handler
wimax/i2400m: Add PID & VID for Intel WiMAX 6250
ipv6: Don't add routes to ipv6 disabled interfaces.
net: Fix skb_copy_expand() handling of ->csum_start
net: Fix corruption of skb csum field in pskb_expand_head() of net/core/skbuff.c
macvtap: Limit packet queue length
ixgbe/igb: catch invalid VF settings
bnx2x: Advance a module version
bnx2x: Protect statistics ramrod and sequence number
bnx2x: Protect a SM state change
wireless: use netif_rx_ni in ieee80211_send_layer2_update
Peter Zijlstra [Fri, 9 Jul 2010 08:21:21 +0000 (10:21 +0200)]
perf, powerpc: Use perf_sample_data_init() for the FSL code
We should use perf_sample_data_init() to initialize struct
perf_sample_data. As explained in the description of commit dc1d628a
("perf: Provide generic perf_sample_data initialization"), it is
possible for userspace to get the kernel to dereference data.raw,
so if it is not initialized, that means that unprivileged userspace
can possibly oops the kernel. Using perf_sample_data_init makes sure
it gets initialized to NULL.
This conversion should have been included in commit dc1d628a, but it
got missed.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
In the case of platform_device_add() fail, we should call
platform_device_put() instead of platform_device_del()
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Axel Lin [Mon, 26 Jul 2010 07:34:14 +0000 (15:34 +0800)]
ab3100: fix off-by-one value range checking for voltage selector
We use voltage selector as an array index for typ_voltages.
Thus the valid range for voltage selector should be 0..voltages_len-1.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Do not try to disable hpet if it hasn't been initialized before
x86, i8259: Only register sysdev if we have a real 8259 PIC
Patch 9e39f7c5b311a306977c5471f9e2ce4c456aa038 changed the
DBG_PRINT() macro and the if clause was wrongly changed. It means
that currently all the DBG_PRINT are being printed, flooding the
kernel log buffer with things like:
s2io: eth6: Next block at: c0000000b9c90000
s2io: eth6: In Neterion Tx routine
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Acked-by: Sreenivasa Honnur <Sreenivasa.Honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus:
MIPS: Set io_map_base for several PCI bridges lacking it
MIPS: Alchemy: Define eth platform devices in the correct order
MIPS: BCM63xx: Prevent second enet registration on BCM6338
MIPS: Quit using undefined behavior of ADDU in 64-bit atomic operations.
MIPS: N32: Define getdents64.
MIPS: MTX-1: Fix PCI on the MeshCube and related boards
MIPS: Make init_vdso a subsys_initcall.
MIPS: "Fix" useless 'init_vdso successfully' message.
MIPS: PowerTV: Move register setup to before reading registers.
SOUND: Au1000: Fix section mismatch
VIDEO: Au1100fb: Fix section mismatch
VIDEO: PMAGB-B: Fix section mismatch
VIDEO: PMAG-BA: Fix section mismatch
NET: declance: Fix section mismatches
VIDEO. gbefb: Fix section mismatches.
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
sysfs: allow creating symlinks from untagged to tagged directories
sysfs: sysfs_delete_link handle symlinks from untagged to tagged directories.
sysfs: Don't allow the creation of symlinks we can't remove
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: musb: tusb6010: fix compile error with n8x0_defconfig
USB: FTDI: Add support for the RT System VX-7 radio programming cable
USB: add quirk for Broadcom BT dongle
USB: usb-storage: fix initializations of urb fields
USB: xhci: Set Mult field in endpoint context correctly.
USB: sisusbvga: Fix for USB 3.0
USB: adds Artisman USB dongle to list of quirky devices
USB: xhci: Set EP0 dequeue ptr after reset of configured device.
USB: Fix USB3.0 Port Speed Downgrade after port reset
USB: xHCI: Fix another bug in link TRB activation change.
USB: option: Add support for AMOI Skypephone S2
USB: New PIDs for Qualcomm gobi 2000 (qcserial)
USB: ftdi_sio: support for Signalyzer tools based on FTDI chips
USB: s3c2410_udc: be aware of connected gadget driver
USB: Expose vendor-specific ACM channel on Nokia 5230
USB: Add PID for Sierra 250U to drivers/usb/serial/sierra.c
USB: option: add support for 1da5:4518
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
drm/i915: add pipe A force quirks to i915 driver
drm/i915: Fix panel fitting regression since 734b4157
drm/i915: fix deadlock in fb teardown
drm/i915: don't free non-existent compressed llb on ILK+
agp/intel: Use the correct mask to detect i830 aperture size.
drm/i915: disable FBC when more than one pipe is active
drm/i915: Use the correct scanout alignment for fbcon.
drm/i915: make sure eDP panel is turned on
drm/i915: add PANEL_UNLOCK_REGS definition
drm/i915: Make G4X-style PLL search more permissive
drm/i915: Clear any existing dither mode prior to enabling spatial dithering
drm/i915: handle shared framebuffers when flipping
drm/i915: Explosion following OOM in do_execbuffer.
gpu/drm/i915: Add a blacklist to omit modeset on LID open
The Pstate transition latency check was added for broken F10h BIOSen
which wrongly contain a value of 0 for transition and bus master
latency. Fam11h and later, however, (will) have similar transition
latency so extend that behavior for them too.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> Signed-off-by: Dave Jones <davej@redhat.com>
Matthew Garrett [Thu, 15 Jul 2010 15:44:00 +0000 (11:44 -0400)]
[CPUFREQ] Fix PCC driver error path
The PCC cpufreq driver unmaps the mailbox address range if any CPUs fail to
initialise, but doesn't do anything to remove the registered CPUs from the
cpufreq core resulting in failures further down the line. We're better off
simply returning a failure - the cpufreq core will unregister us cleanly if
we end up with no successfully registered CPUs. Tidy up the failure path
and also add a sanity check to ensure that the firmware gives us a realistic
frequency - the core deals badly with that being set to 0.
Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com> Signed-off-by: Dave Jones <davej@redhat.com>
Matthew Garrett [Tue, 20 Jul 2010 17:52:00 +0000 (13:52 -0400)]
[CPUFREQ] pcc driver should check for pcch method before calling _OSC
The pcc specification documents an _OSC method that's incompatible with the
one defined as part of the ACPI spec. This shouldn't be a problem as both
are supposed to be guarded with a UUID. Unfortunately approximately nobody
(including HP, who wrote this spec) properly check the UUID on entry to the
_OSC call. Right now this could result in surprising behaviour if the pcc
driver performs an _OSC call on a machine that doesn't implement the pcc
specification. Check whether the PCCH method exists first in order to reduce
this probability.
Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com> Signed-off-by: Dave Jones <davej@redhat.com>
395913d0b1db37092ea3d9d69b832183b1dd84c5 ("[CPUFREQ] remove rwsem lock
from CPUFREQ_GOV_STOP call (second call site)") is not needed, because
there is no rwsem lock in cpufreq_ondemand and cpufreq_conservative
anymore. Lock should not be released until the work done.
sysfs: allow creating symlinks from untagged to tagged directories
Supporting symlinks from untagged to tagged directories is reasonable,
and needed to support CONFIG_SYSFS_DEPRECATED. So don't fail a prior
allowing that case to work.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sysfs: Don't allow the creation of symlinks we can't remove
Recently my tagged sysfs support revealed a flaw in the device core
that a few rare drivers are running into such that we don't always put
network devices in a class subdirectory named net/.
Since we are not creating the class directory the network devices wind
up in a non-tagged directory, but the symlinks to the network devices
from /sys/class/net are in a tagged directory. All of which works
until we go to remove or rename the symlink. When we remove or rename
a symlink we look in the namespace of the target of the symlink.
Since the target of the symlink is in a non-tagged sysfs directory we
don't have a namespace to look in, and we fail to remove the symlink.
Detect this problem up front and simply don't create symlinks we won't
be able to remove later. This prevents symlink leakage and fails in
a much clearer and more understandable way.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Rafael J. Wysocki <rjw@sisk.pl> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bob Copeland [Mon, 12 Jul 2010 15:18:18 +0000 (11:18 -0400)]
USB: usb-storage: fix initializations of urb fields
Commit 0ede76fcec5415ef82a423a95120286895822e2d, "USB: remove uses of
URB_NO_SETUP_DMA_MAP" introduced a regression by inadvertantly removing
initialization of the transfer flags. This caused initialization
failures in the ums-karma driver. Fix the regression by zeroing it.
While at it, as Alan Stern points out, the initializers for
actual_length and status are handled by the core and error_count
only matters for isochronous urbs, so they don't need to be set here.
Remove them.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sarah Sharp [Sat, 10 Jul 2010 13:48:01 +0000 (15:48 +0200)]
USB: xhci: Set Mult field in endpoint context correctly.
The bmAttributes field of the SuperSpeed Endpoint Companion Descriptor has
different meanings, depending on the endpoint type. If the endpoint is
isochronous, the bmAttributes field is the maximum number of packets
within a service interval that this endpoint supports. If the endpoint is
bulk, it's the number of stream IDs this endpoint supports.
Only set the Mult field of the xHCI endpoint context using the
bmAttributes field if the endpoint is isochronous, and the device is a
SuperSpeed device.
Paul Mortier [Fri, 9 Jul 2010 12:18:50 +0000 (13:18 +0100)]
USB: adds Artisman USB dongle to list of quirky devices
When an attempt is made to read the interface strings of the Artisman
Watchdog USB dongle (idVendor:idProduct 04b4:0526) an error is written
to the dmesg log (uhci_result_common: failed with status 440000) and the
dongle resets itself, resulting in a disconnect/reconnect loop.
Adding the dongle to the list of devices in quirks.c, with the same
quirk Alan Stern's previous patch for the Saitek Cyborg Gold 3D
joystick, stops the device from resetting and allows it to be used with
no problems.
Sarah Sharp [Fri, 9 Jul 2010 15:08:54 +0000 (17:08 +0200)]
USB: xhci: Set EP0 dequeue ptr after reset of configured device.
When a configured device is reset, the control endpoint's ring is reused.
If control transfers to the device were issued before the device is reset,
the dequeue pointer will be somewhere in the middle of the ring. If the
device is then issued an address with the set address command, the xHCI
driver must provide a valid input context for control endpoint zero.
The original code would give the hardware the original input context,
which had a dequeue pointer set to the top of the ring. This would cause
the host to re-execute any control transfers until it reached the ring's
enqueue pointer. When issuing a set address command for a device that has
just been configured and then reset, use the control endpoint's enqueue
pointer as the hardware's dequeue pointer.
Assumption: All control transfers will be completed or cancelled before
the set address command is issued to the device. If there are any
outstanding control transfers, this code will not work.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sarah Sharp [Fri, 9 Jul 2010 15:08:48 +0000 (17:08 +0200)]
USB: Fix USB3.0 Port Speed Downgrade after port reset
Without this fix, a USB 3.0 port is downgraded to full speed after a port
reset of a configured device. The USB 3.0 terminations will be disabled
permanently, and USB 3.0 devices will always enumerate as full speed
devices, until the host controller is unplugged (if it is an ExpressCard)
or the computer is rebooted.
Fajun Chen traced this traced the speed downgrade issue to the port reset
and the interpretation of port status in USB hub driver code. The hub
code was not testing for the port being a SuperSpeed port, and it fell
through to the else case of Full Speed.
The following patch adds SuperSpeed mapping from the port status, and
fixes the speed downgrade issue.
Sarah Sharp [Fri, 9 Jul 2010 15:08:38 +0000 (17:08 +0200)]
USB: xHCI: Fix another bug in link TRB activation change.
Commit 6c12db90f19727c76990e7f4801c67a148b30111 also seems to have
introduced a bug that is triggered when the command ring is about to wrap.
The inc_enq() function will not have moved the enqueue pointer past the
link TRB. It is supposed to be moved past the link TRB in prepare_ring(),
which should be called before a TD is enqueued. However, the
queue_command() function never calls the prepare_ring() function because
prepare_ring() is only supposed to be used for endpoint rings. That means
the enqueue pointer will not be moved past the link TRB, and will get
overwritten.
The fix is to make queue_command() call prepare_ring() with a fake
endpoint status (set to running). Then the enqueue pointer will get moved
past the link TRB.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Przemo Firszt [Mon, 28 Jun 2010 20:29:34 +0000 (21:29 +0100)]
USB: Expose vendor-specific ACM channel on Nokia 5230
Nokia S60 phones expose two ACM channels. The first is
a modem, the second is 'vendor-specific' but is treated
as a serial device at the S60 end, so we want to expose
it on Linux too.
Peter Huewe [Tue, 29 Jun 2010 17:35:39 +0000 (19:35 +0200)]
serial: fix rs485 for atmel_serial on avr32
This patch fixes a build failure [1-4] in the atmel_serial code introduced by
patch the patch ARM: 6092/1: atmel_serial: support for RS485
communications (e8faff7330a3501eafc9bfe5f4f15af444be29f5)
The build failure was caused by missing struct field and missing defines
for the avr32 board - the patch fixes this.
[1] http://kisskb.ellerman.id.au/kisskb/buildresult/2575242/ - first failure in linux-next, may 11th
[2] http://kisskb.ellerman.id.au/kisskb/buildresult/2816418/ - still exists as of today
[3] http://kisskb.ellerman.id.au/kisskb/buildresult/2617511/ - first failure in Linus' tree - May 20th - did really no one notice this?!
[4] http://kisskb.ellerman.id.au/kisskb/buildresult/2813956/ - still exists in Linus' tree as of today
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
At module unload time we'll tear down the fbdev state. We do so under
the struct mutex, so we shouldn't try to use the unlocked variant of
the GEM object unreference function or we may deadlock.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
The original report: https://bugzilla.kernel.org/show_bug.cgi?id=15733
The regression report: https://bugzilla.kernel.org/show_bug.cgi?id=16294
According to the specification found at
http://intellinuxgraphics.org/VOL_1_graphics_core.pdf, the PCI config
space register I830_GMCH_CTRL is a mirror of GMCH Graphics
Control. The correct macro for isolating the aperture size bits is
therefore I830_GMCH_GMS_MASK along with the attendant changes to the
case statement.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Tested-by: Kees Cook <kees.cook@canonical.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Eric Anholt <eric@anholt.net> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Fri, 23 Jul 2010 22:32:05 +0000 (23:32 +0100)]
drm/i915: Use the correct scanout alignment for fbcon.
This fixes a potential modesetting error during boot with plymouth on
Broadwater and Crestline introduced with 9df47c. The framebuffer was
hard-coding an alignment of 64K, but the modesetting code required the
documented alignment of 128K. The result was that we would attempt to
unbind the pinned fbcon buffer, triggering an ERROR and ultimately
failing the mode change.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
When enabling the eDP port, we need to make sure the panel is turned on
after training the link. If we don't, it likely won't come back after
suspend or may not come up at all.
For unknown reasons, unlocking the panel regs before initiating a power
on sequence is necessary. There are known bugs in the PCH panel
sequencing logic, apparently this is one possible workaround.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-by: "Paulo J. S. Silva" <pjssilva@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Adam Jackson [Fri, 2 Jul 2010 20:43:30 +0000 (16:43 -0400)]
drm/i915: Make G4X-style PLL search more permissive
Fixes an Ironlake laptop with a 68.940MHz 1280x800 panel and 120MHz SSC
reference clock.
More generally, the 0.488% tolerance used before is just too tight to
reliably find a PLL setting. I extracted the search algorithm and
modified it to find the dot clocks with maximum error over the valid
range for the given output type:
Ben Hutchings [Sun, 13 Jun 2010 21:22:59 +0000 (22:22 +0100)]
MIPS: Set io_map_base for several PCI bridges lacking it
Several MIPS platforms don't set pci_controller::io_map_base for their
PCI bridges. This results in a panic in pci_iomap(). (The panic is
conditional on CONFIG_PCI_DOMAINS, but that is now enabled for all PCI
MIPS systems.)
MIPS: Alchemy: Define eth platform devices in the correct order
Currently, the eth devices are probed in the inverse order, first
au1xxx_eth1_device and then au1xxx_eth0_device. On the GPR board,
this makes trouble:
# ifconfig|grep HWaddr
eth0 Link encap:Ethernet HWaddr 00:50:C2:0C:30:01
eth1 Link encap:Ethernet HWaddr 66:22:01:80:38:10
A bogous ethernet hwaddr is assigned to the first device and
au1xxx_eth0_device is mapped to eth1, which even does not work
properly. With this patch, the problems are gone:
# ifconfig|grep HWaddr
eth0 Link encap:Ethernet HWaddr 66:22:11:32:38:10
eth1 Link encap:Ethernet HWaddr 66:22:11:32:38:11
Signed-off-by: Wolfgang Grandegger <wg@denx.de>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1473/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
As a relativly new ABI N32 should only have received the getdents64(2) but
instead it only had getdents(2). This was noticed as a performance anomaly
in glibc.
Bruno Randolf [Sun, 11 Jul 2010 15:40:28 +0000 (00:40 +0900)]
MIPS: MTX-1: Fix PCI on the MeshCube and related boards
This patch fixes a regression introduced by commit "MIPS: Alchemy: MTX-1:
Use linux gpio api." (bb706b28bbd647c2fd7f22d6bf03a18b9552be05) which broke
PCI bus operation. The problem is caused by alchemy_gpio2_enable() which
resets the GPIO2 block. Two PCI signals (PCI_SERR and PCI_RST) are connected
to GPIO2 and they obviously do not to like the reset. Since GPIO2 is
correctly initialized by the boot monitor (YAMON) it is not necessary to
call this function, so just remove it.
Also replace gpio_set_value() with alchemy_gpio_set_value() to avoid
problems in case gpiolib gets initialized after PCI. And since alchemy
gpio_set_value() calls au_sync() we don't have to au_sync() again later.
Signed-off-by: Bruno Randolf <br1@einfach.org>
To: linux-mips@linux-mips.org
To: manuel.lauss@googlemail.com
Patchwork: https://patchwork.linux-mips.org/patch/1448/ Tested-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
David Daney [Wed, 16 Jun 2010 22:00:28 +0000 (15:00 -0700)]
MIPS: Make init_vdso a subsys_initcall.
Quoting from Jiri Slaby's patch of a similar nature for x86:
When initrd is in use and a driver does request_module() in its
module_init (i.e. __initcall or device_initcall), a modprobe
process is created with VDSO mapping. But VDSO is inited even in
__initcall, i.e. on the same level (at the same time), so it may
not be inited yet (link order matters).
Move init_vdso up to subsys_initcall to avoid the issue.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org Cc: David Daney <ddaney@caviumnetworks.com> Cc: Jiri Slaby <jslaby@suse.cz>
Patchwork: http://patchwork.linux-mips.org/patch/1386/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
David VomLehn [Fri, 18 Jun 2010 23:51:49 +0000 (16:51 -0700)]
MIPS: PowerTV: Move register setup to before reading registers.
The 4600 family code reads registers to differentiate between two ASIC
variants, but this was being done prior to the register setup. This moves
register setup before the reading code.
Signed-off-by: David VomLehn <dvomlehn@cisco.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1392/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
WARNING: sound/soc/au1x/snd-soc-au1xpsc-i2s.o(.data+0xa8): Section mismatch in reference from the variable au1xpsc_i2s_driver to the function .init.text:au1xpsc_i2s_drvprobe()
The variable au1xpsc_i2s_driver references
the function __init au1xpsc_i2s_drvprobe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
WARNING: drivers/video/built-in.o(.data+0x360): Section mismatch in reference from the variable au1100fb_driver to the function .init.text:au1100fb_drv_probe()
The variable au1100fb_driver references
the function __init au1100fb_drv_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
Fixing which triggers of a slew of further mismatches:
WARNING: drivers/video/built-in.o(.devinit.text+0xc0): Section mismatch in reference from the function au1100fb_drv_probe() to the variable .init.data:au1100fb_fix
The function __devinit au1100fb_drv_probe() references
a variable __initdata au1100fb_fix.
If au1100fb_fix is only used by au1100fb_drv_probe then
annotate au1100fb_fix with a matching annotation.
WARNING: drivers/video/built-in.o(.devinit.text+0x21c): Section mismatch in reference from the function au1100fb_drv_probe() to the variable .init.data:au1100fb_var
The function __devinit au1100fb_drv_probe() references
a variable __initdata au1100fb_var.
If au1100fb_var is only used by au1100fb_drv_probe then
annotate au1100fb_var with a matching annotation.
WARNING: drivers/built-in.o(.devinit.text+0xc0): Section mismatch in reference from the function pmagbafb_probe() to the variable .init.data:pmagbafb_fix
The function __devinit pmagbafb_probe() references
a variable __initdata pmagbafb_fix.
If pmagbafb_fix is only used by pmagbafb_probe then
annotate pmagbafb_fix with a matching annotation.
Fixing this one triggers a few more mismatches in order:
WARNING: drivers/video/built-in.o(.devinit.text+0x414): Section mismatch in reference from the function pmagbbfb_probe() to the variable .init.data:pmagbbfb_fix
The function __devinit pmagbbfb_probe() references
a variable __initdata pmagbbfb_fix.
If pmagbbfb_fix is only used by pmagbbfb_probe then
annotate pmagbbfb_fix with a matching annotation.
WARNING: drivers/video/built-in.o(.devinit.text+0x45c): Section mismatch in reference from the function pmagbbfb_probe() to the variable .init.data:pmagbbfb_defined
The function __devinit pmagbbfb_probe() references
a variable __initdata pmagbbfb_defined.
If pmagbbfb_defined is only used by pmagbbfb_probe then
annotate pmagbbfb_defined with a matching annotation.
WARNING: drivers/video/built-in.o(.devinit.text+0x5fc): Section mismatch in reference from the function pmagbbfb_probe() to the function .init.text:pmagbbfb_screen_setup()
The function __devinit pmagbbfb_probe() references
a function __init pmagbbfb_screen_setup().
If pmagbbfb_screen_setup is only used by pmagbbfb_probe then
annotate pmagbbfb_screen_setup with a matching annotation.
WARNING: drivers/video/built-in.o(.devinit.text+0x6f4): Section mismatch in reference from the function pmagbbfb_probe() to the function .init.text:pmagbbfb_osc_setup()
The function __devinit pmagbbfb_probe() references
a function __init pmagbbfb_osc_setup().
If pmagbbfb_osc_setup is only used by pmagbbfb_probe then
annotate pmagbbfb_osc_setup with a matching annotation.
WARNING: drivers/video/built-in.o(.devinit.text+0x5f8): Section mismatch in reference from the function pmagbbfb_osc_setup() to the variable .init.data:pmagbbfb_freqs.15993
The function __devinit pmagbbfb_osc_setup() references
a variable __initdata pmagbbfb_freqs.15993.
If pmagbbfb_freqs.15993 is only used by pmagbbfb_osc_setup then
annotate pmagbbfb_freqs.15993 with a matching annotation.
WARNING: drivers/video/built-in.o(.data+0x1e0): Section mismatch in reference fr
om the variable pmagbafb_driver to the function .init.text:pmagbafb_probe()
The variable pmagbafb_driver references
the function __init pmagbafb_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
Fixing this one triggers 2 more:
WARNING: drivers/video/built-in.o(.devinit.text+0xc0): Section mismatch in reference from the function pmagbafb_probe() to the variable .init.data:pmagbafb_fix
The function __devinit pmagbafb_probe() references
a variable __initdata pmagbafb_fix.
If pmagbafb_fix is only used by pmagbafb_probe then
annotate pmagbafb_fix with a matching annotation.
WARNING: drivers/video/built-in.o(.devinit.text+0x108): Section mismatch in reference from the function pmagbafb_probe() to the variable .init.data:pmagbafb_defined
The function __devinit pmagbafb_probe() references
a variable __initdata pmagbafb_defined.
If pmagbafb_defined is only used by pmagbafb_probe then
annotate pmagbafb_defined with a matching annotation.