dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

335208 Commits

Author SHA1 Message Date
David S. Miller fb78cdbbf4 Merge branch 'fixes-for-3.7' of git://gitorious.org/linux-can/linux-can
Marc Kleine-Budde says:

====================
here are two patches for the v3.7 release cycle. A patch by Wolfgang Grandegger
for the flexcan driver, which switches off a workaround on the imx6q that is
not needed, because the hardware is not affected by that bug. And a patch by
Stephane Grosjean which updates the pci device table for the peak pci sja1000
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-24 23:16:49 -04:00
Li RongQing 14edd87dc6 ipv6: Set default hoplimit as zero.
Commit a02e4b7dae4551(Demark default hoplimit as zero) only changes the
hoplimit checking condition and default value in ip6_dst_hoplimit, not
zeros all hoplimit default value.

Keep the zeroing ip6_template_metrics[RTAX_HOPLIMIT - 1] to force it as
const, cause as a37e6e344910(net: force dst_default_metrics to const
section)

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-24 23:14:17 -04:00
Peter Korsgaard b2b3392cfc NET_VENDOR_TI: make available for am33xx as well
The cpsw/davinci mdio ip cores are present on am33xx, so make NET_VENDOR_TI
visible for it as well.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-24 23:07:36 -04:00
Veaceslav Falico a2fc66ce9f pch_gbe: fix error handling in pch_gbe_up()
If we fail to allocate rx buffers pool by any reason, we'll just return
with an error, however we've previously successfully requested an irq. Fix
this by releasing the irq before returning the error.

Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-24 23:04:31 -04:00
Linus Torvalds 4864ccbb5a spi: Fixes for v3.7
A bunch of fixes here, mostly minor except for the pl022 which has just
 been a bit of a shambles all round, the recent runtime PM changes have
 as far as I can tell never worked so they're just getting thrown out.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQhpP3AAoJELSic+t+oim9y5sP/2HlUw8SrFWVZNGkyZ/834KV
 3DuTZUEG0NAg39gMmnUiXH3ntfvNQBfWmqz9vJ/6Ec4gfCaXREwRNc4ZtkJuWzs+
 zvVoLJLgJ0FxxVP9Ul6K5lb4iPfAupu4up2TjlMWctRFJ0Og+Q68wqK/I58r9YGQ
 XhhCYy44MioBC/MyMToQ6iTnFjJ6ivj/RtHlZ72tLeDcF6/XRdCeLD/0Gd7pR1Ib
 jCnb6dzji+ztIATdz0zJ5dATz5UHKQ+sPKCOR/Aeb8w+XWwcllP7oCFJKYdpzzJj
 63y2wbRIrmF4wk9ZfCwD3LEFdeWL5MHKGUn47afqODnoYcKPOp7w5hlM5YH+ZNun
 3Elln9JPeg996GsN3HQNGM+Ip+g1mi3yCF1hDWIukPPewKI8zqSarlo5B4d0f73i
 wjNbgvEKXiRR3sD8osH9gz4rqubY9pNy3YRCBXYWsP+4jPyOmOjMDhOoc/MmVLc7
 0B0l6waynsZXelSXRDGDINGDrr5Kct4ZmAczWS8W0+wXw7ER7VHj7dbbMBEcDgny
 k80Zfo+VXPIj1+9pvy75JZJ91AWtnHz10hug5iuJNADt0F1rfpdeZZ1+F4U0S/4p
 KcT8IS39V813DfE8UITlg9TEdsV1z72DXiFRDpV/UOQY3oRH9tMn4SrX7crugWEF
 Y3XXO8xlXFdz+bj0rAoV
 =9XvI
 -----END PGP SIGNATURE-----

Merge tag 'spi-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc

Pull spi fixes from Mark Brown:
 "A bunch of fixes here, mostly minor except for the pl022 which has
  just been a bit of a shambles all round, the recent runtime PM changes
  have as far as I can tell never worked so they're just getting thrown
  out."

* tag 'spi-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc:
  spi/pl022: Revert recent runtime PM changes
  spi: tsc2005: delete soon-obsolete e-mail address
  spi: spi-rspi: fix build error for the latest shdma driver
2012-10-24 18:00:17 -07:00
Linus Torvalds 735f0a985a IOMMU Fixes for Linux 3.7-rc2
Two fixes this time:
 
 	1. Another fix for a broken BIOS to detect when AMD IOMMU
 	   interrupt remapping can not work reliably
 	2. Typo fix for NVidia IOMMU driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQiAx1AAoJECvwRC2XARrjJ4kP/3xcFxrjOAyGPlUXwITlz7iu
 Ae21CqkGiXe5ucSXSkiI7BqnwlCVz1BHmC3oOxj8jtNjwX6Qgjb606S9glmsxbHg
 oG1+vhjgfCfqIgDJSTlcZOra0TX9Rk1iXTehGBv5hLCJT21IDZNfKg4Fn6cALTno
 aWRb41C23NkfwVUyMW8qrkhxVDHM8LsGK8PRRklFDdPZqiHfD+d7azGo+it8iWZl
 Pdd3Vvc2AB8UkUGbBA792+DdOb3gRabliVQ1kwvj1ImA50GvN8t326U6nP6XW0Xq
 duTpRtRYcH2NPg0UcL3p1YA6xRoDtxjNXdjbHb+sGXiP6eTtPl6CaFrrlkvfR4ZK
 ScGg2PDWcXUBK8+QUqXz5Xrs0esk9NG380+mOft0z9VfyLt/SMxLe/PDyXaN/5kS
 q4IKz/tZ7LhtYG+tC2HRbvFSJwxRHodJgk8RTp9YUTvmbtwVyzhuj4XzGh1Jbta8
 +tEMPlJ8JibCVjU9R3OYByTcpudJapRa3y2WZhC7rx0D04xUS+N3ZwAACtJKBQFw
 9lh/j1zTCu404rOoHXl9ysHeW9EszX5e/+XJOWH1EyUZaRRf77dgs+LB3ZTl4l5y
 xRNjEsLzF6/pZX7vrng+0R6pEsZ3XXKlLx2HcTkw9KG1kLNgkwXndhC+j9Kbt68/
 WADoYK0DPL3zbL8FxOec
 =V9QJ
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:
 "Two fixes this time:

   1. Another fix for a broken BIOS to detect when AMD IOMMU interrupt
      remapping can not work reliably
   2. Typo fix for NVidia IOMMU driver"

* tag 'iommu-fixes-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/tegra: smmu: Fix deadly typo
  iommu/amd: Work around wrong IOAPIC device-id in IVRS table
2012-10-24 17:05:21 -07:00
Linus Torvalds 99103f7748 This fixes a few pinctrl problems seen since v3.7-rc1:
- Section tagging for init code
 - Use proper pointers to lookup struct device * in the
   bcm2835 (a.k.a. Raspberry Pi)
 - Remove duplicate #includes
 - Fix bad return values in errorpath
 - Remove extraneous pull function from the sirf driver
   causing build errors
 - Provide compilation stubs for the Nomadik pinctrl driver
   when used with legacy systems without PRCMU units
 - Various irqdomain fixes in the Nomadik driver as predicted
 - Various smallish bugs in the Tegra driver, most also
   targeted for stable
 - Removed a deadlocking mutex in the groups debugfs show
   function
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJQh9MAAAoJEEEQszewGV1zIg4P/R3I23LFIV3EqAwNfM24Ru1X
 iOphKTPEp4SlRvElnb8yIH68wumHZirh16jehgGgqsredkokyOCaB8Nbip8ZN/zP
 pRxn5bvT3ZSimEDr9yzF15Odyzg6FA+QTjm3I2pnu5+J9/sQaUpUl5J0xLc3VyHR
 L0D35/Eo2iL79FSzJBM8f3TGbLtEuJJ4Vvqt8PauKg1NSaDWjSzQHa/e3Qkn85P2
 dy0xg/hD8UZcc1hgxFb/R1+IQnkoo56fEaPPMR+l5i2+20ksQf5rx5hzsK6MW2Km
 vqkH5E5y5n5s1SA60TVJ5Baw6Av1ciEa5gzglC4vCVRFDWqrJRlf4h5jOiwzTERy
 LtpXM2a7rpcBy1fNUezzHb3Hg3IVBhXvGurhLu7LZQqggHDzj96ptAidtM5yG0R5
 cRJ+5aIPU/NxPGSnwg4gl8musvfXxknTuEywpvtHMkVCrhXF4pR0hQYTRbzB7RRk
 bmkN9EJuYgtt0jmcmXWsQzKmTUdLNtifu/yeZDoEsXp6yWjPP8n6B5ShIvwhwWTr
 dpFAIX1PFNPE/Re2Xz2UstzGGcIsX77aDfwcLDrIqN0iHNjo/x6l84PB876TiA77
 tFZQFP2jQhbromUd2JvtTgkcnohBdPUjjv/MC+hKN5r65IlSUVpg/WPbsFo0jkIi
 2JDVSnazkUCRdJRorZ7O
 =QL92
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pinctrl fixes from Linus Walleij:
 "This fixes a few pinctrl problems seen since v3.7-rc1:
   - Section tagging for init code
   - Use proper pointers to lookup struct device * in the bcm2835
     (a.k.a.  Raspberry Pi)
   - Remove duplicate #includes
   - Fix bad return values in errorpath
   - Remove extraneous pull function from the sirf driver causing build
     errors
   - Provide compilation stubs for the Nomadik pinctrl driver when used
     with legacy systems without PRCMU units
   - Various irqdomain fixes in the Nomadik driver as predicted
   - Various smallish bugs in the Tegra driver, most also targeted for
     stable
   - Removed a deadlocking mutex in the groups debugfs show function"

* tag 'pinctrl-v3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl/nomadik: pass DT node to the irqdomain
  pinctrl/nomadik: use zero as default irq_start
  pinctrl: fix missing unlock on error in pinctrl_groups_show()
  pinctrl/nomadik: use irq_create_mapping()
  pinctrl: remove mutex lock in groups show
  pinctrl: tegra: correct bank for pingroup and drv pingroup
  pinctrl: tegra: set low power mode bank width to 2
  dt: Document: correct tegra20/30 pinctrl slew-rate name
2012-10-24 17:01:16 -07:00
Linus Torvalds 206aa6a6c5 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull apparmor bugfix from James Morris.

Fix a possibly unbounded recursion by iterating over the entries instead.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  apparmor: fix IRQ stack overflow during free_profile
2012-10-24 16:58:20 -07:00
Linus Torvalds 144d80bed9 An array out-of-bounds fix from Andrew when setting the scrub rate of
the memory controller.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQh/0MAAoJEBLB8Bhh3lVKBk0P+gOad4gpZogxhZIYMzPUdomr
 UnJlUWam3Dx0ekIsQ5wDwE1gqbIBLC4NSiVRJzxeHsQ+Be5OYRlGJtg0TrmO7XVw
 iMUelGUm68gFdjFkDYyWHEVSYXoBMqc5JBQ0HjXlLGuwJPJyJ3qyxlJBW5tn4It4
 2ZWGuLWJEuD4gQ51rOZV0p33+pKaoXepQbETiFOJ9uC7drMbkZqQl/d/HhuAITPp
 eWkSkqNQZjvdHAB1DQvIrLZgcKaRzeSgEfqZ1F/TmRtmEgY+oYq/PdjV2iH2fAHa
 BU/x76FklpXGBDVn9QDzN6NS6ANtXXy4ZiavWJs8n40q6nBzPPMEJtALSGXiMX+B
 V8VRv+B6gSuYmNC+/5HyYDOd3vXUcGFNkAoWGN6SXxTc281RWiKC5XbbLlGttjTq
 NZq8+9PC9+gnIMNNT5Av4L+xUKk6EZnB6BNhwqASs42Td53IrqrsfLAl6V+pVIHl
 Urc1fApyr77gVNW0VsHK6e8nTaBlAchxNFmUZR/XdGywPVHwqG7IPrfGy7RNA5Ml
 6MVFsd8UXsFGQBsg5wmuUooJUA88Vnngg4uCRdmPK25U5Ozf6Ehpr+mRp8ZwNrCn
 bBB78SMNLwGpkyO5eYyCuTOxKN2/2Y7hTmtce+wVGKOkqV4pBGVaRjDDckPeZkrg
 51p7qGvIqaFP2zEspqf3
 =z+OZ
 -----END PGP SIGNATURE-----

Merge tag 'edac_scrubrates_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp

Pull amd64_edac fix from Borislav Petkov:
 "An array out-of-bounds fix from Andrew when setting the scrub rate of
  the memory controller."

* tag 'edac_scrubrates_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  amd64_edac:__amd64_set_scrub_rate(): avoid overindexing scrubrates[]
2012-10-24 16:36:36 -07:00
Linus Torvalds cbb525b447 Merge branch 'for-3.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo:
 "This pull request contains three fixes.

  Two are reverts of task_lock() removal in cgroup fork path.  The
  optimizations incorrectly assumed that threadgroup_lock can protect
  process forks (as opposed to thread creations) too.  Further cleanup
  of cgroup fork path is scheduled.

  The third fixes cgroup emptiness notification loss."

* 'for-3.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  Revert "cgroup: Remove task_lock() from cgroup_post_fork()"
  Revert "cgroup: Drop task_lock(parent) on cgroup_fork()"
  cgroup: notify_on_release may not be triggered in some cases
2012-10-24 16:35:13 -07:00
Linus Torvalds d579a35d0e Merge branch 'for-3.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue fix from Tejun Heo:
 "This pull request contains one patch from Dan Magenheimer to fix
  cancel_delayed_work() regression introduced by its reimplementation
  using try_to_grab_pending().  The reimplementation made it incorrectly
  return %true when the work item is idle.

  There aren't too many consumers of the return value but it broke at
  least ramster."

* 'for-3.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: cancel_delayed_work() should return %false if work item is idle
2012-10-24 16:33:22 -07:00
Omar Ramirez Luna 4d3f120ae7 staging: tidspbridge: delete unused mmu functions
This should get rid of warnings of the type:

warning: passing argument 1 of '' discards qualifiers from pointer target type
 note: expected 'void *' but argument is of type 'const void *'

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 16:31:32 -07:00
Omar Ramirez Luna 5ae4fd94a3 staging: tidspbridge: ioremap physical address of the stack segment in shm
Due to data type change, readl can no longer receive a u32.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 16:31:31 -07:00
Omar Ramirez Luna 7de8a0cf48 staging: tidspbridge: ioremap dsp sync addr
Change the type of sync_addr to 'void __iomem *' and ioremap the
physical address in the shared memory so we can access it using
_raw_*. While at it, drop 'dw_' prefix.

Fix the warning associated with dsp's sync_addr:

warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
../io.h:88: note: expected 'volatile void *' but argument is of type 'u32'

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 16:31:31 -07:00
Omar Ramirez Luna 3c8676967b staging: tidspbridge: change type to __iomem for per and core addresses
Currently per_pm_base and core_pm_base are declared as u32, however
_raw_* changed the data type, since:

195bbca ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors

This should fix warnings for per and core accesses:

warning: passing argument 2 of '__raw_writel' makes pointer from integer without a cast
../io.h:88: note: expected 'volatile void *' but argument is of type 'u32'

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 16:31:31 -07:00
Omar Ramirez Luna 53e3e3f19f staging: tidspbridge: drop const from custom mmu implementation
Custom mmu functions receive a 'const void __iomem *', all the
callers pass a 'void __iomem *', so drop the const to fix the
warnings like:

warning: passing argument 2 of '__raw_writel' discards qualifiers from pointer target type
../io.h:88: note: expected 'volatile void *' but argument is of type 'const void *'

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 16:31:31 -07:00
Omar Ramirez Luna b8cac0bbed staging: tidspbridge: request the right irq for mmu
Requested irq for mmu is currently conflicting with a DMA irq
due to recent changes to irq header files, now the offset for the
start of the interrupt controller numbering has changed.

This should be removed during a future migration to omap-iommu,
for now it is hardcoded.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 16:31:30 -07:00
Geert Uytterhoeven 66081a7251 sysfs: sysfs_pathname/sysfs_add_one: Use strlcat() instead of strcat()
The warning check for duplicate sysfs entries can cause a buffer overflow
when printing the warning, as strcat() doesn't check buffer sizes.
Use strlcat() instead.

Since strlcat() doesn't return a pointer to the passed buffer, unlike
strcat(), I had to convert the nested concatenation in sysfs_add_one() to
an admittedly more obscure comma operator construct, to avoid emitting code
for the concatenation if CONFIG_BUG is disabled.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 15:57:14 -07:00
Joe Perches c0d2af6378 dynamic_debug: Remove unnecessary __used
The __used attribute prevents gcc from eliminating
unnecessary, otherwise optimized away, metadata for
debugging logging messages.

Remove the __used attribute.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 15:57:14 -07:00
K. Y. Srinivasan 1392550240 Drivers: hv: Cleanup error handling in vmbus_open()
Fix a memory leak  in the error handling path in the function vmbus_open().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Reported-by: Jason Wang <jasowang@redhat.com>
Cc: Stable <stable@vger.kernel.org>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 15:46:27 -07:00
Sergei Trofimovich e297da6e0e staging: ipack: add missing include (implicit declaration of function 'kfree')
On ARCH=alpha make allmodconfig:

linux-2.6/drivers/staging/ipack/bridges/tpci200.c: In function 'tpci200_free_irq':
linux-2.6/drivers/staging/ipack/bridges/tpci200.c:188:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
linux-2.6/drivers/staging/ipack/bridges/tpci200.c: In function 'tpci200_request_irq':
linux-2.6/drivers/staging/ipack/bridges/tpci200.c:215:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]

Fixed by adding <linux/slab.h> header

CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
CC: Jens Taprogge <jens.taprogge@taprogge.org>
CC: "Miguel Gómez" <magomez@igalia.com>
CC: devel@driverdev.osuosl.org
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 15:12:01 -07:00
Michael Shigorin d7870af7e2 usb-storage: add unusual_devs entry for Casio EX-N1 digital camera
This commit sets removable subclass for Casio EX-N1 digital camera.

The patch has been tested within an ALT Linux kernel:
http://git.altlinux.org/people/led/packages/?p=kernel-image-3.0.git;a=commitdiff;h=c0fd891836e89fe0c93a4d536a59216d90e4e3e7

See also https://bugzilla.kernel.org/show_bug.cgi?id=49221

Signed-off-by: Oleksandr Chumachenko <ledest@gmail.com>
Signed-off-by: Michael Shigorin <mike@osdn.org.ua>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 15:00:11 -07:00
Jacob Shin 844ab6f993 x86, mm: Find_early_table_space based on ranges that are actually being mapped
Current logic finds enough space for direct mapping page tables from 0
to end. Instead, we only need to find enough space to cover mr[0].start
to mr[nr_range].end -- the range that is actually being mapped by
init_memory_mapping()

This is needed after 1bbbbe779a, to address
the panic reported here:

  https://lkml.org/lkml/2012/10/20/160
  https://lkml.org/lkml/2012/10/21/157

Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Link: http://lkml.kernel.org/r/20121024195311.GB11779@jshin-Toonie
Tested-by: Tom Rini <trini@ti.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-10-24 13:37:04 -07:00
Dan Magenheimer c0158ca64d workqueue: cancel_delayed_work() should return %false if work item is idle
57b30ae77b ("workqueue: reimplement cancel_delayed_work() using
try_to_grab_pending()") made cancel_delayed_work() always return %true
unless someone else is also trying to cancel the work item, which is
broken - if the target work item is idle, the return value should be
%false.

try_to_grab_pending() indicates that the target work item was idle by
zero return value.  Use it for return.  Note that this brings
cancel_delayed_work() in line with __cancel_work_timer() in return
value handling.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
LKML-Reference: <444a6439-b1a4-4740-9e7e-bc37267cfe73@default>
2012-10-24 12:38:16 -07:00
Felipe Balbi a4f743851f Revert "serial: omap: fix software flow control"
This reverts commit 957ee7270d
(serial: omap: fix software flow control).

As Russell has pointed out, that commit isn't fixing
Software Flow Control at all, and it actually makes
it even more broken.

It was agreed to revert this commit and use Russell's
latest UART patches instead.

Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 11:57:21 -07:00
Yinghai Lu 1f2ff682ac x86, mm: Use memblock memory loop instead of e820_RAM
We need to handle E820_RAM and E820_RESERVED_KERNEL at the same time.

Also memblock has page aligned range for ram, so we could avoid mapping
partial pages.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/CAE9FiQVZirvaBMFYRfXMmWEcHbKSicQEHz4VAwUv0xFCk51ZNw@mail.gmail.com
Acked-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: <stable@vger.kernel.org>
2012-10-24 11:52:36 -07:00
Yinghai Lu 6ede1fd3cb x86, mm: Trim memory in memblock to be page aligned
We will not map partial pages, so need to make sure memblock
allocation will not allocate those bytes out.

Also we will use for_each_mem_pfn_range() to loop to map memory
range to keep them consistent.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/CAE9FiQVZirvaBMFYRfXMmWEcHbKSicQEHz4VAwUv0xFCk51ZNw@mail.gmail.com
Acked-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: <stable@vger.kernel.org>
2012-10-24 11:52:21 -07:00
Lennart Sorensen f7bc505166 USB: serial: Fix memory leak in sierra_release()
I found a memory leak in sierra_release() (well sierra_probe() I guess)
that looses 8 bytes each time the driver releases a device.

Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
Acked-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 11:45:34 -07:00
Larry Finger f89ff6441d b43: Fix oops on unload when firmware not found
When b43 fails to find firmware when loaded, a subsequent unload will
oops due to calling ieee80211_unregister_hw() when the corresponding
register call was never made.

Commit 2d838bb608 fixed the same problem
for b43legacy.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Markus Kanet <dvmailing@gmx.eu>
Cc: Stable <stable@vger.kernel.org> [V3.3.0+ (the patch will need to be refactored)]
Cc: Markus Kanet <dvmailing@gmx.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-24 13:18:09 -04:00
Bing Zhao 6fcf2b1053 mwifiex: clean up scan state on error
De-reference and deallocate scan state on failure.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Ryan Cairns <rtc@chromium.org>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-24 13:18:09 -04:00
Bing Zhao dcd5c79c9a mwifiex: return -EBUSY if specific scan request cannot be honored
Previous patch "mwifiex: return -EBUSY if scan request cannot.."
corrected regular scan request only. There is another case for
specific scan that needs the same handling.

Also, removed !req_ssid check as it has already been validated
by caller.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Ryan Cairns <rtc@chromium.org>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-24 13:18:09 -04:00
Yuanhan Liu 9495b31ad7 brcmfmac: fix potential NULL dereference
Fix a samtch warnings catched by Fengguang's 0-DAY system:
+ drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c:3572 brcmf_cfg80211_sched_scan_start() error: we previously assumed 'request' could be null (see line 3571)

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-24 13:18:08 -04:00
Felix Fietkau 73b26df5fa Revert "ath9k_hw: Updated AR9003 tx gain table for 5GHz"
This reverts commit a240dc7b3c.

This commit is reducing tx power by at least 10 db on some devices,
e.g. the Buffalo WZR-HP-G450H.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@vger.kernel.org
Cc: rmanohar@qca.qualcomm.com
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-24 13:18:08 -04:00
Mohammed Shafi Shajakhan 763cbac076 ath9k_htc: Add PID/VID for a Ubiquiti WiFiStation
Roger says, Ubiquiti produce 2 versions of their WiFiStation USB adapter.  One
has an internal antenna, the other has an external antenna and
name suffix EXT.  They have separate USB ids and in distribution
openSUSE 12.2 (kernel 3.4.6), file /usr/share/usb.ids shows:

  0cf3  Atheros Communications, Inc.
       ...
       b002  Ubiquiti WiFiStation 802.11n [Atheros AR9271]
       b003  Ubiquiti WiFiStationEXT 802.11n [Atheros AR9271]

Add b002 Ubiquiti WiFiStation in the PID/VID list.

Reported-by: Roger Price <ath9k@rogerprice.org>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-24 13:18:08 -04:00
Stanislaw Gruszka 761ce8c41e rt2x00: usb: fix reset resume
Patch fixes warnings like below happened on resume:

WARNING: at net/mac80211/driver-ops.h:12 check_sdata_in_driver+0x32/0x34()

Problem is that in __ieee80211_susped() we remove sdata (i.e wlan0
interface) and then during resume we call usb_unbind_interface() ->
ieee80211_unregister_hw() with sdata removed.

Patch fixes problem by adding .reset_resume calback, hence we do not
unbind usb device on resume. This callback can be the same as normal
.resume callback, sice we do all needed initalization during interface
start, which is performed on resume [ ieee80211_resume() ->
ieee80211_reconfig() -> rt2x00mac_start() -> rt2x00lib_start ].

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=48041

Reported-by: David Herrmann <dh.herrmann@googlemail.com>
Reported-and-tested-by: Stephen Boyd <bebarino@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-24 13:18:07 -04:00
Christian Lamparter 0c7e92075f rtlwifi: pass rx setup error code to caller
If _rtl_usb_receive fails, the device is
probably not ready. Hence the error code
should be passed to the caller, so it can
react accordingly and notify the user.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-10-24 13:18:07 -04:00
Alex Deucher 0b90365e7a drm/radeon: fix ATPX regression in acpi rework
Copy and paste typo in the apci rework.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=49351

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2012-10-24 11:41:57 -04:00
Alex Deucher c9bd773c6d drm/radeon: fix ATPX function documentation
The ATPX code no longer handles ATRM.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-24 11:41:57 -04:00
Christian König 0fe7158c8a drm/radeon: move the retry to gem_object_create
When internal users want VRAM we shouldn't return GART memory instead.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-24 11:41:56 -04:00
Christian König 6c0d112f1f drm/radeon: move size limits to gem_object_create.
Driver internal users shouldn't be limited in their allocation size.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-24 11:41:56 -04:00
Christian König 59240ee3e8 drm/radeon: use vzalloc for gart pages
When allocating more than 2GB of GART the array of pages
gets to big for kzalloc, use vzalloc instead.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-24 11:41:55 -04:00
Christian König 1bcb04f758 drm/radeon: fix and simplify pot argument checks v3
GART and VRAM size limits need to be a power of two.
Fix values greater than 1GB and simplify those checks a bit.

v2: also fix radeon_vram_limit usage, and simplify test even more.
v3: agd5f: fix spelling as noticed by Klaus Schnass

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-24 11:41:11 -04:00
John Johansen 2e680dd61e apparmor: fix IRQ stack overflow during free_profile
BugLink: http://bugs.launchpad.net/bugs/1056078

Profile replacement can cause long chains of profiles to build up when
the profile being replaced is pinned. When the pinned profile is finally
freed, it puts the reference to its replacement, which may in turn nest
another call to free_profile on the stack. Because this may happen for
each profile in the replacedby chain this can result in a recusion that
causes the stack to overflow.

Break this nesting by directly walking the chain of replacedby profiles
(ie. use iteration instead of recursion to free the list). This results
in at most 2 levels of free_profile being called, while freeing a
replacedby chain.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
2012-10-25 02:12:50 +11:00
Hiro Sugawara d0078e7231 iommu/tegra: smmu: Fix deadly typo
Fix a deadly typo in macro definition.

Cc: stable@vger.kernel.org
Signed-off-by: Hiro Sugawara <hsugawara@nvidia.com>
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2012-10-24 16:58:53 +02:00
Trond Myklebust e498daa812 LOCKD: Clear ln->nsm_clnt only when ln->nsm_users is zero
The current code is clearing it in all cases _except_ when zero.

Reported-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
2012-10-24 10:46:22 -04:00
Trond Myklebust a4ee8d978e LOCKD: fix races in nsm_client_get
Commit e9406db20f (lockd: per-net
NSM client creation and destruction helpers introduced) contains
a nasty race on initialisation of the per-net NSM client because
it doesn't check whether or not the client is set after grabbing
the nsm_create_mutex.

Reported-by: Nix <nix@esperi.org.uk>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
2012-10-24 10:46:22 -04:00
Trond Myklebust f878b657ce SUNRPC: Get rid of the xs_error_report socket callback
Chris Perl reports that we're seeing races between the wakeup call in
xs_error_report and the connect attempts. Basically, Chris has shown
that in certain circumstances, the call to xs_error_report causes the
rpc_task that is responsible for reconnecting to wake up early, thus
triggering a disconnect and retry.

Since the sk->sk_error_report() calls in the socket layer are always
followed by a tcp_done() in the cases where we care about waking up
the rpc_tasks, just let the state_change callbacks take responsibility
for those wake ups.

Reported-by: Chris Perl <chris.perl@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
Tested-by: Chris Perl <chris.perl@gmail.com>
2012-10-24 10:46:15 -04:00
Trond Myklebust 4bc1e68ed6 SUNRPC: Prevent races in xs_abort_connection()
The call to xprt_disconnect_done() that is triggered by a successful
connection reset will trigger another automatic wakeup of all tasks
on the xprt->pending rpc_wait_queue. In particular it will cause an
early wake up of the task that called xprt_connect().

All we really want to do here is clear all the socket-specific state
flags, so we split that functionality out of xs_sock_mark_closed()
into a helper that can be called by xs_abort_connection()

Reported-by: Chris Perl <chris.perl@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
Tested-by: Chris Perl <chris.perl@gmail.com>
2012-10-24 10:46:08 -04:00
Trond Myklebust b9d2bb2ee5 Revert "SUNRPC: Ensure we close the socket on EPIPE errors too..."
This reverts commit 55420c24a0.
Now that we clear the connected flag when entering TCP_CLOSE_WAIT,
the deadlock described in this commit is no longer possible.
Instead, the resulting call to xs_tcp_shutdown() can interfere
with pending reconnection attempts.

Reported-by: Chris Perl <chris.perl@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
Tested-by: Chris Perl <chris.perl@gmail.com>
2012-10-24 10:45:39 -04:00
Trond Myklebust d0bea455dd SUNRPC: Clear the connect flag when socket state is TCP_CLOSE_WAIT
This is needed to ensure that we call xprt_connect() upon the next
call to call_connect().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
Tested-by: Chris Perl <chris.perl@gmail.com>
2012-10-24 10:44:49 -04:00