]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge commit 'refs/next/20120410/regmap'
Stephen Rothwell [Wed, 11 Apr 2012 04:14:06 +0000 (14:14 +1000)]
Merge commit 'refs/next/20120410/regmap'

12 years agoMerge remote-tracking branch 'xen-two/linux-next'
Stephen Rothwell [Wed, 11 Apr 2012 04:03:51 +0000 (14:03 +1000)]
Merge remote-tracking branch 'xen-two/linux-next'

Conflicts:
arch/x86/include/asm/io_apic.h
arch/x86/kernel/apic/io_apic.c

12 years agoMerge remote-tracking branch 'xen/upstream/xen'
Stephen Rothwell [Wed, 11 Apr 2012 04:03:43 +0000 (14:03 +1000)]
Merge remote-tracking branch 'xen/upstream/xen'

Conflicts:
arch/x86/include/asm/cmpxchg.h

12 years agoMerge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Wed, 11 Apr 2012 03:56:08 +0000 (13:56 +1000)]
Merge remote-tracking branch 'tip/auto-latest'

Conflicts:
Documentation/feature-removal-schedule.txt

12 years agoMerge remote-tracking branch 'spi/spi/next'
Stephen Rothwell [Wed, 11 Apr 2012 03:54:31 +0000 (13:54 +1000)]
Merge remote-tracking branch 'spi/spi/next'

12 years agoMerge remote-tracking branch 'edac-amd/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 03:54:25 +0000 (13:54 +1000)]
Merge remote-tracking branch 'edac-amd/for-next'

12 years agoMerge remote-tracking branch 'fsnotify/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 03:52:47 +0000 (13:52 +1000)]
Merge remote-tracking branch 'fsnotify/for-next'

12 years agoMerge remote-tracking branch 'trivial/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 03:51:03 +0000 (13:51 +1000)]
Merge remote-tracking branch 'trivial/for-next'

12 years agoMerge remote-tracking branch 'selinux/master'
Stephen Rothwell [Wed, 11 Apr 2012 03:49:10 +0000 (13:49 +1000)]
Merge remote-tracking branch 'selinux/master'

12 years agoMerge remote-tracking branch 'security/next'
Stephen Rothwell [Wed, 11 Apr 2012 03:47:39 +0000 (13:47 +1000)]
Merge remote-tracking branch 'security/next'

12 years agoMerge remote-tracking branch 'regulator/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 03:46:11 +0000 (13:46 +1000)]
Merge remote-tracking branch 'regulator/for-next'

12 years agoMerge remote-tracking branch 'fbdev/fbdev-next'
Stephen Rothwell [Wed, 11 Apr 2012 03:44:40 +0000 (13:44 +1000)]
Merge remote-tracking branch 'fbdev/fbdev-next'

12 years agoMerge commit 'refs/next/20120410/md'
Stephen Rothwell [Wed, 11 Apr 2012 03:42:21 +0000 (13:42 +1000)]
Merge commit 'refs/next/20120410/md'

12 years agoMerge remote-tracking branch 'slab/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 03:24:58 +0000 (13:24 +1000)]
Merge remote-tracking branch 'slab/for-next'

12 years agoMerge remote-tracking branch 'mmc/mmc-next'
Stephen Rothwell [Wed, 11 Apr 2012 03:23:26 +0000 (13:23 +1000)]
Merge remote-tracking branch 'mmc/mmc-next'

12 years agoMerge branch 'quilt/device-mapper'
Stephen Rothwell [Wed, 11 Apr 2012 03:23:13 +0000 (13:23 +1000)]
Merge branch 'quilt/device-mapper'

12 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 03:19:07 +0000 (13:19 +1000)]
Merge remote-tracking branch 'cgroup/for-next'

12 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Wed, 11 Apr 2012 03:17:32 +0000 (13:17 +1000)]
Merge remote-tracking branch 'input/next'

12 years agoMerge branch 'quilt/rr'
Stephen Rothwell [Wed, 11 Apr 2012 03:16:03 +0000 (13:16 +1000)]
Merge branch 'quilt/rr'

Conflicts:
arch/arm/kernel/kprobes.c
drivers/virtio/virtio_balloon.c
init/main.c

12 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 03:04:14 +0000 (13:04 +1000)]
Merge remote-tracking branch 'sound-asoc/for-next'

12 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 03:02:40 +0000 (13:02 +1000)]
Merge remote-tracking branch 'sound/for-next'

12 years agoMerge remote-tracking branch 'crypto/master'
Stephen Rothwell [Wed, 11 Apr 2012 03:01:12 +0000 (13:01 +1000)]
Merge remote-tracking branch 'crypto/master'

12 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Wed, 11 Apr 2012 02:59:44 +0000 (12:59 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

12 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Wed, 11 Apr 2012 02:58:14 +0000 (12:58 +1000)]
Merge remote-tracking branch 'bluetooth/master'

12 years agoMerge remote-tracking branch 'wireless-next/master'
Stephen Rothwell [Wed, 11 Apr 2012 02:56:24 +0000 (12:56 +1000)]
Merge remote-tracking branch 'wireless-next/master'

Conflicts:
drivers/net/wireless/iwlwifi/iwl-testmode.c
net/wireless/nl80211.c

12 years agoMerge remote-tracking branch 'net-next/master'
Stephen Rothwell [Wed, 11 Apr 2012 02:21:14 +0000 (12:21 +1000)]
Merge remote-tracking branch 'net-next/master'

12 years agoMerge remote-tracking branch 'dmaengine/next'
Stephen Rothwell [Wed, 11 Apr 2012 02:17:21 +0000 (12:17 +1000)]
Merge remote-tracking branch 'dmaengine/next'

12 years agoMerge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Wed, 11 Apr 2012 02:15:52 +0000 (12:15 +1000)]
Merge remote-tracking branch 'slave-dma/next'

12 years agoMerge remote-tracking branch 'isci/all'
Stephen Rothwell [Wed, 11 Apr 2012 02:14:17 +0000 (12:14 +1000)]
Merge remote-tracking branch 'isci/all'

12 years agoMerge remote-tracking branch 'target-merge/for-next-merge'
Stephen Rothwell [Wed, 11 Apr 2012 02:12:42 +0000 (12:12 +1000)]
Merge remote-tracking branch 'target-merge/for-next-merge'

12 years agoMerge remote-tracking branch 'ieee1394/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 02:12:24 +0000 (12:12 +1000)]
Merge remote-tracking branch 'ieee1394/for-next'

12 years agoMerge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 02:12:12 +0000 (12:12 +1000)]
Merge remote-tracking branch 'kconfig/for-next'

12 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 02:12:09 +0000 (12:12 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

12 years agoMerge commit 'refs/next/20120410/v4l-dvb'
Stephen Rothwell [Wed, 11 Apr 2012 02:10:30 +0000 (12:10 +1000)]
Merge commit 'refs/next/20120410/v4l-dvb'

12 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Wed, 11 Apr 2012 01:53:36 +0000 (11:53 +1000)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

12 years agoMerge branch 'quilt/jdelvare-hwmon'
Stephen Rothwell [Wed, 11 Apr 2012 01:53:35 +0000 (11:53 +1000)]
Merge branch 'quilt/jdelvare-hwmon'

12 years agoMerge remote-tracking branch 'bjdooks-i2c/next-i2c'
Stephen Rothwell [Wed, 11 Apr 2012 01:53:32 +0000 (11:53 +1000)]
Merge remote-tracking branch 'bjdooks-i2c/next-i2c'

Conflicts:
drivers/i2c/busses/i2c-omap.c

12 years agoMerge branch 'quilt/i2c'
Stephen Rothwell [Wed, 11 Apr 2012 01:52:05 +0000 (11:52 +1000)]
Merge branch 'quilt/i2c'

12 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 01:50:40 +0000 (11:50 +1000)]
Merge remote-tracking branch 'hid/for-next'

12 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Wed, 11 Apr 2012 01:49:08 +0000 (11:49 +1000)]
Merge remote-tracking branch 'nfs/linux-next'

12 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Wed, 11 Apr 2012 01:47:43 +0000 (11:47 +1000)]
Merge remote-tracking branch 'logfs/master'

12 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Wed, 11 Apr 2012 01:46:19 +0000 (11:46 +1000)]
Merge remote-tracking branch 'gfs2/master'

12 years agoMerge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 01:44:55 +0000 (11:44 +1000)]
Merge remote-tracking branch 'fuse/for-next'

12 years agoMerge remote-tracking branch 'ext3/for_next'
Stephen Rothwell [Wed, 11 Apr 2012 01:43:29 +0000 (11:43 +1000)]
Merge remote-tracking branch 'ext3/for_next'

12 years agoMerge remote-tracking branch 'ecryptfs/next'
Stephen Rothwell [Wed, 11 Apr 2012 01:42:06 +0000 (11:42 +1000)]
Merge remote-tracking branch 'ecryptfs/next'

Conflicts:
fs/ecryptfs/ecryptfs_kernel.h

12 years agoMerge remote-tracking branch 'tile/master'
Stephen Rothwell [Wed, 11 Apr 2012 01:35:59 +0000 (11:35 +1000)]
Merge remote-tracking branch 'tile/master'

12 years agoMerge remote-tracking branch 'sparc-next/master'
Stephen Rothwell [Wed, 11 Apr 2012 01:34:37 +0000 (11:34 +1000)]
Merge remote-tracking branch 'sparc-next/master'

12 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Wed, 11 Apr 2012 01:33:15 +0000 (11:33 +1000)]
Merge remote-tracking branch 'sh/sh-latest'

12 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Wed, 11 Apr 2012 01:31:48 +0000 (11:31 +1000)]
Merge remote-tracking branch 's390/features'

12 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Wed, 11 Apr 2012 01:31:46 +0000 (11:31 +1000)]
Merge remote-tracking branch 'mpc5xxx/next'

12 years agoMerge remote-tracking branch 'parisc/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 01:31:44 +0000 (11:31 +1000)]
Merge remote-tracking branch 'parisc/for-next'

12 years agoMerge remote-tracking branch 'openrisc/for-upstream'
Stephen Rothwell [Wed, 11 Apr 2012 01:31:43 +0000 (11:31 +1000)]
Merge remote-tracking branch 'openrisc/for-upstream'

12 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Wed, 11 Apr 2012 01:31:42 +0000 (11:31 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

12 years agoMerge remote-tracking branch 'm68knommu/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 01:30:18 +0000 (11:30 +1000)]
Merge remote-tracking branch 'm68knommu/for-next'

12 years agoMerge remote-tracking branch 'm68k/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 01:28:54 +0000 (11:28 +1000)]
Merge remote-tracking branch 'm68k/for-next'

12 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Wed, 11 Apr 2012 01:27:31 +0000 (11:27 +1000)]
Merge remote-tracking branch 'ia64/next'

12 years agoMerge branch 'quilt/hexagon'
Stephen Rothwell [Wed, 11 Apr 2012 01:26:07 +0000 (11:26 +1000)]
Merge branch 'quilt/hexagon'

Conflicts:
arch/hexagon/Kconfig

12 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 01:24:39 +0000 (11:24 +1000)]
Merge remote-tracking branch 'cris/for-next'

12 years agoMerge remote-tracking branch 's5p/for-next'
Stephen Rothwell [Wed, 11 Apr 2012 01:23:15 +0000 (11:23 +1000)]
Merge remote-tracking branch 's5p/for-next'

12 years agoMerge remote-tracking branch 'gpio-current/gpio/merge'
Stephen Rothwell [Wed, 11 Apr 2012 01:16:13 +0000 (11:16 +1000)]
Merge remote-tracking branch 'gpio-current/gpio/merge'

12 years agoMerge remote-tracking branch 'spi-current/spi/merge'
Stephen Rothwell [Wed, 11 Apr 2012 01:16:13 +0000 (11:16 +1000)]
Merge remote-tracking branch 'spi-current/spi/merge'

12 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Wed, 11 Apr 2012 01:16:12 +0000 (11:16 +1000)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

12 years agoMerge remote-tracking branch 'irqdomain-current/irqdomain/merge'
Stephen Rothwell [Wed, 11 Apr 2012 01:16:11 +0000 (11:16 +1000)]
Merge remote-tracking branch 'irqdomain-current/irqdomain/merge'

12 years agoMerge remote-tracking branch 'crypto-current/master'
Stephen Rothwell [Wed, 11 Apr 2012 01:16:05 +0000 (11:16 +1000)]
Merge remote-tracking branch 'crypto-current/master'

12 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Wed, 11 Apr 2012 01:16:01 +0000 (11:16 +1000)]
Merge remote-tracking branch 'input-current/for-linus'

12 years agoMerge remote-tracking branch 'staging.current/staging-linus'
Stephen Rothwell [Wed, 11 Apr 2012 01:16:00 +0000 (11:16 +1000)]
Merge remote-tracking branch 'staging.current/staging-linus'

12 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Wed, 11 Apr 2012 01:15:59 +0000 (11:15 +1000)]
Merge remote-tracking branch 'usb.current/usb-linus'

12 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Stephen Rothwell [Wed, 11 Apr 2012 01:15:59 +0000 (11:15 +1000)]
Merge remote-tracking branch 'tty.current/tty-linus'

12 years agoMerge remote-tracking branch 'driver-core.current/driver-core-linus'
Stephen Rothwell [Wed, 11 Apr 2012 01:15:58 +0000 (11:15 +1000)]
Merge remote-tracking branch 'driver-core.current/driver-core-linus'

12 years agoMerge remote-tracking branch 'wireless/master'
Stephen Rothwell [Wed, 11 Apr 2012 01:15:57 +0000 (11:15 +1000)]
Merge remote-tracking branch 'wireless/master'

12 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Wed, 11 Apr 2012 01:15:57 +0000 (11:15 +1000)]
Merge remote-tracking branch 'sound-current/for-linus'

12 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Wed, 11 Apr 2012 01:15:56 +0000 (11:15 +1000)]
Merge remote-tracking branch 'net/master'

12 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Wed, 11 Apr 2012 01:15:54 +0000 (11:15 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

12 years agoirq_domain: Fix debug output to use "irq" instead of "virq"
Grant Likely [Tue, 10 Apr 2012 23:48:42 +0000 (17:48 -0600)]
irq_domain: Fix debug output to use "irq" instead of "virq"

Back when irq_domain was a powerpc-only thing, the term "virq", or
virtual irq, was used to differentiate irq numbers from hardware irq
numbers.  However, virqs are synonymous with Linux irq numbers, so
using a different term is confusing.  This patch changes the debug
output to use the header "irq" instead of "virq" for the irq number
output column.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoirq_domain: fix formatting of chip data pointer in virq_debug_show()
Mika Westerberg [Tue, 10 Apr 2012 12:25:43 +0000 (15:25 +0300)]
irq_domain: fix formatting of chip data pointer in virq_debug_show()

On 32-bit machines reading the /sys/kernel/debug/irq_domain_mapping file
outputs following:

virq   hwirq    chip name        chip data           domain name
    9  0x00000  IO-APIC          0x        c175a0f8  none
   10  0x00000  IO-APIC          0x        c175a108  none
   11  0x00000  IO-APIC          0x        c175a118  none
...

which looks a bit funny. Fix that with filling the gap with zeroes instead
of spaces.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoirq_domain: correct the debugfs file name
Mika Westerberg [Tue, 10 Apr 2012 12:25:42 +0000 (15:25 +0300)]
irq_domain: correct the debugfs file name

The actual name of the irq_domain mapping debugfs file is
"irq_domain_mapping" not "virq_mapping".

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoirq: Kill pointless irqd_to_hw export
Grant Likely [Tue, 3 Apr 2012 13:11:04 +0000 (07:11 -0600)]
irq: Kill pointless irqd_to_hw export

It makes no sense to export this trivial function.  Make it a static inline
instead.

This patch also drops virq_to_hw from arch/c6x since it is unused by that
architecture.

v2: Move irq_hw_number_t into types.h to fix ARM build failure

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agoirq/irq_domain: Quit ignoring error returns from irq_alloc_desc_from().
David Daney [Thu, 5 Apr 2012 23:52:13 +0000 (16:52 -0700)]
irq/irq_domain: Quit ignoring error returns from irq_alloc_desc_from().

In commit 4bbdd45a (irq_domain/powerpc: eliminate irq_map; use
irq_alloc_desc() instead) code was added that ignores error returns
from irq_alloc_desc_from() by (silently) casting the return value to
unsigned.  The negitive value error return now suddenly looks like a
valid irq number.

Commits cc79ca69 (irq_domain: Move irq_domain code from powerpc to
kernel/irq) and 1bc04f2c (irq_domain: Add support for base irq and
hwirq in legacy mappings) move this code to its current location in
irqdomain.c

The result of all of this is a null pointer dereference OOPS if one of
the error cases is hit.

The fix: Don't cast away the negativeness of the return value and then
check for errors.

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
[grant.likely: dropped addition of new 'irq' variable]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoMerge branch 'for-3.5' into asoc-next
Mark Brown [Tue, 10 Apr 2012 21:53:34 +0000 (22:53 +0100)]
Merge branch 'for-3.5' into asoc-next

12 years agokobject: provide more diagnostic info for kobject_add_internal() failures
Dan Williams [Fri, 6 Apr 2012 20:41:15 +0000 (13:41 -0700)]
kobject: provide more diagnostic info for kobject_add_internal() failures

1/ convert open-coded KERN_ERR+dump_stack() to WARN(), so that automated
   tools pick up this warning.

2/ include the 'child' and 'parent' kobject names.  This information was
   useful for tracking down the case where scsi invoked device_del() on a
   parent object and subsequently invoked device_add() on a child.  Now the
   warning looks like:

     kobject_add_internal failed for target8:0:16 (error: -2 parent: end_device-8:0:24)
     Pid: 2942, comm: scsi_scan_8 Not tainted 3.3.0-rc7-isci+ #2
     Call Trace:
      [<ffffffff8125e551>] kobject_add_internal+0x1c1/0x1f3
      [<ffffffff81075149>] ? trace_hardirqs_on+0xd/0xf
      [<ffffffff8125e659>] kobject_add_varg+0x41/0x50
      [<ffffffff8125e723>] kobject_add+0x64/0x66
      [<ffffffff8131124b>] device_add+0x12d/0x63a
      [<ffffffff8125e0ef>] ? kobject_put+0x4c/0x50
      [<ffffffff8132f370>] scsi_sysfs_add_sdev+0x4e/0x28a
      [<ffffffff8132dce3>] do_scan_async+0x9c/0x145

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: James Bottomley <JBottomley@parallels.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agosysfs: handle 'parent deleted before child added'
Dan Williams [Fri, 6 Apr 2012 20:41:06 +0000 (13:41 -0700)]
sysfs: handle 'parent deleted before child added'

In scsi at least two cases of the parent device being deleted before the
child is added have been observed.

1/ scsi is performing async scans and the device is removed prior to the
   async can thread running (can happen with an in-opportune / unlikely
   unplug during initial scan).

2/ libsas discovery event running after the parent port has been torn
   down (this is a bug in libsas).

Result in crash signatures like:
 BUG: unable to handle kernel NULL pointer dereference at 0000000000000098
 IP: [<ffffffff8115e100>] sysfs_create_dir+0x32/0xb6
 ...
 Process scsi_scan_8 (pid: 5417, threadinfo ffff88080bd16000, task ffff880801b8a0b0)
 Stack:
  00000000fffffffe ffff880813470628 ffff88080bd17cd0 ffff88080614b7e8
  ffff88080b45c108 00000000fffffffe ffff88080bd17d20 ffffffff8125e4a8
  ffff88080bd17cf0 ffffffff81075149 ffff88080bd17d30 ffff88080614b7e8
 Call Trace:
  [<ffffffff8125e4a8>] kobject_add_internal+0x120/0x1e3
  [<ffffffff81075149>] ? trace_hardirqs_on+0xd/0xf
  [<ffffffff8125e641>] kobject_add_varg+0x41/0x50
  [<ffffffff8125e70b>] kobject_add+0x64/0x66
  [<ffffffff8131122b>] device_add+0x12d/0x63a

In this scenario the parent is still valid (because we have a
reference), but it has been device_del()'d which means its kobj->sd
pointer is NULL'd via:

 device_del()->kobject_del()->sysfs_remove_dir()

...and then sysfs_create_dir() (without this fix) goes ahead and
de-references parent_sd via sysfs_ns_type():

 return (sd->s_flags & SYSFS_NS_TYPE_MASK) >> SYSFS_NS_TYPE_SHIFT;

This scenario is being fixed in scsi/libsas, but if other subsystems
present the same ordering the system need not immediately crash.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: James Bottomley <JBottomley@parallels.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agosysfs: Prevent crash on unset sysfs group attributes
Bruno Prémont [Tue, 3 Apr 2012 07:59:48 +0000 (09:59 +0200)]
sysfs: Prevent crash on unset sysfs group attributes

Do not let the kernel crash when a device is registered with
sysfs while group attributes are not set (aka NULL).

Warn about the offender with some information about the offending
device.

This would warn instead of trying NULL pointer deref like:
 BUG: unable to handle kernel NULL pointer dereference at (null)
 IP: [<ffffffff81152673>] internal_create_group+0x83/0x1a0
 PGD 0
 Oops: 0000 [#1] SMP
 CPU 0
 Modules linked in:

 Pid: 1, comm: swapper/0 Not tainted 3.4.0-rc1-x86_64 #3 HP ProLiant DL360 G4
 RIP: 0010:[<ffffffff81152673>]  [<ffffffff81152673>] internal_create_group+0x83/0x1a0
 RSP: 0018:ffff88019485fd70  EFLAGS: 00010202
 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000001
 RDX: ffff880192e99908 RSI: ffff880192e99630 RDI: ffffffff81a26c60
 RBP: ffff88019485fdc0 R08: 0000000000000000 R09: 0000000000000000
 R10: ffff880192e99908 R11: 0000000000000000 R12: ffffffff81a16a00
 R13: ffff880192e99908 R14: ffffffff81a16900 R15: 0000000000000000
 FS:  0000000000000000(0000) GS:ffff88019bc00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
 CR2: 0000000000000000 CR3: 0000000001a0c000 CR4: 00000000000007f0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
 Process swapper/0 (pid: 1, threadinfo ffff88019485e000, task ffff880194878000)
 Stack:
  ffff88019485fdd0 ffff880192da9d60 0000000000000000 ffff880192e99908
  ffff880192e995d8 0000000000000001 ffffffff81a16a00 ffff880192da9d60
  0000000000000000 0000000000000000 ffff88019485fdd0 ffffffff811527be
 Call Trace:
  [<ffffffff811527be>] sysfs_create_group+0xe/0x10
  [<ffffffff81376ca6>] device_add_groups+0x46/0x80
  [<ffffffff81377d3d>] device_add+0x46d/0x6a0
  ...

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoASoC: wm9712: Fix build due to missing definition of "runtime"
Fabio Estevam [Tue, 10 Apr 2012 21:33:07 +0000 (18:33 -0300)]
ASoC: wm9712: Fix build due to missing definition of "runtime"

Fix the following build error:

sound/soc/codecs/wm9712.c:482:32: error: 'runtime' undeclared (first use in this function)
sound/soc/codecs/wm9712.c:499:33: error: 'runtime' undeclared (first use in this function)

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: tegra: utils: Don't use of_have_populated_dt()
Stephen Warren [Tue, 10 Apr 2012 19:11:17 +0000 (13:11 -0600)]
ASoC: tegra: utils: Don't use of_have_populated_dt()

Recent list discussions concluded that drivers should not be calling
of_have_populated_dt(), and hence of_have_populated_dt() should not be
exported. Use a different mechanism to detect DT vs. non-DT boot.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoof/irq: add empty irq_of_parse_and_map() for non-dt builds
Thomas Abraham [Sun, 25 Mar 2012 15:02:49 +0000 (20:32 +0530)]
of/irq: add empty irq_of_parse_and_map() for non-dt builds

Add a empty irq_of_parse_and_map() function that returns 0 for non-dt
builds and avoid having #ifdef CONFIG_OF around all calls to
irq_of_parse_and_map(). In addition to that, the irq_of_parse_and_map()
function declaration is made available only if CONFIG_OF_IRQ is defined,
which is the same config option that makes the irq_of_parse_and_map()
function definition available. While at it, fix a typo as well.

Changes since v1:
- Moved irq_of_parse_and_map() function declaration under CONFIG_OF_IRQ.
- Fix a minor typo in comments.

Suggested-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoUSB: serial: fix race between probe and open
Johan Hovold [Tue, 20 Mar 2012 15:59:33 +0000 (16:59 +0100)]
USB: serial: fix race between probe and open

Fix race between probe and open by making sure that the disconnected
flag is not cleared until all ports have been registered.

A call to tty_open while probe is running may get a reference to the
serial structure in serial_install before its ports have been
registered. This may lead to usb_serial_core calling driver open before
port is fully initialised.

With ftdi_sio this result in the following NULL-pointer dereference as
the private data has not been initialised at open:

[  199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698297] *pde = 00000000
[  199.698303] Oops: 0000 [#1] PREEMPT SMP
[  199.698313] Modules linked in: ftdi_sio usbserial
[  199.698323]
[  199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J
[  199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0
[  199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600
[  199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc
[  199.698356]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000)
[  199.698364] Stack:
[  199.698368]  f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800
[  199.698387]  00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222
[  199.698479]  22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab
[  199.698496] Call Trace:
[  199.698504]  [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial]
[  199.698511]  [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial]
[  199.698521]  [<c126380c>] tty_port_open+0x7c/0xd0
[  199.698527]  [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial]
[  199.698534]  [<f806e76f>] serial_open+0x2f/0x70 [usbserial]
[  199.698540]  [<c125d07c>] tty_open+0x20c/0x510
[  199.698546]  [<c10e9eb7>] chrdev_open+0xe7/0x230
[  199.698553]  [<c10e48f2>] __dentry_open+0x1f2/0x390
[  199.698559]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698565]  [<c10e4b76>] nameidata_to_filp+0x66/0x80
[  199.698570]  [<c10e9dd0>] ? cdev_put+0x20/0x20
[  199.698576]  [<c10f3e08>] do_last+0x198/0x730
[  199.698581]  [<c10f4440>] path_openat+0xa0/0x350
[  199.698587]  [<c10f47d5>] do_filp_open+0x35/0x80
[  199.698593]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698599]  [<c10ff110>] ? alloc_fd+0xc0/0x100
[  199.698605]  [<c10f0b72>] ? getname_flags+0x72/0x120
[  199.698611]  [<c10e4450>] do_sys_open+0xf0/0x1c0
[  199.698617]  [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10
[  199.698623]  [<c10e458e>] sys_open+0x2e/0x40
[  199.698628]  [<c144c990>] sysenter_do_call+0x12/0x36
[  199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24
[  199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc
[  199.698893] CR2: 0000000000000078
[  199.698925] ---[ end trace 77c43ec023940cff ]---

Reported-and-tested-by: Ken Huang <csuhgw@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agogpio: Fix range check in of_gpio_simple_xlate()
Roland Stigge [Wed, 4 Apr 2012 00:02:58 +0000 (02:02 +0200)]
gpio: Fix range check in of_gpio_simple_xlate()

of_gpio_simple_xlate() has an off-by-one bug where it checks to see if
args[0] is > ngpio instead of >=.  args[0] must always be less than
ngpio because it is a zero-based enumeration.

Signed-off-by: Roland Stigge <stigge@antcom.de>
[grant.likely: beef up commit text]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio: Fix uninitialized variable bit in adp5588_irq_handler
Axel Lin [Fri, 6 Apr 2012 12:37:43 +0000 (20:37 +0800)]
gpio: Fix uninitialized variable bit in adp5588_irq_handler

The variable 'bit' is uninitialized in the first iteration of for
loop. Fix it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/sodaville: Convert sodaville driver to new irqdomain API
Grant Likely [Wed, 28 Mar 2012 20:55:04 +0000 (14:55 -0600)]
gpio/sodaville: Convert sodaville driver to new irqdomain API

The irqdomain api changed significantly in v3.4 which caused a build
failure for this driver.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Hans J. Koch <hjk@linutronix.de>
Cc: Torben Hohn <torbenh@linutronix.de>
12 years agospi/devicetree: Move devicetree support code into spi directory
Grant Likely [Sat, 7 Apr 2012 20:16:53 +0000 (14:16 -0600)]
spi/devicetree: Move devicetree support code into spi directory

The SPI device tree support code isn't shared by any other subsystem.  It can
be moved into the core drivers/spi directory and the exported symbol can be
removed.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
12 years agospi: use module_pci_driver
Axel Lin [Wed, 4 Apr 2012 14:29:32 +0000 (22:29 +0800)]
spi: use module_pci_driver

This patch converts the drivers in drivers/spi/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agospi/omap2-mcspi: Trivial optimisation
Shubhrajyoti D [Thu, 29 Mar 2012 16:41:07 +0000 (22:11 +0530)]
spi/omap2-mcspi: Trivial optimisation

Trivial optimisation of tmp variable by directly writing the value
to the register.

Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
12 years agospi: omap2-mcspi: add support for pm_runtime autosuspend
Shubhrajyoti D [Mon, 26 Mar 2012 11:34:22 +0000 (17:04 +0530)]
spi: omap2-mcspi: add support for pm_runtime autosuspend

Adds support for configuring the omap2-mcspi driver use autosuspend for
runtime power management. This can reduce the latency in starting an
spi transfer by not suspending the device immediately following
completion of a transfer. If another transfer then takes place before
the autosuspend timeout (2 secs), the call to resume the device can
return immediately saving some save/ restore cycles.

Acked-by: Govindraj.R <govindraj.raja@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
12 years agospi/omap: Remove bus_num usage for instance index
Benoit Cousson [Mon, 26 Mar 2012 10:02:33 +0000 (15:32 +0530)]
spi/omap: Remove bus_num usage for instance index

bus_num was used to reference the mcspi controller instance in a fixed array.
Remove this array and store this information directly inside drvdata structure.

bus_num is now just set if the pdev->id is present or with -1 for dynamic
allocation by SPI core, but the driver does not access it anymore.

Clean some bad comments format, and remove un-needed space.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
[Cleanup the OMAP2_MCSPI_MAX_CTRL macro as it is not needed anymore]
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
12 years agoMerge branch 'spi' of git://gitorious.org/linus-tree/linus-tree into spi/next
Grant Likely [Tue, 10 Apr 2012 20:09:52 +0000 (14:09 -0600)]
Merge branch 'spi' of git://gitorious.org/linus-tree/linus-tree into spi/next

12 years agob43: claim support for IBSS RSN
Antonio Quartulli [Sat, 31 Mar 2012 21:35:40 +0000 (00:35 +0300)]
b43: claim support for IBSS RSN

The driver now claims to support IBSS/RSN. Group key configuration in hardware
is skipped. Software encryption is used for multicast communications.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years ago{nl,cfg}80211: Support for mesh synchronization
Javier Cardona [Sat, 31 Mar 2012 18:31:33 +0000 (11:31 -0700)]
{nl,cfg}80211: Support for mesh synchronization

Report Toffset to userspace.
Let userspace select the mesh synchronization method.

Signed-off-by: Marco Porsch <marco.porsch@s2005.tu-chemnitz.de>
Signed-off-by: Pavel Zubarev <pavel.zubarev@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Implement mesh synchronization framework
Javier Cardona [Sat, 31 Mar 2012 18:31:32 +0000 (11:31 -0700)]
mac80211: Implement mesh synchronization framework

This patch adds MBSS extensible synchronization framework (Sec.
13.13.2 of IEEE Std. 802.11-2012).

The framework is implemented via an ops table which defines the
following functions:

    rx_bcn_presp() - this is called every time a mesh beacon is
received.
    adjust_tbtt() - this is called immediately before a beacon is about
to be transmitted.

The default neighbor offset synchronization defined in the standard is
implemented.  We also provide template functions for vendor specific
methods.

When neighbor offset synchronization is active (which is the default)
mesh neighbors in the same MBSS will track timing offsets to each other
and compensate clock drift.

In our tests we observed that this mesh synchronization implementation
successfully corrected drifts between stations of ~2PPM while
introducing a jitter of ~20us.

It is also possible to test this framework on mac80211_hwsim simulated
phys to see how it behaves under different topologies, over poor links,
etc.

Signed-off-by: Marco Porsch <marco.porsch@s2005.tu-chemnitz.de>
Signed-off-by: Pavel Zubarev <pavel.zubarev@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Allow tsf increments via debugfs
Javier Cardona [Sat, 31 Mar 2012 18:31:31 +0000 (11:31 -0700)]
mac80211: Allow tsf increments via debugfs

Reading and writing back the tsf value via tsf is too slow if one wants
to make small increments to this timer.  With this change you can use
the syntax "+=<some value>" or "-=<some value>" to add or substract a
value from the tsf counter.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211_hwsim: Fill timestamp beacon at the time it is transmitted
Javier Cardona [Sat, 31 Mar 2012 18:31:30 +0000 (11:31 -0700)]
mac80211_hwsim: Fill timestamp beacon at the time it is transmitted

Generate more acurate tsf values in hwsim by setting the tsf value on
trasmitted beacons immediately before they are moved to the rx path.
Also, adjust the beacon timestamp to be the time at which the first byte
of the timestamp is transmitted.

With these changes the observed tsf offset between two hwsim/mesh peers
is 0 (unless the offset is modified via debugfs)

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>