safe/jmp/linux-2.6
14 years agoUSB: Option: Add support for a variant of DLink DWM 652 U5
Huang Ying [Sun, 28 Feb 2010 05:51:29 +0000 (13:51 +0800)]
USB: Option: Add support for a variant of DLink DWM 652 U5

I found a DLink DWM 652 U5 USB 3G modem has product ID 0xce1e instead
of orignal 0xce16. The new ID is added.

And I found there are two entries for 0xce16, one has raw number, the
other has symbol DLINK_PRODUCT_DWM_652_U5. This is fixed too.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: unusual_devs.h: Fix capacity for SL11R-IDE 2.6c
Ondrej Zary [Sat, 27 Feb 2010 21:56:28 +0000 (22:56 +0100)]
USB: unusual_devs.h: Fix capacity for SL11R-IDE 2.6c

SL11R-IDE 2.6c (at least) reports wrong capacity (one sector more).
Reading that last sector causes the device not to work anymore (and looks
like HAL or something does that automatically after plugging in):
sd 5:0:0:0: [sdc] Device not ready
sd 5:0:0:0: [sdc] Result: hostbyte=0x00 driverbyte=0x08
sd 5:0:0:0: [sdc] Sense Key : 0x2 [current]
sd 5:0:0:0: [sdc] ASC=0x0 ASCQ=0x0
sd 5:0:0:0: [sdc] CDB: cdb[0]=0x28: 28 00 04 a8 b5 70 00 00 01 00

Add unusual_devs entry to fix the capacity.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: use port endpoint size to determine if ep is available
Johan Hovold [Sat, 27 Feb 2010 15:24:49 +0000 (16:24 +0100)]
USB: serial: use port endpoint size to determine if ep is available

It is possible to have a multi-port device with a port lacking an in or
out bulk endpoint. Only checking for num_bulk_in or num_bulk_out is thus not
sufficient to determine whether a specific port has an in or out bulk
endpoint.

This fixes potential null pointer dereferences in the generic open and
write routines, as well as access to uninitialised fifo in write_room
and chars_in_buffer.

Also let write fail with ENODEV (instead of 0) on missing out endpoint
(also on zero-length writes).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix softint not being called on errors
Johan Hovold [Sat, 27 Feb 2010 13:06:07 +0000 (14:06 +0100)]
USB: serial: fix softint not being called on errors

Make sure usb_serial_port_softint is called on errors also when using
multi urb writes.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: fix error message on close in generic driver
Johan Hovold [Sat, 27 Feb 2010 13:05:46 +0000 (14:05 +0100)]
USB: serial: fix error message on close in generic driver

Resubmitting read urb fails with -EPERM if completion handler runs while
urb is being killed on close. This should not be reported as an error.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: fix usbfs regression
Alan Stern [Sat, 6 Mar 2010 20:04:03 +0000 (15:04 -0500)]
USB: fix usbfs regression

This patch (as1352) fixes a bug in the way isochronous input data is
returned to userspace for usbfs transfers.  The entire buffer must be
copied, not just the first actual_length bytes, because the individual
packets will be discontiguous if any of them are short.

Reported-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty_port,usb-console: Fix usb serial console open/close regression
Jason Wessel [Tue, 9 Mar 2010 03:50:11 +0000 (21:50 -0600)]
tty_port,usb-console: Fix usb serial console open/close regression

Commit e1108a63e10d344284011cccc06328b2cd3e5da3 ("usb_serial: Use the
shutdown() operation") breaks the ability to use a usb console
starting in 2.6.33.  This was observed when using
console=ttyUSB0,115200 as a boot argument with an FTDI device.  The
error is:

ftdi_sio ttyUSB0: ftdi_submit_read_urb - failed submitting read urb, error -22

The handling of the ASYNCB_INITIALIZED changed in 2.6.32 such that in
tty_port_shutdown() it always clears the flag if it is set.  The fix
is to add a variable to the tty_port struct to indicate when the tty
port is a console.

CC: Alan Cox <alan@linux.intel.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Oliver Neukum <oliver@neukum.org>
CC: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: cpm_uart: use resource_size()
Tobias Klauser [Thu, 11 Mar 2010 22:08:18 +0000 (14:08 -0800)]
tty: cpm_uart: use resource_size()

Use the resource_size function instead of manually calculating the
resource size.  This reduces the chance of introducing off-by-one errors.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Kumar Gala <galak@gate.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty_buffer: Fix distinct type warning
Fang Wenqi [Tue, 9 Mar 2010 10:54:28 +0000 (18:54 +0800)]
tty_buffer: Fix distinct type warning

CC      drivers/char/tty_buffer.o
drivers/char/tty_buffer.c: In function ‘tty_insert_flip_string_fixed_flag’:
drivers/char/tty_buffer.c:251: warning: comparison of distinct pointer types lacks a cast
drivers/char/tty_buffer.c: In function ‘tty_insert_flip_string_flags’:
drivers/char/tty_buffer.c:288: warning: comparison of distinct pointer types lacks a cast

Fix it by replacing min() with min_t() in tty_insert_flip_string_flags and
  tty_insert_flip_string_fixed_flag().

Signed-off-by: Fang Wenqi <antonf@turbolinux.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agohvc_console: Fix race between hvc_close and hvc_remove
Amit Shah [Fri, 12 Mar 2010 06:23:15 +0000 (11:53 +0530)]
hvc_console: Fix race between hvc_close and hvc_remove

Alan pointed out a race in the code where hvc_remove is invoked. The
recent virtio_console work is the first user of hvc_remove().

Alan describes it thus:

The hvc_console assumes that a close and remove call can't occur at the
same time.

In addition tty_hangup(tty) is problematic as tty_hangup is asynchronous
itself....

So this can happen

        hvc_close                               hvc_remove
        hung up ? - no
                                                lock
                                                tty = hp->tty
                                                unlock
        lock
        hp->tty = NULL
        unlock
        notify del
        kref_put the hvc struct
        close completes
        tty is destroyed
                                                tty_hangup dead tty
                                                tty->ops will be NULL
                                                NULL->...

This patch adds some tty krefs and also converts to using tty_vhangup().

Reported-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
CC: linuxppc-dev@ozlabs.org
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agouartlite: Fix build on sparc.
David Miller [Wed, 3 Mar 2010 10:50:26 +0000 (02:50 -0800)]
uartlite: Fix build on sparc.

We can get this driver enabled via MFD_TIMBERDALE which only
requires GPIO to be on.

But the of_address_to_resource() function is only present on
powerpc and microblaze, so we have to conditionalize the
CONFIG_OF probing bits on that.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: Take a 256 byte padding into account when buffering below sub-page units
Mel Gorman [Tue, 2 Mar 2010 22:24:19 +0000 (22:24 +0000)]
tty: Take a 256 byte padding into account when buffering below sub-page units

The TTY layer takes some care to ensure that only sub-page allocations
are made with interrupts disabled. It does this by setting a goal of
"TTY_BUFFER_PAGE" to allocate. Unfortunately, while TTY_BUFFER_PAGE takes the
size of tty_buffer into account, it fails to account that tty_buffer_find()
rounds the buffer size out to the next 256 byte boundary before adding on
the size of the tty_buffer.

This patch adjusts the TTY_BUFFER_PAGE calculation to take into account the
size of the tty_buffer and the padding. Once applied, tty_buffer_alloc()
should not require high-order allocations.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoRevert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELD...
Greg Kroah-Hartman [Tue, 16 Mar 2010 00:14:15 +0000 (17:14 -0700)]
Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call"

This reverts commit eec9fe7d1ab4a0dfac4cb43047a7657fffd0002f.

Ari writes as the reason this should be reverted:
The problems with this patch include:
1. There's at least one subtlety I overlooked - switching
between X servers (i.e. from one X VT to another) still requires
the cooperation of both X servers. I was assuming that KMS
eliminated this.
2. It hasn't been tested at all (no X server patch exists which
uses the new mode).

As he was the original author of the patch, I'll revert it.

Cc: Ari Entlich <atrigent@ccs.neu.edu>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agodriver core: numa: fix BUILD_BUG_ON for node_read_distance
David Rientjes [Wed, 10 Mar 2010 22:50:21 +0000 (14:50 -0800)]
driver core: numa: fix BUILD_BUG_ON for node_read_distance

node_read_distance() has a BUILD_BUG_ON() to prevent buffer overruns when
the number of nodes printed will exceed the buffer length.

Each node only needs four chars: three for distance (maximum distance is
255) and one for a seperating space or a trailing newline.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agodriver-core: document ERR_PTR() return values
Jani Nikula [Thu, 11 Mar 2010 16:11:45 +0000 (18:11 +0200)]
driver-core: document ERR_PTR() return values

A number of functions in the driver core return ERR_PTR() values on
error. Document this in the kernel-doc of the functions.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agokobject: documentation: Update to refer to kset-example.c.
Robert P. J. Day [Fri, 12 Mar 2010 12:30:35 +0000 (07:30 -0500)]
kobject: documentation: Update to refer to kset-example.c.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysdev: the cpu probe/release attributes should be sysdev_class_attributes
Stephen Rothwell [Mon, 15 Mar 2010 23:33:32 +0000 (10:33 +1100)]
sysdev: the cpu probe/release attributes should be sysdev_class_attributes

This fixes these warnings:

drivers/base/cpu.c:264: warning: initialization from incompatible pointer type
drivers/base/cpu.c:265: warning: initialization from incompatible pointer type

Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agokobject: documentation: Fix erroneous example in kobject doc.
Robert P. J. Day [Thu, 11 Mar 2010 12:59:09 +0000 (07:59 -0500)]
kobject: documentation: Fix erroneous example in kobject doc.

Replace uio_mem example for kobjects with uio_map, since the uio_mem
struct no longer contains a kobject.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agodriver-core: fix missing kernel-doc in firmware_class
Randy Dunlap [Wed, 10 Mar 2010 19:47:58 +0000 (11:47 -0800)]
driver-core: fix missing kernel-doc in firmware_class

Fix kernel-doc warning in firmware_class.c:

Warning(drivers/base/firmware_class.c:94): No description found for parameter 'attr'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDriver core: Early platform kernel-doc update
Magnus Damm [Wed, 10 Mar 2010 11:50:38 +0000 (20:50 +0900)]
Driver core: Early platform kernel-doc update

This patch updates the kernel-doc notation for early
platform functions.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysfs: fix sysfs lockdep warning in mlx4 code
Greg Kroah-Hartman [Mon, 15 Mar 2010 21:01:55 +0000 (14:01 -0700)]
sysfs: fix sysfs lockdep warning in mlx4 code

This fixes a sysfs lockdep warning in the mlx4 code.

Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysfs: fix sysfs lockdep warning in infiniband code
Greg Kroah-Hartman [Mon, 15 Mar 2010 21:01:25 +0000 (14:01 -0700)]
sysfs: fix sysfs lockdep warning in infiniband code

This fixes a sysfs lockdep warning in the infiniband code.

Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysfs: fix sysfs lockdep warning in ipmi code
Greg Kroah-Hartman [Mon, 15 Mar 2010 20:59:51 +0000 (13:59 -0700)]
sysfs: fix sysfs lockdep warning in ipmi code

This fixes a sysfs lockdep warning in the ipmi code.

Thanks to Eric Biederman and Yinghai Lu for the original versions of the
patch, unfortunatly they did not submit them in a form they could be
applied in.

Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysfs: Initialised pci bus legacy_mem field before use
Mel Gorman [Wed, 10 Mar 2010 22:48:34 +0000 (22:48 +0000)]
sysfs: Initialised pci bus legacy_mem field before use

PPC64 is failing to boot the latest mmotm due to an uninitialised pointer in
pci_create_legacy_files(). The surprise is that machines boot at all and it
would appear to affect current mainline as well.  This patch fixes the problem.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agosysfs: use sysfs_bin_attr_init in firmware class driver
Jiri Kosina [Tue, 9 Mar 2010 18:30:28 +0000 (19:30 +0100)]
sysfs: use sysfs_bin_attr_init in firmware class driver

Annotate dynamic sysfs attribute in fw_setup_device(). This gets
rid of the following lockdep warning:

bnx2 0000:08:00.0: firmware: requesting bnx2/bnx2-mips-06-5.0.0.j6.fw
BUG: key ffff880008293470 not in .data!
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0x562/0x620()
Modules linked in: bnx2(+) sg tpm_bios floppy rtc_lib usb_storage i2c_piix4 joydev button container shpchp i2c_core sr_mod cdrom pci_hotplug usbhid hid ohci_hcd ehci_hcd sd_mod usbcore edd ext3 mbcache jbd fan ata_generic sata_svw pata_serverworks libata scsi_mod thermal processor
Pid: 1915, comm: work_for_cpu Not tainted 2.6.34-rc1-default #81
Call Trace:
 [<ffffffff8107c1d2>] ? lockdep_init_map+0x562/0x620
 [<ffffffff81049fd8>] warn_slowpath_common+0x78/0xd0
 [<ffffffff8104a03f>] warn_slowpath_null+0xf/0x20
 [<ffffffff8107c1d2>] lockdep_init_map+0x562/0x620
 [<ffffffff8117a236>] ? sysfs_new_dirent+0x76/0x120
 [<ffffffff8126edb2>] ? put_device+0x12/0x20
 [<ffffffff811797cc>] sysfs_add_file_mode+0x6c/0xd0
 [<ffffffff8117983c>] sysfs_add_file+0xc/0x10
 [<ffffffff8117bf61>] sysfs_create_bin_file+0x21/0x30
 [<ffffffff81279c61>] _request_firmware+0x2f1/0x650
 [<ffffffff8127a04e>] request_firmware+0xe/0x10
 [<ffffffffa01ec19e>] bnx2_init_one+0x8f5/0x177e [bnx2]
 [<ffffffff81389eab>] ? _raw_spin_unlock_irq+0x2b/0x40
 [<ffffffff81040ed9>] ? finish_task_switch+0x69/0x100
 [<ffffffff81040e70>] ? finish_task_switch+0x0/0x100
 [<ffffffff81064b40>] ? do_work_for_cpu+0x0/0x30
 [<ffffffff811e6302>] local_pci_probe+0x12/0x20
 [<ffffffff81064b53>] do_work_for_cpu+0x13/0x30
 [<ffffffff81064b40>] ? do_work_for_cpu+0x0/0x30
 [<ffffffff81068c56>] kthread+0x96/0xa0
 [<ffffffff81003e64>] kernel_thread_helper+0x4/0x10
 [<ffffffff8138a350>] ? restore_args+0x0/0x30
 [<ffffffff81068bc0>] ? kthread+0x0/0xa0
 [<ffffffff81003e60>] ? kernel_thread_helper+0x0/0x10
---[ end trace a2ecee9c9602d195 ]---

Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agopowerpc: Remove IOMMU_VMERGE config option
FUJITA Tomonori [Tue, 2 Mar 2010 14:25:38 +0000 (14:25 +0000)]
powerpc: Remove IOMMU_VMERGE config option

The description says:

 Cause IO segments sent to a device for DMA to be merged virtually
 by the IOMMU when they happen to have been allocated contiguously.
 This doesn't add pressure to the IOMMU allocator. However, some
 drivers don't support getting large merged segments coming back
 from *_map_sg().

 Most drivers don't have this problem; it is safe to say Y here.

It's out of date. Long ago, drivers didn't have a way to tell IOMMUs
about their segment length limit (that is, the maximum segment length
that they can handle). So IOMMUs merged as many segments as possible
and gave too large segments to drivers.

dma_get_max_seg_size() was introduced to solve the above
problem. Device drives can use the API to tell IOMMU about the maximum
segment length that they can handle. In addition, the default limit
(64K) should be safe for everyone.

So this config option seems to be unnecessary.

Note that this config option just enables users to disable the virtual
merging by default. Users can still disable the virtual merging by the
boot parameter.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Fix swiotlb to respect the boot option
FUJITA Tomonori [Tue, 16 Mar 2010 13:16:25 +0000 (13:16 +0000)]
powerpc: Fix swiotlb to respect the boot option

powerpc initializes swiotlb before parsing the kernel boot options so
swiotlb options (e.g. specifying the swiotlb buffer size) are ignored.

Any time before freeing bootmem works for swiotlb so this patch moves
powerpc's swiotlb initialization after parsing the kernel boot
options, mem_init (as x86 does).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Becky Bruce <beckyb@kernel.crashing.org>
Tested-by: Albert Herranz <albert_herranz@yahoo.es>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Do not call prink when CONFIG_PRINTK is not defined
Márton Németh [Sat, 6 Mar 2010 22:43:55 +0000 (22:43 +0000)]
powerpc: Do not call prink when CONFIG_PRINTK is not defined

When printk() is disabled (CONFIG_PRINTK) at menu item
 General setup
 -> Configure standard kernel features (for small systems)
    -> Enable support for printk
then there should be no printk() calls at all.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Use correct ccr bit for syscall error status
Nathan Lynch [Fri, 12 Mar 2010 13:16:02 +0000 (13:16 +0000)]
powerpc: Use correct ccr bit for syscall error status

The powerpc implementations of syscall_get_error and
syscall_set_return_value should use CCR0:S0 (0x10000000) for testing
and setting syscall error status.  Fortunately these APIs don't seem
to be used at the moment.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoMerge commit 'kumar/merge' into merge
Benjamin Herrenschmidt [Fri, 19 Mar 2010 05:23:55 +0000 (16:23 +1100)]
Merge commit 'kumar/merge' into merge

14 years agosmsc95xx: Fix tx checksum offload for small packets
Steve Glendinning [Fri, 19 Mar 2010 05:18:41 +0000 (22:18 -0700)]
smsc95xx: Fix tx checksum offload for small packets

TX checksum offload does not work properly when transmitting
UDP packets with 0, 1 or 2 bytes of data.  This patch works
around the problem by calculating checksums for these packets
in the driver.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Fix 82599 KX4 Wake on LAN issue after an improper system shutdown
Mallikarjuna R Chilakala [Thu, 18 Mar 2010 15:16:56 +0000 (15:16 +0000)]
ixgbe: Fix 82599 KX4 Wake on LAN issue after an improper system shutdown

Advanced Power Management is disabled for 82599 KX4 connections by
clearing GRC.APME bit, causing it to not wake the system from an
improper system shutdown. By default GRC.APME is enabled and software
is not supposed to clear these settings during adapter probe.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@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 82599 multispeed fiber link issues due to Tx laser flapping
Mallikarjuna R Chilakala [Thu, 18 Mar 2010 14:34:52 +0000 (14:34 +0000)]
ixgbe: Fix 82599 multispeed fiber link issues due to Tx laser flapping

Fix 82599 link issues during driver load and unload test using multi-speed
10G & 1G fiber modules. When connected back to back sometime 82599 multispeed
fiber modules would link at 1G speed instead of 10G highest speed, due to a
race condition in autotry process involving Tx laser flapping. Move autotry
autoneg-37 tx laser flapping process from multispeed module init setup
to driver unload. This will alert the link partner to restart its
autotry process when it tries to establish the link with the link partner

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@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 [Fri, 19 Mar 2010 04:18:19 +0000 (21:18 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

14 years agonet: Potential null skb->dev dereference
Eric Dumazet [Fri, 19 Mar 2010 04:16:45 +0000 (21:16 -0700)]
net: Potential null skb->dev dereference

When doing "ifenslave -d bond0 eth0", there is chance to get NULL
dereference in netif_receive_skb(), because dev->master suddenly becomes
NULL after we tested it.

We should use ACCESS_ONCE() to avoid this (or rcu_dereference())

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agojme: Advance driver version number
Guo-Fu Tseng [Wed, 17 Mar 2010 00:09:31 +0000 (00:09 +0000)]
jme: Advance driver version number

Advance driver version number after some bug fix.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agojme: Protect vlgrp structure by pause RX actions.
Guo-Fu Tseng [Wed, 17 Mar 2010 00:09:30 +0000 (00:09 +0000)]
jme: Protect vlgrp structure by pause RX actions.

Temporary stop the RX IRQ, and disable (sync) tasklet or napi.
And restore it after finished the vlgrp pointer assignment.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agojme: Fix VLAN memory leak
Guo-Fu Tseng [Wed, 17 Mar 2010 00:09:29 +0000 (00:09 +0000)]
jme: Fix VLAN memory leak

Fix memory leak while receiving 8021q tagged packet which is not
registered by user.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoKS8851: Avoid NULL pointer in set rx mode
Abraham Arce [Tue, 16 Mar 2010 12:24:54 +0000 (12:24 +0000)]
KS8851: Avoid NULL pointer in set rx mode

Kernel NULL pointer dereference when setting mode for IFF_MULTICAST.
Tested on SDP OMAP4430 board.

ks8851 spi1.0: message enable is 0
ks8851 spi1.0: revision 0, MAC f2:f4:2f:56:37:de, IRQ 194
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP
last sysfs file:
Modules linked in:
CPU: 0    Not tainted  (2.6.34-rc1-01039-g38d7ed1-dirty #3)
PC is at ks8851_set_rx_mode+0x88/0x124
LR is at bitrev32+0x24/0x2c

<snip>

Backtrace:
[<c01bfbd8>] ? (ks8851_set_rx_mode+0x0/0x124)
[<c01d4164>] (__dev_set_rx_mode+0x0/0x90)
[<c01dc460>] (dev_mc_add+0x0/0x78)
[<c021f0bc>] (igmp_group_added+0x0/0x64)
[<c021f174>] (ip_mc_inc_group+0x0/0x150)
[<c021f3b8>] (ip_mc_up+0x0/0x64)
[<c0219eb0>] (inetdev_event+0x0/0x3d4)
[<c0066818>] (notifier_call_chain+0x0/0x78)
[<c00668b8>] (__raw_notifier_call_chain+0x0/0x24)
[<c00668dc>] (raw_notifier_call_chain+0x0/0x28)
[<c01d7484>] (call_netdevice_notifiers+0x0/0x24)
[<c01d7780>] (__dev_notify_flags+0x0/0x68)
[<c01d77e8>] (dev_change_flags+0x0/0x4c)
[<c001f0bc>] (ip_auto_config+0x0/0xf1c)
[<c0028490>] (do_one_initcall+0x0/0x1bc)
 [<c00084dc>] (kernel_init+0x0/0x234)
Code: e15130bc e1833012 e14130bc e5943000 (e5934000)
---[ end trace ed0fb00a94142792 ]---
Kernel panic - not syncing: Fatal exception in interrupt

Signed-off-by: Abraham Arce <x0066660@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: Fix OOB POLLIN avoidance.
Alexandra Kossovsky [Fri, 19 Mar 2010 03:29:24 +0000 (20:29 -0700)]
tcp: Fix OOB POLLIN avoidance.

From: Alexandra.Kossovsky@oktetlabs.ru

Fixes kernel bugzilla #15541

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoalpha: fix compile errors in dma-mapping-common.h
FUJITA Tomonori [Fri, 19 Mar 2010 02:35:28 +0000 (22:35 -0400)]
alpha: fix compile errors in dma-mapping-common.h

The commit c186caca3dbe7f44da624cb4f9d78e1b1dfb13b8 leads to the
following errors with CONFIG_ALPHA_{TSUNAMI, TITAN, RAWHIDE, MARVEL}:
/home/fujita/git/linux-2.6/include/asm-generic/dma-mapping-common.h: In
function `dma_map_sg_attrs':
/home/fujita/git/linux-2.6/include/asm-generic/dma-mapping-common.h:49:
error: implicit declaration of function `for_each_sg'
/home/fujita/git/linux-2.6/include/asm-generic/dma-mapping-common.h:50:
error: syntax error before "kmemcheck_mark_initialized"

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reported-by: Michael Cree <mcree@orcon.net.nz>
Signed-off-by: Matt Turner <mattst88@gmail.com>
14 years agoalpha: remove trailing spaces in messages
Frans Pop [Mon, 1 Mar 2010 18:29:14 +0000 (13:29 -0500)]
alpha: remove trailing spaces in messages

Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: linux-alpha@vger.kernel.org
Signed-off-by: Matt Turner <mattst88@gmail.com>
14 years agoalpha: use __ratelimit
Akinobu Mita [Mon, 1 Mar 2010 18:25:49 +0000 (13:25 -0500)]
alpha: use __ratelimit

Replace open-coded rate limiting logic with __ratelimit().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: linux-alpha@vger.kernel.org
Signed-off-by: Matt Turner <mattst88@gmail.com>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
Linus Torvalds [Fri, 19 Mar 2010 00:02:35 +0000 (17:02 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/vapier/blackfin

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (96 commits)
  Blackfin: stop cleaning include/asm/asm-offsets.h
  Blackfin: scale calibration when cpu freq changes
  Blackfin: eat spurious space in asm/dpmc.h
  Blackfin: fix anomaly 283 handling with exact hardware error
  Blackfin: bf537-stamp: add example ADXL346 orientation resources
  Blackfin: bf537-stamp: add example AD2S1210 IIO resources
  Blackfin: don't support keypad wakeup from hibernate
  Blackfin: bf537-stamp: add example AD7416 IIO resources
  Blackfin: bf537-stamp: add example ADP8860 backlight/led resources
  Blackfin: bf537-stamp: add example AD7414 temp sensor resources
  Blackfin: rename AD1836 to AD183X in board files
  Blackfin: bf537-stamp: add example AD2S120x resources
  Blackfin: add support for the on-chip MAC status interrupts
  Blackfin: asm/page.h: pull in asm-generic headers
  Blackfin: mark gpio lib functions static
  Blackfin: bf537-stamp: add example ADAU1361 resources
  Blackfin: GPIO: implement to_irq handler
  Blackfin: bf537-stamp: add example ADP122/ADP150 power regulator resources
  Blackfin: bf537-stamp: add example AD2S90 resources
  Blackfin: bf537-stamp: add example AD5398 power regulator resources
  ...

14 years agoMerge branch 'merge' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Fri, 19 Mar 2010 00:01:19 +0000 (17:01 -0700)]
Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6

* 'merge' of git://git.secretlab.ca/git/linux-2.6:
  powerpc/5200: Build fix for mpc52xx watchdog timer code
  of: Fix comparison of "compatible" properties
  powerpc/52xx: update defconfigs
  spi/omap2_mcspi: Use transaction speed if provided
  spi/omap2_mcspi: fix NULL pointer dereference
  uartlite: Fix build on sparc.

14 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 18 Mar 2010 23:59:30 +0000 (16:59 -0700)]
Merge branch 'omap-fixes-for-linus' of git://git./linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  ARM/OMAP: Remove the +x bit from a couple of source files
  omap: McBSP: Drop unnecessary status/error bit clearing on reg_cacheretrieved register values
  OMAP4: fix temporary hacks that break multi-omap PM
  OMAP2: cpu_is_omap2*: fix compile-time removal of unused code
  omap3: pandora: add missing i2c3 board_info
  omap: mach-omap2/io.c: fix function declarations
  omap: Fix gpio_resume_after_retention
  omap3: Fix support for the LEDs connected to GPIO outputs on IGEP v2board
  omap: Checkpatch cleanup for blizzard.h
  omap: pass the reboot command to the boot loader
  omap2/3/4: mailbox: remove compiler warning
  OMAP2: serial.c: Fix number of uarts in early_init
  omap: Enable PM_RUNTIME in defconfigs to avoid USB compile errors
  omap2: Update n8x0 defconfig to test multi-omap and DMA api changes
  omap2: add USB initialization for tusb6010
  omap4: Fix build break by moving omap_smc1 into a separate .S
  omap2/3/4: ehci: avoid compiler error with touchbook
  omap3: Fix compile for Touch Book early_param

14 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 18 Mar 2010 23:59:10 +0000 (16:59 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm: (23 commits)
  ARM: Fix RiscPC decompressor build errors
  ARM: Fix sorting of platform group config options and includes
  ARM: 5991/1: Fix regression in restore_user_regs macro
  ARM: 5989/1: ARM: KGDB: add support for SMP platforms
  ARM: 5990/1: ARM: use __armv5tej_mmu_cache_flush for V5TEJ instead of __armv4_mmu_cache_flush
  ARM: Add final piece to fix XIP decompressor in read-only memory
  video: enable sh_mobile_lcdc on SH-Mobile ARM
  ARM: mach-shmobile: ap4evb SDHI0 platform data V2
  ARM: mach-shmobile: sh7372 SDHI vector merge
  ARM: mach-shmobile: sh7377 SDHI vector merge
  ARM: mach-shmobile: sh7367 SDHI vector merge
  ARM: mach-shmobile: G4EVM KEYSC platform data
  mtd: enable sh_flctl on SH-Mobile ARM
  ARM: mach-shmobile: G3EVM FLCTL platform data
  ARM: mach-shmobile: G3EVM KEYSC platform data
  Video: ARM CLCD: Better fix for swapped IENB and CNTL registers
  ARM: Add L2 cache handling to smp boot support
  ARM: 5960/1: ARM: perf-events: fix v7 event selection mask
  ARM: 5959/1: ARM: perf-events: request PMU interrupts with IRQF_NOBALANCING
  ARM: 5988/1: pgprot_dmacoherent() for non-mmu builds
  ...

14 years agoMerge branch 'for-linus/samsung-fixes' of git://git.fluff.org/bjdooks/linux
Linus Torvalds [Thu, 18 Mar 2010 23:58:42 +0000 (16:58 -0700)]
Merge branch 'for-linus/samsung-fixes' of git://git.fluff.org/bjdooks/linux

* 'for-linus/samsung-fixes' of git://git.fluff.org/bjdooks/linux:
  ARM: SAMSUNG: Fixup commit 4e6d488af37980d224cbf298224db6173673f362
  ARM: SAMSUNG: Fix build error from stale define in <plat/uncompress.h>
  ARM: SAMSUNG: Add suspend/resume support for S3C PWM driver
  ARM: S3C2440: Fix s3c2440 cpufreq compilation post move.

14 years agoMerge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze
Linus Torvalds [Thu, 18 Mar 2010 23:57:24 +0000 (16:57 -0700)]
Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze

* 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze: (27 commits)
  microblaze: entry.S use delay slot for return handlers
  microblaze: Save current task directly
  microblaze: Simplify entry.S - save/restore r3/r4 - ret_from_trap
  microblaze: PCI early support for noMMU system
  microblaze: Fix dma alloc and free coherent dma functions
  microblaze: Add consistent code
  microblaze: pgtable.h: move consistent functions
  microblaze: Remove ancient Kconfig option for consistent mapping
  microblaze: Remove VMALLOC_VMADDR
  microblaze: Add define for ASM_LOOP
  microblaze: Preliminary support for dma drivers
  microblaze: remove trailing space in messages
  microblaze: Use generic show_mem()
  microblaze: Change temp register for cmdline
  microblaze: Preliminary support for dma drivers
  microblaze: Move cache function to cache.c
  microblaze: Add support from PREEMPT
  microblaze: Add support for Xilinx PCI host bridge
  microblaze: Enable PCI, missing files
  microblaze: Add core PCI files
  ...

14 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Thu, 18 Mar 2010 23:55:24 +0000 (16:55 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: deal with merge_bvec_fn in component devices better.

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Thu, 18 Mar 2010 23:54:31 +0000 (16:54 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (69 commits)
  [SCSI] scsi_transport_fc: Fix synchronization issue while deleting vport
  [SCSI] bfa: Update the driver version to 2.1.2.1.
  [SCSI] bfa: Remove unused header files and did some cleanup.
  [SCSI] bfa: Handle SCSI IO underrun case.
  [SCSI] bfa: FCS and include file changes.
  [SCSI] bfa: Modified the portstats get/clear logic
  [SCSI] bfa: Replace bfa_get_attr() with specific APIs
  [SCSI] bfa: New portlog entries for events (FIP/FLOGI/FDISC/LOGO).
  [SCSI] bfa: Rename pport to fcport in BFA FCS.
  [SCSI] bfa: IOC fixes, check for IOC down condition.
  [SCSI] bfa: In MSIX mode, ignore spurious RME interrupts when FCoE ports are in FW mismatch state.
  [SCSI] bfa: Fix Command Queue (CPE) full condition check and ack CPE interrupt.
  [SCSI] bfa: IOC recovery fix in fcmode.
  [SCSI] bfa: AEN and byte alignment fixes.
  [SCSI] bfa: Introduce a link notification state machine.
  [SCSI] bfa: Added firmware save clear feature for BFA driver.
  [SCSI] bfa: FCS authentication related changes.
  [SCSI] bfa: PCI VPD, FIP and include file changes.
  [SCSI] bfa: Fix to copy fpma MAC when requested by user space application.
  [SCSI] bfa: RPORT state machine: direct attach mode fix.
  ...

14 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 18 Mar 2010 23:52:46 +0000 (16:52 -0700)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (35 commits)
  perf: Fix unexported generic perf_arch_fetch_caller_regs
  perf record: Don't try to find buildids in a zero sized file
  perf: export perf_trace_regs and perf_arch_fetch_caller_regs
  perf, x86: Fix hw_perf_enable() event assignment
  perf, ppc: Fix compile error due to new cpu notifiers
  perf: Make the install relative to DESTDIR if specified
  kprobes: Calculate the index correctly when freeing the out-of-line execution slot
  perf tools: Fix sparse CPU numbering related bugs
  perf_event: Fix oops triggered by cpu offline/online
  perf: Drop the obsolete profile naming for trace events
  perf: Take a hot regs snapshot for trace events
  perf: Introduce new perf_fetch_caller_regs() for hot regs snapshot
  perf/x86-64: Use frame pointer to walk on irq and process stacks
  lockdep: Move lock events under lockdep recursion protection
  perf report: Print the map table just after samples for which no map was found
  perf report: Add multiple event support
  perf session: Change perf_session post processing functions to take histogram tree
  perf session: Add storage for seperating event types in report
  perf session: Change add_hist_entry to take the tree root instead of session
  perf record: Add ID and to recorded event data when recording multiple events
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Thu, 18 Mar 2010 23:52:31 +0000 (16:52 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: avoid '\0' in hid debugfs events file
  HID: Add RGT Clutch Wheel clutch device id
  HID: ntrig: fix touch events
  HID: add quirk for UC-Logik WP4030 tablet
  HID: magicmouse: fix oops after device removal

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Linus Torvalds [Thu, 18 Mar 2010 23:50:55 +0000 (16:50 -0700)]
Merge git://git./linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (30 commits)
  Btrfs: fix the inode ref searches done by btrfs_search_path_in_tree
  Btrfs: allow treeid==0 in the inode lookup ioctl
  Btrfs: return keys for large items to the search ioctl
  Btrfs: fix key checks and advance in the search ioctl
  Btrfs: buffer results in the space_info ioctl
  Btrfs: use __u64 types in ioctl.h
  Btrfs: fix search_ioctl key advance
  Btrfs: fix gfp flags masking in the compression code
  Btrfs: don't look at bio flags after submit_bio
  btrfs: using btrfs_stack_device_id() get devid
  btrfs: use memparse
  Btrfs: add a "df" ioctl for btrfs
  Btrfs: cache the extent state everywhere we possibly can V2
  Btrfs: cache ordered extent when completing io
  Btrfs: cache extent state in find_delalloc_range
  Btrfs: change the ordered tree to use a spinlock instead of a mutex
  Btrfs: finish read pages in the order they are submitted
  btrfs: fix btrfs_mkdir goto for no free objectids
  Btrfs: flush data on snapshot creation
  Btrfs: make df be a little bit more understandable
  ...

14 years agoMerge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Thu, 18 Mar 2010 23:50:09 +0000 (16:50 -0700)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  NFS: ensure bdi_unregister is called on mount failure.
  NFS: Avoid a deadlock in nfs_release_page
  NFSv4: Don't ignore the NFS_INO_REVAL_FORCED flag in nfs_revalidate_inode()
  nfs4: Make the v4 callback service hidden
  nfs: fix unlikely memory leak
  rpc client can not deal with ENOSOCK, so translate it into ENOCONN

14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Thu, 18 Mar 2010 23:49:24 +0000 (16:49 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: pp->active_link is not reliable when FBS is enabled
  ahci: use BIOS date in broken_suspend list
  ahci: add missing nv IDs

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Thu, 18 Mar 2010 23:48:19 +0000 (16:48 -0700)]
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:
  sound: sequencer: clean up remove bogus check
  ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212
  ALSA: hda - Disable MSI for Nvidia controller
  ALSA: hda - Add PCI quirks for MSI NetOn AP1900 and Wind Top AE2220
  ALSA: hda - Fix secondary ADC of ALC260 basic model
  ALSA: hda - Add an error message for invalid mapping NID
  ALSA: hda - New Intel HDA controller

14 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
Linus Torvalds [Thu, 18 Mar 2010 23:48:00 +0000 (16:48 -0700)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
  backlight: panasonic-laptop - Fix incomplete registration failure handling
  backlight: msi-laptop, msi-wmi: fix incomplete registration failure handling
  backlight: blackfin - Fix missing registration failure handling
  backlight: classmate-laptop - Fix missing registration failure handling
  backlight: mbp_nvidia_bl - add five more MacBook variants
  backlight: Allow properties to be passed at registration
  backlight: Add backlight_device parameter to check_fb
  video: backlight/progear, fix pci device refcounting
  backlight: l4f00242t03: Fix module licence absence.
  backlight: Revert some const qualifiers
  backlight: Add Epson L4F00242T03 LCD driver

14 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
Linus Torvalds [Thu, 18 Mar 2010 23:47:04 +0000 (16:47 -0700)]
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: Fix race between LED device uevent and actual attributes creation
  leds-gpio: fix default state handling on OF platforms
  leds: Add Dell Business Class Netbook LED driver
  leds: Kconfig cleanup
  leds: led-class.c - Quiet boot messages
  leds: make PCI device id constant
  leds: ALIX2: Add dependency to !GPIO_CS5335

14 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Thu, 18 Mar 2010 23:46:05 +0000 (16:46 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: don't warn about page discards on shutdown
  xfs: use scalable vmap API
  xfs: remove old vmap cache

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 18 Mar 2010 23:45:01 +0000 (16:45 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (39 commits)
  gigaset: fix build failure
  bridge: Make first arg to deliver_clone const.
  bridge br_multicast: Don't refer to BR_INPUT_SKB_CB(skb)->mrouters_only without IGMP snooping.
  route: Fix caught BUG_ON during rt_secret_rebuild_oneshot()
  bridge br_multicast: Fix skb leakage in error path.
  bridge br_multicast: Fix handling of Max Response Code in IGMPv3 message.
  NET: netpoll, fix potential NULL ptr dereference
  tipc: fix lockdep warning on address assignment
  l2tp: Fix UDP socket reference count bugs in the pppol2tp driver
  smsc95xx: wait for PHY to complete reset during init
  l2tp: Fix oops in pppol2tp_xmit
  smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver
  ne: Do not use slashes in irq name string
  NET: ksz884x, fix lock imbalance
  gigaset: correct range checking off by one error
  bridge: Fix br_forward crash in promiscuous mode
  bridge: Move NULL mdb check into br_mdb_ip_get
  ISDN: Add PCI ID for HFC-2S/4S Beronet Card PCIe
  net-2.6 [Bug-Fix][dccp]: fix oops caused after failed initialisation
  myri: remove dead code
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 18 Mar 2010 23:44:47 +0000 (16:44 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sunxvr1000: Add missing FB=y depenency.
  MAINTAINERS: Add entry for sparc serial drivers.
  drivers/serial/sunsab.c: adjust the constant used to initialize the interrupt_mask0 fields

14 years agoMerge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
Linus Torvalds [Thu, 18 Mar 2010 18:04:59 +0000 (11:04 -0700)]
Merge branch 'urgent' of git://git./linux/kernel/git/brodo/pcmcia-2.6

* 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
  PCMCIA: resource, fix lock imbalance
  pcmcia: add important if statement
  pcmcia: re-route Cardbus IRQ to ISA on ti1130 bridges if necessary
  pcmcia: allow for cb_irq to differ from pci_dev's irq in yenta_socket
  pcmcia: honor saved flags in yenta_socket's I365_CSCINT register
  pcmcia: revert "irq probe can be done without risking an IRQ storm"
  pcmcia: pd6729, i82092: use parent (PCI) resources
  pcmcia/vrc4171: use local spinlock for device local lock.

14 years agoBtrfs: fix the inode ref searches done by btrfs_search_path_in_tree
Chris Mason [Thu, 18 Mar 2010 16:23:10 +0000 (12:23 -0400)]
Btrfs: fix the inode ref searches done by btrfs_search_path_in_tree

This is used by the inode lookup ioctl to follow all the backrefs up
to the subvol root.  But the search being done would sometimes land one
past the last item in the leaf instead of finding the backref.

This changes the search to look for the highest possible backref and hop
back one item.  It also fixes a leaked path on failure to find the root.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: allow treeid==0 in the inode lookup ioctl
Chris Mason [Thu, 18 Mar 2010 16:17:05 +0000 (12:17 -0400)]
Btrfs: allow treeid==0 in the inode lookup ioctl

When a root id of 0 is sent to the inode lookup ioctl, it will
use the root of the file we're ioctling and pass the root id
back to userland along with the results.

This allows userland to do searches based on that root later on.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: return keys for large items to the search ioctl
Chris Mason [Thu, 18 Mar 2010 16:14:54 +0000 (12:14 -0400)]
Btrfs: return keys for large items to the search ioctl

The search ioctl was skipping large items entirely (ones that are too
big for the results buffer).  This changes things to at least copy
the item header so that we can send information about the item back to
userland.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fix key checks and advance in the search ioctl
Chris Mason [Thu, 18 Mar 2010 16:10:08 +0000 (12:10 -0400)]
Btrfs: fix key checks and advance in the search ioctl

The search ioctl was working well for finding tree roots, but using it for
generic searches requires a few changes to how the keys are advanced.
This treats the search control min fields for objectid, type and offset
more like a key, where we drop the offset to zero once we bump the type,
etc.

The downside of this is that we are changing the min_type and min_offset
fields during the search, and so the ioctl caller needs extra checks to make sure
the keys in the result are the ones it wanted.

This also changes key_in_sk to use btrfs_comp_cpu_keys, just to make
things more readable.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agopowerpc/5200: Build fix for mpc52xx watchdog timer code
Grant Likely [Thu, 18 Mar 2010 20:01:18 +0000 (14:01 -0600)]
powerpc/5200: Build fix for mpc52xx watchdog timer code

mpc52xx_gpt_wdt_setup is defined as 0, which causes the following build
failure with gcc 4.5, since it's built with -Werror.

arch/powerpc/platforms/52xx/mpc52xx_gpt.c:761:3: error: statement with no effect

Changing it to a static inline fixes the problem.

Reported-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
14 years agoof: Fix comparison of "compatible" properties
Grant Likely [Thu, 18 Mar 2010 13:30:31 +0000 (07:30 -0600)]
of: Fix comparison of "compatible" properties

Commit 7c7b60cb87547b1664a4385c187f029bf514a737
"of: put default string compare and #a/s-cell values into common header"

Breaks various things on powerpc due to using strncasecmp instead of
strcasecmp for comparing against "compatible" strings.

This causes things like the 4xx PCI code to fail miserably due to the
partial matches in code like this:

       for_each_compatible_node(np, NULL, "ibm,plb-pcix")
               ppc4xx_probe_pcix_bridge(np);
       for_each_compatible_node(np, NULL, "ibm,plb-pci")
               ppc4xx_probe_pci_bridge(np);

It's not quite right to do partial name match. Entries in a compatible
list are meant to be matched whole. If a device is compatible with both
"foo" and "foo1", then the device should have both strings in its
"compatible" property.

This patch reverts powerpc and microblaze us to use strcasecmp.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      (for patch description)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Michal Simek <michal.simek@petalogix.com>
14 years agomemory hotplug/s390: set phys_device
Heiko Carstens [Mon, 15 Mar 2010 04:35:05 +0000 (00:35 -0400)]
memory hotplug/s390: set phys_device

Implement arch specific arch_get_memory_phys_device function and
initialize phys_device for each memory section.  That way we finally can
tell which piece of memory belongs to which physical device.

This makes s390's /sys/devices/system/memory/memoryX/phys_device display
the correct thing?

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomemory hotplug: allow setting of phys_device
Heiko Carstens [Mon, 15 Mar 2010 04:35:03 +0000 (00:35 -0400)]
memory hotplug: allow setting of phys_device

/sys/devices/system/memory/memoryX/phys_device is supposed to contain the
number of the physical device that the corresponding piece of memory
belongs to.

In case a physical device should be replaced or taken offline for whatever
reason it is necessary to set all corresponding memory pieces offline.
The current implementation always sets phys_device to '0' and there is no
way or hook to change that.  Seems like there was a plan to implement that
but it wasn't finished for whatever reason.

So add a weak function which architectures can override to actually set
the phys_device from within add_memory_block().

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agohpet: use for_each_set_bit()
Akinobu Mita [Mon, 15 Mar 2010 04:35:01 +0000 (00:35 -0400)]
hpet: use for_each_set_bit()

Replace open-coded loop with for_each_set_bit().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Clemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agontfs: use bitmap_weight
Akinobu Mita [Mon, 15 Mar 2010 04:35:00 +0000 (00:35 -0400)]
ntfs: use bitmap_weight

Use bitmap_weight() instead of doing hweight32() for each u32 element in
the page.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Anton Altaparmakov <aia21@cantab.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agojffs2: fix up rb_root initializations to use RB_ROOT
Venkatesh Pallipadi [Mon, 15 Mar 2010 04:34:59 +0000 (00:34 -0400)]
jffs2: fix up rb_root initializations to use RB_ROOT

jffs2 uses rb_node = NULL; to zero rb_root.

The problem with this is that 17d9ddc72fb8bba0d4f678 ("rbtree: Add
support for augmented rbtrees") in the linux-next tree adds a new field
to that struct which needs to be NULL as well.  This patch uses RB_ROOT
as the intializer so all of the relevant fields will be NULL'd.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Eric Paris <eparis@redhat.com>
Acked-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomemcg: avoid use cmpxchg in swap cgroup maintainance
KAMEZAWA Hiroyuki [Mon, 15 Mar 2010 04:34:57 +0000 (00:34 -0400)]
memcg: avoid use cmpxchg in swap cgroup maintainance

swap_cgroup uses 2bytes data and uses cmpxchg in a new operation.  2byte
cmpxchg/xchg is not available on some archs.  This patch replaces
cmpxchg/xchg with operations under lock.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reported-by: Sachin Sant <sachinp@in.ibm.com> wrote:
Acked-by: Balbir Singh <balbir@in.ibm.com>
Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agogigaset: fix build failure
Tilman Schmidt [Wed, 17 Mar 2010 21:22:07 +0000 (14:22 -0700)]
gigaset: fix build failure

Update the dummy LL interface to the LL interface change
introduced by commit daab433c03c15fd642c71c94eb51bdd3f32602c8.
This fixes the build failure occurring after that commit when
enabling ISDN_DRV_GIGASET but neither ISDN_I4L nor ISDN_CAPI.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovhost: fix error handling in vring ioctls
Michael S. Tsirkin [Wed, 17 Mar 2010 14:06:11 +0000 (16:06 +0200)]
vhost: fix error handling in vring ioctls

Stanse found a locking problem in vhost_set_vring:
several returns from VHOST_SET_VRING_KICK, VHOST_SET_VRING_CALL,
VHOST_SET_VRING_ERR with the vq->mutex held.
Fix these up.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Laurent Chavey <chavey@google.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoahci: pp->active_link is not reliable when FBS is enabled
Shane Huang [Tue, 16 Mar 2010 10:08:55 +0000 (18:08 +0800)]
ahci: pp->active_link is not reliable when FBS is enabled

pp->active_link is not reliable when FBS is enabled.
Both PORT_SCR_ACT and PORT_CMD_ISSUE should be checked
because mixed NCQ and non-NCQ commands may be in flight.

Signed-off-by: Shane Huang <shane.huang@amd.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoahci: use BIOS date in broken_suspend list
Tejun Heo [Tue, 16 Mar 2010 00:50:26 +0000 (09:50 +0900)]
ahci: use BIOS date in broken_suspend list

HP is recycling both DMI_PRODUCT_NAME and DMI_BIOS_VERSION making
ahci_broken_suspend() trigger for later products which are not
affected by the original problems.  Match BIOS date instead of version
and add references to bko's so that full information can be found
easier later.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=15462

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: tigerfishdaisy@gmail.com
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoahci: add missing nv IDs
Tejun Heo [Thu, 11 Mar 2010 02:37:16 +0000 (11:37 +0900)]
ahci: add missing nv IDs

bko#15481 shows that we're missing some NVIDIA ahci PCI IDs.  Peer
Chen confirms that IDs 0x580-0x58f are reserved for cases where Linux
ID option is selected in the BIOS and are only used for mcp65-73.  Add
0x0581-0x058f.

  http://bugzilla.kernel.org/show_bug.cgi?id=15481

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Peer Chen <pchen@nvidia.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agovhost: fix interrupt mitigation with raw sockets
Michael S. Tsirkin [Mon, 8 Mar 2010 21:24:22 +0000 (23:24 +0200)]
vhost: fix interrupt mitigation with raw sockets

A thinko in code means we never trigger interrupt
mitigation. Fix this.

Reported-by: Juan Quintela <quintela@redhat.com>
Reported-by: Unai Uribarri <unai.uribarri@optenet.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoperf: Fix unexported generic perf_arch_fetch_caller_regs
Frederic Weisbecker [Tue, 16 Mar 2010 00:05:02 +0000 (01:05 +0100)]
perf: Fix unexported generic perf_arch_fetch_caller_regs

perf_arch_fetch_caller_regs() is exported for the overriden x86
version, but not for the generic weak version.

As a general rule, weak functions should not have their symbol
exported in the same file they are defined.

So let's export it on trace_event_perf.c as it is used by trace
events only.

This fixes:

ERROR: ".perf_arch_fetch_caller_regs" [fs/xfs/xfs.ko] undefined!
ERROR: ".perf_arch_fetch_caller_regs" [arch/powerpc/platforms/cell/spufs/spufs.ko] undefined!

-v2: And also only build it if trace events are enabled.
-v3: Fix changelog mistake

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1268697902-9518-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Wed, 17 Mar 2010 08:01:38 +0000 (09:01 +0100)]
Merge branch 'fix/hda' into for-linus

14 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Wed, 17 Mar 2010 08:01:33 +0000 (09:01 +0100)]
Merge branch 'fix/misc' into for-linus

14 years agopowerpc/fsl-booke: Get coherent bit from PTE
Kumar Gala [Wed, 17 Mar 2010 04:39:56 +0000 (23:39 -0500)]
powerpc/fsl-booke: Get coherent bit from PTE

We shouldn't be always setting 'M' in the TLB entry since its reasonable
for somethings to be mapped non-coherent.  The PTE should have 'M' set
properly.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/85xx: Make sure lwarx hint isn't set on ppc32
Kumar Gala [Thu, 11 Mar 2010 05:33:25 +0000 (23:33 -0600)]
powerpc/85xx: Make sure lwarx hint isn't set on ppc32

e500v1/v2 based chips will treat any reserved field being set in an
opcode as illegal.  Thus always setting the hint in the opcode is
a bad idea.

Anton should be kept away from the powerpc opcode map.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agosunxvr1000: Add missing FB=y depenency.
David S. Miller [Tue, 16 Mar 2010 21:40:42 +0000 (14:40 -0700)]
sunxvr1000: Add missing FB=y depenency.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge: Make first arg to deliver_clone const.
David S. Miller [Tue, 16 Mar 2010 21:37:47 +0000 (14:37 -0700)]
bridge: Make first arg to deliver_clone const.

Otherwise we get a warning from the call in br_forward().

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge br_multicast: Don't refer to BR_INPUT_SKB_CB(skb)->mrouters_only without IGMP...
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 15 Mar 2010 21:51:18 +0000 (21:51 +0000)]
bridge br_multicast: Don't refer to BR_INPUT_SKB_CB(skb)->mrouters_only without IGMP snooping.

Without CONFIG_BRIDGE_IGMP_SNOOPING,
BR_INPUT_SKB_CB(skb)->mrouters_only is not appropriately
initialized, so we can see garbage.

A clear option to fix this is to set it even without that
config, but we cannot optimize out the branch.

Let's introduce a macro that returns value of mrouters_only
and let it return 0 without CONFIG_BRIDGE_IGMP_SNOOPING.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoroute: Fix caught BUG_ON during rt_secret_rebuild_oneshot()
Vitaliy Gusev [Tue, 16 Mar 2010 01:07:51 +0000 (01:07 +0000)]
route: Fix caught BUG_ON during rt_secret_rebuild_oneshot()

route: Fix caught BUG_ON during rt_secret_rebuild_oneshot()

Call rt_secret_rebuild can cause BUG_ON(timer_pending(&net->ipv4.rt_secret_timer)) in
add_timer as there is not any synchronization for call rt_secret_rebuild_oneshot()
for the same net namespace.

Also this issue affects to rt_secret_reschedule().

Thus use mod_timer enstead.

Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge br_multicast: Fix skb leakage in error path.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 15 Mar 2010 19:26:56 +0000 (19:26 +0000)]
bridge br_multicast: Fix skb leakage in error path.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge br_multicast: Fix handling of Max Response Code in IGMPv3 message.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 15 Mar 2010 19:27:00 +0000 (19:27 +0000)]
bridge br_multicast: Fix handling of Max Response Code in IGMPv3 message.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoNET: netpoll, fix potential NULL ptr dereference
Jiri Slaby [Tue, 16 Mar 2010 05:29:54 +0000 (05:29 +0000)]
NET: netpoll, fix potential NULL ptr dereference

Stanse found that one error path in netpoll_setup dereferences npinfo
even though it is NULL. Avoid that by adding new label and go to that
instead.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Daniel Borkmann <danborkmann@googlemail.com>
Cc: David S. Miller <davem@davemloft.net>
Acked-by: chavey@google.com
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotipc: fix lockdep warning on address assignment
Neil Horman [Tue, 16 Mar 2010 08:14:33 +0000 (08:14 +0000)]
tipc: fix lockdep warning on address assignment

So in the forward porting of various tipc packages, I was constantly
getting this lockdep warning everytime I used tipc-config to set a network
address for the protocol:

[ INFO: possible circular locking dependency detected ]
2.6.33 #1
tipc-config/1326 is trying to acquire lock:
(ref_table_lock){+.-...}, at: [<ffffffffa0315148>] tipc_ref_discard+0x53/0xd4 [tipc]

but task is already holding lock:
(&(&entry->lock)->rlock#2){+.-...}, at: [<ffffffffa03150d5>] tipc_ref_lock+0x43/0x63 [tipc]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #1 (&(&entry->lock)->rlock#2){+.-...}:
[<ffffffff8107b508>] __lock_acquire+0xb67/0xd0f
[<ffffffff8107b78c>] lock_acquire+0xdc/0x102
[<ffffffff8145471e>] _raw_spin_lock_bh+0x3b/0x6e
[<ffffffffa03152b1>] tipc_ref_acquire+0xe8/0x11b [tipc]
[<ffffffffa031433f>] tipc_createport_raw+0x78/0x1b9 [tipc]
[<ffffffffa031450b>] tipc_createport+0x8b/0x125 [tipc]
[<ffffffffa030f221>] tipc_subscr_start+0xce/0x126 [tipc]
[<ffffffffa0308fb2>] process_signal_queue+0x47/0x7d [tipc]
[<ffffffff81053e0c>] tasklet_action+0x8c/0xf4
[<ffffffff81054bd8>] __do_softirq+0xf8/0x1cd
[<ffffffff8100aadc>] call_softirq+0x1c/0x30
[<ffffffff810549f4>] _local_bh_enable_ip+0xb8/0xd7
[<ffffffff81054a21>] local_bh_enable_ip+0xe/0x10
[<ffffffff81454d31>] _raw_spin_unlock_bh+0x34/0x39
[<ffffffffa0308eb8>] spin_unlock_bh.clone.0+0x15/0x17 [tipc]
[<ffffffffa0308f47>] tipc_k_signal+0x8d/0xb1 [tipc]
[<ffffffffa0308dd9>] tipc_core_start+0x8a/0xad [tipc]
[<ffffffffa01b1087>] 0xffffffffa01b1087
[<ffffffff8100207d>] do_one_initcall+0x72/0x18a
[<ffffffff810872fb>] sys_init_module+0xd8/0x23a
[<ffffffff81009b42>] system_call_fastpath+0x16/0x1b

-> #0 (ref_table_lock){+.-...}:
[<ffffffff8107b3b2>] __lock_acquire+0xa11/0xd0f
[<ffffffff8107b78c>] lock_acquire+0xdc/0x102
[<ffffffff81454836>] _raw_write_lock_bh+0x3b/0x6e
[<ffffffffa0315148>] tipc_ref_discard+0x53/0xd4 [tipc]
[<ffffffffa03141ee>] tipc_deleteport+0x40/0x119 [tipc]
[<ffffffffa0316e35>] release+0xeb/0x137 [tipc]
[<ffffffff8139dbf4>] sock_release+0x1f/0x6f
[<ffffffff8139dc6b>] sock_close+0x27/0x2b
[<ffffffff811116f6>] __fput+0x12a/0x1df
[<ffffffff811117c5>] fput+0x1a/0x1c
[<ffffffff8110e49b>] filp_close+0x68/0x72
[<ffffffff8110e552>] sys_close+0xad/0xe7
[<ffffffff81009b42>] system_call_fastpath+0x16/0x1b

Finally decided I should fix this.  Its a straightforward inversion,
tipc_ref_acquire takes two locks in this order:
ref_table_lock
entry->lock

while tipc_deleteport takes them in this order:
entry->lock (via tipc_port_lock())
ref_table_lock (via tipc_ref_discard())

when the same entry is referenced, we get the above warning.  The fix is equally
straightforward.  Theres no real relation between the entry->lock and the
ref_table_lock (they just are needed at the same time), so move the entry->lock
aquisition in tipc_ref_acquire down, after we unlock ref_table_lock (this is
safe since the ref_table_lock guards changes to the reference table, and we've
already claimed a slot there.  I've tested the below fix and confirmed that it
clears up the lockdep issue

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Fix UDP socket reference count bugs in the pppol2tp driver
James Chapman [Tue, 16 Mar 2010 06:29:20 +0000 (06:29 +0000)]
l2tp: Fix UDP socket reference count bugs in the pppol2tp driver

This patch fixes UDP socket refcnt bugs in the pppol2tp driver.

A bug can cause a kernel stack trace when a tunnel socket is closed.

A way to reproduce the issue is to prepare the UDP socket for L2TP (by
opening a tunnel pppol2tp socket) and then close it before any L2TP
sessions are added to it. The sequence is

Create UDP socket
Create tunnel pppol2tp socket to prepare UDP socket for L2TP
  pppol2tp_connect: session_id=0, peer_session_id=0
L2TP SCCRP control frame received (tunnel_id==0)
  pppol2tp_recv_core: sock_hold()
  pppol2tp_recv_core: sock_put
L2TP ZLB control frame received (tunnel_id=nnn)
  pppol2tp_recv_core: sock_hold()
  pppol2tp_recv_core: sock_put
Close tunnel management socket
  pppol2tp_release: session_id=0, peer_session_id=0
Close UDP socket
  udp_lib_close: BUG

The addition of sock_hold() in pppol2tp_connect() solves the problem.

For data frames, two sock_put() calls were added to plug a refcnt leak
per received data frame. The ref that is grabbed at the top of
pppol2tp_recv_core() must always be released, but this wasn't done for
accepted data frames or data frames discarded because of bad UDP
checksums. This leak meant that any UDP socket that had passed L2TP
data traffic (i.e. L2TP data frames, not just L2TP control frames)
using pppol2tp would not be released by the kernel.

WARNING: at include/net/sock.h:435 udp_lib_unhash+0x117/0x120()
Pid: 1086, comm: openl2tpd Not tainted 2.6.33-rc1 #8
Call Trace:
 [<c119e9b7>] ? udp_lib_unhash+0x117/0x120
 [<c101b871>] ? warn_slowpath_common+0x71/0xd0
 [<c119e9b7>] ? udp_lib_unhash+0x117/0x120
 [<c101b8e3>] ? warn_slowpath_null+0x13/0x20
 [<c119e9b7>] ? udp_lib_unhash+0x117/0x120
 [<c11598a7>] ? sk_common_release+0x17/0x90
 [<c11a5e33>] ? inet_release+0x33/0x60
 [<c11577b0>] ? sock_release+0x10/0x60
 [<c115780f>] ? sock_close+0xf/0x30
 [<c106e542>] ? __fput+0x52/0x150
 [<c106b68e>] ? filp_close+0x3e/0x70
 [<c101d2e2>] ? put_files_struct+0x62/0xb0
 [<c101eaf7>] ? do_exit+0x5e7/0x650
 [<c1081623>] ? mntput_no_expire+0x13/0x70
 [<c106b68e>] ? filp_close+0x3e/0x70
 [<c101eb8a>] ? do_group_exit+0x2a/0x70
 [<c101ebe1>] ? sys_exit_group+0x11/0x20
 [<c10029b0>] ? sysenter_do_call+0x12/0x26

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosmsc95xx: wait for PHY to complete reset during init
Steve Glendinning [Tue, 16 Mar 2010 09:03:06 +0000 (09:03 +0000)]
smsc95xx: wait for PHY to complete reset during init

This patch ensures the PHY correctly completes its reset before
setting register values.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agol2tp: Fix oops in pppol2tp_xmit
James Chapman [Tue, 16 Mar 2010 06:46:31 +0000 (06:46 +0000)]
l2tp: Fix oops in pppol2tp_xmit

When transmitting L2TP frames, we derive the outgoing interface's UDP
checksum hardware assist capabilities from the tunnel dst dev. This
can sometimes be NULL, especially when routing protocols are used and
routing changes occur. This patch just checks for NULL dst or dev
pointers when checking for netdev hardware assist features.

BUG: unable to handle kernel NULL pointer dereference at 0000000c
IP: [<f89d074c>] pppol2tp_xmit+0x341/0x4da [pppol2tp]
*pde = 00000000
Oops: 0000 [#1] SMP
last sysfs file: /sys/class/net/lo/operstate
Modules linked in: pppol2tp pppox ppp_generic slhc ipv6 dummy loop snd_hda_codec_atihdmi snd_hda_intel snd_hda_codec snd_pcm snd_timer snd soundcore snd_page_alloc evdev psmouse serio_raw processor button i2c_piix4 i2c_core ati_agp agpgart pcspkr ext3 jbd mbcache sd_mod ide_pci_generic atiixp ide_core ahci ata_generic floppy ehci_hcd ohci_hcd libata e1000e scsi_mod usbcore nls_base thermal fan thermal_sys [last unloaded: scsi_wait_scan]

Pid: 0, comm: swapper Not tainted (2.6.32.8 #1)
EIP: 0060:[<f89d074c>] EFLAGS: 00010297 CPU: 3
EIP is at pppol2tp_xmit+0x341/0x4da [pppol2tp]
EAX: 00000000 EBX: f64d1680 ECX: 000005b9 EDX: 00000000
ESI: f6b91850 EDI: f64d16ac EBP: f6a0c4c0 ESP: f70a9cac
 DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process swapper (pid: 0, ti=f70a8000 task=f70a31c0 task.ti=f70a8000)
Stack:
 000005a9 000005b9 f734c400 f66652c0 f7352e00 f67dc800 00000000 f6b91800
<0> 000005a3 f70ef6c4 f67dcda9 000005a3 f89b192e 00000246 000005a3 f64d1680
<0> f63633e0 f6363320 f64d1680 f65a7320 f65a7364 f65856c0 f64d1680 f679f02f
Call Trace:
 [<f89b192e>] ? ppp_push+0x459/0x50e [ppp_generic]
 [<f89b217f>] ? ppp_xmit_process+0x3b6/0x430 [ppp_generic]
 [<f89b2306>] ? ppp_start_xmit+0x10d/0x120 [ppp_generic]
 [<c11c15cb>] ? dev_hard_start_xmit+0x21f/0x2b2
 [<c11d0947>] ? sch_direct_xmit+0x48/0x10e
 [<c11c19a0>] ? dev_queue_xmit+0x263/0x3a6
 [<c11e2a9f>] ? ip_finish_output+0x1f7/0x221
 [<c11df682>] ? ip_forward_finish+0x2e/0x30
 [<c11de645>] ? ip_rcv_finish+0x295/0x2a9
 [<c11c0b19>] ? netif_receive_skb+0x3e9/0x404
 [<f814b791>] ? e1000_clean_rx_irq+0x253/0x2fc [e1000e]
 [<f814cb7a>] ? e1000_clean+0x63/0x1fc [e1000e]
 [<c1047eff>] ? sched_clock_local+0x15/0x11b
 [<c11c1095>] ? net_rx_action+0x96/0x195
 [<c1035750>] ? __do_softirq+0xaa/0x151
 [<c1035828>] ? do_softirq+0x31/0x3c
 [<c10358fe>] ? irq_exit+0x26/0x58
 [<c1004b21>] ? do_IRQ+0x78/0x89
 [<c1003729>] ? common_interrupt+0x29/0x30
 [<c101ac28>] ? native_safe_halt+0x2/0x3
 [<c1008c54>] ? default_idle+0x55/0x75
 [<c1009045>] ? c1e_idle+0xd2/0xd5
 [<c100233c>] ? cpu_idle+0x46/0x62
Code: 8d 45 08 f0 ff 45 08 89 6b 08 c7 43 68 7e fb 9c f8 8a 45 24 83 e0 0c 3c 04 75 09 80 63 64 f3 e9 b4 00 00 00 8b 43 18 8b 4c 24 04 <8b> 40 0c 8d 79 11 f6 40 44 0e 8a 43 64 75 51 6a 00 8b 4c 24 08
EIP: [<f89d074c>] pppol2tp_xmit+0x341/0x4da [pppol2tp] SS:ESP 0068:f70a9cac
CR2: 000000000000000c

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosmsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver
Steve Glendinning [Tue, 16 Mar 2010 08:46:46 +0000 (08:46 +0000)]
smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver

This patch adds a driver for SMSC's LAN7500 family of USB 2.0
to gigabit ethernet adapters.  It's loosely based on the smsc95xx
driver but the device registers for LAN7500 are completely different.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agone: Do not use slashes in irq name string
Atsushi Nemoto [Tue, 16 Mar 2010 05:27:40 +0000 (05:27 +0000)]
ne: Do not use slashes in irq name string

This patch fixes following warning introduced by commit
12bac0d9f4dbf3445a0319beee848d15fa32775e ("proc: warn on non-existing
proc entries"):

WARNING: at /work/mips-linux/make/linux/fs/proc/generic.c:316 __xlate_proc_name+0xe0/0xe8()
name 'RBHMA4X00/RTL8019'

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoNET: ksz884x, fix lock imbalance
Jiri Slaby [Tue, 16 Mar 2010 04:53:50 +0000 (04:53 +0000)]
NET: ksz884x, fix lock imbalance

Stanse found that one error path (when alloc_skb fails) in netdev_tx
omits to unlock hw_priv->hwlock. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tristram Ha <Tristram.Ha@micrel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>