Commit Graph

154111 Commits

Author SHA1 Message Date
Wei Yongjun dc9c9759eb net/irda: sh_sir: fix return value check in sh_sir_set_baudrate()
In case of error, the function clk_get() returns ERR_PTR()
and never returns NULL pointer. The NULL test in the error
handling should be replaced with IS_ERR().

dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-21 13:47:24 -04:00
Wei Yongjun 6861509f9f stmmac: fix return value check in stmmac_open_ext_timer()
In case of error, the function clk_get() returns ERR_PTR()
and never returns NULL pointer. The NULL test in the error
handling should be replaced with IS_ERR().

dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-21 13:47:24 -04:00
Richard Cochran 28889b7e78 gianfar: fix phc index build failure
This patch fixes a build failure introduced in commit 66636287
("gianfar: Support the get_ts_info ethtool method."). Not only was a
global variable inconsistently named, but also it was not exported as
it should have been.

This fix is also needed in stable version 3.5.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-21 13:45:29 -04:00
Ariel Elior 185d4c8bf5 bnx2x: remove false warning regarding interrupt number
Since version 7.4 the FW configures in the pci config space the max
number of interrupts available to the physical function, instead of
the exact number to use.
This causes a false warning in driver when comparing the number of
configured interrupts to the number about to be used.

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-21 13:27:16 -04:00
Alex Williamson b68e7fa879 vfio: Fix virqfd release race
vfoi-pci supports a mechanism like KVM's irqfd for unmasking an
interrupt through an eventfd.  There are two ways to shutdown this
interface: 1) close the eventfd, 2) ioctl (such as disabling the
interrupt).  Both of these do the release through a workqueue,
which can result in a segfault if two jobs get queued for the same
virqfd.

Fix this by protecting the pointer to these virqfds by a spinlock.
The vfio pci device will therefore no longer have a reference to it
once the release job is queued under lock.  On the ioctl side, we
still flush the workqueue to ensure that any outstanding releases
are completed.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2012-09-21 10:48:28 -06:00
Marc Kleine-Budde ab04c8bd42 can: ti_hecc: fix oops during rmmod
This patch fixes an oops which occurs when unloading the driver, while the
network interface is still up. The problem is that first the io mapping is
teared own, then the CAN device is unregistered, resulting in accessing the
hardware's iomem:

[  172.744232] Unable to handle kernel paging request at virtual address c88b0040
[  172.752441] pgd = c7be4000
[  172.755645] [c88b0040] *pgd=87821811, *pte=00000000, *ppte=00000000
[  172.762207] Internal error: Oops: 807 [#1] PREEMPT ARM
[  172.767517] Modules linked in: ti_hecc(-) can_dev
[  172.772430] CPU: 0    Not tainted  (3.5.0alpha-00037-g3554cc0 #126)
[  172.778961] PC is at ti_hecc_close+0xb0/0x100 [ti_hecc]
[  172.784423] LR is at __dev_close_many+0x90/0xc0
[  172.789123] pc : [<bf00c768>]    lr : [<c033be58>]    psr: 60000013
[  172.789123] sp : c5c1de68  ip : 00040081  fp : 00000000
[  172.801025] r10: 00000001  r9 : c5c1c000  r8 : 00100100
[  172.806457] r7 : c5d0a48c  r6 : c5d0a400  r5 : 00000000  r4 : c5d0a000
[  172.813232] r3 : c88b0000  r2 : 00000001  r1 : c5d0a000  r0 : c5d0a000
[  172.820037] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  172.827423] Control: 10c5387d  Table: 87be4019  DAC: 00000015
[  172.833404] Process rmmod (pid: 600, stack limit = 0xc5c1c2f0)
[  172.839447] Stack: (0xc5c1de68 to 0xc5c1e000)
[  172.843994] de60:                   bf00c6b8 c5c1dec8 c5d0a000 c5d0a000 00200200 c033be58
[  172.852478] de80: c5c1de44 c5c1dec8 c5c1dec8 c033bf2c c5c1de90 c5c1de90 c5d0a084 c5c1de44
[  172.860992] dea0: c5c1dec8 c033c098 c061d3dc c5d0a000 00000000 c05edf28 c05edb34 c000d724
[  172.869476] dec0: 00000000 c033c2f8 c5d0a084 c5d0a084 00000000 c033c370 00000000 c5d0a000
[  172.877990] dee0: c05edb00 c033c3b8 c5d0a000 bf00d3ac c05edb00 bf00d7c8 bf00d7c8 c02842dc
[  172.886474] df00: c02842c8 c0282f90 c5c1c000 c05edb00 bf00d7c8 c0283668 bf00d7c8 00000000
[  172.894989] df20: c0611f98 befe2f80 c000d724 c0282d10 bf00d804 00000000 00000013 c0068a8c
[  172.903472] df40: c5c538e8 685f6974 00636365 c61571a8 c5cb9980 c61571a8 c6158a20 c00c9bc4
[  172.911987] df60: 00000000 00000000 c5cb9980 00000000 c5cb9980 00000000 c7823680 00000006
[  172.920471] df80: bf00d804 00000880 c5c1df8c 00000000 000d4267 befe2f80 00000001 b6d90068
[  172.928985] dfa0: 00000081 c000d5a0 befe2f80 00000001 befe2f80 00000880 b6d90008 00000008
[  172.937469] dfc0: befe2f80 00000001 b6d90068 00000081 00000001 00000000 befe2eac 00000000
[  172.945983] dfe0: 00000000 befe2b18 00023ba4 b6e6addc 60000010 befe2f80 a8e00190 86d2d344
[  172.954498] [<bf00c768>] (ti_hecc_close+0xb0/0x100 [ti_hecc]) from [<c033be58>] (__dev__registered_many+0xc0/0x2a0)
[  172.984161] [<c033c098>] (rollback_registered_many+0xc0/0x2a0) from [<c033c2f8>] (rollback_registered+0x20/0x30)
[  172.994750] [<c033c2f8>] (rollback_registered+0x20/0x30) from [<c033c370>] (unregister_netdevice_queue+0x68/0x98)
[  173.005401] [<c033c370>] (unregister_netdevice_queue+0x68/0x98) from [<c033c3b8>] (unregister_netdev+0x18/0x20)
[  173.015899] [<c033c3b8>] (unregister_netdev+0x18/0x20) from [<bf00d3ac>] (ti_hecc_remove+0x60/0x80 [ti_hecc])
[  173.026245] [<bf00d3ac>] (ti_hecc_remove+0x60/0x80 [ti_hecc]) from [<c02842dc>] (platform_drv_remove+0x14/0x18)
[  173.036712] [<c02842dc>] (platform_drv_remove+0x14/0x18) from [<c0282f90>] (__device_release_driver+0x7c/0xbc)

Cc: stable <stable@vger.kernel.org>
Cc: Anant Gole <anantgole@ti.com>
Tested-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-09-21 12:54:53 +02:00
Ira W. Snyder e21093ef6f can: janz-ican3: fix support for older hardware revisions
The Revision 1.0 Janz CMOD-IO Carrier Board does not have support for
the reset registers. To support older hardware, the code is changed to
use the hardware reset register on the Janz VMOD-ICAN3 hardware itself.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-09-21 12:54:52 +02:00
Dave Airlie 017a27e7f5 Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes
Daniel writes:
Essentially just flush my -fixes queue before I head off to xdc.
- gen2 regression fixer, we've enabled the lvds stuff too late. Not
  causing any known issues, but this restores the sequence before a
  refactor that landed in 3.5, and lvds is a fickle beast. And seriously,
  who runs gen2 still ...
- downgrade a BUG to a WARN - we haven't root-caused/fixed the underlying
  issue yet, but this should help bug reporters quite a bit.
- properly disable hdmi audio - we've lost track of this, which resulted
  in the alsa driver again losing track of the unplug event.

* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: HDMI - Clear Audio Enable bit for Hot Plug
  drm/i915: Reduce a pin-leak BUG into a WARN
  drm/i915: enable lvds pin pairs before dpll on gen2
2012-09-21 20:46:01 +10:00
Dave Airlie 6c06d608ec drm/nouveau: add dmi quirk for gpio reset
This fixes the gpio reset problem so the Retina MBP works, but avoids
breaking the Dell systems. Ben will work on a better solution for 3.7.

Tested by me on retina MBP.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-21 10:17:15 -04:00
Ed Cashin 8babe8cc65 aoe: assert AoE packets marked as requiring no checksum
In order for the network layer to see that AoE requires
no checksumming in a generic way, the packets must be
marked as requiring no checksum, so we make this requirement
explicit with the assertion.

Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-20 22:23:40 -04:00
Devendra Naga 3cfc159010 at91ether: return PTR_ERR if call to clk_get fails
we are currently returning ENODEV, as the clk_get may give a exact
error code in its returned pointer, assign it to the ret by using the
PTR_ERR function, so that the subsequent goto label will jump to the
error path and clean the driver and return the error correctly.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-20 22:21:40 -04:00
Bjørn Mork 9db273f456 net: qmi_wwan: adding Huawei E367, ZTE MF683 and Pantech P4200
One of the modes of Huawei E367 has this QMI/wwan interface:

 I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=07 Driver=(none)
 E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
 E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
 E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms

Huawei use subclass and protocol to identify vendor specific
functions, so adding a new vendor rule for this combination.

The Pantech devices UML290 (106c:3718) and P4200 (106c:3721) use
the same subclass to identify the QMI/wwan function.  Replace the
existing device specific UML290 entries with generic vendor matching,
adding support for the Pantech P4200.

The ZTE MF683 has 6 vendor specific interfaces, all using
ff/ff/ff for cls/sub/prot.  Adding a match on interface #5 which
is a QMI/wwan interface.

Cc: Fangxiaozhi (Franko) <fangxiaozhi@huawei.com>
Cc: Thomas Schäfer <tschaefer@t-online.de>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Shawn J. Goff <shawn7400@gmail.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-20 17:54:28 -04:00
Dave Airlie 8e910d08a2 Merge branch 'drm-fixes-3.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
fixes a resume regression on pre-r6xx asics.

* 'drm-fixes-3.6' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: Prevent leak of scratch register on resume from suspend
2012-09-21 06:50:40 +10:00
Simon Kitching 16c58081eb drm/radeon: Prevent leak of scratch register on resume from suspend
Cards typically have 5-7 scratch registers; one of these is reserved for
rdev->rptr_save_reg. Unfortunately the reservation is done in function
r100_cp_init, which is called by all drivers except r600 - and this
function is also invoked on resume from suspend. After several resumes,
no scratch registers are free and graphics acceleration is disabled.

Dmesg then reports either:
   *ERROR* radeon: cp failed to get scratch reg (-22).
   *ERROR* radeon: cp isn't working(-22).
   radeon 0000:01:00.0: failed initializing CP (-22).
or:
   *ERROR* radeon: failed to get scratch reg (-22).
   *ERROR* radeon: failed testing IB on GFX ring (-22).
   *ERROR* ib ring test failed (-22).

The chain of calls on boot for all except r600 is:
radeon_init -> ... -> (rXXX_init) -> rXXX_startup -> r100_cp_init

The chain of calls on resume for all except r600 is:
rXXX_resume -> rXXX_startup -> r100_cp_init.

R600 correctly allocates rptr_save_reg in r600_init (ie once only, not
in resume). However moving the code into the init functions for all
drivers means touching 4 drivers. So instead, this patch just adds a
test in r100_cp_init to avoid reallocating on resume. As the rdev
structure is allocated via kzalloc in radeon_driver_load_kms, and zero
is not a valid registerid, zero safely implies not-yet-allocated.

This issue appears to have been introduced in c7eff978 (3.6.0-rcN)

Signed-off-by: Simon Kitching <skitching@vonos.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-20 12:59:16 -04:00
Dave Airlie 18d4dbd886 Revert "drm/nv50-/gpio: initialise to vbios defaults during init"
This reverts commit 991083ba60.

We discovered this causes problem on some Dell eDP laptops, so Apple
lose out for now, I might try and whip up a dmi based workaround for 3.6
but I'm not sure I'll get time.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-20 21:00:15 +10:00
Dave Airlie 8d4f5cc881 Merge branch 'drm-fixes-3.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
The pll fix ended up causing some regressions.  Drop it for 3.6.  I've
fixed it properly in 3.7, but the fix is too invasive for 3.6.

* 'drm-fixes-3.6' of git://people.freedesktop.org/~agd5f/linux:
  Revert "drm/radeon: rework pll selection (v3)"
2012-09-20 20:48:31 +10:00
Axel Lin 35b1da4e1e Input: edt-ft5x06 - return -EFAULT on copy_to_user() error
copy_to_user() returns the number of bytes remaining, but we want a
negative error code here.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-09-19 16:00:26 -07:00
Tai-hwa Liang 30ebb7fa0e Input: sentelic - filter out erratic movement when lifting finger
When lifing finger off the surface some versions of touchpad send movement
packets with very low coordinates, which cause cursor to jump to the upper
left corner of the screen. Let's ignore least significant bits of X and Y
coordinates if higher bits are all zeroes and consider finger not touching
the pad.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43197
Reported-and-tested-by:	Aleksey Spiridonov <leks13@leks13.ru>
Tested-by: Eddie Dunn <eddie.dunn@gmail.com>
Tested-by: Jakub Luzny <limoto94@gmail.com>
Tested-by: Olivier Goffart <olivier@woboq.com>
Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-09-19 14:58:07 -07:00
Pawel Moll 59d1f5c41a Input: ambakmi - [un]prepare clocks when enabling amd disabling
Clocks must be prepared before enabling and unprepared
after disabling. Use appropriate functions to do this
in one go.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-09-19 14:56:36 -07:00
Anisse Astier 8669cf6793 Input: i8042 - disable mux on Toshiba C850D
On Toshiba Satellite C850D, the touchpad and the keyboard might randomly
not work at boot. Preventing MUX mode activation solves this issue.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-09-19 14:55:50 -07:00
Jiri Kosina 1ad346a9f8 Merge branch 'for-next' of git://github.com/rydberg/linux into from-henrik
Pull Input and HID updates for 3.7 from Henrik Rydberg:
"The tree contains input core changes, Acked by Dmitry, which substantially
reduces the irqsoff latency for all input devices. It also contains MT changes
which allows further memory reduction, speedup and hardware support in the HID
Multitouch driver. Lastly, you get the conversion of the bcm5974 driver to
MT-B, which due to the mixed dependency of the tree fits better here than
anywhere else."

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-19 23:48:16 +02:00
Søren holm ed3770a9cd asix: Support DLink DUB-E100 H/W Ver C1
Signed-off-by: Søren Holm <sgh@sgh.dk>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-19 17:21:35 -04:00
Russell King d99a910a00 Merge branch 'clkdev' into fixes 2012-09-19 22:04:48 +01:00
Mark Brown 20332ff376 ARM: 7537/1: clk: Fix release in devm_clk_put()
Surprisingly devres_destroy() doesn't call the destructor for the
resource it is destroying, use the newly added devres_release() instead
to fix this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-09-19 21:51:27 +01:00
Linus Torvalds c46de2263f Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
 "A small collection of driver fixes/updates and a core fix for 3.6.  It
  contains:

   - Bug fixes for mtip32xx, and support for new hardware (just addition
     of IDs).  They have been queued up for 3.7 for a few weeks as well.

   - rate-limit a failing command error message in block core.

   - A fix for an old cciss bug from Stephen.

   - Prevent overflow of partition count from Alan."

* 'for-linus' of git://git.kernel.dk/linux-block:
  cciss: fix handling of protocol error
  blk: add an upper sanity check on partition adding
  mtip32xx: fix user_buffer check in exec_drive_command
  mtip32xx: Remove dead code
  mtip32xx: Change printk to pr_xxxx
  mtip32xx: Proper reporting of write protect status on big-endian
  mtip32xx: Increase timeout for standby command
  mtip32xx: Handle NCQ commands during the security locked state
  mtip32xx: Add support for new devices
  block: rate-limit the error message from failing commands
2012-09-19 11:04:34 -07:00
Linus Torvalds 077fee0036 SuperH fixes for 3.6-rc7
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlBYK+cACgkQGkmNcg7/o7jthwCfemhnr590s3hwWXjA88ZZMFDl
 U8kAoJA7hNCtAqdoj+LHXJlKLK1UalkD
 =aCxD
 -----END PGP SIGNATURE-----

Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh

Pull SuperH fixes from Paul Mundt.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
  sh: Fix up TIF_NOTIFY_RESUME sans TIF_SIGPENDING handling.
  sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path
  sh: intc: Fix up multi-evt irq association.
2012-09-19 11:03:55 -07:00
Linus Torvalds cf42d543e5 A quick rpmsg fix from Fernando, fixing two buggy invocations of
dma_free_coherent.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQV/pNAAoJELLolMlTRIoMkh8QAK56+PRhhhhtGKR9n9Mf8NX1
 ZBbNYfHqm3AcToHgCIAY0ciaS2H6ZoOQj9bg4G2+JJWlwnphIcK7Vq9RBXi2/+jk
 zvPvxz/mHkWeiCXARd9HtKxHSr4QRbO8xGmD2sxQSojlsr8RQTuTBcRbPF3e4RFH
 7QYC7YwowS5JZXS4m/szLSTlWyzi1D8HzFZkKf7FMg3RklpbQm3v3wg4iJIPn8C+
 CO6jV35WB436M5vuu4nk6YnKfMaE5D//Aj/1Eeq1aZOIquRQ7vVtWMnDGo+ZpOT1
 i2paY7h7ra7Yh6f2wD6GAtpRhd+xV5dp6g0N9pntQ03/3Xyg7qQJ0rTyiLUNSZVQ
 OPD69ud/xKr+VEda7rKcZ63TiJ3e3gZypgm5/xkZMw58X5Tt4ELC/7YTXjK7zrWN
 S1jjUEl+38UN11iIiTdhRKCdiEZWpA6xiUrzE1jxG2AyiS2EgnkByhedb3QwIR8V
 VbRbpcQkDW/Dn8dP6+JtW9PQyBFkuEHofmMtLGXUmn52ijHX90dXsYPnOaPtf+2e
 oV7JYQXQZ1X+3K3evo7FmaeiEFCs/KL4eoCjDOaZz05pIOJ/Y9GOUapnmPo85TZ3
 axyeP/82Td2C4CpnTb6TWfFtw1WTI0Vdj/kz/5IdX2AuK9SGum606jYlyz2NGSuP
 YT9LXJT4G30DkG6Zk3aL
 =Ywa8
 -----END PGP SIGNATURE-----

Merge tag 'rpmsg-3.6-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/rpmsg

Pull rpmsg fix from Ohad Ben-Cohen:
 "A quick rpmsg fix from Fernando, fixing two buggy invocations of
  dma_free_coherent"

* tag 'rpmsg-3.6-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/rpmsg:
  rpmsg: fix dma_free_coherent dev parameter
2012-09-19 11:03:13 -07:00
Linus Torvalds 4b92c17e1d 3 fixes for md in 3.6.
One reverts a recent patch which turns out to not be such a good
 idea.
 Other two fix minor bugs with the new (since 3.3) 'replacement' code
 and have been tagged for -stable.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIVAwUAUFk0Xznsnt1WYoG5AQL/wg/+PgiYHPhz88Nw7pQIDMVtxVPjsf8YLhs/
 cFeIoTE13KQX+akiKORoFopIaon0hJLX48Hs+/WlrZmucJMLn/gmUhkwkcZs31As
 PrGLrLdz6cXue0GPTU5IP25lkbMRBsRV1U5k1pWuq9qWQv+Bjs1dXc1H1HekR3Lr
 WD4TdLz/Zg5fboADXVt6cSpAHL++eDdHOoqh7amMDzQfLf6Et9U1gaqTXeQMw70M
 /0+AubVmceYbP7uw1/haWii6/cLNtu7opE9dEvsHHkibdwcdSiOmsqMYCurjvd8p
 zYsaK/KcIWipfSpYsaDI1Sz4tYVc4UBQZCYgHJxv2ynnKRHHEDnrj1/hU86SRsmS
 YUEM5ENeLnXtmFMZH2Pro8c9x4ianv751uMCEt61HZs2572Rz5csZ0JgCSaScCVA
 PKldSe4AsyeGQsQ0lSjhza/zmx6uvy0mUrJFSd2lt8cMLvlcDfGihYG1ERjFf638
 kuIthP7NwtE/sM0cZtLkVvXfJdyUQDL2EGvJJIO4A4m1PJ07RzJ0KRU/g0jzi1Q8
 E63abhnTk7y7QpLtIH7Bv4DrDjdMvmfYFbprR/Mxz5D4RUOBxxj+HvD9EFwNG9oJ
 ufc/hnDQd7BYkMPFWrVuYxtByMYMdnhuiRSFUDCrMt81pxSLecxjDt1r9UOLT5Bo
 emAPezrzK/g=
 =dfcj
 -----END PGP SIGNATURE-----

Merge tag 'md-3.6-fixes' of git://neil.brown.name/md

Pull md fixes from NeilBrown:
 "3 fixes for md in 3.6.

  One reverts a recent patch which turns out to not be such a good idea.

  Other two fix minor bugs with the new (since 3.3) 'replacement' code
  and have been tagged for -stable."

* tag 'md-3.6-fixes' of git://neil.brown.name/md:
  md: make sure metadata is updated when spares are activated or removed.
  md/raid5: fix calculate of 'degraded' when a replacement becomes active.
  Revert "md/raid5: For odirect-write performance, do not set STRIPE_PREREAD_ACTIVE."
2012-09-19 11:01:38 -07:00
Linus Torvalds c5c473e29c Merge branch 'for-3.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue / powernow-k8 fix from Tejun Heo:
 "This is the fix for the bug where cpufreq/powernow-k8 was tripping
  BUG_ON() in try_to_wake_up_local() by migrating workqueue worker to a
  different CPU.

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

  As discussed, the fix is now two parts - one to reimplement
  work_on_cpu() so that it doesn't create a new kthread each time and
  the actual fix which makes powernow-k8 use work_on_cpu() instead of
  performing manual migration.

  While pretty late in the merge cycle, both changes are on the safer
  side.  Jiri and I verified two existing users of work_on_cpu() and
  Duncan confirmed that the powernow-k8 fix survived about 18 hours of
  testing."

* 'for-3.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  cpufreq/powernow-k8: workqueue user shouldn't migrate the kworker to another CPU
  workqueue: reimplement work_on_cpu() using system_wq
2012-09-19 11:00:07 -07:00
Henrik Rydberg 51c80b7400 Input: bcm5974 - Convert to MT-B
Use of the in-kernel tracking code to convert the driver to MT-B.

With ten fingers on the pad, the in-kernel tracking adds approximately
25 us to the maximum irqsoff latency. Under normal workloads, however,
the tracking has no measurable effect.

Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:22 +02:00
Henrik Rydberg 0e7269669d Input: bcm5974 - Drop the logical dimensions
The logical scale is used to produce special finger width values to
userspace, but has become an unnecessary restriction for everything
else.  Also, the bcm5974 trackpads are very accurate and work well
without hysteresis.

This patch simplifies the driver and device data by removing the
logical scale, and by moving the special synaptics code out of the
main path.  Also add the orientation range, needed in a subsequent
patch, to the device configuration.

Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:22 +02:00
Henrik Rydberg f17953abc9 Input: bcm5974 - Preparatory renames
Rename touch properties to match established nomenclature, and define
the maximum number of fingers.

Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:21 +02:00
Henrik Rydberg 43f482b48d Input: bcm5974 - only setup button urb for TYPE1 devices
The early generations with this trackpad used the separate mouse
interface to produce button events. With the introduction of the
button pads, this information was moved to the trackpad interface,
leaving the mouse interface unused. The driver is still setting up
both interfaces, which has not caused any problems - until now.

It turns out that without the CONFIG_USB_EHCI_TT_NEWSCHED option, the
driver may return an ENOSPC upon bt_urb submission, resulting in a
failure to open the device. This happens everytime on the MacBookPro
Retina (and likely on other mid-2012 models), but earlier MacBook
models seem to work fine.

This patch skips the bt_urb setup for TYPE2 devices, which arguably
should have been done in the first place.

Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:21 +02:00
Henrik Rydberg 77723e3bc7 HID: hid-multitouch: Add Flatfrog support
Add support for the Flatfrog Multitouch 3200 panel. This panel
advertises some fields that it does not use, hence the new quirk.

Cc: Pablo Cases <pablo.cases@flatfrog.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:21 +02:00
Henrik Rydberg c5d40be5f5 HID: hid-multitouch: Fix contact count on 3M panels
Some devices report the number of contacts via the unreliable
CONTACTCOUNT usage, rather than using the CONTACTMAX feature.
Without this patch, the 3M devices are constrained to the default
maximum of ten fingers.

Cc: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:21 +02:00
Henrik Rydberg 3e1b5015d9 HID: hid-multitouch: Remove the redundant touch state
With the input_mt_sync_frame() function in place, there is no longer
any need to keep the full touch state in the driver. This patch
removes the slot state and replaces the lookup code with the input-mt
equivalent.

Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:20 +02:00
Henrik Rydberg 76f5902aeb HID: hid-multitouch: Simplify setup and frame synchronization
With the input_configured() callback in place, the setup and frame
synchronization can be simplified. The input device initialization is
moved to mt_input_configured(), to make sure the full HID report has been
seen.

Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:20 +02:00
Henrik Rydberg 9ebf3d7687 HID: Add an input configured notification callback
A hid device may create several input devices, and a driver may need
to prepare or finalize the configuration per input device. Currently,
there is no sane way for a driver to know when a device has been
configured. This patch adds a callback providing that information.

Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:20 +02:00
Henrik Rydberg 2273929340 Input: MT - Allow legacy pressure computation
Some drivers like to report ABS_PRESSURE in a special way.
Allow this when ABS_MT_PRESSURE is not defined.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:19 +02:00
Henrik Rydberg 17a465a7f2 Input: MT - Get slot by key
Some devices use an internal key for tracking which cannot be directly
mapped to slots. This patch provides a key-to-slot mapping, which can
be used by drivers of such devices.

Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:19 +02:00
Henrik Rydberg 7c1a87897c Input: MT - Add in-kernel tracking
With the INPUT_MT_TRACK flag set, the function input_mt_assign_slots()
can be used to match a new set of contacts against the currently used
slots. The algorithm used is based on Lagrange relaxation, and performs
very well in practice; slower than mtdev for a few corner cases, but
faster in most commonly occuring cases.

Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:19 +02:00
Henrik Rydberg 55e49089f4 Input: MT - Handle frame synchronization in core
Most MT drivers perform the same actions on frame synchronization.
Some actions, like dropping unseen contacts, are also unnecessarily
complex. Collect common frame synchronization tasks in a new function,
input_mt_sync_frame(). Depending on the flags set, it drops unseen
contacts and performs pointer emulation.

With init flags and frame synchronization in place, most MT drivers
can be simplified. First out are the bcm5974 and hid-multitouch
drivers, following this patch.

Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:19 +02:00
Henrik Rydberg b4adbbefc2 Input: MT - Add flags to input_mt_init_slots()
Preparing to move more repeated code into the mt core, add a flags
argument to the input_mt_slots_init() function.

Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:18 +02:00
Henrik Rydberg a274ac15ed Input: evdev - Add the events() callback
By sending a full frame of events at the same time, the irqsoff
latency at heavy load is brought down from 200 us to 100 us.

Cc: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:18 +02:00
Henrik Rydberg 4369c64c79 Input: Send events one packet at a time
On heavy event loads, such as a multitouch driver, the irqsoff latency
can be as high as 250 us.  By accumulating a frame worth of data
before passing it on, the latency can be dramatically reduced.  As a
side effect, the special EV_SYN handling can be removed, since the
frame is now atomic.

This patch adds the events() handler callback and uses it if it
exists. The latency is improved by 50 us even without the callback.

Cc: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:18 +02:00
Henrik Rydberg 352ac4bd01 Input: Move autorepeat to the event-passing phase
Preparing to split event filtering and event passing, move the
autorepeat function to the point where the event is actually passed.

Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:17 +02:00
Henrik Rydberg 0672120a2e Input: Make sure we follow all EV_KEY events
For some EV_KEY types, sending a larger-than-one value causes the
input state to oscillate. This patch makes sure this cannot happen,
clearing up the autorepeat bypass logic in the process.

Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:17 +02:00
Henrik Rydberg 7c75bf9927 Input: Improve the events-per-packet estimate
The events-per-packet estimate has so far been used by MT devices
only. This patch adjusts the packet buffer size to also accomodate the
KEY and MSC events.  Keyboards normally send one or two keys at a
time. MT devices normally send a number of button keys along with the
MT information.  The buffer size chosen here covers those cases, and
matches the default buffer size in evdev. Since the input estimate is
now preferred, remove the special input-mt estimate.

Reviewed-and-tested-by: Ping Cheng <pingc@wacom.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:17 +02:00
Henrik Rydberg 8d18fba282 Input: Break out MT data
Move all MT-related things to a separate place. This saves some
bytes for non-mt input devices, and prepares for new MT features.

Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2012-09-19 19:50:17 +02:00
Dmitry Torokhov 527df5fae9 Revert "input: ab8500-ponkey: Create AB8500 domain IRQ mapping"
This reverts commit ca3b3faf9b.

There was a plan to place ab8500_irq_get_virq() calls in each AB8500
child device prior to requesting an IRQ, but as we're no longer using
Device Tree to collect our IRQ numbers, it's actually better to allow
the core to do this during device registration time. So the IRQ number
we pull from its resource has already been converted to a virtual IRQ.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-09-19 10:23:18 -07:00
Dmitry Torokhov 0b6c404a07 Linux 3.6-rc5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJQS9hEAAoJEHm+PkMAQRiGo04H/0UmrnxfD6NLS8SGE8EOqbn+
 d2kSVcLxvpBAOSg6chvNgxnUoohL3Or4LpagqLSsfAYgLBmGw8lPEEOFJ3MMXhsd
 /YYJti2Hyke0zFfbW3ZxUmL1d+DFopqgjLeDLsabcTuL9ksVkA5tOeIwyEVZb9k0
 8Uwh4ejscKHdNUZXMWB6DQoxnDFwlgdz+/n8Bj/v7w71suvIxSWSo2A7TtfVhMsz
 34uifzaawhs8bldpHkRuuo6+YSNs+ozhVFcz8aT/zf7egDjCfuVA098Te28k2PKS
 LMQs9uDpXEJ3jE7/bb4O9iSc0+ZlBLz5c3XDj5ijqjdC3Us8Na6dRB0eu3Wdb+o=
 =KJIJ
 -----END PGP SIGNATURE-----

Merge tag 'v3.6-rc5' into for-linus

Sync with mainline so that I can revert an input patch that came in through
another subsystem tree.
2012-09-19 10:21:21 -07:00
Tejun Heo 6889125b8b cpufreq/powernow-k8: workqueue user shouldn't migrate the kworker to another CPU
powernowk8_target() runs off a per-cpu work item and if the
cpufreq_policy->cpu is different from the current one, it migrates the
kworker to the target CPU by manipulating current->cpus_allowed.  The
function migrates the kworker back to the original CPU but this is
still broken.  Workqueue concurrency management requires the kworkers
to stay on the same CPU and powernowk8_target() ends up triggerring
BUG_ON(rq != this_rq()) in try_to_wake_up_local() if it contends on
fidvid_mutex and sleeps.

It is unclear why this bug is being reported now.  Duncan says it
appeared to be a regression of 3.6-rc1 and couldn't reproduce it on
3.5.  Bisection seemed to point to 63d95a91 "workqueue: use @pool
instead of @gcwq or @cpu where applicable" which is an non-functional
change.  Given that the reproduce case sometimes took upto days to
trigger, it's easy to be misled while bisecting.  Maybe something made
contention on fidvid_mutex more likely?  I don't know.

This patch fixes the bug by using work_on_cpu() instead if @pol->cpu
isn't the same as the current one.  The code assumes that
cpufreq_policy->cpu is kept online by the caller, which Rafael tells
me is the case.

stable: ed48ece27c ("workqueue: reimplement work_on_cpu() using
        system_wq") should be applied before this; otherwise, the
        behavior could be horrible.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Duncan <1i5t5.duncan@cox.net>
Tested-by: Duncan <1i5t5.duncan@cox.net>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: stable@vger.kernel.org
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47301
2012-09-19 10:15:01 -07:00
Axel Lin 206e3f1cda HID: picolcd_core: Remove setting hdev->claimed before calling hid_hw_start()
Current implementation of hid_hw_start() allows connect_mask to be 0.
Setting hdev->claimed = HID_CLAIMED_INPUT before calling hid_hw_start() is not
necessary. Remove it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-By: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-19 13:57:03 +02:00
Bruno Prémont bb5c32d998 HID: picoLCD: drop version check during probe
Commit 4ea5454203
[HID: Fix race condition between driver core and ll-driver] introduced
new locking around probe/remove functions that prevents any report/reply
from hardware to reach driver until it returned from probe.

As such, the ask-reply way to checking picoLCD firmware version during
probe is bound to timeout and let probe fail.

Drop the check to let driver successfully probe again (until locking issues
are resolved allowing to reinstate the check).

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-19 13:43:51 +02:00
Axel Lin 8908dd8063 HID: wacom: Fix wacom_probe error handling
OLEDs/LED are not critical for tablet functioning thus ignore OLED/LED
initialisation failures.

This patch does clean up all the sysfs attribute files in error paths.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Tested-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-19 13:40:56 +02:00
NeilBrown 6dafab6b13 md: make sure metadata is updated when spares are activated or removed.
It isn't always necessary to update the metadata when spares are
removed as the presence-or-not of a spare isn't really important to
the integrity of an array.
Also activating a spare doesn't always require updating the metadata
as the update on 'recovery-completed' is usually sufficient.

However the introduction of 'replacement' devices have made these
transitions sometimes more important.  For example the 'Replacement'
flag isn't cleared until the original device is removed, so we need
to ensure a metadata update after that 'spare' is removed.

So set MD_CHANGE_DEVS whenever a spare is activated or removed, to
complement the current situation where it is set when a spare is added
or a device is failed (or a number of other less common situations).

This is suitable for -stable as out-of-data metadata could lead
to data corruption.
This is only relevant for 3.3 and later 9when 'replacement' as
introduced.

Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
2012-09-19 12:54:22 +10:00
NeilBrown e5c86471f9 md/raid5: fix calculate of 'degraded' when a replacement becomes active.
When a replacement device becomes active, we mark the device that it
replaces as 'faulty' so that it can subsequently get removed.
However 'calc_degraded' only pays attention to the primary device, not
the replacement, so the array appears to become degraded, which is
wrong.

So teach 'calc_degraded' to consider any replacement if a primary
device is faulty.

This is suitable for -stable as an incorrect 'degraded' value can
confuse md and could lead to data corruption.
This is only relevant for 3.3 and later.

Cc: stable@vger.kernel.org
Reported-by: Robin Hill <robin@robinhill.me.uk>
Reported-by: John Drescher <drescherjm@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2012-09-19 12:52:30 +10:00
NeilBrown a852d7b8a0 Revert "md/raid5: For odirect-write performance, do not set STRIPE_PREREAD_ACTIVE."
This reverts commit 895e3c5c58.

While this patch seemed like a good idea and did help some workloads,
it hurts other workloads.
Large sequential O_DIRECT writes were faster,
Small random O_DIRECT writes were slower.

Other changes (batching RAID5 writes) have improved the sequential
writes using a different mechanism, so the net result of this patch
is definitely negative.  So revert it.

Reported-by: Shaohua Li <shli@kernel.org>
Tested-by: Jianpeng Ma <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2012-09-19 12:48:30 +10:00
Emmanuel Grumbach a7be50b7e3 iwlwifi: don't double free the interrupt in failure path
When the driver can't get the HW ready, we would release
the interrupt twice which made the kernel complain loudly.

Cc: stable@vger.kernel.org
Reported-by: Brian Cockrell <brian.cockrell@intel.com>
Tested-by: Brian Cockrell <brian.cockrell@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-18 20:43:23 -04:00
Tushar Dave 59d86c760f e1000: Small packets may get corrupted during padding by HW
On PCI/PCI-X HW, if packet size is less than ETH_ZLEN,
packets may get corrupted during padding by HW.
To WA this issue, pad all small packets manually.

Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-18 16:32:21 -04:00
Nikolay Aleksandrov e4d1aa40e3 netxen: check for root bus in netxen_mask_aer_correctable
Add a check if pdev->bus->self == NULL (root bus). When attaching
a netxen NIC to a VM it can be on the root bus and the guest would
crash in netxen_mask_aer_correctable() because of a NULL pointer
dereference if CONFIG_PCIEAER is present.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-18 16:22:08 -04:00
Parag Warudkar 521cf64892 hwmon: (applesmc) Bump max wait
A heavy-load test on a MacBookPro6,1 is still showing a substantial
amount of read errors.  Increasing the maximum wait time to 128 ms
resolves the issue.

Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-18 13:20:49 -07:00
Guenter Roeck 3ceefe4319 hwmon: (ad7314) Add 'name' sysfs attribute
The 'name' sysfs attribute is mandatory for hwmon devices, but was missing
in this driver.

Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
2012-09-18 13:20:35 -07:00
Michal Schmidt e488921f44 bnx2x: fix rx checksum validation for IPv6
Commit d6cb3e41 "bnx2x: fix checksum validation" caused a performance
regression for IPv6. Rx checksum offload does not work. IPv6 packets
are passed to the stack with CHECKSUM_NONE.

The hardware obviously cannot perform IP checksum validation for IPv6,
because there is no checksum in the IPv6 header. This should not prevent
us from setting CHECKSUM_UNNECESSARY.

Tested on BCM57711.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-18 16:13:46 -04:00
Linus Torvalds 925a6f0bf8 A single hwspinlock fix by Wei Yongjun, which prevents potential
NULL dereferences.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQWBd8AAoJELLolMlTRIoMsdQQAKGtNY9sF8FlWWLl49RTO8iZ
 gb9p0Frb5HGaW9FYW6tGfn2CKqKpd4K0MJ+4BhXYr099rwXEZeQ6SIjMZg6wzvO3
 +l84yYv6aJZmOWFvK6ViiID2tfVm583bQ+dDRjZnqxa2miTKAkEEX4unuSZzd/MR
 uaR7xta4Ya4y09zkyPrsZuBysVPGged3/FqzeHqPaSlOAcQx1DfHWIu2eOlKV2lW
 uBHnWMXzL0gOZhnj/93aLf/I0gQiKs2a9JWZqz9BGXSS2Jh5Td9GEKdr7pBcesPi
 78543/gZnE03q5RgzkrredGqepxWTrwJugHoDwOwTb3V7+yUHin8uqFwkjenF1uL
 xTMsqX84Fao71s1IF3Na1lCZrkAGazY7KJhjYaoLy/lwmUa1Y3VnZwJvOdbqhlTd
 3DeSAldDjhCdf7vZnJA1PTsRowRR9BWKSm/vdrL5gUXxsufJwS8xAWgModSGvn4P
 9I2Mr9yaU2OgRyP10NfBXBI6cykH1DwniFJ1313Yp1K8JXSFI5KmSi04fKeINP6s
 K1GXvxdfaLvODXOtYz097pLx7BxwPKoW05C+lglavdlVSzuQoP/DwLdX0V8hcl0L
 sDxW5/jg8ZR9tk3DPOBeOpmMBz2me+3e1F2V+ztXicP03WLpQN2Al5QK9SUdKKLx
 h4ZVlbfOR6SKwyFASNDp
 =wZhC
 -----END PGP SIGNATURE-----

Merge tag 'hwspinlock-3.6-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock

Pull hwspinlock fix from Ohad Ben-Cohen:
 "A single hwspinlock fix by Wei Yongjun, which prevents potential NULL
  dereferences"

* tag 'hwspinlock-3.6-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
  hwspinlock/core: move the dereference below the NULL test
2012-09-18 11:58:54 -07:00
Stephen M. Cameron 256d0eaac8 [SCSI] hpsa: fix handling of protocol error
If a command status of CMD_PROTOCOL_ERR is received, this
information should be conveyed to the SCSI mid layer, not
dropped on the floor.  CMD_PROTOCOL_ERR may be received
from the Smart Array for any commands destined for an external
RAID controller such as a P2000, or commands destined for tape
drives or CD/DVD-ROM drives, if for instance a cable is
disconnected.  This mostly affects multipath configurations, as
disconnecting a cable on a non-multipath configuration is not
going to do anything good regardless of whether CMD_PROTOCOL_ERR
is handled correctly or not.  Not handling CMD_PROTOCOL_ERR
correctly in a multipath configaration involving external RAID
controllers may cause data corruption, so this is quite a serious
bug.  This bug should not normally cause a problem for direct
attached disk storage.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-18 12:29:30 +01:00
Stephen M. Cameron 2453f5f992 cciss: fix handling of protocol error
If a command completes with a status of CMD_PROTOCOL_ERR, this
information should be conveyed to the SCSI mid layer, not dropped
on the floor.  Unlike a similar bug in the hpsa driver, this bug
only affects tape drives and CD and DVD ROM drives in the cciss
driver, and to induce it, you have to disconnect (or damage) a
cable, so it is not a very likely scenario (which would explain
why the bug has gone undetected for the last 10 years.)

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-09-18 11:57:08 +02:00
Florian Echtler a2f6e4e009 HID: wiimote: fix weight conversion error for values > 17kg
Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-18 11:37:14 +02:00
Laurent Pinchart 077664a264 sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path
The sh_pfc_gpio_request_enable() function acquires a spinlock but fails
to release it before returning if the requested mux type is not
supported. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-09-18 16:54:46 +09:00
Sachin Kamat 61c6e7531d DMA: PL330: Check the pointer returned by kzalloc
kzalloc could return NULL. Hence add a check to avoid
NULL pointer dereference.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-09-18 09:04:52 +05:30
Sachin Kamat 2e2c682bec DMA: PL330: Fix potential NULL pointer dereference in pl330_submit_req()
'r->cfg' is being checked for NULL. However, it is dereferenced
in the previous statements. Thus moving those statements within
the check.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-09-18 09:04:52 +05:30
Linus Torvalds 08077ca849 Merge branch 'akpm' (Andrew's patch-bomb)
Merge fixes from Andrew Morton:
 "13 patches.  12 are fixes and one is a little preparatory thing for
  Andi."

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (13 commits)
  memory hotplug: fix section info double registration bug
  mm/page_alloc: fix the page address of higher page's buddy calculation
  drivers/rtc/rtc-twl.c: ensure all interrupts are disabled during probe
  compiler.h: add __visible
  pid-namespace: limit value of ns_last_pid to (0, max_pid)
  include/net/sock.h: squelch compiler warning in sk_rmem_schedule()
  slub: consider pfmemalloc_match() in get_partial_node()
  slab: fix starting index for finding another object
  slab: do ClearSlabPfmemalloc() for all pages of slab
  nbd: clear waiting_queue on shutdown
  MAINTAINERS: fix TXT maintainer list and source repo path
  mm/ia64: fix a memory block size bug
  memory hotplug: reset pgdat->kswapd to NULL if creating kernel thread fails
2012-09-17 15:01:14 -07:00
Kevin Hilman 8dcebaa9a0 drivers/rtc/rtc-twl.c: ensure all interrupts are disabled during probe
On some platforms, bootloaders are known to do some interesting RTC
programming.  Without going into the obscurities as to why this may be
the case, suffice it to say the the driver should not make any
assumptions about the state of the RTC when the driver loads.  In
particular, the driver probe should be sure that all interrupts are
disabled until otherwise programmed.

This was discovered when finding bursty I2C traffic every second on
Overo platforms.  This I2C overhead was keeping the SoC from hitting
deep power states.  The cause was found to be the RTC firing every
second on the I2C-connected TWL PMIC.

Special thanks to Felipe Balbi for suggesting to look for a rogue driver
as the source of the I2C traffic rather than the I2C driver itself.

Special thanks to Steve Sakoman for helping track down the source of the
continuous RTC interrups on the Overo boards.

Signed-off-by: Kevin Hilman <khilman@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Tested-by: Steve Sakoman <steve@sakoman.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Tested-by: Shubhrajyoti Datta <omaplinuxkernel@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-09-17 15:00:38 -07:00
Paul Clements fded4e090c nbd: clear waiting_queue on shutdown
Fix a serious but uncommon bug in nbd which occurs when there is heavy
I/O going to the nbd device while, at the same time, a failure (server,
network) or manual disconnect of the nbd connection occurs.

There is a small window between the time that the nbd_thread is stopped
and the socket is shutdown where requests can continue to be queued to
nbd's internal waiting_queue.  When this happens, those requests are
never completed or freed.

The fix is to clear the waiting_queue on shutdown of the nbd device, in
the same way that the nbd request queue (queue_head) is already being
cleared.

Signed-off-by: Paul Clements <paul.clements@steeleye.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-09-17 15:00:37 -07:00
Guenter Roeck 4e21f4eaa4 hwmon: (ads7871) Add 'name' sysfs attribute
The 'name' sysfs attribute is mandatory for hwmon devices, but was missing
in this driver.

Cc: Paul Thomas <pthomas8589@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Paul Thomas <pthomas8589@gmail.com>
2012-09-17 14:29:20 -07:00
Alex Deucher 2f1f4d9b60 Revert "drm/radeon: rework pll selection (v3)"
This reverts commit 985f61f7ee.

This commit fixed certain cases, but ended up regressing others
due to limitations in the current KMS API.  A proper fix is too
invasive for 3.6.  Push it back to 3.7.

Reported-by: Andres Freund <andres@anarazel.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-17 17:26:24 -04:00
Linus Torvalds 2ade0b7f79 Last set of InfiniBand/RDMA fixes for 3.6:
- Couple more IPoIB fixes for regressions introduced by path database conversion
  - Minor other fixes to low-level drivers (cxgb4, mlx4, qib, ocrdma)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABCAAGBQJQV0eiAAoJEENa44ZhAt0hTScP/3+Y8v4w3Nyop7iNj9uvnsCn
 PhgfY9XUp9d0zOHM7XK+pTGLJheLLiyXfcCFTwgoC6tIyj7J1ulhYv+RBr7GbS+e
 K7aG7QtLDyM17ETgOBVIAvkz1CFKwdI843xRQKo0/oVMQJ9XLHg0nvzd+XaxZuud
 C+7Lfl5RH9Bl1tHJuOZmdyJinSQyLO/uV+tqwL5upF5YMTCJ2XsmVa1HQKhOAkBE
 bH4zXtFViNEKVuKXkpGc1yJFKZiwysirluYXedDkkEdr2jf9Mysw5JvZKVUOCh+4
 qYMjEAWQaUBia/tFUs9k6iCwE8ws7tRC4OSisb3cVzCUaqkfmx1Sp7vAQcDqx4xB
 r2dy4oc+vEFdrmjerOVEgmdgTwnDrWMjUlPuGyRX9935I7ybKA7NQPGlImKU8oiq
 8vyptsTN6r7AYc7kw6aYaE9kqGPnST7I3cZg71lHfwCuHKMNYfkxd1Mqxx/W6rMZ
 G1VnstVdioQK2HvcFIeArXQ6H6QjUAY92WMoyhIsrU4KwEx2Zpr0pfKWCD0eIOuB
 f4s9v0f5/6DqSwJ9uhhpAW/5bmV+RUCDjm8Ep9i70bGk7SliwT0MNPhHbaMfm7aU
 c+awy3HWpWKGCtod9zUzJH/4NsHzpggdHUlyAOuU5nqsh9GarYb0cvLjTNfsfdyV
 haQtMR+fSUK7Durd9MQl
 =nqvR
 -----END PGP SIGNATURE-----

Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

Pull InfiniBand/RDMA fixes from Roland Dreier:
 - A couple more IPoIB fixes for regressions introduced by path database
   conversion
 - Minor other fixes to low-level drivers (cxgb4, mlx4, qib, ocrdma)

* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/qib: Fix failure of compliance test C14-024#06_LocalPortNum
  RDMA/ocrdma: Fix CQE expansion of unsignaled WQE
  mlx4_core: Fix integer overflows so 8TBs of memory registration works
  IPoIB: Fix AB-BA deadlock when deleting neighbours
  IPoIB: Fix memory leak in the neigh table deletion flow
  RDMA/cxgb4: Move dereference below NULL test
2012-09-17 13:21:02 -07:00
Stefan Achatz ca9bbdcc89 HID: roccat: conditional blacklisting of Roccat modules
Roccat devices are standard compatible, specific drivers are only needed
for extended functionality.
If Roccat drivers are not configured, hid-generic binds these devices now.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17 17:27:19 +02:00
Florian Echtler 3155a09fd5 HID: wiimote: Parse calibration data of balance boards
The raw pressure-data that is reported by balance-boards is pretty useless
unless calibration data is applied. Therefore, we read the full
calibration data on extension initialization and apply it to every
reported data.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17 17:22:43 +02:00
David Herrmann 5ad67fbc2a HID: wiimote: Add Nintendo Balance-Board support
The Nintendo Balance-Board is a controller which behaves exactly like the
Wii Remote but reports all its data through a special extension device.
Hence, we can simply add the Balance-Board as extension device and we get
full support for it.

Tested-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17 17:19:49 +02:00
sreekanth.reddy@lsi.com 10cce6d8b5 [SCSI] mpt2sas: Fix for issue - Unable to boot from the drive connected to HBA
This patch checks whether HBA is SAS2008 B0 controller.
if it is a SAS2008 B0 controller then it use IO-APIC interrupt instead of MSIX,
as SAS2008 B0 controller doesn't support MSIX interrupts.

[jejb: fix whitespace problems]
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@lsi.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-17 13:49:47 +01:00
Eddie Wai d653220711 [SCSI] bnx2i: Fixed NULL ptr deference for 1G bnx2 Linux iSCSI offload
This patch fixes the following kernel panic invoked by uninitialized fields
in the chip initialization for the 1G bnx2 iSCSI offload.

One of the bits in the chip initialization is being used by the latest
firmware to control overflow packets.  When this control bit gets enabled
erroneously, it would ultimately result in a bad packet placement which would
cause the bnx2 driver to dereference a NULL ptr in the placement handler.

This can happen under certain stress I/O environment under the Linux
iSCSI offload operation.

This change only affects Broadcom's 5709 chipset.

Unable to handle kernel NULL pointer dereference at 0000000000000008 RIP:
 [<ffffffff881f0e7d>] :bnx2:bnx2_poll_work+0xd0d/0x13c5
Pid: 0, comm: swapper Tainted: G     ---- 2.6.18-333.el5debug #2
RIP: 0010:[<ffffffff881f0e7d>]  [<ffffffff881f0e7d>] :bnx2:bnx2_poll_work+0xd0d/0x13c5
RSP: 0018:ffff8101b575bd50  EFLAGS: 00010216
RAX: 0000000000000005 RBX: ffff81007c5fb180 RCX: 0000000000000000
RDX: 0000000000000ffc RSI: 00000000817e8000 RDI: 0000000000000220
RBP: ffff81015bbd7ec0 R08: ffff8100817e9000 R09: 0000000000000000
R10: ffff81007c5fb180 R11: 00000000000000c8 R12: 000000007a25a010
R13: 0000000000000000 R14: 0000000000000005 R15: ffff810159f80558
FS:  0000000000000000(0000) GS:ffff8101afebc240(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000008 CR3: 0000000000201000 CR4: 00000000000006a0
Process swapper (pid: 0, threadinfo ffff8101b5754000, task ffff8101afebd820)
Stack:  000000000000000b ffff810159f80000 0000000000000040 ffff810159f80520
 ffff810159f80500 00cf00cf8008e84b ffffc200100939e0 ffff810009035b20
 0000502900000000 000000be00000001 ffff8100817e7810 00d08101b575bea8
Call Trace:
 <IRQ>  [<ffffffff8008e0d0>] show_schedstat+0x1c2/0x25b
 [<ffffffff881f1886>] :bnx2:bnx2_poll+0xf6/0x231
 [<ffffffff8000c9b9>] net_rx_action+0xac/0x1b1
 [<ffffffff800125a0>] __do_softirq+0x89/0x133
 [<ffffffff8005e30c>] call_softirq+0x1c/0x28
 [<ffffffff8006d5de>] do_softirq+0x2c/0x7d
 [<ffffffff8006d46e>] do_IRQ+0xee/0xf7
 [<ffffffff8005d625>] ret_from_intr+0x0/0xa
 <EOI>  [<ffffffff801a5780>] acpi_processor_idle_simple+0x1c5/0x341
 [<ffffffff801a573d>] acpi_processor_idle_simple+0x182/0x341
 [<ffffffff801a55bb>] acpi_processor_idle_simple+0x0/0x341
 [<ffffffff80049560>] cpu_idle+0x95/0xb8
 [<ffffffff80078b1c>] start_secondary+0x479/0x488

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Cc: stable@vger.kernel.org
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-17 13:40:32 +01:00
Sachin Kamat a6fbaacfb9 HID: Fix return values in open_collection()
Return -ENOMEM instead of -1 if memory allocation fails.
Return -EINVAL instead of -1 for stack overflow and
underflow errors.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17 13:15:55 +02:00
Axel Lin 832fbeaef4 HID: lenovo-tpkbd: Remove unnecessary casts of void pointers
container_of() never returns NULL, thus also remove the NULL checking for it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17 13:09:02 +02:00
Axel Lin 372d297b8c HID: prodikeys: Remove unnecessary casts of void pointers
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17 13:08:30 +02:00
Axel Lin 4629fd160f HID: lg4ff: Remove unnecessary casts of void pointers
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17 13:07:34 +02:00
Axel Lin 2575155309 HID: lg: Remove unnecessary casts of void pointers
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-17 13:05:34 +02:00
Wang Xingchao b98b601672 drm/i915: HDMI - Clear Audio Enable bit for Hot Plug
Clear Audio Enable bit to trigger unsolicated event to notify Audio
Driver part the HDMI hot plug change. The patch fixed the bug when
remove HDMI cable the bit was not cleared correctly.

In intel_hdmi_dpms(), if intel_hdmi->has_audio been true, the "Audio enable bit" will
be set to trigger unsolicated event to notify Alsa driver the change.

intel_hdmi->has_audio will be reset to false from intel_hdmi_detect() after
remove the hdmi cable, here's debug log:

[  187.494153] [drm:output_poll_execute], [CONNECTOR:17:HDMI-A-1] status updated from 1 to 2
[  187.525349] [drm:intel_hdmi_detect], HDMI: has_audio = 0

so when comes back to intel_hdmi_dpms(), the "Audio enable bit" will not be cleared. And this
cause the eld infomation and pin presence doesnot update accordingly in alsa driver side.

This patch will also trigger unsolicated event to alsa driver to notify the hot plug event:

[  187.853159] ALSA sound/pci/hda/patch_hdmi.c:772 HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=1
[  187.853268] ALSA sound/pci/hda/patch_hdmi.c:990 HDMI status: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=0

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-17 10:13:02 +02:00
Chris Wilson 7e81a42e34 drm/i915: Reduce a pin-leak BUG into a WARN
Pin-leaks persist and we get the perennial bug reports of machine
lockups to the BUG_ON(pin_count==MAX). If we instead loudly report that
the object cannot be pinned at that time it should prevent the driver from
locking up, and hopefully restore a semblance of working whilst still
leaving us a OOPS to debug.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-17 10:12:57 +02:00
Daniel Vetter 5b5896e4e1 drm/i915: enable lvds pin pairs before dpll on gen2
Otherwise things migt not work too well.

Breakage introduced in

commit eb1cbe4848
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Mar 28 23:12:16 2012 +0200

    drm/i915: split PLL update code out of i9xx_crtc_mode_set

Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@vger.kernel.org (for 3.5 only)
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-17 10:04:39 +02:00
Stefan Haberland 03429f34c2 s390/dasd: fix read unit address configuration loop
Read unit address is done for all devices during online processing to read
out LCU features. This is also done after disconnect/connect a LCU.
Some older storage hardware does not provide the capability to read unit
address configuration.
This leads to a loop trying to read unit address configuration every 30
seconds. The device is still operational but logs are flooded with error
messages.

Fix the loop by recognizing a command reject saying that the suborder
for ruac is not supported.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-09-17 09:58:21 +02:00
Stefan Haberland 12d7b1078b s390/dasd: fix pathgroup race
If a new path is available we need to verify the path data. If it is the
first path for a device the stop bits are removed after path verification.
If a pathgroup is established we need to set system characteristics for
the lcu. Therefore I/O has to be started.
If the device is stopped the set system characteristics worker may block
the path verification worker and the device is blocked.

Turn on failfast for set system characteristics CQR to prevent a deadlock
with the path verification worker.

If a pathgroup is established on a device that is not in use trigger path
verification. Maybe we were not informed about a working path.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Reviewed-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-09-17 09:58:18 +02:00
David S. Miller a1f6d8f771 Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says:

====================
This is a batch of fixes intended for the 3.6 stream.

Arend van Spriel sends a simple thinko fix to correct a constant,
preventing the setting of an invalid power level.

Colin Ian King gives us a simple allocation failure check to avoid a
NULL pointer dereference.

Felix Fietkau sends another ath9k tx power patch, this time disabling a
feature that has been reported to cause rx problems.

Hante Meuleman provides a pair of endian fixes for brcmfmac.

Larry Finger offers an rtlwifi fix that avoids a system lockup related
to loading the wrong firmware for RTL8188CE devices.

These have been in linux-next for a few days and I think they should be
included in the final 3.6 kernel if possible.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-17 01:28:58 -04:00
Linus Torvalds 73f8be297e This is the remaining MFD fixes for 3.6, with 5 pending fixes:
- A tps65217 build error fix.
 - A lcp_ich regression fix caused by the MFD driver failing to initialize the
   watchdog sub device due to ACPI conflicts.
 - 2 MAX77693 interrupt handling bug fixes.
 - An MFD core fix, adding an IRQ domain argument to the MFD device addition
   API in order to prevent silent and potentially harmful remapping behaviour
   changes for drivers supporting non-DT platforms.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQVQpwAAoJEIqAPN1PVmxKpnQP/iDPakfGT0m00nxk9VvuXfaA
 SlNxhhM1ZPxlZcBrVFULZ+dCVuUaBYIfwoT4Wwl2yZsmp8uYb62Rd6LGXDnjO+FH
 zKMg3b/KDHq/jicYxqFy4bVq3I850jTLN4Hti6hArn8HM6gxZJQxM810Poxt6M0T
 odud6oHSevGpCoL7GU4O+gmx1wKSDRrw6TZPokJDfXaQcFPJEt0YGGtI2zAO1sV+
 iBPQE/bI3bF5r/kowbh9ro5WybGNyFrwiYtaTzJWntXoPKN1lmr0F2F2NaCEo1xj
 2vJPFSCK3qC9Ft7sPQEBYxrSXzyzgu7G8HGgkcBG5SaSo+W3awe9DEaHfk5E7sdr
 iyc01kh4FmGlMAvHG/zcK3YvchR7GJdRI7BrR+MTQ03ZUv/ZrmTYFAHv5fAzBQ+N
 6ZUoC/1bqPKpfeFPOKYpDeYJVnFBWLYr+t7McTqqg+kpxUuYnQ0HyJVjDh01ZVQT
 AtCjjW7R+Ka44B+xfMOartPZMqZZEHSJ0UjacyEyzMpAAY14eUDMtTqs/jtNp+8Z
 B0bZiA8ZhUmNVH7TZoT/u57FgEW34JnM8oH6jLVN+yjInpuugIvqpZn0TA90GL7V
 Fh2DALMgUN5z/TXduGSsSPg1hvXFPOujaS+4o78e8PWiVQd5XUk/mc8OOS/mrRwj
 +mILnzxJcp8iYrYqESbt
 =nP/y
 -----END PGP SIGNATURE-----

Merge tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

Pull mfd fixes from Samuel Ortiz:
 "This is the remaining MFD fixes for 3.6, with 5 pending fixes:

   - A tps65217 build error fix.
   - A lcp_ich regression fix caused by the MFD driver failing to
     initialize the watchdog sub device due to ACPI conflicts.
   - 2 MAX77693 interrupt handling bug fixes.
   - An MFD core fix, adding an IRQ domain argument to the MFD device
     addition API in order to prevent silent and potentially harmful
     remapping behaviour changes for drivers supporting non-DT
     platforms."

* tag 'mfd-for-linus-3.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: MAX77693: Fix NULL pointer error when initializing irqs
  mfd: MAX77693: Fix interrupt handling bug
  mfd: core: Push irqdomain mapping out into devices
  mfd: lpc_ich: Fix a 3.5 kernel regression for iTCO_wdt driver
  mfd: Move tps65217 regulator plat data handling to regulator
2012-09-16 13:22:21 -07:00
Linus Torvalds c500ce38e5 While this comes a bit later than I had wished, both patches are rather
minor and touch only new drivers so I think these are still safe for
 merging.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQVcWAAAoJEN0jrNd/PrOhmtEP/jy9tG/aP15UM9lPacVNz89V
 LaO0jYRBZtS8A8Gi5smdjQj6nQ+ir7P06jF5YyRzA1gNkUU2pDCrdIs8Sf0KJkL0
 sJ5dRHEYuK3MNdwK2ajR6LkpFtMtGXpQtoyilwvRZWNgWCo7LMBK7k2xGYPfyF6r
 yc8/OuOyZzC83p54prW8JCun7XShgel4KYoCvYWnYzmZZ5ct0jARCgl49eJagul3
 I3nlvGfDYI4nZd9KSuWiKIor8lyW7Sk2WKfl7g9EIX+EKzsxFToQ/sRiT5mGtrTG
 gzGp31DJGVaCpdhk2/2AkjCxkh/JYNo3YqBXmQRMpGj7nkHOpQ6tz4nz1DGmJU9f
 c5ZY9rW8AUXTP0vQcW5PbxE0xnOZOVDCgkX2ZQuE7av34QPjVDsl/zDI9amx/EMC
 imyoZPk/lssVy3fuXRG4uxjmyULqk/TMnrx6pNcPOxeFr9JKs3NJVELFd6z0enrt
 6AmaaRol+XiF9IGRzai6CwwIDN8hYd9qp6e1U0bkk7bmo1D05OsUodClxX17Rr/S
 kGH6hAhhE4miWUJ2pYyfJOC1R7Tbre1G2H2wlv5jjVzNVrzasU/8NYJ8G0dYuj9z
 LCExF0QBCfZlHjW3Jn7tpLhFY0S0pSEViGckdb1kLoY3qXGHCnJhQdVon5ceWS/v
 0y7277cvE9R11TJiI2aF
 =tCsJ
 -----END PGP SIGNATURE-----

Merge tag 'for-3.6-rc6' of git://gitorious.org/linux-pwm/linux-pwm

Pull pwm fixes from Thierry Reding:
 "While this comes a bit later than I had wished, both patches are
  rather minor and touch only new drivers so I think these are still
  safe for merging."

* tag 'for-3.6-rc6' of git://gitorious.org/linux-pwm/linux-pwm:
  pwm: pwm-tiehrpwm: Fix conflicting channel period setting
  pwm: pwm-tiecap: Disable APWM mode after configure
2012-09-16 13:20:43 -07:00
Linus Torvalds 76e77daf65 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull scsi target fixes from Nicholas Bellinger:
 "Here is the current set of target-pending fixes headed for v3.6-final

  The main parts of this series include bug-fixes from Paolo Bonzini to
  address an use-after-free bug in pSCSI sense exception handling, along
  with addressing some long-standing bugs wrt the handling of zero-
  length SCSI CDB payloads also specific to pSCSI pass-through device
  backends."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: go through normal processing for zero-length REQUEST_SENSE
  target: support zero allocation length in REQUEST SENSE
  target: support zero-size allocation lengths in transport_kmap_data_sg
  target: fail REPORT LUNS with less than 16 bytes of payload
  target: report too-small parameter lists everywhere
  target: go through normal processing for zero-length PSCSI commands
  target: fix use-after-free with PSCSI sense data
  target: simplify code around transport_get_sense_data
  target: move transport_get_sense_data
  target: Check idr_get_new return value in iscsi_login_zero_tsih_s1
  target: Fix ->data_length re-assignment bug with SCSI overflow
2012-09-16 13:00:36 -07:00
Linus Torvalds 9bc67590a6 Power management fixes for 3.6-rc6
* Three ACPI device power management fixes related to checking and
   setting device power states.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJQVN5wAAoJEKhOf7ml8uNsUEUQAJN7kQI4x/3BRw+JPXsuQcZ+
 HKoAT23eKuPpkuBgfnyacB0NMVB8VVLoYqFq/L282k2mkuO/dJ1NVruAOBikuApH
 U/bf7Rct2gFI0AkPBAx+itGnNx2xxALd0NbpZLgccKxgmbc5TT5BtzYK9uFSNSuQ
 y0QzKzGYrlfE7PV1439eQvHn9nffpeJHUoZVJtZlHOPuGlX12SpOEIHnaHnFH1rF
 XY58zYFPDCE0qaWR9r4i/bcgdcatDP30JHSoULtRDse46En2ebGlyuiGZrbs8HZ1
 PzFzjGd3X6vbycX+gpEGuFMzKAyUjFhChZ8DGGlTQ7H3mxDBBtNIDiqIdKw27DUJ
 LvwpOk8LPAcgkO0zvoUf3Won92HcXS2TPC6/AjosOYXi9n9gZFzCVuKTnvUDcEP3
 AI1+MVGELEJowIYkx8Thafcr0ipEsMXMb2GQfnSuotdL6V/pzlMZsaJneMp34W3v
 P/3CkOj+JEH3K6Ode4AoRQB+pwLBLPBHAN/sNTUtNLDUrkNYmNdDHiam7ZyG6ffh
 2Sxrc9N1e3Q0Ogy1h+vMr/ZjUbiPyCl5YlsC+Iasm0AuvioN00IFNMEcSlRzS6X8
 HhjNVMUIOoIwU4ZBm3lnTnMh2DnlRtJDH9NHuW9qR/g/7cHn3oiBEGZ5GOrA5Q+L
 3QkosGc/V7tMPuA+tZiO
 =TTmm
 -----END PGP SIGNATURE-----

Merge tag 'pm-for-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael J. Wysocki:
 "Three ACPI device power management fixes related to checking and
  setting device power states."

* tag 'pm-for-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / PM: Use KERN_DEBUG when no power resources are found
  ACPI / PM: Fix resource_lock dead lock in acpi_power_on_device
  ACPI / PM: Infer parent power state from child if unknown, v2
2012-09-16 12:59:42 -07:00
Chanwoo Choi b186b12487 mfd: MAX77693: Fix NULL pointer error when initializing irqs
This patch initialize register map of MUIC device because mfd driver
of Maxim MAX77693 use regmap-muic instance of MUIC device when irqs of
Maxim MAX77693 is initialized before call max77693-muic probe() function.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-16 00:33:09 +02:00
Chanwoo Choi d51f42d2c5 mfd: MAX77693: Fix interrupt handling bug
This patch fix bug related to interrupt handling for MAX77693 devices.
- Unmask interrupt masking bit for charger/flash/muic to revolve
that interrupt isn't happened when external connector is attached.
- Fix wrong regmap instance when muic interrupt is happened.

This patch were discussed and confirm discussion about this patch on below url:
http://lkml.org/lkml/2012/7/16/118

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-16 00:32:57 +02:00
Mark Brown 0848c94fb4 mfd: core: Push irqdomain mapping out into devices
Currently the MFD core supports remapping MFD cell interrupts using an
irqdomain but only if the MFD is being instantiated using device tree
and only if the device tree bindings use the pattern of registering IPs
in the device tree with compatible properties.  This will be actively
harmful for drivers which support non-DT platforms and use this pattern
for their DT bindings as it will mean that the core will silently change
remapping behaviour and it is also limiting for drivers which don't do
DT with this particular pattern.  There is also a potential fragility if
there are interrupts not associated with MFD cells and all the cells are
omitted from the device tree for some reason.

Instead change the code to take an IRQ domain as an optional argument,
allowing drivers to take the decision about the parent domain for their
interrupts.  The one current user of this feature is ab8500-core, it has
the domain lookup pushed out into the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-15 23:22:04 +02:00
Lars-Peter Clausen 8ef997b67f ARM: 7534/1: clk: Make the managed clk functions generically available
The managed clk functions are currently only available when the generic clk
lookup framework is build. But the managed clk functions are merely wrappers
around clk_get and clk_put and do not depend on any specifics of the generic
lookup functions and there are still quite a few custom implementations of the
clk API. So make the managed functions available whenever the clk API is
implemented.

The patch also removes the custom implementation of devm_clk_get for the
coldfire platform.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-09-15 21:55:27 +01:00
Linus Torvalds 9cb0ee8576 Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86
Pull x86 platform driver updates from Matthew Garrett:
 "A few small updates for 3.6 - a trivial regression fix and a couple of
  conformance updates for the gmux driver, plus some tiny fixes for
  asus-wmi, eeepc-laptop and thinkpad_acpi."

* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
  thinkpad_acpi: buffer overflow in fan_get_status()
  eeepc-laptop: fix device reference count leakage in eeepc_rfkill_hotplug()
  platform/x86: fix asus_laptop.wled_type description
  asus-laptop: HRWS/HWRS typo
  drivers-platform-x86: remove useless #ifdef CONFIG_ACPI_VIDEO
  apple-gmux: Fix port address calculation in gmux_pio_write32()
  apple-gmux: Fix index read functions
  apple-gmux: Obtain version info from indexed gmux
2012-09-14 17:59:35 -07:00
Linus Torvalds 5b799dde31 Merge branch 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux
Pull i2c embedded fixes from Wolfram Sang:
 "The last bunch of (typical) i2c-embedded driver fixes for 3.6.

  Also update the MAINTAINERS file to point to my tree since people keep
  asking where to find their patches."

* 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux:
  i2c: algo: pca: Fix mode selection for PCA9665
  MAINTAINERS: fix tree for current i2c-embedded development
  i2c: mxs: correctly setup speed for non devicetree
  i2c: pnx: Fix read transactions of >= 2 bytes
  i2c: pnx: Fix bit definitions
2012-09-14 17:55:57 -07:00
Linus Torvalds 1c23ce720d Fix word size register read and write operations in ina2xx driver, and
initialize uninitialized structure elements in twl4030-madc-hwmon driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQUqtMAAoJEMsfJm/On5mBMQsP/jH4HzFWMVHg14M5PSrGy9me
 P77+ldlO09SnvmA2qdMZSNfBXrh5bjq6VoPNR5vdX9PB2jdJ0HOdKvyUG9D2eXQD
 jGJAYGk24HrjrGi6FeVD7pP7NGwQRyyVRM1Vmm+n/M781SD66gJPCMO+qC6391ma
 oytVuejT6TVajZtXfWZuKp1GQ2x3lb21hfhrDbnSB3AibYilXSqktx4AjmG+IDRb
 SsNPI+WLu4mNJQMTYFVrrRs2b6PLYDw1ODuIQIoB3lyKEJVOE6mUw2EQXEnzaybb
 F03Ujktgn81/7kvPQK1Qovq97TuwrY0mxDRwg/5brUZo9nNxeMqTMt9IXesDCokf
 euzVUWM+kZ7FLIokl5GwuZt309tVxQozr0aE6JKOi+CPkcT4VskBfC8DfNJ2wqnR
 tUTzFiCa/wo2cr3/iqf6o5sR7eRJBN5lF9RLW14K+2MvotwEDOZ3R/9EtEEL1MSP
 bdGQ1p4swYQxu8O8FFLVVWbPUl4/c0l/dW0yiEpQl/hdHpP2G/DV3pSBLMyrOzGu
 elpm2lFzC+aKG7lm08IpxHzBKXOZZ7Lp3s9FN3koOcAWD/hGlS6jNOPCFpMdlVg0
 uFeMO/lgveuvcTD5llBa9d+yWzCNYPHuqx1kBbiNyZ3sisdwCmuldgISuKPcp7wb
 BQ5Xc6sv7Jg3tDbP12d+
 =gYp1
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "Fix word size register read and write operations in ina2xx driver, and
  initialize uninitialized structure elements in twl4030-madc-hwmon
  driver."

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (ina2xx) Fix word size register read and write operations
  hwmon: (twl4030-madc-hwmon) Initialize uninitialized structure elements
2012-09-14 17:52:29 -07:00
Linus Torvalds dd383af6aa Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "I realise this a bit bigger than I would want at this point.

  Exynos is a large chunk, I got them to half what they wanted already,
  and hey its ARM based, so not going to hurt many people.

  Radeon has only two fixes, but the PLL fixes were a bit bigger, but
  required for a lot of scenarios, the fence fix is really urgent.

  vmwgfx: I've pulled in a dumb ioctl support patch that I was going to
  shove in later and cc stable, but we need it asap, its mainly to stop
  mesa growing a really ugly dependency in userspace to run stuff on
  vmware, and if I don't stick it in the kernel now, everyone will have
  to ship ugly userspace libs to workaround it.

  nouveau: single urgent fix found in F18 testing, causes X to not start
  properly when f18 plymouth is used

  i915: smattering of fixes and debug quieting

  gma500: single regression fix

  So as I said a bit large, but its fairly well scattered and its all
  stuff I'll be shipping in F18's 3.6 kernel."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (26 commits)
  drm/nouveau: fix booting with plymouth + dumb support
  drm/radeon: make 64bit fences more robust v3
  drm/radeon: rework pll selection (v3)
  drm: Drop the NV12M and YUV420M formats
  drm/exynos: remove DRM_FORMAT_NV12M from plane module
  drm/exynos: fix double call of drm_prime_(init/destroy)_file_private
  drm/exynos: add dummy support for dmabuf-mmap
  drm/exynos: Add missing braces around sizeof in exynos_mixer.c
  drm/exynos: Add missing braces around sizeof in exynos_hdmi.c
  drm/exynos: Make g2d_pm_ops static
  drm/exynos: Add dependency for G2D in Kconfig
  drm/exynos: fixed page align bug.
  drm/exynos: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]
  drm/exynos: Use devm_* functions in exynos_drm_g2d.c file
  drm/exynos: Use devm_kzalloc in exynos_drm_hdmi.c file
  drm/exynos: Use devm_kzalloc in exynos_drm_vidi.c file
  drm/exynos: Remove redundant check in exynos_drm_fimd.c file
  drm/exynos: Remove redundant check in exynos_hdmi.c file
  vmwgfx: add dumb ioctl support
  gma500: Fix regression on Oaktrail devices
  ...
2012-09-14 17:51:10 -07:00
Linus Torvalds a1362d504e Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) Use after free and new device IDs in bluetooth from Andre Guedes,
    Yevgeniy Melnichuk, Gustavo Padovan, and Henrik Rydberg.

 2) Fix crashes with short packet lengths and VLAN in pktgen, from
    Nishank Trivedi.

 3) mISDN calls flush_work_sync() with locks held, fix from Karsten
    Keil.

 4) Packet scheduler gred parameters are reported to userspace
    improperly scaled, and WRED idling is not performed correctly.  All
    from David Ward.

 5) Fix TCP socket refcount problem in ipv6, from Julian Anastasov.

 6) ibmveth device has RX queue alignment requirements which are not
    being explicitly met resulting in sporadic failures, fix from
    Santiago Leon.

 7) Netfilter needs to take care when interpreting sockets attached to
    socket buffers, they could be time-wait minisockets.  Fix from Eric
    Dumazet.

 8) sock_edemux() has the same issue as netfilter did in #7 above, fix
    from Eric Dumazet.

 9) Avoid infinite loops in CBQ scheduler with some configurations, from
    Eric Dumazet.

10) Deal with "Reflection scan: an Off-Path Attack on TCP", from Jozsef
    Kadlecsik.

11) SCTP overcharges socket for TX packets, fix from Thomas Graf.

12) CODEL packet scheduler should not reset it's state every time it
    builds a new flow, fix from Eric Dumazet.

13) Fix memory leak in nl80211, from Wei Yongjun.

14) NETROM doesn't check skb_copy_datagram_iovec() return values, from
    Alan Cox.

15) l2tp ethernet was using sizeof(ETH_HLEN) instead of plain ETH_HLEN,
    oops.  From Eric Dumazet.

16) Fix selection of ath9k chips on which PA linearization and AM2PM
    predistoration are used, from Felix Fietkau.

17) Flow steering settings in mlx4 driver need to be validated properly,
    from Hadar Hen Zion.

18) bnx2x doesn't show the correct link duplex setting, from Yaniv
    Rosner.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (75 commits)
  pktgen: fix crash with vlan and packet size less than 46
  bnx2x: Add missing afex code
  bnx2x: fix registers dumped
  bnx2x: correct advertisement of pause capabilities
  bnx2x: display the correct duplex value
  bnx2x: prevent timeouts when using PFC
  bnx2x: fix stats copying logic
  bnx2x: Avoid sending multiple statistics queries
  net: qmi_wwan: call subdriver with control intf only
  net_sched: gred: actually perform idling in WRED mode
  net_sched: gred: fix qave reporting via netlink
  net_sched: gred: eliminate redundant DP prio comparisons
  net_sched: gred: correct comment about qavg calculation in RIO mode
  mISDN: Fix wrong usage of flush_work_sync while holding locks
  netfilter: log: Fix log-level processing
  net-sched: sch_cbq: avoid infinite loop
  net: qmi_wwan: fix Gobi device probing for un2430
  net: fix net/core/sock.c build error
  ixp4xx_hss: fix build failure due to missing linux/module.h inclusion
  caif: move the dereference below the NULL test
  ...
2012-09-14 15:34:07 -07:00
Linus Torvalds 4bca55d3d9 USB patches for 3.6-rc6
Here are a number of USB patches, a bit more than I normally like this
 late in the -rc series, but given people's vacations (myself included),
 and the kernel summit, it seems to have happened this way.
 
 All are tiny, but they add up.  A number of gadget and xhci fixes, and a
 few new device ids.  All have been tested in linux-next.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlBSFeQACgkQMUfUDdst+ykjlACfUj5OOjP+VIZ/LdXpPjeXV4/P
 Ho8An2/5iut+STLa+feA8AvMsvv/WdaL
 =YlCk
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB patches from Greg Kroah-Hartman:
 "Here are a number of USB patches, a bit more than I normally like this
  late in the -rc series, but given people's vacations (myself
  included), and the kernel summit, it seems to have happened this way.

  All are tiny, but they add up.  A number of gadget and xhci fixes, and
  a few new device ids.  All have been tested in linux-next.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'usb-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits)
  usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low
  usb: chipidea: cleanup dma_pool if udc_start() fails
  usb: chipidea: udc: fix error path in udc_start()
  usb: chipidea: udc: add pullup fuction, needed by the uvc gadget
  usb: chipidea: udc: fix setup of endpoint maxpacket size
  USB: option: replace ZTE K5006-Z entry with vendor class rule
  EHCI: Update qTD next pointer in QH overlay region during unlink
  USB: cdc-wdm: fix wdm_find_device* return value
  USB: ftdi_sio: do not claim CDC ACM function
  usb: dwc3: gadget: fix pending isoc handling
  usb: renesas_usbhs: fixup DMA transport data alignment
  usb: gadget: at91udc: Don't check for ep->ep.desc
  usb: gadget: at91udc: don't overwrite driver data
  usb: dwc3: core: fix incorrect usage of resource pointer
  usb: musb: musbhsdma: fix IRQ check
  usb: musb: tusb6010: fix error path in tusb_probe()
  usb: musb: host: fix for musb_start_urb Oops
  usb: gadget: dummy_hcd: add support for USB_DT_BOS on rh
  usb: gadget: dummy_hcd: fixup error probe path
  usb: gadget: s3c-hsotg.c: fix error return code
  ...
2012-09-14 14:54:57 -07:00
Linus Torvalds fe59d297ea TTY fixes for 3.6-rc6
Here are 2 tiny patches for a serial driver to resolve issues that
 people have reported with the 3.6-rc tree.
 
 Both of these have been in the linux-next tree for a while now.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlBSGL4ACgkQMUfUDdst+ylrhQCgy0+bmNLtsxrEjJY20ahe9sVT
 Q3YAn0xmu8SJ+Bv1vJKKD6vIataVQ93a
 =iZmM
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull TTY fixes from Greg Kroah-Hartman:
 "Here are 2 tiny patches for a serial driver to resolve issues that
  people have reported with the 3.6-rc tree.

  Both of these have been in the linux-next tree for a while now.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'tty-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: serial: imx: don't reinit clock in imx_setup_ufcr()
  tty: serial: imx: console write routing is unsafe on SMP
2012-09-14 14:54:29 -07:00
Linus Torvalds f2378e386f Staging tree fixes for 3.6-rc6
Here are a few staging tree fixes for problems that have been reported.
 
 Nothing major, just a number of tiny driver fixes.  All of these have
 been in the linux-next tree for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlBSF54ACgkQMUfUDdst+ykh/wCeOAGv4uwvqK8pkYpdV4+XOlM/
 W1QAnRvjv4dCj0e2+W46Vp5xLPPOBePk
 =IyFJ
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging tree fixes from Greg Kroah-Hartman:
 "Here are a few staging tree fixes for problems that have been
  reported.

  Nothing major, just a number of tiny driver fixes.  All of these have
  been in the linux-next tree for a while.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'staging-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  drm/omap: add more new timings fields
  drm/omap: update for interlaced
  staging: r8712u: fix bug in r8712_recv_indicatepkt()
  staging: zcache: fix cleancache race condition with shrinker
  Staging: Android alarm: IOCTL command encoding fix
  staging: vt6656: [BUG] - Failed connection, incorrect endian.
  staging: ozwpan: fix memcmp() test in oz_set_active_pd()
  staging: wlan-ng: Fix problem with wrong arguments
  staging: comedi: das08: Correct AO output for das08jr-16-ao
  staging: comedi: das08: Correct AI encoding for das08jr-16-ao
  staging: comedi: das08: Fix PCI ref count
  staging: comedi: amplc_pci230: Fix PCI ref count
  staging: comedi: amplc_pc263: Fix PCI ref count
  staging: comedi: amplc_pc236: Fix PCI ref count
  staging: comedi: amplc_dio200: Fix PCI ref count
  staging: comedi: amplc_pci224: Fix PCI ref count
  drivers/iio/adc/at91_adc.c: adjust inconsistent IS_ERR and PTR_ERR
  staging iio: fix potential memory leak in lis3l02dq_ring.c
  staging:iio: prevent divide by zero bugs
2012-09-14 14:53:51 -07:00
Aaron Lu f25b70613c ACPI / PM: Use KERN_DEBUG when no power resources are found
commit a606dac368 adds support to link
devices which have _PRx, if a device does not have _PRx, a warning
message will be printed.

This commit is for ZPODD on Intel ZPODD capable platforms, on other
platforms, it has no problem if there is no power resource for this
device, so a warning here is not appropriate, change it to debug.

Reported-by: Borislav Petkov <bp@amd64.org>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-09-14 20:54:44 +02:00
Roland Dreier 2116fe4e8b Merge branches 'cxgb4', 'ipoib', 'mlx4', 'ocrdma' and 'qib' into for-next 2012-09-14 10:42:52 -07:00
Mike Marciniszyn 4c3550057b IB/qib: Fix failure of compliance test C14-024#06_LocalPortNum
Commit 3236b2d469 ("IB/qib: MADs with misset M_Keys should return
failure") introduced a return code assignment that unfortunately
introduced an unconditional exit for the routine due to missing braces.

This patch adds the braces to correct the original patch.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-09-14 10:42:32 -07:00
Parav Pandit ae3bca90e9 RDMA/ocrdma: Fix CQE expansion of unsignaled WQE
Fix CQE expansion of unsignaled WQE -- don't expand the CQE when the
WQE index of the completed CQE matches with last pending WQE (tail) in
the queue.

Signed-off-by: Parav Pandit <parav.pandit@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-09-14 10:40:58 -07:00
John W. Linville 7a253c2954 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2012-09-14 11:39:39 -04:00
Wang Sen 27e99ade81 [SCSI] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list
When using the commands below to write some data to a virtio-scsi LUN of the
QEMU guest(32-bit) with 1G physical memory(qemu -m 1024), the qemu will crash.

        # sudo mkfs.ext4 /dev/sdb  (/dev/sdb is the virtio-scsi LUN.)
        # sudo mount /dev/sdb /mnt
        # dd if=/dev/zero of=/mnt/file bs=1M count=1024

In current implementation, sg_set_buf is called to add buffers to sg list which
is put into the virtqueue eventually. But if there are some HighMem pages in
table->sgl you can not get virtual address by sg_virt. So, sg_virt(sg_elem) may
return NULL value. This will cause QEMU exit when virtqueue_map_sg is called
in QEMU because an invalid GPA is passed by virtqueue.

Two solutions are discussed here:
http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/00675.html

Finally, value assignment approach was adopted because:

Value assignment creates a well-formed scatterlist, because the termination
marker in source sg_list has been set in blk_rq_map_sg(). The last entry of the
source sg_list is just copied to the the last entry in destination list.  Note
that, for now, virtio_ring does not care about the form of the scatterlist and
simply processes the first out_num + in_num consecutive elements of the sg[]
array.

I have tested the patch on my workstation. QEMU would not crash any more.

Cc: <stable@vger.kernel.org> # 3.4: 4fe74b1: [SCSI] virtio-scsi: SCSI driver
Signed-off-by: Wang Sen <senwang@linux.vnet.ibm.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-14 15:47:01 +01:00
Thomas Kavanagh 5f71a3ef37 i2c: algo: pca: Fix mode selection for PCA9665
The code currently always selects turbo mode for PCA9665, no matter which
clock frequency is configured. This is because it compares the clock frequency
against constants reflecting (boundary / 100). Compare against real boundary
frequencies to fix the problem.

Signed-off-by: Thomas Kavanagh <tkavanagh@juniper.net>
Signed-off-by: Guenter Roeck <groeck@juniper.net>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-09-14 15:25:22 +02:00
Dave Airlie 610bd7da16 drm/nouveau: fix booting with plymouth + dumb support
We noticed a plymouth bug on Fedora 18, and I then
noticed this stupid thinko, fixing it fixed the problem
with plymouth.

Cc: stable@vger.kernel.org
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-14 15:45:01 +10:00
Nicolas Ferre c456797681 dmaengine: at_hdmac: check that each sg data length is non-null
Avoid the construction of a malformed DMA request sent to
the DMA controller.
Log message is for debug only because this condition is unlikely to
append and may only trigger at driver development time.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Stable <stable@vger.kernel.org> [2.6.31+]
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-09-14 08:26:40 +05:30
Nicolas Ferre c618a9be0e dmaengine: at_hdmac: fix comment in atc_prep_slave_sg()
s/dma_memcpy/slave_sg/ and it is sg length that we are
talking about.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Stable <stable@vger.kernel.org> [2.6.31+]
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-09-14 08:26:40 +05:30
Yishai Hadas dd03e73481 mlx4_core: Fix integer overflows so 8TBs of memory registration works
This patch adds on the fixes done in commits 89dd86db78 ("mlx4_core:
Allow large mlx4_buddy bitmaps") and 3de819e6b6 ("mlx4_core: Fix
integer overflow issues around MTT table") so that memory registration
of up to 8TB (log_num_mtt=31) finally works.

It fixes integer overflows in a few mlx4_table_yyy routines in icm.c
by using a u64 intermediate variable, and int/uint issues that caused
table indexes to become nagive by setting some variables to be u32
instead of int.  These problems cause crashes when a user attempted to
register > 512GB of RAM.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-09-13 17:52:02 -07:00
Lin Ming 40bf66ec97 ACPI / PM: Fix resource_lock dead lock in acpi_power_on_device
Commit 0090def("ACPI: Add interface to register/unregister device
to/from power resources") used resource_lock to protect the devices list
that relies on power resource. It caused a mutex dead lock, as below

    acpi_power_on ---> lock resource_lock
      __acpi_power_on
        acpi_power_on_device
          acpi_power_get_inferred_state
            acpi_power_get_list_state ---> lock resource_lock

This patch adds a new mutex "devices_lock" to protect the devices list
and calls acpi_power_on_device in acpi_power_on, instead of
__acpi_power_on, after the resource_lock is released.

[rjw: Changed data type of a boolean variable to bool.]

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-09-14 00:26:33 +02:00
Rafael J. Wysocki 8f7412a792 ACPI / PM: Infer parent power state from child if unknown, v2
It turns out that there are ACPI BIOSes defining device objects with
_PSx and without either _PSC or _PRx.  For devices corresponding to
those ACPI objetcs __acpi_bus_get_power() returns ACPI_STATE_UNKNOWN
and their initial power states are regarded as unknown as a result.
If such a device is a parent of another power-manageable device, the
child cannot be put into a low-power state through ACPI, because
__acpi_bus_set_power() refuses to change power states of devices
whose parents' power states are unknown.

To work around this problem, observe that the ACPI power state of
a device cannot be higher-power (lower-number) than the power state
of its parent.  Thus, if the device's _PSC method or the
configuration of its power resources indicates that the device is
in D0, the device's parent has to be in D0 as well.  Consequently,
if the parent's power state is unknown when we've just learned that
its child's power state is D0, we can safely set the parent's
power.state field to ACPI_STATE_D0.

Tested-by: Aaron Lu <aaron.lu@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-09-14 00:26:24 +02:00
Dan Carpenter eceeb43712 thinkpad_acpi: buffer overflow in fan_get_status()
The acpi_evalf() function modifies four bytes of data but in
fan_get_status() we pass a pointer to u8.  I have modified the
function to use type checking now.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13 16:46:31 -04:00
Jiang Liu f661848b74 eeepc-laptop: fix device reference count leakage in eeepc_rfkill_hotplug()
Fix a device reference count leakage issue in function
eeepc_rfkill_hotplug().

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13 16:46:31 -04:00
Maxim Nikulin 3f5449bf39 platform/x86: fix asus_laptop.wled_type description
MODULE_PARM_DESC for wlan_status is further in the same file

Signed-off-by: Maxim A. Nikulin <M.A.Nikulin@gmail.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13 16:46:31 -04:00
Corentin Chary 8871e99f89 asus-laptop: HRWS/HWRS typo
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=24222
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13 16:46:30 -04:00
Corentin Chary 689db7843d drivers-platform-x86: remove useless #ifdef CONFIG_ACPI_VIDEO
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13 16:46:30 -04:00
Seth Forshee e6d9d3d59c apple-gmux: Fix port address calculation in gmux_pio_write32()
This function fails to add the start address of the gmux I/O range to
the requested port address and thus writes to the wrong location.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13 16:46:29 -04:00
Bernhard Froemel c5a5052923 apple-gmux: Fix index read functions
Study of Apple's binary driver revealed that the GMUX_READ_PORT should
be written between calls to gmux_index_wait_ready and
gmux_index_wait_complete (i.e., the new index protocol must be
followed). If this is not done correctly, the indexed
gmux device only partially accepts writes which lead to problems
concerning GPU switching. Special thanks to Seth Forshee who helped
greatly with identifying unnecessary changes.

Signed-off-by: Bernhard Froemel <froemel@vmars.tuwien.ac.at>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13 16:46:29 -04:00
Bernhard Froemel 07f377da7e apple-gmux: Obtain version info from indexed gmux
This patch extracts and displays version information from the indexed
gmux device as it is also done for the classic gmux device.

Signed-off-by: Bernhard Froemel <froemel@vmars.tuwien.ac.at>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-09-13 16:46:29 -04:00
Yuval Mintz 7b5342d902 bnx2x: Add missing afex code
Commit a334872224 added afex support but lacked
several logical changes. This lack can cause afex to crash, and also
have a slight effect on other flows (i.e., driver always assumes the Tx ring
has less available buffers than what it actually has).

This patch adds the missing segments, fixing said issues.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-13 16:37:52 -04:00
Dmitry Kravkov 2ace95103d bnx2x: fix registers dumped
Under traffic, there are several registers that when read (e.g., via
'ethtool -d') may cause the chip to stall.
This patch corrects the registers read in such flows.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-13 16:37:52 -04:00
Yaniv Rosner 5cd75f0c0f bnx2x: correct advertisement of pause capabilities
This patch propagates users' requested flow-control into the link layer,
which will later be used to advertise this flow-control for auto-negotiation
(until now these values were ignored).

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-13 16:37:52 -04:00
Yaniv Rosner 430d172a63 bnx2x: display the correct duplex value
Prior to this fix, the driver reported the chip's active duplex state
is always 'full', even if using half-duplex mode.

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-13 16:37:52 -04:00
Yaniv Rosner 375944cb7c bnx2x: prevent timeouts when using PFC
Prevent updating the xmac PFC configuration when using a link speed
slower than 10G -the umac block is responsible for 1G or slower connections,
therefore it is possible the xmac block is reset when connection is slower.

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-13 16:37:52 -04:00
Yuval Mintz 217aeb896a bnx2x: fix stats copying logic
FW needs the driver statistics for management. Current logic is broken
in that the function that gathers the port statistics does not copy
its own statistics to a place where the FW can use it.
This patch causes every function that can pass statistics to the FW to
do so.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-13 16:37:51 -04:00
Dmitry Kravkov bef05406ac bnx2x: Avoid sending multiple statistics queries
During traffic when DCB is enabled, it is possible for multiple instances
of statistics queries to be sent to the chip - this may cause the FW to assert.

This patch prevents the sending of an additional instance of statistics query
while the previous query hasn't completed.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-13 16:37:51 -04:00
Christian König f492c171a3 drm/radeon: make 64bit fences more robust v3
Only increase the higher 32bits if we really detect a wrap around.

v2: instead of increasing the higher 32bits just use the higher
    32bits from the last emitted fence.
v3: also use last emitted fence value as upper limit.

The intention of this patch is to make fences as robust as
they where before introducing 64bit fences. This is
necessary because on older systems it looks like the fence
value gets corrupted on initialization.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=51344

Should also fix:
https://bugs.freedesktop.org/show_bug.cgi?id=54129
https://bugs.freedesktop.org/show_bug.cgi?id=54662
https://bugzilla.redhat.com/show_bug.cgi?id=846505
https://bugzilla.redhat.com/show_bug.cgi?id=845639

3.5 needs a separate patch due to changes in the
fence code.  Will send that out separately.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-13 16:17:49 -04:00
Alex Deucher 985f61f7ee drm/radeon: rework pll selection (v3)
For DP we can use the same PPLL for all active DP
encoders.  Take advantage of that to prevent cases
where we may end up sharing a PPLL between DP and
non-DP which won't work.  Also clean up the code
a bit.

v2: - fix missing pll_id assignment in crtc init
v3: - fix DP PPLL check
    - document functions
    - break in main encoder search loop after matching.
      no need to keep checking additional encoders.

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=54471

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2012-09-13 16:17:49 -04:00
Bjørn Mork 8624dd2a3e net: qmi_wwan: call subdriver with control intf only
This fixes a hang on suspend due to calling wdm_suspend on
the unregistered data interface. The hang should have been
a NULL pointer reference had it not been for a logic error
in the cdc_wdm code.

  commit 230718bd net: qmi_wwan: bind to both control and data interface

changed qmi_wwan to use cdc_wdm as a subdriver for devices with
a two-interface QMI/wwan function.  The commit failed to update
qmi_wwan_suspend and qmi_wwan_resume, which were written to handle
either a single combined interface function, or no subdriver at all.

The result was that we called into the subdriver both when the
control interface was suspended and when the data interface was
suspended.  Calling the subdriver suspend function with an
unregistered interface is not supported and will make the
subdriver bug out.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-13 16:11:51 -04:00
Karsten Keil 4b921eda53 mISDN: Fix wrong usage of flush_work_sync while holding locks
It is a bad idea to hold a spinlock and call flush_work_sync.
Move the workqueue cleanup outside the spinlock and use cancel_work_sync,
on closing the channel this seems to be the more correct function.
Remove the never used and constant return value of mISDN_freebchannel.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
Cc: <stable@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-13 14:58:54 -04:00
Ingo Molnar 4553f0b90e Merge branch 'core/rcu' into perf/core
Steve Rostedt asked for the merge of a single commit, into both
the RCU and the perf/tracing tree:

 | Josh made a change to the tracing code that affects both the
 | work Paul McKenney and I are currently doing. At the last
 | Kernel Summit back in August, Linus said when such a case
 | exists, it is best to make a separate branch based off of his
 | tree and place the change there. This way, the repositories
 | that need to share the change can both pull them in and the
 | SHA1 will match for both. Whichever branch is pulled in first
 | by Linus will also pull in the necessary change for the other
 | branch as well.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-09-13 17:18:38 +02:00
Linus Torvalds 5e88083f40 Additional AHCI PCI IDs.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUFFr8CWzCDIBeCsvAQIcMg/+Oc5rCqG2vp1FFBsDLH9dnr27IHdHw+bB
 WX0D0WuXli3Il2g5a1OWfoNnZKsd9DCEbJZiS5zIKgxKtg6ajQGqSq5FRH/00kpV
 cvwpmwJdAz5T3P94y1VfHpX5cZKBpIsIYHxjH2dXsAQfuIVQyMBh2411p9iJBXyD
 gAlOnq0Xzb0gUBdjE9Z0hCO9WS09ZlFOi+UTyFE0UIKnr1Z/Z4ymwsJAzZ44leP9
 QXWa0gESVSWq/oWIpS7ar/7JAeDwyD9UQTFj8zB7cIAn4ULzR2gJGJJBSakgdMbG
 4fXZPLdelDZfSaAcvkTQ6P0Q2yFFQhpeRsWVv8eCJvQkJMQoLk0L6a3PRN4lJqbz
 jOD9s5rTezUX38F9aSMLhc2lHUUBJQ4e9SVR3rgEIT9O1Op2pNxAQrmOwPtfcSwH
 EGPu9qJ1RJZ4SqSR+A5J2R2o7i/5hOSHhggLiJc/UwE0hRELw3648ZRo8IulEvXI
 FObhUXJhqHU3AnyfJh/3ieswYIp30cZW+uv2Zrc8p2AgP+MHPyhxMIpzRVWgpSu+
 m/O+My62mmf59qcOlNQ0RnlAx7mHFNih71PkUJ3rm6jykhzLj6LCkAPGZ+lAD5dM
 WmOoRwp/42oLjDTbhytAD/pn13G2T56CH/37NSfnYDfaU0m7cMqTO943yGoMpnba
 pskr8cb62oE=
 =XXdb
 -----END PGP SIGNATURE-----

Merge tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

Pull additional AHCI PCI IDs from Jeff Garzik.

* tag 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: Add identifiers for ASM106x devices
  ahci: Add alternate identifier for the 88SE9172
  ahci: Add JMicron 362 device IDs
2012-09-13 19:07:15 +08:00
Alan Cox 7b4f6ecacb ahci: Add identifiers for ASM106x devices
They don't always appear as AHCI class devices but instead as IDE class.

Based on an initial patch by Hiroaki Nito

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42804
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 00:24:29 -04:00
Alan Cox 17c60c6b76 ahci: Add alternate identifier for the 88SE9172
This can also appear as 0x9192. Reported in bugzilla and confirmed with the
board documentation for these boards.

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42970
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: The Stables <stable@vger.kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 00:23:57 -04:00
Ben Hutchings 1fefb8fdc6 ahci: Add JMicron 362 device IDs
The JMicron JMB362 controller supports AHCI only, but some revisions
use the IDE class code.  These need to be matched by device ID.

These additions have apparently been included by QNAP in their NAS
devices using these controllers.

References: http://bugs.debian.org/634180
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-09-13 00:23:12 -04:00
Dave Airlie b65523283c Merge branch 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung into drm-fixes
Inki Dae writes:
- fix build warnings
- minor code cleanup
- remove non-standard format, DRM_FORMAT_NV12M
- add dummy mmap for exynos dmabuf
  . dma_buf export needs this patch

* 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung:
  drm: Drop the NV12M and YUV420M formats
  drm/exynos: remove DRM_FORMAT_NV12M from plane module
  drm/exynos: fix double call of drm_prime_(init/destroy)_file_private
  drm/exynos: add dummy support for dmabuf-mmap
  drm/exynos: Add missing braces around sizeof in exynos_mixer.c
  drm/exynos: Add missing braces around sizeof in exynos_hdmi.c
  drm/exynos: Make g2d_pm_ops static
  drm/exynos: Add dependency for G2D in Kconfig
  drm/exynos: fixed page align bug.
  drm/exynos: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]
  drm/exynos: Use devm_* functions in exynos_drm_g2d.c file
  drm/exynos: Use devm_kzalloc in exynos_drm_hdmi.c file
  drm/exynos: Use devm_kzalloc in exynos_drm_vidi.c file
  drm/exynos: Remove redundant check in exynos_drm_fimd.c file
  drm/exynos: Remove redundant check in exynos_hdmi.c file
2012-09-13 14:18:55 +10:00
Inki Dae ece82d624c drm/exynos: remove DRM_FORMAT_NV12M from plane module
this patch removes DRM_FORMAT_NV12M from plane module because this format
is same as DRM_FORMAT_NV12. DRM_FORMAT_NV12M will be identified by
mode_cmd->handles and mode_cmd->offsets fields internally.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin.park <kyungmin.park@samsung.com>
2012-09-13 12:38:10 +09:00
Mandeep Singh Baines 525ee699f0 drm/exynos: fix double call of drm_prime_(init/destroy)_file_private
The double invocations are incorrect but seem to be safe so I don't
think this will fix any bugs.

Before:

[    7.639366] drm_prime_init_file ee3675d0
[    7.639377] drm_prime_init_file ee3675d0
[    7.639507] drm_prime_destroy_file ee3675d0
[    7.639518] drm_prime_destroy_file ee3675d0
[    7.639802] drm_prime_init_file ee372390
[    7.639810] drm_prime_init_file ee372390
[    8.473316] drm_prime_init_file ee356390
[    8.473331] drm_prime_init_file ee356390

After:

[    6.363842] drm_prime_init_file edc2e5d0
[    6.363994] drm_prime_destroy_file edc2e5d0
[    6.364260] drm_prime_init_file edc2e750
[    8.004837] drm_prime_init_file ee36ded0

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-09-13 12:38:09 +09:00
Tomasz Stanislawski b716d46e00 drm/exynos: add dummy support for dmabuf-mmap
This patch adds a stub function for DMABUF mmap.
This allows to export a DMABUF.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2012-09-13 12:38:09 +09:00