safe/jmp/linux-2.6
14 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Fri, 9 Apr 2010 15:36:19 +0000 (17:36 +0200)]
Merge branch 'fix/hda' into topic/hda

14 years agoALSA: hda - Fix initial capture source connections of ALC880/260
Takashi Iwai [Fri, 9 Apr 2010 15:32:23 +0000 (17:32 +0200)]
ALSA: hda - Fix initial capture source connections of ALC880/260

The widget connections of ADC of ALC880 and ALC2260 aren't initialized,
thus it might point to invalid pin.  This can be a problem when mode=auto
and there is only one input pin.  Then user can't change the connection
at all.

This patch adds the code to initialize the input pin connection of these
codecs.

Reference: Novell bnc#594363
https://bugzilla.novell.com/show_bug.cgi?id=594363

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Fix setup for ALC269vb amic and dmic models
Kailang Yang [Fri, 9 Apr 2010 09:01:20 +0000 (11:01 +0200)]
ALSA: hda - Fix setup for ALC269vb amic and dmic models

Corrected HP and mic pins for ALC269vb amic and dmic models.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Fix auto-parser of ALC269vb for HP pin NID 0x21
Kailang Yang [Fri, 9 Apr 2010 08:57:33 +0000 (10:57 +0200)]
ALSA: hda - Fix auto-parser of ALC269vb for HP pin NID 0x21

ALC269vb has an alternative HP pin 0x21 in addition.
Fix the parser to recognize it.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda: Add support for Medion WIM2160
Maurus Cuelenaere [Tue, 6 Apr 2010 16:12:52 +0000 (18:12 +0200)]
ALSA: hda: Add support for Medion WIM2160

This adds support for the Medion WIM2160 soundcard.
There's no PCI quirk added because it has the same PCI id as the
Medion MD2.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Remove left-over debug printk in patch_realtek.c
Takashi Iwai [Wed, 7 Apr 2010 12:53:00 +0000 (14:53 +0200)]
ALSA: hda - Remove left-over debug printk in patch_realtek.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Fix ALC882 DAC connections in auto mode
Takashi Iwai [Wed, 7 Apr 2010 07:06:00 +0000 (09:06 +0200)]
ALSA: hda - Fix ALC882 DAC connections in auto mode

Assign DACs properly to each output.  Currently, the front output is bound
to HP/speaker outputs blindly, but they should be assigned to individual
DACs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Wed, 7 Apr 2010 06:38:47 +0000 (08:38 +0200)]
Merge branch 'fix/hda' into topic/hda

14 years agoALSA: hda - Fix a wrong array range check in patch_realtek.c
Takashi Iwai [Mon, 5 Apr 2010 21:25:13 +0000 (23:25 +0200)]
ALSA: hda - Fix a wrong array range check in patch_realtek.c

The commit 6a4f2ccb467e00281470cde2dee08fe5ecde62d1 introduced a wrong
comparision for the array range check, which effectively skips the whole
initialization of DAC connections.  Fixed now.

Reference: bko#15689
https://bugzilla.kernel.org/show_bug.cgi?id=15689

Reported-by: Adrian Ulrich <kernel@blinkenlights.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Enable amplifiers on Acer Inspire 6530G
Tony Vroon [Mon, 5 Apr 2010 15:30:43 +0000 (16:30 +0100)]
ALSA: hda - Enable amplifiers on Acer Inspire 6530G

After more tests it appears that EAPD needs to be enabled
on both the 0x14 and 0x15 NIDs to enable the main speaker
and headphone amplifiers. The maximum volume setting is
now equal to what the machine achieves under other operating
systems.
Disabling Front or LFE playback triggers EAPD and disables
the amplifier. As such, these two playback switches have
been removed from the mixer.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Add MSI blacklist for Aopen MZ915-M
Takashi Iwai [Sun, 4 Apr 2010 10:14:03 +0000 (12:14 +0200)]
ALSA: hda - Add MSI blacklist for Aopen MZ915-M

The device needs MSI disablement.  Added to the quirk list.

Reported-by: Harald Dunkel <harri@afaics.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Update document about MSI and interrupts
Takashi Iwai [Thu, 1 Apr 2010 16:08:29 +0000 (18:08 +0200)]
ALSA: hda - Update document about MSI and interrupts

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge branch 'topic/hda-alc-mute' into topic/hda
Takashi Iwai [Thu, 1 Apr 2010 14:04:28 +0000 (16:04 +0200)]
Merge branch 'topic/hda-alc-mute' into topic/hda

14 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Thu, 1 Apr 2010 14:04:13 +0000 (16:04 +0200)]
Merge branch 'fix/hda' into topic/hda

14 years agoALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981
Daniel T Chen [Tue, 30 Mar 2010 17:29:28 +0000 (13:29 -0400)]
ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981

BugLink: https://launchpad.net/bugs/551606
The OR's hardware distorts at PCM 100% because it does not correspond to
0 dB. Fix this in patch_ad1981() for all models using the Thinkpad
quirk.

Reported-by: Jane Silber
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - introduce snd_hda_codec_update_cache()
Takashi Iwai [Tue, 30 Mar 2010 16:03:44 +0000 (18:03 +0200)]
ALSA: hda - introduce snd_hda_codec_update_cache()

Add a new helper, snd_hda_codec_update_cache(), for reducing the unneeded
verbs.  This function checks the cached value and skips if it's identical
with the given one.  Otherwise it works like snd_hda_codec_write_cache().

The alc269 code uses this function as an example.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Add mute LED support for HP laptop with ALC269
Takashi Iwai [Tue, 30 Mar 2010 16:00:59 +0000 (18:00 +0200)]
ALSA: hda - Add mute LED support for HP laptop with ALC269

Some HP laptops have a mute LED that is controlled over the unused
MIC2 VREF pin.  Implement the LED updater like patch_sigmatel.c for this
model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Tue, 30 Mar 2010 16:00:42 +0000 (18:00 +0200)]
Merge branch 'fix/hda' into topic/hda

14 years agoALSA: hda - Add missing printk argument in previous patch
Takashi Iwai [Tue, 30 Mar 2010 05:48:05 +0000 (07:48 +0200)]
ALSA: hda - Add missing printk argument in previous patch

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Fix ADC/MUX assignment of ALC269 codec
Takashi Iwai [Mon, 29 Mar 2010 15:21:45 +0000 (17:21 +0200)]
ALSA: hda - Fix ADC/MUX assignment of ALC269 codec

ALC269 codec has a few different variants, and each of them may have
different ADC and MUX widgets.  For example, one model has ADC 0x08
with MUX 0x23 while others has ADC 0x09 or ADC 0x07 with MUX 022 or
0x24.  The difference of ADC appears usually as the capability of
the digital mic pin (0x12), and the current driver sometimes misses
the internal mic pin due to the mismatching ADC.

This patch adds a bit more clever way to find the matching ADC instead
of the static list.  Now the driver checks all active input pins and
fills only the ADC/MUX's that contain all of them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Report errors when invalid values are passed to snd_hda_amp_*()
Takashi Iwai [Mon, 29 Mar 2010 07:19:38 +0000 (09:19 +0200)]
ALSA: hda - Report errors when invalid values are passed to snd_hda_amp_*()

The values should be in 8 bits.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Mon, 29 Mar 2010 07:20:32 +0000 (09:20 +0200)]
Merge branch 'fix/hda' into topic/hda

14 years agoALSA: hda - Fix invalid bit values passed to snd_hda_codec_amp_stereo()
Takashi Iwai [Mon, 29 Mar 2010 07:16:24 +0000 (09:16 +0200)]
ALSA: hda - Fix invalid bit values passed to snd_hda_codec_amp_stereo()

The mask and value parameters passed to snd_hda_codec_amp_stereo()
should be 8-bit values for mute and volume.  Passing AMP_IN_MUTE() is
wrong, which is found in many places in patch_realtek.c as a left-over
from the conversion to snd_hda_codec_amp_stereo().

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda: Use LPIB for ga-ma770-ud3 board
Daniel T Chen [Sun, 28 Mar 2010 06:34:40 +0000 (02:34 -0400)]
ALSA: hda: Use LPIB for ga-ma770-ud3 board

BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575669
The OR states that position_fix=1 is necessary to work around glitching
during volume adjustments using PulseAudio.

Reported-by: Carlos Laviola <claviola@debian.org>
Tested-by: Carlos Laviola <claviola@debian.org>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge remote branch 'alsa/devel' into topic/hda
Takashi Iwai [Fri, 26 Mar 2010 14:28:41 +0000 (15:28 +0100)]
Merge remote branch 'alsa/devel' into topic/hda

14 years agoALSA: hda-intel - probe_only module option is int type now
Jaroslav Kysela [Fri, 26 Mar 2010 10:16:59 +0000 (11:16 +0100)]
ALSA: hda-intel - probe_only module option is int type now

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoALSA: hda-intel - remove model=hwio from documentation
Jaroslav Kysela [Fri, 26 Mar 2010 10:14:55 +0000 (11:14 +0100)]
ALSA: hda-intel - remove model=hwio from documentation

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoALSA: hda-intel - remove model=hwio , use probe_only=3 instead
Jaroslav Kysela [Fri, 26 Mar 2010 10:04:38 +0000 (11:04 +0100)]
ALSA: hda-intel - remove model=hwio , use probe_only=3 instead

The probe_only module parameter skips the codec initialization, too.
Remove the model=hwio code and use second bit in probe_only to
skip the HDA codec reset procedure.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoALSA: hda-intel - AD1984 thinkpad - add analog beep input control
Jaroslav Kysela [Fri, 26 Mar 2010 09:33:18 +0000 (10:33 +0100)]
ALSA: hda-intel - AD1984 thinkpad - add analog beep input control

For Lenovo Thinkpad T61/X61, the analog beep input is connected
to node 0x20, index 3. Move the digital beep mute/volume controls
as "Digital Beep" and create analog beep controls for mentioned node.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoALSA: hda-intel - add special 'hwio' model to bypass initialization
Jaroslav Kysela [Fri, 26 Mar 2010 09:28:46 +0000 (10:28 +0100)]
ALSA: hda-intel - add special 'hwio' model to bypass initialization

Using the 'model=hwio' option, the driver bypasses any codec
initialization and the reset procedure for codecs is also
bypassed. This mode is usefull to enable direct access using
hwdep interface (using hdaverb or hda-analyzer tools) and
retain codec setup from BIOS.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Thu, 25 Mar 2010 14:06:58 +0000 (15:06 +0100)]
Merge branch 'fix/hda' into topic/hda

14 years agoALSA: hda - Don't set invalid connection index in Realtek initialiaiton
Takashi Iwai [Thu, 25 Mar 2010 14:00:15 +0000 (15:00 +0100)]
ALSA: hda - Don't set invalid connection index in Realtek initialiaiton

Skip initialization of connections of DAC widgets that aren't used,
which resulted in invalid verb parameters.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: ua101: remove experimental status
Clemens Ladisch [Mon, 22 Mar 2010 14:12:07 +0000 (15:12 +0100)]
ALSA: ua101: remove experimental status

Now that the EHCI driver copes with small iso packets without blowing
up, take the snd-ua101 driver out of the alpha-test stage.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoFix up prototype for sys_ipc breakage
Linus Torvalds [Mon, 22 Mar 2010 20:12:33 +0000 (13:12 -0700)]
Fix up prototype for sys_ipc breakage

Commit 45575f5a426c ("ppc64 sys_ipc breakage in 2.6.34-rc2") fixed the
definition of the sys_ipc() helper, but didn't fix the prototype in
<linux/syscalls.h>

Reported-and-tested-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Linus Torvalds [Mon, 22 Mar 2010 17:03:51 +0000 (10:03 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mst/vhost

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  virtio: console: Check if port is valid in resize_console
  virtio: console: Generate a kobject CHANGE event on adding 'name' attribute

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 22 Mar 2010 17:01:58 +0000 (10:01 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (38 commits)
  ip_gre: include route header_len in max_headroom calculation
  if_tunnel.h: add missing ams/byteorder.h include
  ipv4: Don't drop redirected route cache entry unless PTMU actually expired
  net: suppress lockdep-RCU false positive in FIB trie.
  Bluetooth: Fix kernel crash on L2CAP stress tests
  Bluetooth: Convert debug files to actually use debugfs instead of sysfs
  Bluetooth: Fix potential bad memory access with sysfs files
  netfilter: ctnetlink: fix reliable event delivery if message building fails
  netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err()
  NET_DMA: free skbs periodically
  netlink: fix unaligned access in nla_get_be64()
  tcp: Fix tcp_mark_head_lost() with packets == 0
  net: ipmr/ip6mr: fix potential out-of-bounds vif_table access
  KS8695: update ksp->next_rx_desc_read at the end of rx loop
  igb: Add support for 82576 ET2 Quad Port Server Adapter
  ixgbevf: Message formatting cleanups
  ixgbevf: Shorten up delay timer for watchdog task
  ixgbevf: Fix VF Stats accounting after reset
  ixgbe: Set IXGBE_RSC_CB(skb)->DMA field to zero after unmapping the address
  ixgbe: fix for real_num_tx_queues update issue
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Linus Torvalds [Mon, 22 Mar 2010 16:58:04 +0000 (09:58 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/bp/bp

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  edac, mce: Filter out invalid values

14 years agorxrpc: Check allocation failure.
Tetsuo Handa [Mon, 22 Mar 2010 13:50:19 +0000 (13:50 +0000)]
rxrpc: Check allocation failure.

alloc_skb() can return NULL.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoAFS: Potential null dereference
Dan Carpenter [Mon, 22 Mar 2010 13:07:14 +0000 (13:07 +0000)]
AFS: Potential null dereference

It seems clear from the surrounding code that xpermits is allowed to be
NULL here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoppc64 sys_ipc breakage in 2.6.34-rc2
Anton Blanchard [Mon, 22 Mar 2010 06:47:59 +0000 (17:47 +1100)]
ppc64 sys_ipc breakage in 2.6.34-rc2

I chased down a fail on ppc64 on 2.6.34-rc2 where an application that
uses shared memory was getting a SEGV.

Commit baed7fc9b580bd3fb8252ff1d9b36eaf1f86b670 ("Add generic sys_ipc
wrapper") changed the second argument from an unsigned long to an int.
When we call shmget the system call wrappers for sys_ipc will sign
extend second (ie the size) which truncates it.  It took a while to
track down because the call succeeds and strace shows the untruncated
size :)

The patch below changes second from an int to an unsigned long which
fixes shmget on ppc64 (and I assume s390, sparc64 and mips64).

Signed-off-by: Anton Blanchard <anton@samba.org>
--

I assume the function prototypes for the other IPC methods would cause us
to sign or zero extend second where appropriate (avoiding any security
issues). Come to think of it, the syscall wrappers for each method should do
that for us as well.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agox86 / perf: Fix suspend to RAM on HP nx6325
Rafael J. Wysocki [Sun, 21 Mar 2010 20:51:51 +0000 (21:51 +0100)]
x86 / perf: Fix suspend to RAM on HP nx6325

Commit 3f6da3905398826d85731247e7fbcf53400c18bd
(perf: Rework and fix the arch CPU-hotplug hooks) broke suspend to
RAM on my HP nx6325 (and most likely on other AMD-based boxes too)
by allowing amd_pmu_cpu_offline() to be executed for CPUs that are
going offline as part of the suspend process.  The problem is that
cpuhw->amd_nb may be NULL already, so the function should make sure
it's not NULL before accessing the object pointed to by it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoALSA: hda - Fix uninitialized variable warning in alc_auto_parse_customize_define()
Takashi Iwai [Mon, 22 Mar 2010 16:09:47 +0000 (17:09 +0100)]
ALSA: hda - Fix uninitialized variable warning in alc_auto_parse_customize_define()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoedac, mce: Filter out invalid values
Borislav Petkov [Tue, 9 Mar 2010 19:38:48 +0000 (20:38 +0100)]
edac, mce: Filter out invalid values

Print the CPU associated with the error only when the field is valid.

Cc: <stable@kernel.org> # .32.x .33.x
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agovirtio: console: Check if port is valid in resize_console
Amit Shah [Fri, 19 Mar 2010 12:06:44 +0000 (17:36 +0530)]
virtio: console: Check if port is valid in resize_console

The console port could have been hot-unplugged. Check if it is valid
before working on it.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agovirtio: console: Generate a kobject CHANGE event on adding 'name' attribute
Amit Shah [Fri, 19 Mar 2010 12:06:43 +0000 (17:36 +0530)]
virtio: console: Generate a kobject CHANGE event on adding 'name' attribute

When the host lets us know what 'name' a port is assigned, we create the
sysfs 'name' attribute. Generate a 'change' event after this so that
udev wakes up and acts on the rules for virtio-ports (currently there's
only one rule that creates a symlink from the 'name' to the actual char
device).

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoALSA: hda - Fix access-after-free in patch_realtek.c
Takashi Iwai [Mon, 22 Mar 2010 07:30:20 +0000 (08:30 +0100)]
ALSA: hda - Fix access-after-free in patch_realtek.c

alc_free_kctls() has to be called after all jobs done in alc_build_controls().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Sort codec entry list of Nvidia HDMI
Takashi Iwai [Mon, 22 Mar 2010 07:07:55 +0000 (08:07 +0100)]
ALSA: hda - Sort codec entry list of Nvidia HDMI

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Add support of Nvidia GT220 HDMI
Derek Kelly [Mon, 22 Mar 2010 07:04:19 +0000 (08:04 +0100)]
ALSA: hda - Add support of Nvidia GT220 HDMI

This patch adds the device id for Nvidia GT220 cards to the nvhdmi
driver.  I have tested it and confirmed it to be working.

Original patch download link:
https://gist.github.com/324070/

Signed-off-by: Derek Kelly <user.vdr@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
Daniel T Chen [Sun, 21 Mar 2010 22:34:43 +0000 (18:34 -0400)]
ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)

BugLink: https://launchpad.net/bugs/420578
The OR has verified that his hardware distorts because of the 0 dB
offset not corresponding to the highest PCM level. Fix this by capping
said PCM level to 0 dB similarly to what we do for CX20549 (Venice).

Reported-by: Mike Pontillo <pontillo@gmail.com>
Tested-by: Mike Pontillo <pontillo@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoip_gre: include route header_len in max_headroom calculation
Timo Teräs [Sat, 20 Mar 2010 02:27:58 +0000 (02:27 +0000)]
ip_gre: include route header_len in max_headroom calculation

Taking route's header_len into account, and updating gre device
needed_headroom will give better hints on upper bound of required
headroom. This is useful if the gre traffic is xfrm'ed.

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoif_tunnel.h: add missing ams/byteorder.h include
Paulius Zaleckas [Mon, 22 Mar 2010 04:19:02 +0000 (21:19 -0700)]
if_tunnel.h: add missing ams/byteorder.h include

When compiling userspace application which includes
if_tunnel.h and uses GRE_* defines you will get undefined
reference to __cpu_to_be16.

Fix this by adding missing #include <asm/byteorder.h>

Cc: stable@kernel.org
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4: Don't drop redirected route cache entry unless PTMU actually expired
Guenter Roeck [Mon, 22 Mar 2010 03:55:13 +0000 (20:55 -0700)]
ipv4: Don't drop redirected route cache entry unless PTMU actually expired

TCP sessions over IPv4 can get stuck if routers between endpoints
do not fragment packets but implement PMTU instead, and we are using
those routers because of an ICMP redirect.

Setup is as follows

       MTU1    MTU2   MTU1
    A--------B------C------D

with MTU1 > MTU2. A and D are endpoints, B and C are routers. B and C
implement PMTU and drop packets larger than MTU2 (for example because
DF is set on all packets). TCP sessions are initiated between A and D.
There is packet loss between A and D, causing frequent TCP
retransmits.

After the number of retransmits on a TCP session reaches tcp_retries1,
tcp calls dst_negative_advice() prior to each retransmit. This results
in route cache entries for the peer to be deleted in
ipv4_negative_advice() if the Path MTU is set.

If the outstanding data on an affected TCP session is larger than
MTU2, packets sent from the endpoints will be dropped by B or C, and
ICMP NEEDFRAG will be returned. A and D receive NEEDFRAG messages and
update PMTU.

Before the next retransmit, tcp will again call dst_negative_advice(),
causing the route cache entry (with correct PMTU) to be deleted. The
retransmitted packet will be larger than MTU2, causing it to be
dropped again.

This sequence repeats until the TCP session aborts or is terminated.

Problem is fixed by removing redirected route cache entries in
ipv4_negative_advice() only if the PMTU is expired.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
David S. Miller [Mon, 22 Mar 2010 01:03:11 +0000 (18:03 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6

14 years agonet: suppress lockdep-RCU false positive in FIB trie.
Paul E. McKenney [Mon, 22 Mar 2010 01:01:05 +0000 (18:01 -0700)]
net: suppress lockdep-RCU false positive in FIB trie.

Allow fib_find_node() to be called either under rcu_read_lock()
protection or with RTNL held.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Sun, 21 Mar 2010 08:33:25 +0000 (09:33 +0100)]
Merge branch 'fix/hda' into topic/hda

14 years agoALSA: hda - Add PCI quirk for HP dv6-1110ax.
Kunal Gangakhedkar [Sat, 20 Mar 2010 17:38:01 +0000 (23:08 +0530)]
ALSA: hda - Add PCI quirk for HP dv6-1110ax.

Adding this PCI quirk fixes the board config detection.
This also fixes jack sensing by using "hp_detect=1" via properly detected
board config.

Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoBluetooth: Fix kernel crash on L2CAP stress tests
Andrei Emeltchenko [Fri, 19 Mar 2010 08:26:28 +0000 (10:26 +0200)]
Bluetooth: Fix kernel crash on L2CAP stress tests

Added very simple check that req buffer has enough space to
fit configuration parameters. Shall be enough to reject packets
with configuration size more than req buffer.

Crash trace below

[ 6069.659393] Unable to handle kernel paging request at virtual address 02000205
[ 6069.673034] Internal error: Oops: 805 [#1] PREEMPT
...
[ 6069.727172] PC is at l2cap_add_conf_opt+0x70/0xf0 [l2cap]
[ 6069.732604] LR is at l2cap_recv_frame+0x1350/0x2e78 [l2cap]
...
[ 6070.030303] Backtrace:
[ 6070.032806] [<bf1c2880>] (l2cap_add_conf_opt+0x0/0xf0 [l2cap]) from
[<bf1c6624>] (l2cap_recv_frame+0x1350/0x2e78 [l2cap])
[ 6070.043823]  r8:dc5d3100 r7:df2a91d6 r6:00000001 r5:df2a8000 r4:00000200
[ 6070.050659] [<bf1c52d4>] (l2cap_recv_frame+0x0/0x2e78 [l2cap]) from
[<bf1c8408>] (l2cap_recv_acldata+0x2bc/0x350 [l2cap])
[ 6070.061798] [<bf1c814c>] (l2cap_recv_acldata+0x0/0x350 [l2cap]) from
[<bf0037a4>] (hci_rx_task+0x244/0x478 [bluetooth])
[ 6070.072631]  r6:dc647700 r5:00000001 r4:df2ab740
[ 6070.077362] [<bf003560>] (hci_rx_task+0x0/0x478 [bluetooth]) from
[<c006b9fc>] (tasklet_action+0x78/0xd8)
[ 6070.087005] [<c006b984>] (tasklet_action+0x0/0xd8) from [<c006c160>]

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Gustavo F. Padovan <gustavo@padovan.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Convert debug files to actually use debugfs instead of sysfs
Marcel Holtmann [Sun, 21 Mar 2010 04:27:45 +0000 (05:27 +0100)]
Bluetooth: Convert debug files to actually use debugfs instead of sysfs

Some of the debug files ended up wrongly in sysfs, because at that point
of time, debugfs didn't exist. Convert these files to use debugfs and
also seq_file. This patch converts all of these files at once and then
removes the exported symbol for the Bluetooth sysfs class.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Fix potential bad memory access with sysfs files
Marcel Holtmann [Mon, 15 Mar 2010 21:12:58 +0000 (14:12 -0700)]
Bluetooth: Fix potential bad memory access with sysfs files

When creating a high number of Bluetooth sockets (L2CAP, SCO
and RFCOMM) it is possible to scribble repeatedly on arbitrary
pages of memory. Ensure that the content of these sysfs files is
always less than one page. Even if this means truncating. The
files in question are scheduled to be moved over to debugfs in
the future anyway.

Based on initial patches from Neil Brown and Linus Torvalds

Reported-by: Neil Brown <neilb@suse.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoMerge branch 'vhost' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
David S. Miller [Sat, 20 Mar 2010 21:41:01 +0000 (14:41 -0700)]
Merge branch 'vhost' of git://git./linux/kernel/git/mst/vhost

14 years agonetfilter: ctnetlink: fix reliable event delivery if message building fails
Pablo Neira Ayuso [Tue, 16 Mar 2010 13:30:21 +0000 (13:30 +0000)]
netfilter: ctnetlink: fix reliable event delivery if message building fails

This patch fixes a bug that allows to lose events when reliable
event delivery mode is used, ie. if NETLINK_BROADCAST_SEND_ERROR
and NETLINK_RECV_NO_ENOBUFS socket options are set.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err()
Pablo Neira Ayuso [Thu, 18 Mar 2010 14:24:42 +0000 (14:24 +0000)]
netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err()

Currently, ENOBUFS errors are reported to the socket via
netlink_set_err() even if NETLINK_RECV_NO_ENOBUFS is set. However,
that should not happen. This fixes this problem and it changes the
prototype of netlink_set_err() to return the number of sockets that
have set the NETLINK_RECV_NO_ENOBUFS socket option. This return
value is used in the next patch in these bugfix series.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoNET_DMA: free skbs periodically
Steven J. Magnani [Tue, 16 Mar 2010 05:22:44 +0000 (05:22 +0000)]
NET_DMA: free skbs periodically

Under NET_DMA, data transfer can grind to a halt when userland issues a
large read on a socket with a high RCVLOWAT (i.e., 512 KB for both).
This appears to be because the NET_DMA design queues up lots of memcpy
operations, but doesn't issue or wait for them (and thus free the
associated skbs) until it is time for tcp_recvmesg() to return.
The socket hangs when its TCP window goes to zero before enough data is
available to satisfy the read.

Periodically issue asynchronous memcpy operations, and free skbs for ones
that have completed, to prevent sockets from going into zero-window mode.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetlink: fix unaligned access in nla_get_be64()
Pablo Neira Ayuso [Tue, 16 Mar 2010 13:30:44 +0000 (13:30 +0000)]
netlink: fix unaligned access in nla_get_be64()

This patch fixes a unaligned access in nla_get_be64() that was
introduced by myself in a17c859849402315613a0015ac8fbf101acf0cc1.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: Fix tcp_mark_head_lost() with packets == 0
Lennart Schulte [Wed, 17 Mar 2010 02:16:29 +0000 (02:16 +0000)]
tcp: Fix tcp_mark_head_lost() with packets == 0

A packet is marked as lost in case packets == 0, although nothing should be done.
This results in a too early retransmitted packet during recovery in some cases.
This small patch fixes this issue by returning immediately.

Signed-off-by: Lennart Schulte <lennart.schulte@nets.rwth-aachen.de>
Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: ipmr/ip6mr: fix potential out-of-bounds vif_table access
Patrick McHardy [Wed, 17 Mar 2010 06:04:14 +0000 (06:04 +0000)]
net: ipmr/ip6mr: fix potential out-of-bounds vif_table access

mfc_parent of cache entries is used to index into the vif_table and is
initialised from mfcctl->mfcc_parent. This can take values of to 2^16-1,
while the vif_table has only MAXVIFS (32) entries. The same problem
affects ip6mr.

Refuse invalid values to fix a potential out-of-bounds access. Unlike
the other validity checks, this is checked in ipmr_mfc_add() instead of
the setsockopt handler since its unused in the delete path and might be
uninitialized.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoKS8695: update ksp->next_rx_desc_read at the end of rx loop
Yegor Yefremov [Sat, 20 Mar 2010 05:43:29 +0000 (22:43 -0700)]
KS8695: update ksp->next_rx_desc_read at the end of rx loop

There is no need to adjust the next rx descriptor after each packet,
so do it only once at the end of the routine.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
14 years agoigb: Add support for 82576 ET2 Quad Port Server Adapter
Carolyn Wyborny [Fri, 19 Mar 2010 06:07:48 +0000 (06:07 +0000)]
igb: Add support for 82576 ET2 Quad Port Server Adapter

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbevf: Message formatting cleanups
Greg Rose [Fri, 19 Mar 2010 03:00:31 +0000 (03:00 +0000)]
ixgbevf: Message formatting cleanups

Clean up some text output formatting.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbevf: Shorten up delay timer for watchdog task
Greg Rose [Fri, 19 Mar 2010 03:00:12 +0000 (03:00 +0000)]
ixgbevf: Shorten up delay timer for watchdog task

The recovery from PF reset works better when you shorten up the delay
until the watchdog task executes.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbevf: Fix VF Stats accounting after reset
Greg Rose [Fri, 19 Mar 2010 02:59:52 +0000 (02:59 +0000)]
ixgbevf: Fix VF Stats accounting after reset

The counters in the 82599 Virtual Function are not clear on read.  They
accumulate to the maximum value and then roll over.  They are also not
cleared when the VF executes a soft reset, so it is possible they are
non-zero when the driver loads and starts.  This has all been accounted
for in the code that keeps the stats up to date but there is one case
that is not.  When the PF driver is reset the counters in the VF are
all reset to zero.  This adds an additional accounting overhead into
the VF driver when the PF is reset under its feet.  This patch adds
additional counters that are used by the VF driver to accumulate and
save stats after a PF reset has been detected.  Prior to this patch
displaying the stats in the VF after the PF has reset would show
bogus data.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Set IXGBE_RSC_CB(skb)->DMA field to zero after unmapping the address
Mallikarjuna R Chilakala [Fri, 19 Mar 2010 04:41:33 +0000 (04:41 +0000)]
ixgbe: Set IXGBE_RSC_CB(skb)->DMA field to zero after unmapping the address

As per Simon Horman's feedback set IXGBE_RSC_CB(skb)->dma to zero
after unmapping HWRSC DMA address to avoid double freeing.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: fix for real_num_tx_queues update issue
Vasu Dev [Fri, 19 Mar 2010 04:33:10 +0000 (04:33 +0000)]
ixgbe: fix for real_num_tx_queues update issue

Currently netdev_features_change is called before fcoe tx queues
setup is done, so this patch moves calling of netdev_features_change
after tx queues setup is done in ixgbe_init_interrupt_scheme, so
that real_num_tx_queues is updated correctly on each fcoe enable
or disable.

This allows additional fcoe queues updated correctly in vlan driver
for their correct queue selection.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoTCP: check min TTL on received ICMP packets
stephen hemminger [Thu, 18 Mar 2010 11:27:32 +0000 (11:27 +0000)]
TCP: check min TTL on received ICMP packets

This adds RFC5082 checks for TTL on received ICMP packets.
It adds some security against spoofed ICMP packets
disrupting GTSM protected sessions.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: Remove redundant dst NULL check in ip6_dst_check
Herbert Xu [Thu, 18 Mar 2010 23:00:22 +0000 (23:00 +0000)]
ipv6: Remove redundant dst NULL check in ip6_dst_check

As the only path leading to ip6_dst_check makes an indirect call
through dst->ops, dst cannot be NULL in ip6_dst_check.

This patch removes this check in case it misleads people who
come across this code.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4: check rt_genid in dst_check
Timo Teräs [Thu, 18 Mar 2010 23:20:20 +0000 (23:20 +0000)]
ipv4: check rt_genid in dst_check

Xfrm_dst keeps a reference to ipv4 rtable entries on each
cached bundle. The only way to renew xfrm_dst when the underlying
route has changed, is to implement dst_check for this. This is
what ipv6 side does too.

The problems started after 87c1e12b5eeb7b30b4b41291bef8e0b41fc3dde9
("ipsec: Fix bogus bundle flowi") which fixed a bug causing xfrm_dst
to not get reused, until that all lookups always generated new
xfrm_dst with new route reference and path mtu worked. But after the
fix, the old routes started to get reused even after they were expired
causing pmtu to break (well it would occationally work if the rtable
gc had run recently and marked the route obsolete causing dst_check to
get called).

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoLinux 2.6.34-rc2 v2.6.34-rc2
Linus Torvalds [Sat, 20 Mar 2010 01:17:57 +0000 (18:17 -0700)]
Linux 2.6.34-rc2

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Sat, 20 Mar 2010 01:16:20 +0000 (18:16 -0700)]
Merge git://git./linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  serial: sh-sci: remove duplicated #include
  sh: Export uncached helper symbols.
  sh: Fix up NUMA build for 29-bit.
  serial: sh-sci: Fix build failure for non-sh architectures.
  sh: Fix up uncached offset for legacy 29-bit mode.
  sh: Support CPU affinity masks for INTC controllers.

14 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
Linus Torvalds [Sat, 20 Mar 2010 01:14:22 +0000 (18:14 -0700)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/dvrabel/uwb

* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
  uwb: remove duplicate cpu_to_le16()
  uwb: declare MODULE_FIRMWARE() in i1480 DFU driver
  uwb: make USB device id table constant
  uwb: wlp: refactor wlp_get_<attribute>() macros

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88...
Linus Torvalds [Fri, 19 Mar 2010 20:49:29 +0000 (13:49 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mattst88/alpha-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6:
  alpha: fix compile errors in dma-mapping-common.h
  alpha: remove trailing spaces in messages
  alpha: use __ratelimit

14 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Fri, 19 Mar 2010 20:42:43 +0000 (13:42 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Remove IOMMU_VMERGE config option
  powerpc: Fix swiotlb to respect the boot option
  powerpc: Do not call prink when CONFIG_PRINTK is not defined
  powerpc: Use correct ccr bit for syscall error status
  powerpc/fsl-booke: Get coherent bit from PTE
  powerpc/85xx: Make sure lwarx hint isn't set on ppc32

14 years agoMerge branch 'zerolen' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:42:00 +0000 (13:42 -0700)]
Merge branch 'zerolen' of git://git./linux/kernel/git/jgarzik/misc-2.6

* 'zerolen' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  Delete zero-length file drivers/mtd/maps/omap_nor.c

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:40:03 +0000 (13:40 -0700)]
Merge git://git./linux/kernel/git/gregkh/tty-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  tty_port,usb-console: Fix usb serial console open/close regression
  tty: cpm_uart: use resource_size()
  tty_buffer: Fix distinct type warning
  hvc_console: Fix race between hvc_close and hvc_remove
  uartlite: Fix build on sparc.
  tty: Take a 256 byte padding into account when buffering below sub-page units
  Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call"

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:39:42 +0000 (13:39 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  driver core: numa: fix BUILD_BUG_ON for node_read_distance
  driver-core: document ERR_PTR() return values
  kobject: documentation: Update to refer to kset-example.c.
  sysdev: the cpu probe/release attributes should be sysdev_class_attributes
  kobject: documentation: Fix erroneous example in kobject doc.
  driver-core: fix missing kernel-doc in firmware_class
  Driver core: Early platform kernel-doc update
  sysfs: fix sysfs lockdep warning in mlx4 code
  sysfs: fix sysfs lockdep warning in infiniband code
  sysfs: fix sysfs lockdep warning in ipmi code
  sysfs: Initialised pci bus legacy_mem field before use
  sysfs: use sysfs_bin_attr_init in firmware class driver

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:39:21 +0000 (13:39 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (45 commits)
  USB: gadget/multi: cdc_do_config: remove redundant check
  usb: r8a66597-hcd: fix removed from an attached hub
  USB: xhci: Make endpoint interval debugging clearer.
  USB: Fix usb_fill_int_urb for SuperSpeed devices
  USB: cp210x: Remove double usb_control_msg from cp210x_set_config
  USB: Remove last bit of CONFIG_USB_BERRY_CHARGE
  USB: gadget: add gadget controller number for s3c-hsotg driver
  USB: ftdi_sio: Fix locking for change_speed() function
  USB: g_mass_storage: fixed module name in Kconfig
  USB: gadget: f_mass_storage::fsg_bind(): fix error handling
  USB: g_mass_storage: fix section mismatch warnings
  USB: gadget: fix Blackfin builds after gadget cleansing
  USB: goku_udc: remove potential null dereference
  USB: option.c: Add Pirelli VID/PID and indicate Pirelli's modem interface is 0xff
  USB: serial: Fix module name typo for qcaux Kconfig entry.
  usb: cdc-wdm: Fix deadlock between write and resume
  usb: cdc-wdm: Fix order in disconnect and fix locking
  usb: cdc-wdm:Fix loss of data due to autosuspend
  usb: cdc-wdm: Fix submission of URB after suspension
  usb: cdc-wdm: Fix race between disconnect and debug messages
  ...

14 years agoDelete zero-length file drivers/mtd/maps/omap_nor.c
Jeff Garzik [Fri, 19 Mar 2010 18:25:45 +0000 (14:25 -0400)]
Delete zero-length file drivers/mtd/maps/omap_nor.c

The content was deleted in cc87edb173effdf74e680ee6d622a935ff0c1d6f,
but the file remained as a zero-length file.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Fri, 19 Mar 2010 16:43:06 +0000 (09:43 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (205 commits)
  ceph: update for write_inode API change
  ceph: reset osd after relevant messages timed out
  ceph: fix flush_dirty_caps race with caps migration
  ceph: include migrating caps in issued set
  ceph: fix osdmap decoding when pools include (removed) snaps
  ceph: return EBADF if waiting for caps on closed file
  ceph: set osd request message front length correctly
  ceph: reset front len on return to msgpool; BUG on mismatched front iov
  ceph: fix snaptrace decoding on cap migration between mds
  ceph: use single osd op reply msg
  ceph: reset bits on connection close
  ceph: remove bogus mds forward warning
  ceph: remove fragile __map_osds optimization
  ceph: fix connection fault STANDBY check
  ceph: invalidate_authorizer without con->mutex held
  ceph: don't clobber write return value when using O_SYNC
  ceph: fix client_request_forward decoding
  ceph: drop messages on unregistered mds sessions; cleanup
  ceph: fix comments, locking in destroy_inode
  ceph: move dereference after NULL test
  ...

Fix trivial conflicts in Documentation/ioctl/ioctl-number.txt

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Fri, 19 Mar 2010 16:36:18 +0000 (09:36 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: trivial white space
  [CIFS] checkpatch cleanup
  cifs: add cifs_revalidate_file
  cifs: add a CIFSSMBUnixQFileInfo function
  cifs: add a CIFSSMBQFileInfo function
  cifs: overhaul cifs_revalidate and rename to cifs_revalidate_dentry

14 years agoUSB: gadget/multi: cdc_do_config: remove redundant check
Peter Korsgaard [Fri, 12 Mar 2010 11:33:15 +0000 (12:33 +0100)]
USB: gadget/multi: cdc_do_config: remove redundant check

cdc_do_config() had a double ret check after fsg_add().

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: r8a66597-hcd: fix removed from an attached hub
Yoshihiro Shimoda [Tue, 16 Mar 2010 03:29:35 +0000 (12:29 +0900)]
usb: r8a66597-hcd: fix removed from an attached hub

fix the problem that when a USB hub is attached to the r8a66597-hcd and
a device is removed from that hub, it's likely that a kernel panic follows.

Reported-by: Markus Pietrek <Markus.Pietrek@emtrion.de>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Make endpoint interval debugging clearer.
Sarah Sharp [Tue, 16 Mar 2010 19:59:24 +0000 (12:59 -0700)]
USB: xhci: Make endpoint interval debugging clearer.

The xHCI hardware can only handle polling intervals that are a power of
two.  When we add a new endpoint during a bandwidth allocation, and the
polling interval is rounded down to a power of two, print the original
polling interval in the endpoint descriptor.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: Fix usb_fill_int_urb for SuperSpeed devices
Matthew Wilcox [Tue, 16 Mar 2010 19:55:44 +0000 (12:55 -0700)]
USB: Fix usb_fill_int_urb for SuperSpeed devices

USB 3 and Wireless USB specify a logarithmic encoding of the endpoint
interval that matches the USB 2 specification.  usb_fill_int_urb() didn't
know that and was filling in the interval as if it was USB 1.1.  Fix
usb_fill_int_urb() for SuperSpeed devices, but leave the wireless case
alone, because David Vrabel wants to keep the old encoding.

Update the struct urb kernel doc to note that SuperSpeed URBs must have
urb->interval specified in microframes.

Add a missing break statement in the usb_submit_urb() interrupt URB
checking, since wireless USB and SuperSpeed USB encode urb->interval
differently.  This allows xHCI roothubs to actually register with khubd.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cp210x: Remove double usb_control_msg from cp210x_set_config
Michael Brunner [Wed, 10 Mar 2010 22:26:37 +0000 (23:26 +0100)]
USB: cp210x: Remove double usb_control_msg from cp210x_set_config

This patch removes a double usb_control_msg that sets the cp210x
configuration registers a second time when calling cp210x_set_config.
For data sizes >2 the second write gets corrupted.
The patch has been created against 2.6.34-rc1, but all cp210x driver
revisions are affected.

Signed-off-by: Michael Brunner <mibru@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: Remove last bit of CONFIG_USB_BERRY_CHARGE
Christoph Egger [Wed, 10 Mar 2010 11:33:11 +0000 (12:33 +0100)]
USB: Remove last bit of CONFIG_USB_BERRY_CHARGE

One last bit was missed while removing the USB_BERRY_CHARGE config
option in a8d4211f33a9573f7b1bdcfd9c9c48631d1515ee which gets dropped
by this patch.

Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: add gadget controller number for s3c-hsotg driver
Maurus Cuelenaere [Mon, 8 Mar 2010 17:20:59 +0000 (18:20 +0100)]
USB: gadget: add gadget controller number for s3c-hsotg driver

This prevents some drivers from complaining that no bcdDevice id was set.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: Fix locking for change_speed() function
Alessio Igor Bogani [Sat, 13 Mar 2010 17:35:14 +0000 (18:35 +0100)]
USB: ftdi_sio: Fix locking for change_speed() function

The change_speed() function should be serialized against multiple calls.
Use the cfg_lock mutex to do this.

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: g_mass_storage: fixed module name in Kconfig
Michal Nazarewicz [Mon, 15 Mar 2010 10:10:23 +0000 (11:10 +0100)]
USB: g_mass_storage: fixed module name in Kconfig

The Kconfig help message for Mass Storage Gadget claimed the
module will be named "g_file_storage" whereas it should be
"g_mass_storage".

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: f_mass_storage::fsg_bind(): fix error handling
Peter Korsgaard [Fri, 12 Mar 2010 14:55:28 +0000 (15:55 +0100)]
USB: gadget: f_mass_storage::fsg_bind(): fix error handling

Contrary to the comment in fsg_add, fsg_bind calls fsg_unbind on errors,
which decreases refcount and frees the fsg_dev structure, causing trouble
when fsg_add does the same.

Fix it by simply leaving up cleanup to fsg_add().

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: g_mass_storage: fix section mismatch warnings
Mike Frysinger [Sun, 7 Mar 2010 15:36:27 +0000 (10:36 -0500)]
USB: g_mass_storage: fix section mismatch warnings

The recent commit (0e530b45783f75) that moved usb_ep_autoconfig from the
__devinit section to the __init section missed the mass storage device.
Its fsg_bind() function uses the usb_ep_autoconfig() function from non
__init context leading to:
WARNING: drivers/usb/gadget/g_mass_storage.o(.text): Section mismatch in
reference from the function _fsg_bind()
            to the function .init.text:_usb_ep_autoconfig()

So move fsg_bind() into __init as well.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: fix Blackfin builds after gadget cleansing
Mike Frysinger [Tue, 9 Mar 2010 05:35:22 +0000 (00:35 -0500)]
USB: gadget: fix Blackfin builds after gadget cleansing

The recent change to clean out dead gadget drivers (90f7976880bbbf99)
missed the call to gadget_is_musbhsfc() behind CONFIG_BLACKFIN.  This
causes Blackfin gadget builds to fail since the function no longer
exists anywhere.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>