safe/jmp/linux-2.6
14 years agoUSB: usbmon: fix bug in mon_buff_area_shrink
Alan Stern [Wed, 4 Nov 2009 16:35:53 +0000 (11:35 -0500)]
USB: usbmon: fix bug in mon_buff_area_shrink

This patch (as1299b) fixes a bug in an error-handling path of usbmon's
binary interface.  The storage area for URB data is divided into
fixed-size blocks.  If an URB's data can't be copied, the area
reserved for it should be decreased to the size of the truncated
information (rounded up to a block boundary).  Rounding up the amount
to be removed and subtracting it from the reserved size is definitely
the wrong thing to do.

Also, when the data for an isochronous URB can't be copied, we can
still copy the isoc packet descriptors.  In fact the current code does
copy the descriptors, but then sets the capture length to 0 so they
remain inaccessible.  The capture length should be reduced to the
length of the descriptors, not set to 0.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Fix scratchpad deallocation.
Sarah Sharp [Wed, 4 Nov 2009 19:22:19 +0000 (11:22 -0800)]
USB: xhci: Fix scratchpad deallocation.

The scratchpad_free() function uses xhci->page_size to free some memory
with pci_free_consistent().  However, the page_size is set to zero before
the call, causing kernel oopses on driver unload.  Call scratchpad_free()
before setting xhci->page_size to zero.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: John Youn <John.Youn@synopsys.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Fix TRB physical to virtual address translation.
Sarah Sharp [Wed, 4 Nov 2009 06:02:24 +0000 (22:02 -0800)]
USB: xhci: Fix TRB physical to virtual address translation.

The trb_in_td() function in the xHCI driver is supposed to translate a
physical transfer buffer request (TRB) into a virtual pointer to the ring
segment that TRB is in.

Unfortunately, a mistake in this function may cause endless loops as the
driver searches through the linked list of ring segments over and over
again.  Fix a couple bugs that may lead to loops or bad output:

1. Bail out if we get a NULL pointer when translating the segment's
private structure and the starting DMA address of the segment chunk.  If
this happens, we've been handed a starting TRB pointer from a different
ring.

2. Make sure the function works when there's multiple segments in the
ring.  In the while loop to search through the ring segments, use the
current segment variable (cur_seg), rather than the starting segment
variable (start_seg) that is passed in.

3. Stop searching the ring if we've run through all the segments in the
ring.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: xhci: Fix bug memory free after failed initialization.
Sarah Sharp [Wed, 4 Nov 2009 06:02:22 +0000 (22:02 -0800)]
USB: xhci: Fix bug memory free after failed initialization.

If the xHCI driver fails during the memory initialization, xhci->ir_set
may not be a valid pointer.  Check that it points to valid DMA'able memory
before writing to that address during the memory freeing process.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cdc_acm: Fix memory leak after hangup
Francesco Lavra [Tue, 3 Nov 2009 10:53:07 +0000 (10:53 +0000)]
USB: cdc_acm: Fix memory leak after hangup

Am Donnerstag, 10. September 2009 15:43:53 schrieb Dietmar Hilbrich:
> Hello,
>
> i have the following problem with the cdc-acm - driver:
>
> I'm using the driver with an "Ericsson F3507G" on a Thinkpad T400.
>
> If a disable the device (with the RFKill-Switch) while it is used by a
> programm like ppp, the driver doesn't seem to correctly clean up the tty,
> even after the program has been closed)
>
> The tty is still active (e.g. there still exists an entry in
> /sys/dev/char/166:0 if ttyACM0 was used) and if a reacticate the device,
> this device entry will be skipped and the Device-Nodes ttyACM1, ttyACM2
> and ttyACM3 will be used.
>
> This problem was introduced with the commit
10077d4a6674f535abdbe25cdecb1202af7948f1 (before 2.6.31-rc1) and still
> exists in 2.6.31.
>
> I was able the fix this problem with the following patch:
>
> diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
> index 2bfc41e..0970d2f 100644
> --- a/drivers/usb/class/cdc-acm.c
> +++ b/drivers/usb/class/cdc-acm.c
> @@ -676,6 +676,7 @@ static void acm_tty_hangup(struct tty_struct *tty)
>         struct acm *acm = tty->driver_data;
>         tty_port_hangup(&acm->port);
>         acm_port_down(acm, 0);
> +       acm_tty_unregister(acm);
>  }

I have the same problem with cdc-acm (I'm using a Samsung SGH-U900): when I
unplug it from the USB port during a PPP connection, the ppp daemon gets the
hangup correctly (and closes the device), but the struct acm corresponding to
the device disconnected is not freed. Hence reconnecting the device results in
creation of /dev/ttyACM(x+1). The same happens when the system is hibernated
during a PPP connection.

This memory leak is due to the fact that when the tty is hung up,
tty_port_close_start() returns always zero, and acm_tty_close() never reaches
the point where acm_tty_unregister() is called.

Here is a fix for this.

Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cdc_acm: Fix race condition when opening tty
Henry Gebhardt [Wed, 4 Nov 2009 10:19:28 +0000 (11:19 +0100)]
USB: cdc_acm: Fix race condition when opening tty

If acm_rx_tasklet() gets called before tty_port_block_til_ready()
returns, then bulk IN urbs may not be sent. This fixes it.

Signed-off-by: Henry Gebhardt <gebhardt@astro.uni-tuebingen.de>
Acked-by: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer
Libin Yang [Wed, 4 Nov 2009 06:55:18 +0000 (14:55 +0800)]
USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer

The following patch in the driver is required to avoid USB 1.1 device
failures that may occur due to requests from USB OHCI controllers may
be overwritten if the latency for any pending request by the USB
controller is very long (in the range of milliseconds).

Signed-off-by: Libin Yang <libin.yang@amd.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: cp210x: Fix carrier handling
Alan Cox [Wed, 28 Oct 2009 20:12:33 +0000 (21:12 +0100)]
tty: cp210x: Fix carrier handling

Original discussion:
http://thread.gmane.org/gmane.linux.usb.general/23217/focus=23248
or
http://marc.info/?l=linux-usb&m=125553790714133&w=2

9a68e39d4a701fb3be03cae9b462408664ebd205 broke carrier handling so that a
cp210x setup which needed the carrier lines set up (non CLOCAL) which did
not make a call which set the termios bits left the lines down even if
CLOCAL was not asserted.

Fix this not by reverting but by adding the proper dtr_rts and
carrier_raised methods. This both sets the modem lines properly and also
implements the correct blocking semantics for the port as required by
POSIX.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Reported-by: Karl Hiramoto <karl@hiramoto.org>
Tested-by: Karl Hiramoto <karl@hiramoto.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty_port: If we are opened non blocking we still need to raise the carrier
Alan Cox [Wed, 28 Oct 2009 20:12:32 +0000 (21:12 +0100)]
tty_port: If we are opened non blocking we still need to raise the carrier

Original discussion:
http://thread.gmane.org/gmane.linux.usb.general/23217/focus=23248
or
http://marc.info/?l=linux-usb&m=125553790714133&w=2

The tty_port code inherited a bug common to various drivers it was based
upon. If the tty is opened O_NONBLOCK we do not wait for the carrier to be
raised but we must still raise our modem lines if appropriate.

(There is a second question here about whether we should do so if CLOCAL is
 set but that can wait)

Signed-off-by: Alan Cox <alan@linux.intel.com>
Reported-by: Karl Hiramoto <karl@hiramoto.org>
Tested-by: Karl Hiramoto <karl@hiramoto.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoomap3: clock: Fixed dpll3_m2x2 rate calculation
Tero Kristo [Mon, 16 Nov 2009 13:36:54 +0000 (13:36 +0000)]
omap3: clock: Fixed dpll3_m2x2 rate calculation

Current calculation does not take into account any changes to M2 divisor, and
thus when we change VDD2 OPP, dpll3_m2x2 rate does not change. Fixed by
re-routing dpll3_m2x2 parent to dpll3_m2.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: clock: Fix the DPLL freqsel computations
Rajendra Nayak [Mon, 16 Nov 2009 13:36:53 +0000 (13:36 +0000)]
omap3: clock: Fix the DPLL freqsel computations

Fix the freqsel value computation. Use n instead of (n+1)

The formula in the TRM uses a zero-based N, hence the (n+1); however
at this point in the clock34xx.c code, N is one-based.

Hayati Bayrakdar <h-bayrakdar@ti.com> and Nishanth Menon <nm@ti.com> helped
track down this bug.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
[paul@pwsan.com: modified commit message]
Cc: Hayati Bayrakdar <h-bayrakdar@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Tue, 17 Nov 2009 19:01:54 +0000 (11:01 -0800)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] bfa: declare MODULE_FIRMWARE
  [SCSI] gdth: Prevent negative offsets in ioctl CVE-2009-3080
  [SCSI] libsas: do not set res = 0 in sas_ex_discover_dev()
  [SCSI] Fix incorrect reporting of host protection capabilities
  [SCSI] pmcraid: Fix ppc64 driver build for using cpu_to_le32 on U8 data type
  [SCSI] ipr: add workaround for MSI interrupts on P7
  [SCSI] scsi_transport_fc: Fix WARN message for FC passthru failure paths
  [SCSI] bfa: fix test in bfad_os_fc_host_init()

14 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Tue, 17 Nov 2009 17:42:35 +0000 (09:42 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: copy li_lsn before dropping AIL lock
  XFS bug in log recover with quota (bugzilla id 855)

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Tue, 17 Nov 2009 17:20:50 +0000 (09:20 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: lifebook - fix settings for CF-72
  Input: psmouse - fix breakage introduced by b7802c5c1ea

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Tue, 17 Nov 2009 17:20:38 +0000 (09:20 -0800)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: clear server inode number flag while autodisabling

14 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Tue, 17 Nov 2009 17:19:54 +0000 (09:19 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] pxa: ensure mfp is in correct range in mfp_{read,write}
  [ARM] pxa/hx4700: fix hx4700 touchscreen pressure values
  ARM: 5787/1: U300 COH 901 331 fixes
  ARM: Fix warning in sa1100-flash.c
  [ARM] Kirkwood: disable propagation of mbus error to the CPU local bus
  [ARM] pxa: fix incorrect mfp_to_gpio() conversion
  [ARM] pxa/colibri: fix AC97 ifdefs and add missing include
  [ARM] pxa: fix missing underscores in mfp-pxa910.h
  [ARM] pxa: fix interrupts number calculation when CONFIG_PXA_HAVE_ISA_IRQS=y

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
Linus Torvalds [Tue, 17 Nov 2009 17:19:27 +0000 (09:19 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
  dereferencing freed memory regulator_fixed_voltage_remove()
  regulator: Fix check of unsigned return value and transmit errors in wm831x_gp_ldo_get_mode()
  regulator: Handle missing constraints in _regulator_disable()

14 years agoMerge branch 'for-linus' of git://github.com/at91linux/linux-2.6-at91
Linus Torvalds [Tue, 17 Nov 2009 17:19:13 +0000 (09:19 -0800)]
Merge branch 'for-linus' of git://github.com/at91linux/linux-2.6-at91

* 'for-linus' of git://github.com/at91linux/linux-2.6-at91:
  at91: at91sam9g20ek modify dual slot evaluation kit

14 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Tue, 17 Nov 2009 17:17:40 +0000 (09:17 -0800)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (adt7475) Fix sysfs file names
  hwmon: (adt7475) Cache limits for 60 seconds
  hwmon: (adt7475) Fix temperature fault flags
  hwmon: (s3c-hwmon) Ignore invalid divider settings

14 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
Linus Torvalds [Tue, 17 Nov 2009 17:16:57 +0000 (09:16 -0800)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds-gpio: fix possible crash on OF device unbinding
  backlight: Fix backlight limiting on spitz/corgi devices
  backlight: lcd - Fix wrong sizeof

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Tue, 17 Nov 2009 17:15:48 +0000 (09:15 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ice1724 - make some bitfields unsigned
  ALSA: hda - Dell Studio 1557 hd-audio quirk
  ALSA: ice1724 - Fix section mismatch in prodigy_hd2_resume()
  ALSA: hda - Add another Nvidia HDMI codec id (10de:0005)
  ALSA: hda: Use model=mb5 for MacBookPro 5,2

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Tue, 17 Nov 2009 17:15:18 +0000 (09:15 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: deleted inconsistent comment in nilfs_load_inode_block()
  nilfs2: deleted struct nilfs_dat_group_desc
  nilfs2: fix lock order reversal in chcp operation

14 years agoMerge branch 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Tue, 17 Nov 2009 17:14:49 +0000 (09:14 -0800)]
Merge branch 'hostprogs-wmissing-prototypes' of git://git./linux/kernel/git/josh/linux-misc

* 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc:
  Makefile: Add -Wmising-prototypes to HOSTCFLAGS
  oss: Mark loadhex static in hex2hex.c
  dtc: Mark various internal functions static
  dtc: Set "noinput" in the lexer to avoid an unused function
  drm: radeon: Mark several functions static in mkregtable
  arch/sparc/boot/*.c: Mark various internal functions static
  arch/powerpc/boot/addRamDisk.c: Mark several internal functions static
  arch/alpha/boot/tools/objstrip.c: Mark "usage" static
  Documentation/vm/page-types.c: Declare checked_open static
  genksyms: Mark is_reserved_word static
  kconfig: Mark various internal functions static
  kconfig: Make zconf.y work with current bison

14 years agofcntl: Use consistent values for F_[GS]ETOWN_EX
Stephen Rothwell [Sat, 14 Nov 2009 09:45:06 +0000 (20:45 +1100)]
fcntl: Use consistent values for F_[GS]ETOWN_EX

These values were only introduced during this release cycle, so it is
still early enough to get them right.

alpha uses the same values that are in asm-generic/fcntl.h, so just
remove them.

parisc uses the values interchanged for no apparent reason, so remove
them to give us consistency across all architectures.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoxfs: copy li_lsn before dropping AIL lock
Nathaniel W. Turner [Mon, 16 Nov 2009 19:51:48 +0000 (19:51 +0000)]
xfs: copy li_lsn before dropping AIL lock

Access to log items on the AIL is generally protected by m_ail_lock;
this is particularly needed when we're getting or setting the 64-bit
li_lsn on a 32-bit platform.  This patch fixes a couple places where we
were accessing the log item after dropping the AIL lock on 32-bit
machines.

This can result in a partially-zeroed log->l_tail_lsn if
xfs_trans_ail_delete is racing with xfs_trans_ail_update, and in at
least some cases, this can leave the l_tail_lsn with a zero cycle
number, which means xlog_space_left will think the log is full (unless
CONFIG_XFS_DEBUG is set, in which case we'll trip an ASSERT), leading to
processes stuck forever in xlog_grant_log_space.

Thanks to Adrian VanderSpek for first spotting the race potential and to
Dave Chinner for debug assistance.

Signed-off-by: Nathaniel W. Turner <nate@houseofnate.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agoXFS bug in log recover with quota (bugzilla id 855)
Jan Rekorajski [Mon, 16 Nov 2009 11:57:02 +0000 (11:57 +0000)]
XFS bug in log recover with quota (bugzilla id 855)

Hi,
I was hit by a bug in linux 2.6.31 when XFS is not able to recover the
log after a crash if fs was mounted with quotas. Gory details in XFS
bugzilla: http://oss.sgi.com/bugzilla/show_bug.cgi?id=855.

It looks like wrong struct is used in buffer length check, and the following
patch should fix the problem.

xfs_dqblk_t has a size of 104+32 bytes, while xfs_disk_dquot_t is 104 bytes
long, and this is exactly what I see in system logs - "XFS: dquot too small
(104) in xlog_recover_do_dquot_trans."

Signed-off-by: Jan Rekorajski <baggins@sith.mimuw.edu.pl>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agoALSA: hda - Fix quirk for VAIO type G
Takashi Iwai [Tue, 17 Nov 2009 14:58:35 +0000 (15:58 +0100)]
ALSA: hda - Fix quirk for VAIO type G

Vaio type G laptop doesn't work with the current quirk setup.
After some tests, it turned out that it should be model=auto as default.

Reported-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: usb - Quirk to disable master volume control in PCM2702
Javier Kohen [Tue, 17 Nov 2009 14:36:13 +0000 (15:36 +0100)]
ALSA: usb - Quirk to disable master volume control in PCM2702

Disable the master volume control in the PCM2702 chipset.

The datasheet documents two independent channel volume controls, one
master mute control and one master volume control. All controls are
fully functional except for the master volume control, which returns
USB stalls on all GET requests.

Signed-off-by: Javier Kohen <jkohen@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agovlan: Fix register_vlan_dev() error path
Eric Dumazet [Tue, 17 Nov 2009 14:45:04 +0000 (06:45 -0800)]
vlan: Fix register_vlan_dev() error path

In case register_netdevice() returns an error, and a new vlan_group
was allocated and inserted in vlan_group_hash[] we call
vlan_group_free() without deleting group from hash table. Future
lookups can give infinite loops or crashes.

We must delete the vlan_group using RCU safe procedure.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogro: Fix illegal merging of trailer trash
Herbert Xu [Tue, 17 Nov 2009 13:18:18 +0000 (05:18 -0800)]
gro: Fix illegal merging of trailer trash

When we've merged skb's with page frags, and subsequently receive
a trailer skb (< MSS) that is not completely non-linear (this can
occur on Intel NICs if the packet size falls below the threshold),
GRO ends up producing an illegal GSO skb with a frag_list.

This is harmless unless the skb is then forwarded through an
interface that requires software GSO, whereupon the GSO code
will BUG.

This patch detects this case in GRO and avoids merging the
trailer skb.

Reported-by: Mark Wagner <mwagner@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosungem: Fix Serdes detection.
David S. Miller [Tue, 17 Nov 2009 12:46:18 +0000 (04:46 -0800)]
sungem: Fix Serdes detection.

We need to look for the 'shared-pins' property to get
this right.

Based upon a patch by Hermann Lauer.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix mdio section mismatch warning
Stephen Rothwell [Mon, 16 Nov 2009 22:47:33 +0000 (22:47 +0000)]
net: fix mdio section mismatch warning

This fixes the following warning:

WARNING: drivers/net/phy/built-in.o(.devexit.text+0x70): Section mismatch in reference from the function .mdio_gpio_bus_destroy() to the function .devinit.text:.mdio_gpio_bus_deinit()
The function __devexit .mdio_gpio_bus_destroy() references
a function __devinit .mdio_gpio_bus_deinit().
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __devinit annotation of
.mdio_gpio_bus_deinit() so it may be used outside an init section.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoppp: fix BUG on non-linear SKB (multilink receive)
Ben McKeegan [Mon, 16 Nov 2009 03:44:25 +0000 (03:44 +0000)]
ppp: fix BUG on non-linear SKB (multilink receive)

PPP does not correctly call pskb_may_pull() on all necessary receive paths
before reading the PPP protocol, thus causing PPP to report seemingly
random 'unsupported protocols' and eventually trigger BUG_ON(skb->len <
skb->data_len) in skb_pull_rcsum() when receiving multilink protocol in
non-linear skbs.

ppp_receive_nonmp_frame() does not call pskb_may_pull() before reading the
protocol number.  For the non-mp receive path this is not a problem, as
this check is done in ppp_receive_frame().  For the mp receive path,
ppp_mp_reconstruct() usually copies the data into a new linear skb.
However, in the case where the frame is made up of a single mp fragment,
the mp header is pulled and the existing skb used.  This skb was then
passed to ppp_receive_nonmp_frame() without checking if the encapsulated
protocol header could safely be read.

Signed-off-by: Ben McKeegan <ben@netservers.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Fixing EEH handler to handle more than one error
Breno Leitao [Tue, 10 Nov 2009 08:37:47 +0000 (08:37 +0000)]
ixgbe: Fixing EEH handler to handle more than one error

After commmit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff EEH breaks
after the second error, since it calls pci_restore_state()
but it returns 0, since pci->state_saved is false.

So, this patch just call pci_save_state() after pci_restore_state().

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.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/linville/wirel...
David S. Miller [Tue, 17 Nov 2009 07:43:01 +0000 (23:43 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

14 years agoInput: lifebook - fix settings for CF-72
Abner Holsinger [Tue, 17 Nov 2009 06:12:14 +0000 (22:12 -0800)]
Input: lifebook - fix settings for CF-72

Panasonic CF-72 uses 6-byte protocol and does not need to be tied
to a particular port.

Signed-off-by: Abner Holsinger <9zabner@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoInput: psmouse - fix breakage introduced by b7802c5c1ea
Jiri Kosina [Tue, 17 Nov 2009 06:12:13 +0000 (22:12 -0800)]
Input: psmouse - fix breakage introduced by b7802c5c1ea

Commit b7802c5c1ea ("Input: psmouse - use boolean type") caused the
synaptics_hardware variable to be completely useless, as it is
constantly set to 'true' throughout the whole psmouse_extensions().
This was caused by the following hunk in the commit in question

-       int synaptics_hardware = 0;
+       bool synaptics_hardware = true;

which is wrong and causes driver to issue extra reset when falling
back to bare PS/2 protocol.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoomap: Fix keymap for zoom2 according to matrix keypad framwork
Vimal Singh [Mon, 16 Nov 2009 22:55:59 +0000 (14:55 -0800)]
omap: Fix keymap for zoom2 according to matrix keypad framwork

Interpretation of 'row' and 'col' got reversed in matrix keymap
framework. Also last element '0', present in keymap array, is no
more needed.
Correcting zoom2 keyboard keymap accordingly.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoMerge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Russell King [Mon, 16 Nov 2009 20:59:25 +0000 (20:59 +0000)]
Merge branch 'fix' of git://git./linux/kernel/git/ycmiao/pxa-linux-2.6

14 years ago[ARM] pxa: ensure mfp is in correct range in mfp_{read,write}
Roel Kluin [Fri, 13 Nov 2009 10:37:34 +0000 (11:37 +0100)]
[ARM] pxa: ensure mfp is in correct range in mfp_{read,write}

Ensure we do not read/write outside array boundaries with a negative index.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years ago[ARM] pxa/hx4700: fix hx4700 touchscreen pressure values
Paul Parsons [Sat, 14 Nov 2009 16:54:12 +0000 (16:54 +0000)]
[ARM] pxa/hx4700: fix hx4700 touchscreen pressure values

hx4700 touchscreen events were being dropped in ads7846_rx() because their
pressure values consistently exceeded the platform maximum of 512; a sample
of 256 pressure values were in the range 531 to 815.  Doubling the platform
maximum to 1024 allows hx4700 touchscreen events to pass the test.

Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years agoMerge branch 'for-rmk' of git://git.marvell.com/orion
Russell King [Mon, 16 Nov 2009 16:28:15 +0000 (16:28 +0000)]
Merge branch 'for-rmk' of git://git.marvell.com/orion

14 years agoARM: 5787/1: U300 COH 901 331 fixes
Linus Walleij [Sat, 14 Nov 2009 00:03:24 +0000 (01:03 +0100)]
ARM: 5787/1: U300 COH 901 331 fixes

This will fix some small issues with the COH 901 331 RTC driver:
- Interrupt is disabled after alarm so that we don't fire
  multiple interrupts.
- We return 0 from the coh901331_alarm_irq_enable() ridding
  a compile warning.
- We alter the name in the U300 device registry to match that
  of the driver so they sucessfully resolve.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: Fix warning in sa1100-flash.c
Russell King [Mon, 16 Nov 2009 16:13:35 +0000 (16:13 +0000)]
ARM: Fix warning in sa1100-flash.c

drivers/mtd/maps/sa1100-flash.c: In function 'sa1100_probe_subdev':
drivers/mtd/maps/sa1100-flash.c:214: warning: format '%d' expects type 'int', but argument 3 has type 'uint64_t'

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoat91: at91sam9g20ek modify dual slot evaluation kit
Nicolas Ferre [Tue, 20 Oct 2009 14:32:53 +0000 (16:32 +0200)]
at91: at91sam9g20ek modify dual slot evaluation kit

at91sam9g20ek rev. C and onwards embed two SD/MMC slots. This patch modify the
previous dual slot board definition to match the official rev. C board. It also
allows the use of at91_mci SD/MMC driver in addition to the atmel-mci one.

Some pins have been re-affected from leds or Ethernet phy IRQ to the SD/MMC
slot A. This lead to a modification of those definitions.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
14 years agocifs: clear server inode number flag while autodisabling
Suresh Jayaraman [Mon, 16 Nov 2009 06:33:16 +0000 (12:03 +0530)]
cifs: clear server inode number flag while autodisabling

Fix the commit ec06aedd44 that intended to turn off querying for server inode
numbers when server doesn't consistently support inode numbers. Presumably
the commit didn't actually clear the CIFS_MOUNT_SERVER_INUM flag, perhaps a
typo.

Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Acked-by: Jeff Layton <jlayton@redhat.com>
Cc: Stable <stable@kernel.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
14 years agodereferencing freed memory regulator_fixed_voltage_remove()
Dan Carpenter [Mon, 16 Nov 2009 09:05:03 +0000 (11:05 +0200)]
dereferencing freed memory regulator_fixed_voltage_remove()

Don't dereference drvdata after it has been freed.

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoleds-gpio: fix possible crash on OF device unbinding
Dmitry Eremin-Solenikov [Sun, 15 Nov 2009 22:48:32 +0000 (01:48 +0300)]
leds-gpio: fix possible crash on OF device unbinding

If there are leds present in the OF tree, but the GPIOs for (some) of
them are unavailable, led_data doesn't get populated with correct
devices. Then, on device unbinding, one can crash the kernel.

Workaround this by setting led->gpio to invalid value early.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agobacklight: Fix backlight limiting on spitz/corgi devices
Pavel Machek [Fri, 6 Nov 2009 15:58:31 +0000 (15:58 +0000)]
backlight: Fix backlight limiting on spitz/corgi devices

On spitz (& similar) machines, if battery is running low, backlight
needs
to be limited to lower step.  Unfortunately, current code uses &= for
limiting, turning backlight off completely for some backlight settings.
Fix that.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agobacklight: lcd - Fix wrong sizeof
Jean Delvare [Fri, 2 Oct 2009 09:28:18 +0000 (11:28 +0200)]
backlight: lcd - Fix wrong sizeof

Which is why I have always preferred sizeof(struct foo) over
sizeof(var).

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
14 years agohwmon: (adt7475) Fix sysfs file names
Jean Delvare [Mon, 16 Nov 2009 11:45:40 +0000 (12:45 +0100)]
hwmon: (adt7475) Fix sysfs file names

The adt7475 driver creates pwm#_auto_channel_temp attributes instead
of the standard pwm#_auto_channels_temp. Fix it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
14 years agohwmon: (adt7475) Cache limits for 60 seconds
Jean Delvare [Mon, 16 Nov 2009 11:45:40 +0000 (12:45 +0100)]
hwmon: (adt7475) Cache limits for 60 seconds

The comment says that limits are cached for 60 seconds but the code
actually caches them for only 2 seconds. Align the code on the
comment, as 60 seconds makes more sense.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
14 years agohwmon: (adt7475) Fix temperature fault flags
Jean Delvare [Mon, 16 Nov 2009 11:45:39 +0000 (12:45 +0100)]
hwmon: (adt7475) Fix temperature fault flags

The logic of temperature fault flags is wrong, it shows faults when
there are none and vice versa. Fix it.

I can't believe this has been broken since the driver was added, 8
months ago, basically breaking temp1 and temp3, and nobody ever
complained.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
14 years agohwmon: (s3c-hwmon) Ignore invalid divider settings
Ben Dooks [Mon, 16 Nov 2009 11:45:39 +0000 (12:45 +0100)]
hwmon: (s3c-hwmon) Ignore invalid divider settings

Avoid registering channels that have zero divider settings in them, as this
will only lead to kernel OOPS from divide-by-zero when the sysfs entry is
read.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agonet: Fix the rollback test in dev_change_name()
Eric Dumazet [Sun, 15 Nov 2009 23:30:24 +0000 (23:30 +0000)]
net: Fix the rollback test in dev_change_name()

net: Fix the rollback test in dev_change_name()

In dev_change_name() an err variable is used for storing the original
call_netdevice_notifiers() errno (negative) and testing for a rollback
error later, but the test for non-zero is wrong, because the err might
have positive value as well - from dev_alloc_name(). It means the
rollback for a netdevice with a number > 0 will never happen. (The err
test is reordered btw. to make it more readable.)

Signed-off-by: Jarek Poplawski <jarkao2@gmail.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 for-linus
Takashi Iwai [Mon, 16 Nov 2009 11:20:02 +0000 (12:20 +0100)]
Merge branch 'fix/hda' into for-linus

14 years agoregulator: Fix check of unsigned return value and transmit errors in wm831x_gp_ldo_ge...
Roel Kluin [Fri, 16 Oct 2009 12:16:15 +0000 (14:16 +0200)]
regulator: Fix check of unsigned return value and transmit errors in wm831x_gp_ldo_get_mode()

If ret is unsigned, the checks for negative wm831x_reg_read() return values
are wrong. The error value should be transmitted to its caller, e.g.
wm831x_gp_ldo_get_status() which tests for a negative return value.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator: Handle missing constraints in _regulator_disable()
Mark Brown [Tue, 13 Oct 2009 12:06:50 +0000 (13:06 +0100)]
regulator: Handle missing constraints in _regulator_disable()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoALSA: ice1724 - make some bitfields unsigned
Dan Carpenter [Mon, 16 Nov 2009 09:07:17 +0000 (11:07 +0200)]
ALSA: ice1724 - make some bitfields unsigned

This is a clean up and doesn't change the behavior.

Bit fields should always be unsigned.  Otherwise pm_suspend_enabled will
be -1 when you want it to be 1.  The other bad thing is that the sparse
checker will complain 36 times if they aren't unsigned.

The other bitfields in that struct are unsigned already.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoRevert "isdn: isdn_ppp: Use SKB list facilities instead of home-grown implementation."
David S. Miller [Mon, 16 Nov 2009 06:23:47 +0000 (22:23 -0800)]
Revert "isdn: isdn_ppp: Use SKB list facilities instead of home-grown implementation."

This reverts commit 38783e671399b5405f1fd177d602c400a9577ae6.

It causes kernel bugzilla #14594

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoTI Davinci EMAC : Fix Console Hang when bringing the interface down
Sriram [Thu, 12 Nov 2009 01:55:42 +0000 (01:55 +0000)]
TI Davinci EMAC : Fix Console Hang when bringing the interface down

In the NAPI poll function(emac_poll), check for netif_running()
is unnecassary. In addition to associated runtime overhead, it
also results in a continuous softirq loop when the interface is
brought down under heavy traffic(tested wit Traffic Generator).
Once the interface is disabled, the poll function always returns
zero(with the check for netif_running) and napi_complete() would
never get called resulting in softirq loop.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Acked-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosmsc911x: Fix Console Hang when bringing the interface down.
Sriram [Thu, 12 Nov 2009 02:14:38 +0000 (02:14 +0000)]
smsc911x: Fix Console Hang when bringing the interface down.

In the NAPI poll function, check for netif_running() is unnecassary.
In addition to associated runtime overhead, it also results in
continuous softirq loop when the interface is brought down under heavy
traffic(tested with Traffic Generator).Once the interface is disabled,
the poll function always returns zero(with the check for netif_running)
and napi_complete() would never get called resulting in softirq loop.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomISDN: fix error return in HFCmulti_init()
Roel Kluin [Mon, 16 Nov 2009 05:18:13 +0000 (21:18 -0800)]
mISDN: fix error return in HFCmulti_init()

The returned error should stay negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoforcedeth: mac address fix
Stanislav O. Bezzubtsev [Mon, 16 Nov 2009 05:17:02 +0000 (21:17 -0800)]
forcedeth: mac address fix

Use the existing random_ether_addr() to generate random MAC
instead of doing it by-hand.

Signed-off-by: Stanislav O. Bezzubtsev <stas@lvk.cs.msu.su>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor6040: fix version printing
Florian Fainelli [Mon, 16 Nov 2009 05:14:59 +0000 (21:14 -0800)]
r6040: fix version printing

The version string already contains the printk level
specifying it again results in the following message
being printed:
<6>r6040: RDC R6040 NAPI ...

Signed-off-by: Florian Fainelli <florian@openwrt.org>
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, 16 Nov 2009 04:59:34 +0000 (20:59 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6

14 years agoBluetooth: Fix regression with L2CAP configuration in Basic Mode
Gustavo F. Padovan [Sun, 18 Oct 2009 00:41:01 +0000 (21:41 -0300)]
Bluetooth: Fix regression with L2CAP configuration in Basic Mode

Basic Mode is the default mode of operation of a L2CAP entity. In
this case the RFC (Retransmission and Flow Control) configuration
option should not be used at all.

Normally remote L2CAP implementation should just ignore this option,
but it can cause various side effects with other Bluetooth stacks
that are not capable of handling unknown options.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Select Basic Mode as default for SOCK_SEQPACKET
Gustavo F. Padovan [Tue, 29 Sep 2009 04:42:23 +0000 (01:42 -0300)]
Bluetooth: Select Basic Mode as default for SOCK_SEQPACKET

The default mode for SOCK_SEQPACKET is Basic Mode. So when no
mode has been specified, Basic Mode shall be used.

This is important for current application to keep working as
expected and not cause a regression.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Set general bonding security for ACL by default
Andrei Emeltchenko [Thu, 3 Sep 2009 09:34:19 +0000 (12:34 +0300)]
Bluetooth: Set general bonding security for ACL by default

This patch fixes double pairing issues with Secure Simple
Paring support. It was observed that when pairing with SSP
enabled, that the confirmation will be asked twice.

http://www.spinics.net/lists/linux-bluetooth/msg02473.html

This also causes bug when initiating SSP connection from
Windows Vista.

The reason is because bluetoothd does not store link keys
since HCIGETAUTHINFO returns 0. Setting default to general
bonding fixes these issues.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoMakefile: Add -Wmising-prototypes to HOSTCFLAGS
Josh Triplett [Sun, 15 Nov 2009 22:38:47 +0000 (14:38 -0800)]
Makefile: Add -Wmising-prototypes to HOSTCFLAGS

Now that all host programs use static for all private functions and
forward prototypes for all extern functions, add -Wmissing-prototypes to
HOSTCFLAGS in the hopes of keeping it that way.

All versions of GCC supported by the kernel handle -Wmissing-prototypes.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
14 years agooss: Mark loadhex static in hex2hex.c
Josh Triplett [Fri, 16 Oct 2009 23:03:49 +0000 (16:03 -0700)]
oss: Mark loadhex static in hex2hex.c

Nothing outside of hex2hex.c references loadhex.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
14 years agodtc: Mark various internal functions static
Josh Triplett [Fri, 16 Oct 2009 22:53:55 +0000 (15:53 -0700)]
dtc: Mark various internal functions static

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
14 years agodtc: Set "noinput" in the lexer to avoid an unused function
Josh Triplett [Fri, 16 Oct 2009 22:52:06 +0000 (15:52 -0700)]
dtc: Set "noinput" in the lexer to avoid an unused function

Regenerate the corresponding generated lexer.

Regenerating the lexer with current flex also provides prototypes for
various yy* functions, making some -Wmissing-prototypes warnings go away
as well.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
14 years agodrm: radeon: Mark several functions static in mkregtable
Josh Triplett [Fri, 16 Oct 2009 22:12:13 +0000 (15:12 -0700)]
drm: radeon: Mark several functions static in mkregtable

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
14 years agoarch/sparc/boot/*.c: Mark various internal functions static
Josh Triplett [Fri, 16 Oct 2009 21:58:29 +0000 (14:58 -0700)]
arch/sparc/boot/*.c: Mark various internal functions static

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
14 years agoarch/powerpc/boot/addRamDisk.c: Mark several internal functions static
Josh Triplett [Fri, 16 Oct 2009 21:52:05 +0000 (14:52 -0700)]
arch/powerpc/boot/addRamDisk.c: Mark several internal functions static

Nothing outside of arch/powerpc/boot/addRamDisk.c references the
functions "get4k", "put4k", or "death".

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
14 years agoarch/alpha/boot/tools/objstrip.c: Mark "usage" static
Josh Triplett [Fri, 16 Oct 2009 21:46:56 +0000 (14:46 -0700)]
arch/alpha/boot/tools/objstrip.c: Mark "usage" static

Nothing outside of arch/alpha/boot/tools/objstrip.c references the usage
function.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
14 years agoDocumentation/vm/page-types.c: Declare checked_open static
Josh Triplett [Fri, 16 Oct 2009 21:06:13 +0000 (14:06 -0700)]
Documentation/vm/page-types.c: Declare checked_open static

Nothing outside of Documentation/vm/page-types.c references
checked_open.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
14 years agogenksyms: Mark is_reserved_word static
Josh Triplett [Thu, 15 Oct 2009 19:58:40 +0000 (12:58 -0700)]
genksyms: Mark is_reserved_word static

The genksyms keyword gperf hash provides a function is_reserved_word.
genksyms #includes the resulting generated file keywords.c, so the
function gets used only in the same source file that defines it.  Mark
is_reserved_word static, and regenerate the corresponding generated
file.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
14 years agokconfig: Mark various internal functions static
Josh Triplett [Thu, 15 Oct 2009 19:13:36 +0000 (12:13 -0700)]
kconfig: Mark various internal functions static

kconfig's keyword hash, lexer, and parser define various functions used
only locally.  Declare these functions as static, and regenerate the
corresponding generated files.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
14 years agoALSA: hda - Dell Studio 1557 hd-audio quirk
Daniel J Blueman [Sat, 14 Nov 2009 18:20:04 +0000 (18:20 +0000)]
ALSA: hda - Dell Studio 1557 hd-audio quirk

Add the Dell Studio 15 (model 1557, Core i7) laptop to the hd-audio
quirk list, enabling audio.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agonilfs2: deleted inconsistent comment in nilfs_load_inode_block()
Jiro SEKIBA [Sun, 15 Nov 2009 04:49:45 +0000 (13:49 +0900)]
nilfs2: deleted inconsistent comment in nilfs_load_inode_block()

The comment says, "Caller of this function MUST lock s_inode_lock",
however just above the comment, it locks s_inode_lock in the function.

Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
14 years agonilfs2: deleted struct nilfs_dat_group_desc
Jiro SEKIBA [Sun, 15 Nov 2009 04:49:44 +0000 (13:49 +0900)]
nilfs2: deleted struct nilfs_dat_group_desc

struct nilfs_dat_group_desc is not used both in kernel and user spaces.
struct nilfs_palloc_group_desc is used instead.

Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
14 years agoMerge git://git.infradead.org/users/dwmw2/iommu-2.6.32
Linus Torvalds [Sat, 14 Nov 2009 21:05:27 +0000 (13:05 -0800)]
Merge git://git.infradead.org/users/dwmw2/iommu-2.6.32

* git://git.infradead.org/users/dwmw2/iommu-2.6.32:
  intel-iommu: Support PCIe hot-plug
  intel-iommu: Obey coherent_dma_mask for alloc_coherent on passthrough
  intel-iommu: Check for 'DMAR at zero' BIOS error earlier.

14 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Sat, 14 Nov 2009 21:03:24 +0000 (13:03 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: SMTC: Fix lockup in smtc_distribute_timer
  MIPS: TXx9: Update rbtx49xx_defconfig
  MIPS: Make local arrays with CL_SIZE static __initdata
  MIPS: Add DMA declare coherent memory support
  MIPS: Fix emulation of 64-bit FPU on FPU-less 64-bit CPUs.

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sat, 14 Nov 2009 21:00:17 +0000 (13:00 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: psmouse - remove unneeded '\n' from psmouse.proto parameter
  Input: atkbd - restore LED state at reconnect
  Input: force LED reset on resume
  Input: fix locking in memoryless force-feedback devices

14 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Sat, 14 Nov 2009 20:59:32 +0000 (12:59 -0800)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md/raid5: Allow dirty-degraded arrays to be assembled when only party is degraded.
  Don't unconditionally set in_sync on newly added device in raid5_reshape
  md: allow v0.91 metadata to record devices as being active but not in-sync.
  md: factor out updating of 'recovery_offset'.

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
Linus Torvalds [Sat, 14 Nov 2009 20:59:06 +0000 (12:59 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tj/percpu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  percpu: restructure pcpu_extend_area_map() to fix bugs and improve readability

14 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Sat, 14 Nov 2009 20:57:39 +0000 (12:57 -0800)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] s390: fix single stepping on svc0
  [S390] sclp: undo quiesce handler override on resume
  [S390] reset cputime accounting after IPL from NSS
  [S390] monreader: fix use after free bug with suspend/resume

14 years agofix memory leak in fixed btusb_close
Oliver Neukum [Fri, 13 Nov 2009 13:26:23 +0000 (14:26 +0100)]
fix memory leak in fixed btusb_close

If the waker is killed before it can replay outstanding URBs, these URBs
won't be freed or will be replayed at the next open.  This patch closes
the window by explicitely discarding outstanding URBs.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoFix memory corruption caused by nfsd readdir+
Petr Vandrovec [Sat, 14 Nov 2009 09:47:07 +0000 (10:47 +0100)]
Fix memory corruption caused by nfsd readdir+

Commit 8177e6d6dfb9cd03d9bdeb647c32161f8f58f686 ("nfsd: clean up
readdirplus encoding") introduced single character typo in nfs3 readdir+
implementation.  Unfortunately that typo has quite bad side effects:
random memory corruption, followed (on my box) with immediate
spontaneous box reboot.

Using 'p1' instead of 'p' fixes my Linux box rebooting whenever VMware
ESXi box tries to list contents of my home directory.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoALSA: ice1724 - Fix section mismatch in prodigy_hd2_resume()
Takashi Iwai [Sat, 14 Nov 2009 13:37:19 +0000 (14:37 +0100)]
ALSA: ice1724 - Fix section mismatch in prodigy_hd2_resume()

Remove invlid __devinit prefix from the suspend callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agor8169: Fix receive buffer length when MTU is between 1515 and 1536
Raimonds Cicans [Fri, 13 Nov 2009 10:52:19 +0000 (10:52 +0000)]
r8169: Fix receive buffer length when MTU is between 1515 and 1536

In r8169 driver MTU is used to calculate receive buffer size.
Receive buffer size is used to configure hardware incoming packet filter.

For jumbo frames:
Receive buffer size = Max frame size = MTU + 14 (ethernet header) + 4
(vlan header) + 4 (ethernet checksum) = MTU + 22

Bug:
driver for all MTU up to 1536 use receive buffer size 1536

As you can see from formula, this mean all IP packets > 1536 - 22
(for vlan tagged, 1536 - 18 for not tagged) are dropped by hardware
filter.

Example:

host_good>  ifconfig eth0 mtu 1536
host_r8169> ifconfig eth0 mtu 1536
host_good>  ping host_r8169
Ok
host_good>  ping -s 1500 host_r8169
Fail
host_good>  ifconfig eth0 mtu 7000
host_r8169> ifconfig eth0 mtu 7000
host_good>  ping -s 1500 host_r8169
Ok

Bonus: got rid of magic number 8

Signed-off-by: Raimonds Cicans <ray@apollo.lv>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: add the missing netlink get_xstats_size callback
Wolfgang Grandegger [Thu, 12 Nov 2009 05:34:05 +0000 (05:34 +0000)]
can: add the missing netlink get_xstats_size callback

This patch adds the missing "get_xstats_size" callback for the
netlink interface, which is required if "fill_xstats" is used,
as pointed out by Patrick McHardy.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: Fix driver Kconfig structure
Oliver Hartkopp [Thu, 12 Nov 2009 01:35:01 +0000 (01:35 +0000)]
can: Fix driver Kconfig structure

In 2.6.32-rc the new EMS USB CAN driver was contributed and added the Kconfig
entry right behind an entry of the same *vendor*. This teared the SJA1000
based driver selection into pieces.

This fix cleans up the 2.6.32-rc Kconfig files for the CAN drivers and moves
the SJA1000 and USB Kconfig portions into the belonging directories.

As there are many new CAN drivers in the queue getting this cleanup into
2.6.32-rc would massively reduce the problems for the upcoming drivers.

Thanks,
Oliver

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipmr: missing dev_put() on error path in vif_add()
Dan Carpenter [Wed, 11 Nov 2009 02:03:54 +0000 (02:03 +0000)]
ipmr: missing dev_put() on error path in vif_add()

The other error paths in front of this one have a dev_put() but this one
got missed.

Found by smatch static checker.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Wang Chen <ellre923@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agos2io: fixing a ethtool test that is broken
Breno Leitao [Tue, 10 Nov 2009 09:44:23 +0000 (09:44 +0000)]
s2io: fixing a ethtool test that is broken

Due commit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff, it is not more
possible to pci_restore_state() more than once without calling
pci_save_state() in the middle.

Actually running a ethtool test on s2io makes the card inactive,
and it needs to unload/reload the module to fix.

This patch just save the state just after it restore in order to
keep the old behaviour

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosctp: Set socket source address when additing first transport
Vlad Yasevich [Wed, 11 Nov 2009 11:54:37 +0000 (11:54 +0000)]
sctp: Set socket source address when additing first transport

Recent commits
sctp: Get rid of an extra routing lookup when adding a transport
and
sctp: Set source addresses on the association before adding transports

changed when routes are added to the sctp transports.  As such,
we didn't set the socket source address correctly when adding the first
transport.  The first transport is always the primary/active one, so
when adding it, set the socket source address.  This was causing
regression failures in SCTP tests.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosctp: Fix regression introduced by new sctp_connectx api
Vlad Yasevich [Wed, 11 Nov 2009 08:19:24 +0000 (08:19 +0000)]
sctp: Fix regression introduced by new sctp_connectx api

A new (unrealeased to the user) sctp_connectx api

c6ba68a26645dbc5029a9faa5687ebe6fcfc53e4
    sctp: support non-blocking version of the new sctp_connectx() API

introduced a regression cought by the user regression test
suite.  In particular, the API requires the user library to
re-allocate the buffer and could potentially trigger a SIGFAULT.

This change corrects that regression by passing the original
address buffer to the kernel unmodified, but still allows for
a returned association id.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosctp: Set source addresses on the association before adding transports
Vlad Yasevich [Tue, 10 Nov 2009 08:57:34 +0000 (08:57 +0000)]
sctp: Set source addresses on the association before adding transports

Recent commit 8da645e101a8c20c6073efda3c7cc74eec01b87f
sctp: Get rid of an extra routing lookup when adding a transport
introduced a regression in the connection setup.  The behavior was

different between IPv4 and IPv6.  IPv4 case ended up working because the
route lookup routing returned a NULL route, which triggered another
route lookup later in the output patch that succeeded.  In the IPv6 case,
a valid route was returned for first call, but we could not find a valid
source address at the time since the source addresses were not set on the
association yet.  Thus resulted in a hung connection.

The solution is to set the source addresses on the association prior to
adding peers.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>