1
0
Fork 0
Commit Graph

147801 Commits (2a7d5559b346574057dce4672d1ed9aaa9d1e685)

Author SHA1 Message Date
Alan Cox f507598b06 gma500: Fix lid related crash
We now set up the lid timer before we set up the backlight.  On some
devices that causes a crash as we do a backlight change before or during
the setup.

As this fixes a crash on boot regression on some setups it ought to go
in ASAP, especially as all the user gets is a blank screen.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Tested-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-16 09:20:33 -07:00
Linus Torvalds 33d519feac Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86
Pull x86 platform tree fixes from Matthew Garrett:
 "Small fixes to a couple of drivers plus a slightly larger number for
  sony-laptop that the maintainer thinks are appropriate, most of which
  fix problems with the earlier 3.5 updates.  These have been in -next
  for a while without complaint."

* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
  intel_ips: blacklist HP ProBook laptops
  ideapad: uninitialized data in ideapad_acpi_add()
  sony-laptop: correct find_snc_handle failure checks
  sony-laptop: fix a couple signedness bugs
  sony-laptop: fix sony_nc_sysfs_store()
  sony-laptop: input initialization should be done before SNC
  sony-laptop: add lid backlight support for handle 0x143
  sony-laptop: store battery care limits on batteries
  sony-laptop: notify userspace of GFX switch position changes
  sony-laptop: use an enum for SNC event types
2012-07-16 08:35:44 -07:00
Linus Torvalds 1694a0a08e late pinctrl fixes for v3.5
- Two fixes to the i.MX driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQAfMcAAoJEEEQszewGV1z1rYP/2bYOSSQOvL5Gpxai/IT+meT
 ztG7KWujoWL6ds6k0LB7V+NPelQf+6i/7bkaSDoL8ANvkOGWBUtF/6ElCVMpW/U2
 /IYvKXxSkW46psBFZPdqZdsE2VOo16x5S5x0kNZNKwaTvX4bitKTCd7JxKaqQRxT
 L6b/5qQvr96ezhN8VPafuNIftYkjqui4XMZLke4FCqnpEBUg/ShWXXnRH8MpfPF/
 rpRyXfLjev/QMMSlIw6mcaBqxVHVuL6DXU9Lb2X36j2pnNATIriHS8i0pmR5RaeC
 7QnYXnggrpl8SR0qHjaseYUYWHibYt3EXIoHR50z5yG6HFIAxZhWnQC/nJlLaP23
 h1G+OuxiHUjmCD3AMa+su2zcrZl181hjvPxN8pdBboRxTGvY8xc65wlfEkg2LSAV
 AEP77KAyGc9TUSmW2KJEaIjRuxXCtc45TKwlFHyvN8AeaZRVno/FEXekmt+XDNgC
 hPPl/aL60iAGEYoDbo2tAA6vfbpF/AYk6Y61aTVBRyBPbhbfpTvCPssh4EiQtqIB
 qH0oFf5Q8NjWg5XlbU5IRStb4SgvLsSNpxT7XTp8hbvjSsOdZPiHqXOIRmPzndyO
 QLcCsES6Zc/0obj2eG4TaqruevpWAHTKbObRAJIRPzb1jQ9C8P9tkehXCvPk7Awu
 bdLMHzwj1JmFExZo3sz8
 =ucSC
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull late pinctrl fixes from Linus Walleij:
- Two fixes to the i.MX driver

* tag 'fixes-for-v3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: pinctrl-imx6q: add missed mux function for USBOTG_ID
  pinctrl: pinctrl-imx: only print debug message when DEBUG is defined
2012-07-16 08:32:06 -07:00
Silva Paulo 68d740d79c blk: fix wrong idr_pre_get() error check in loop.c
The idr_pre_get() function never returns a value < 0.  It returns 0 (no
memory) or 1 (OK).

Reported-by: Silva Paulo <psdasilva@yahoo.com>
[ Rewrote Silva's patch, but attributing it to Silva anyway  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-14 15:39:58 -07:00
Mark Rustad 3cc5d2a6b9 tcm_fc: Fix crash seen with aborts and large reads
This patch fixes a crash seen when large reads have their exchange
aborted by either timing out or being reset. Because the exchange
abort results in the seq pointer being set to NULL, because the
sequence is no longer valid, it must not be dereferenced. This
patch changes the function ft_get_task_tag to return ~0 if it is
unable to get the tag for this reason. Because the get_task_tag
interface provides no means of returning an error, this seems
like the best way to fix this issue at the moment.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-07-14 15:17:29 -07:00
Dong Aisheng 4a5f7eff8b pinctrl: pinctrl-imx6q: add missed mux function for USBOTG_ID
The original pin registers table is derived from u-boot mainline,
but somehow it was found missing some mux functions for USBOTG_ID.
We added it at the bottom by following the exist pin function ids,
then it will not break the exist using of pin function id in dts file.

Reported-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
2012-07-14 22:32:10 +02:00
Dong Aisheng a6e7360b22 pinctrl: pinctrl-imx: only print debug message when DEBUG is defined
Fix regression for commit 3a86a5f8 (pinctrl: pinctrl-imx: free allocated
pinctrl_map structure only once and use kernel facilities for IMX_PMX_DUMP)
introduced in 3.5-rc3.
With above commit, the debug code will alway be excuted.
Change to excute it only when DEBUG is defined.

Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-07-14 22:31:02 +02:00
Linus Torvalds c5b01acff1 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI patch from Len Brown.

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  ACPICA: Fix possible fault in return package object repair code
2012-07-14 12:44:26 -07:00
Linus Torvalds a7559b13de cpufreq fix for 3.5-rc7
This fixes a regression preventing the ACPI cpufreq driver from loading on some
 systems where it worked previously without any problems.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJQAWv6AAoJEKhOf7ml8uNsUXcQAINIZmqe/VCYC3jsYwn0OURQ
 Ua9g51czYvyFS+9tDc5V6b4DrG6B6rIjOBywO1qTXQkRyfpbEx4CVvCOij/0sApg
 Jw/VwImYlIL88uqfGniFv/LW1qUA4v1QcfyDcdbsBGGTwvQwekeYomLRwYWthqkO
 VEC/hYXtTAkfHnJJSWG2PtYpUbicmOdVDwh2SQuf/dmXVZXmMmljQFVvyPHNMwbd
 X6ENqhYiTr5tJ5k0e9mAGwfpRmG7YoXQE7pM1hl4kcv0CgdN3U71WEK3LfxJBeTW
 lGawcA0pu/4o/+X9NYJHo1QosXQAHAeqMkn38pv8K4EwqnnXqLK35+wTYBf00kdg
 lJHGNvg1kuQEp32nXT3y4kzASNHHnTV2IU2YbERZ61+2x3sU3DSLjNo2ZL/kqd8k
 fxN+RWXEBA1lI5TRL4ENENT0c/m+RDQCJkHXwAEOwTZwMZDUKWfiaZwoRcs1xTEC
 JjcBIe1wMmHJDxH+fh4KBdqjFiPDoBqHi4AWWIavJJG/W+LJLrd/i90o99GOHZ/0
 q/pouYurt05ec7dwX3rMqlLGQz8hVkp6flg0DgrJCe0tGaQarZ0bkp6RaQpEAfxi
 y1eIgYbCy61YvUMxhBp/SWoD9/wAoYuWZFtq1CgwYmkRJ25lT6zoOFiJAn3GF5PG
 2thM5M0vuLVhG/BPZMo3
 =XZHs
 -----END PGP SIGNATURE-----

Merge tag 'cpufreq-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull cpufreq fix from Rafael Wysocki:
 "This fixes a regression preventing the ACPI cpufreq driver from
  loading on some systems where it worked previously without any
  problems."

* tag 'cpufreq-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq / ACPI: Fix not loading acpi-cpufreq driver regression
2012-07-14 11:51:11 -07:00
Bob Moore 46befd6b38 ACPICA: Fix possible fault in return package object repair code
Fixes a problem that can occur when a lone package object is
wrapped with an outer package object in order to conform to
the ACPI specification. Can affect these predefined names:
_ALR,_MLS,_PSS,_TRT,_TSS,_PRT,_HPX,_DLM,_CSD,_PSD,_TSD

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

This problem was introduced in 3.4-rc1 by commit
6a99b1c94d
(ACPICA: Object repair code: Support to add Package wrappers)

Reported-by: Vlastimil Babka <caster@gentoo.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Cc: <stable@vger.kernel.org> # 3.4
Signed-off-by: Len Brown <len.brown@intel.com>
2012-07-14 11:38:41 -04:00
Bruce Allan a52359b56c e1000e: fix test for PHY being accessible on 82577/8/9 and I217
Occasionally, the PHY can be initially inaccessible when the first read of
a PHY register, e.g. PHY_ID1, happens (signified by the returned value
0xFFFF) but subsequent accesses of the PHY work as expected.  Add a retry
counter similar to how it is done in the generic e1000_get_phy_id().

Also, when the PHY is completely inaccessible (i.e. when subsequent reads
of the PHY_IDx registers returns all F's) and the MDIO access mode must be
set to slow before attempting to read the PHY ID again, the functions that
do these latter two actions expect the SW/FW/HW semaphore is not already
set so the semaphore must be released before and re-acquired after calling
them otherwise there is an unnecessarily inordinate amount of delay during
device initialization.

Reported-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-14 00:45:45 -07:00
Tushar Dave d0efa8f23a e1000e: Correct link check logic for 82571 serdes
SYNCH bit and IV bit of RXCW register are sticky. Before examining these bits,
RXCW should be read twice to filter out one-time false events and have correct
values for these bits. Incorrect values of these bits in link check logic can
cause weird link stability issues if auto-negotiation fails.

CC: stable <stable@vger.kernel.org> [2.6.38+]
Reported-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
Reviewed-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-07-14 00:43:27 -07:00
Linus Torvalds fdb1335a82 md: One use-after-free bugfix for RAID1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIVAwUAUACxPznsnt1WYoG5AQJxDA//dD/5ZQ+35N0x6fpeOT0hxipmdk/iCmfZ
 eAxiN34YH3Zxk1oF+ZjRUzecL+I2Q3w8SAxeS5lowuJvUbPY6A5ttBZ2xJhC6oZ2
 5MgliHN7IjBfVul0DOodCN+lYG3ve7CO5fOz/QnMGBwQFdTHMMJYQw9Qf+QwsxfC
 YXxhDwt9lJrcQhUo50Na0WM0F7lC60A8Ny6ANtiLGRrfI/IDgCg2UN16VpchOWZT
 Szn9iPOB7wCGEpzCDMJf/dbZ/mQxrccfeG1F3qM9w5WNQ73SiNswCTvwjmW6O477
 32pqrK5xxPgYvqB28t93159lZpaY2GKNC9KvQ6vVqQPVih+zJxn+6qqvdvWNI3cD
 hTiUKW1O26lcQpeI8ADNrk9PQqX5o10Ypy42SgpUv8pfgcjLiJkXIv9GG5K3KfsT
 5Ea4W2Cru33d0VGsTw6rr2w1UwALjUWEXHOJRn+P5yrGJhfIXSV84RTzOWYYbBYl
 uAo1jLdlKI/jnnXMlOCi2w19PqGb1ZZpBwg5Gs5K0cBUBQCJAUU1MS1qJXEKo1oL
 i2ZMWmQxjPXLk3fadV1eoGOSpd2zOFdfCItf39qospLrC1Ym0C9p+1obkRLAQeTf
 bZMf261ZwIhH3bTCEVucOUvT1tlYaiE7s/zabWvjCajIzWEKIrWoOQw/U3eftJeZ
 SnnFsporIXk=
 =cy9g
 -----END PGP SIGNATURE-----

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

Pull use-after-free RAID1 bugfix from NeilBrown.

* tag 'md-3.5-fixes' of git://neil.brown.name/md:
  md/raid1: fix use-after-free bug in RAID1 data-check code.
2012-07-13 17:59:33 -07:00
Linus Torvalds ac7d181e32 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Please pull one hwmon subsystem fix from Jean Delvare.

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (it87) Preserve configuration register bits on init
2012-07-13 11:01:03 -07:00
Linus Torvalds 39ea32ca7e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer fixes from Dmitry Torokhov:
 "The changes are limited to adding new VID/PID combinations to drivers
  to enable support for new versions of hardware, most notably hardware
  found in new MacBook Pro Retina boxes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: xpad - add Andamiro Pump It Up pad
  Input: xpad - add signature for Razer Onza Tournament Edition
  Input: xpad - handle all variations of Mad Catz Beat Pad
  Input: bcm5974 - Add support for 2012 MacBook Pro Retina
  HID: add support for 2012 MacBook Pro Retina
2012-07-13 10:33:18 -07:00
Linus Torvalds 8488e4088f Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
 - Some regression fixes at the audio part for devices with
   cx23885/cx25840
 - A DMA corruption fix at cx231xx
 - two fixes at the winbond IR driver
 - Several fixes for the EXYNOS media driver (s5p)
 - two fixes at the OMAP3 preview driver
 - one fix at the dvb core failure path
 - an include missing (slab.h) at smiapp-core causing compilation
   breakage
 - em28xx was not loading the IR driver driver anymore.

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (31 commits)
  [media] Revert "[media] V4L: JPEG class documentation corrections"
  [media] s5p-fimc: Add missing FIMC-LITE file operations locking
  [media] omap3isp: preview: Fix contrast and brightness handling
  [media] omap3isp: preview: Fix output size computation depending on input format
  [media] winbond-cir: Initialise timeout, driver_type and allowed_protos
  [media] winbond-cir: Fix txandrx module info
  [media] cx23885: Silence unknown command warnings
  [media] cx23885: add support for HVR-1255 analog (cx23888 variant)
  [media] cx23885: make analog support work for HVR_1250 (cx23885 variant)
  [media] cx25840: fix vsrc/hsrc usage on cx23888 designs
  [media] cx25840: fix regression in HVR-1800 analog audio
  [media] cx25840: fix regression in analog support hue/saturation controls
  [media] cx25840: fix regression in HVR-1800 analog support
  [media] s5p-mfc: Fixed setup of custom controls in decoder and encoder
  [media] cx231xx: don't DMA to random addresses
  [media] em28xx: fix em28xx-rc load
  [media] dvb-core: Release semaphore on error path dvb_register_device()
  [media] s5p-fimc: Stop media entity pipeline if fimc_pipeline_validate fails
  [media] s5p-fimc: Fix compiler warning in fimc-lite.c
  [media] s5p-fimc: media_entity_pipeline_start() may fail
  ...
2012-07-13 10:29:41 -07:00
Linus Torvalds 2c91390027 MMC fixes for 3.5-rc7:
- Revert a patch that made failing to select power class fatal;
    it turns out that it fails non-fatally on Tegra boards.
    Regression against 3.5-rc1.
  - Add the IRQF_ONESHOT flag to the cd-gpio driver, which turned
    into a regression in 3.5-rc1 when IRQF_ONESHOT became required
    for threaded IRQs with no handler.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP/O1XAAoJEHNBYZ7TNxYM1H8QAI/qaOZgkVN8ecs53JM69G7q
 SVyqLez8d5luBKl0q5MPKMDHZqj8IojZc5R0tGzKLpGJom2P9S+HzgCuIlo20g4d
 SW3dbnaUIb3kVdpo9/VlDRB9YIxuwdtTYyfy8WtEvxZXTaFbV8scN4sAyDksoDUF
 LImFoVGGCcKNCVfk3EXIkvPiVUTTsH/ivhBKwCwZ8WWcpiFkh/8wDzYNeosgn3e3
 RALBe/1OeB5+I4Ten0Mw3LuuKc5WL5CxNzxj90kQwKhhXL4KJaNqvaT8Y8L0rB3f
 DVlSUCNkoRBA7EJKfJ4lk7ur1XVsT07KEXGuNb1xioz2cGpX/A36+W/QWWULG36U
 NcNEgoAqWLSH4tfLcYdscUnSnDYfOS1l0GwCPSl8iKy5uKoYSS5I3RuFKsybZSLa
 /Wvh1ue5lsil72T9u90CyViRUGahekXKT2Y6/HtPWSj2CzVScTaD3bFFTn20xWCR
 3AsrX0ORDrZ2QqT7ILYZ70kMu6EjN0Nn0AYTnA644K/7v4QRYMiY0PJ65rRx4BY+
 hEQybBIatUiE9txiEGdZ6sXRxGwXrWdZT0a9TR6eMyYyYywB8rieU9JRTD74mGo6
 Fejx3h4rK/pHce/Gl3vC2FcFaOxLu7aFtZxLvJdunuDVnL/JFZGkRlq7SUtsxLav
 fz4/zR3ifnDJDJyG/n+G
 =lLEH
 -----END PGP SIGNATURE-----

Merge tag 'mmc-fixes-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc

Pull MMC fixes from Chris Ball:
 - Revert a patch that made failing to select power class fatal;
   it turns out that it fails non-fatally on Tegra boards.
   Regression against 3.5-rc1.
 - Add the IRQF_ONESHOT flag to the cd-gpio driver, which turned
   into a regression in 3.5-rc1 when IRQF_ONESHOT became required
   for threaded IRQs with no handler.

* tag 'mmc-fixes-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
  mmc: cd-gpio: pass IRQF_ONESHOT to request_threaded_irq()
  mmc: core: Revert "skip card initialization if power class selection fails"
2012-07-13 10:27:25 -07:00
Linus Torvalds 36ec9fbfe7 Late MTD fixes for 3.5:
- fix 'sparse warning fix' regression which totally breaks MXC NAND
  - fix GPMI NAND regression when used with UBI
  - update/correct sysfs documentation for new 'bitflip_threshold' field
  - fix nandsim build failure
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iEYEABECAAYFAk/+eiEACgkQdwG7hYl686NzvwCglK7p8xzqxwIUx/kCWlGqPZFr
 3CsAoKf9EplTp2PvTbgyEn8+Zg+pgP/Z
 =YwDa
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-20120712' of git://git.infradead.org/linux-mtd

Pull late MTD fixes from David Woodhouse:
 - fix 'sparse warning fix' regression which totally breaks MXC NAND
 - fix GPMI NAND regression when used with UBI
 - update/correct sysfs documentation for new 'bitflip_threshold' field
 - fix nandsim build failure

* tag 'for-linus-20120712' of git://git.infradead.org/linux-mtd:
  mtd: nandsim: don't open code a do_div helper
  mtd: ABI documentation: clarification of bitflip_threshold
  mtd: gpmi-nand: fix read page when reading to vmalloced area
  mtd: mxc_nand: use 32bit copy functions
2012-07-13 09:56:26 -07:00
Linus Torvalds 7801dc33be MFD Fixes for 3.5
- 3 Palmas fixes, 1 of them being a build error fix.
 - 2 mc13xx fixes. 1 for fixing an SPI regmap configuration and another one for
   working around an i.Mx hardware bug.
 - 1 omap-usb regression fix.
 - 1 twl6040 build breakage fix.
 - 1 file deletion (ab5500-core.h) that was overlooked during the last merge
   window.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP/vIeAAoJEIqAPN1PVmxKTlMP/RFiIP9Exyy0gqGCMJpYpOfH
 m1NX0LMZ9ktv61M0bgx1AZewNCLG0O6vNf1zW6S4aaczx/D5o1uqWTrra7WqIHTj
 LG2dTpm1dYo2FHNkaGSwpDCGJI2H1K9l4HBcevJcNeVsE3OSZIfQXOFAdXuxJjf3
 RUBZ/dzRAi0/KnZySu+1z3ua3Fbican5CwcljsMEp3K5ajr/d7zFCYDz3Osk+g3k
 kvncHZtfeQNhXgfHMm+8nWRnHvpGWutUXtAIL5yzSQgeEtKANe7D2KsxK73t68iV
 BkelhzqXk9o711nluA0hF4gvS20/cS675QNbQ6XLUK2N7wsCORqMSTNXxnvJze2E
 1hH599dLqPMkq3P5TRCTaQLx8p/QK8Vnrgvsy5pOkSZnqiNU/Owtik0NA4Gz3WrG
 f6WMRHNb+wwLdvhkqHUuMjt2OzmIUiuikKu6kt2pyJ3tXj0tPisC0UieF+6fRHG+
 yxwrXqKtv/aj+gbp+X476fMWt2LR4Duihq1QkW2tE9rtkVlUMTIJgCj6T1mdC6T5
 g1ELR3mi+AXCyOp5d6jpmJmKTnHjQfCPouNgalfFonJlp7Fngih0SzUpwV/XYyP7
 CUy490mcRUZUhSmTH4UQV9CfxhQA8gKNbN9Oak499N6UNWSDyoiH/bh+h/BQuAli
 Gn6cYgk5IKYjiO020ilG
 =dlI4
 -----END PGP SIGNATURE-----

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

Pull MFD Fixes from Samuel Ortiz:
 - Three Palmas fixes, One of them being a build error fix.
 - Two mc13xx fixes.  One for fixing an SPI regmap configuration and
   another one for working around an i.Mx hardware bug.
 - One omap-usb regression fix.
 - One twl6040 build breakage fix.
 - One file deletion (ab5500-core.h) that was overlooked during the last
   merge window.

* tag 'mfd-for-linus-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: Add missing hunk to change palmas irq to clear on read
  mfd: Fix palmas regulator pdata missing
  mfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix issues.
  mfd: Update twl6040 Kconfig to avoid build breakage
  mfd: Delete ab5500-core.h
  mfd: mc13xxx workaround SPI hardware bug on i.Mx
  mfd: Fix mc13xxx SPI regmap
  mfd: Add terminating entry for i2c_device_id palmas table
2012-07-13 09:54:26 -07:00
Yuri Khan e76b8ee25e Input: xpad - add Andamiro Pump It Up pad
I couldn't find the vendor ID in any of the online databases, but this
mat has a Pump It Up logo on the top side of the controller compartment,
and a disclaimer stating that Andamiro will not be liable on the bottom.

Signed-off-by: Yuri Khan <yurivkhan@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-12 23:59:39 -07:00
Jean Delvare 41002f8dd5 hwmon: (it87) Preserve configuration register bits on init
We were accidentally losing one bit in the configuration register on
device initialization. It was reported to freeze one specific system
right away. Properly preserve all bits we don't explicitly want to
change in order to prevent that.

Reported-by: Stevie Trujillo <stevie.trujillo@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2012-07-12 22:47:37 +02:00
Thomas Renninger c4686c71a9 cpufreq / ACPI: Fix not loading acpi-cpufreq driver regression
Commit d640113fe8 introduced a regression on SMP
systems where the processor core with ACPI id zero is disabled
(typically should be the case because of hyperthreading).
The regression got spread through stable kernels.
On 3.0.X it got introduced via 3.0.18.

Such platforms may be rare, but do exist.
Look out for a disabled processor with acpi_id 0 in dmesg:
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x10] disabled)

This problem has been observed on a:
HP Proliant BL280c G6 blade

This patch restricts the introduced workaround to platforms
with nr_cpu_ids <= 1.

Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: stable@vger.kernel.org
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-12 22:39:32 +02:00
Linus Torvalds 918227bb1b fbdev fixes for 3.5
- two fixes for OMAPDSS by Tomi Valkeinen
   one to avoid warnings when runtime PM is not enabled
   one workaround to dependancy issues during suspend/resume
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP/f14AAoJECSVL5KnPj1PxNoP/2vTGFkR6RTF/os1cLg6vY/s
 mRJkKk+tcEA4lWG26rEgyJDCNhN0gRkETkq5mB5cJqR8BcDdZBzrBUEyhVZW6qlC
 sBNUz0A/6HobW5lir1TMxoSCdyYWUAW8b1ywzJcmHl753Cmc8DrnVlAg/H8T6AHs
 uHd4sNutLbPCw9oziphImjY5U7RHGPR3SKSb7RCaLiLHk0/JYTw55+K8EwUUSDcV
 OdcFBPrBUqoRixE/1UtcXd6Ko3MuhgXIhS+yOzjydm5Y0QNfz84t2+/WXG1dZoRa
 Gv8KHntnP0tKaYQ1rHHCXPv2mZqKEWx91WAZWjIyeaKvI6nAfh9YvTkc4plhBKzR
 6hvK1ucRlWnOUwVV0qqaLKR/BMAmuVoF+VjizgDlmT5omUNZk3gufAUkSAAuTu09
 arhXh6WqTJBMGtbxEl7IPOwhBRty9gxsCmOGtDnuGUkIArEDzc0hCAEnU3QyXur1
 //SsR/DPxcZnSol4MzPPNrn0upLiZ5ZtsLAt9lVbxdji6VzsK7Ktq1m2Sry8k4Ig
 xbn2zZaFxIBAMM8wA59X21ap09C2oecxPeXexm1oGFxedbtE/KGQErHaOTdzZheg
 XuYaxWFVkDsinPlzXXkh5wx+5QZaRshK7piyRilKI3lsOqgIIpEN3B7xhacOtMLZ
 EjB0RjujdBbKqhAz8nQM
 =petk
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-fixes-for-3.5-2' of git://github.com/schandinat/linux-2.6

Pull fbdev fixes from Florian Tobias Schandinat:
 "Two fixes for OMAPDSS by Tomi Valkeinen:
   - one to avoid warnings when runtime PM is not enabled
   - one workaround to dependancy issues during suspend/resume"

* tag 'fbdev-fixes-for-3.5-2' of git://github.com/schandinat/linux-2.6:
  OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n
  OMAPDSS: Use PM notifiers for system suspend
2012-07-11 16:17:14 -07:00
Linus Torvalds 00c3e276c5 Merge branch 'akpm' (Andrew's patch-bomb)
Merge random patches from Andrew Morton.

* Merge emailed patches from Andrew Morton <akpm@linux-foundation.org>: (32 commits)
  memblock: free allocated memblock_reserved_regions later
  mm: sparse: fix usemap allocation above node descriptor section
  mm: sparse: fix section usemap placement calculation
  xtensa: fix incorrect memset
  shmem: cleanup shmem_add_to_page_cache
  shmem: fix negative rss in memcg memory.stat
  tmpfs: revert SEEK_DATA and SEEK_HOLE
  drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
  fat: fix non-atomic NFS i_pos read
  MAINTAINERS: add OMAP CPUfreq driver to OMAP Power Management section
  sgi-xp: nested calls to spin_lock_irqsave()
  fs: ramfs: file-nommu: add SetPageUptodate()
  drivers/rtc/rtc-mxc.c: fix irq enabled interrupts warning
  mm/memory_hotplug.c: release memory resources if hotadd_new_pgdat() fails
  h8300/uaccess: add mising __clear_user()
  h8300/uaccess: remove assignment to __gu_val in unhandled case of get_user()
  h8300/time: add missing #include <asm/irq_regs.h>
  h8300/signal: fix typo "statis"
  h8300/pgtable: add missing #include <asm-generic/pgtable.h>
  drivers/rtc/rtc-ab8500.c: ensure correct probing of the AB8500 RTC when Device Tree is enabled
  ...
2012-07-11 16:06:54 -07:00
Kevin Hilman 6b91bf1a3f drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
Requesting a threaded interrupt without a primary handler and without
IRQF_ONESHOT is dangerous, and after commit 1c6c6952 ("genirq: Reject
bogus threaded irq requests"), these requests are rejected.  This causes
->probe() to fail, and the RTC driver not to be availble.

To fix, add IRQF_ONESHOT to the IRQ flags.

Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake to
wake from system suspend multiple times.

Signed-off-by: Kevin Hilman <khilman@ti.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-11 16:04:48 -07:00
Dan Carpenter 8875408abd sgi-xp: nested calls to spin_lock_irqsave()
The code here has a nested spin_lock_irqsave().  It's not needed since
IRQs are already disabled and it causes a problem because it means that
IRQs won't be enabled again at the end.  The second call to
spin_lock_irqsave() will overwrite the value of irq_flags and we can't
restore the proper settings.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-11 16:04:47 -07:00
Benoît Thébaudeau b59f6d1feb drivers/rtc/rtc-mxc.c: fix irq enabled interrupts warning
Fixes

  WARNING: at irq/handle.c:146 handle_irq_event_percpu+0x19c/0x1b8()
  irq 25 handler mxc_rtc_interrupt+0x0/0xac enabled interrupts
  Modules linked in:
   (unwind_backtrace+0x0/0xf0) from (warn_slowpath_common+0x4c/0x64)
   (warn_slowpath_common+0x4c/0x64) from (warn_slowpath_fmt+0x30/0x40)
   (warn_slowpath_fmt+0x30/0x40) from (handle_irq_event_percpu+0x19c/0x1b8)
   (handle_irq_event_percpu+0x19c/0x1b8) from (handle_irq_event+0x28/0x38)
   (handle_irq_event+0x28/0x38) from (handle_level_irq+0x80/0xc4)
   (handle_level_irq+0x80/0xc4) from (generic_handle_irq+0x24/0x38)
   (generic_handle_irq+0x24/0x38) from (handle_IRQ+0x30/0x84)
   (handle_IRQ+0x30/0x84) from (avic_handle_irq+0x2c/0x4c)
   (avic_handle_irq+0x2c/0x4c) from (__irq_svc+0x40/0x60)
  Exception stack(0xc050bf60 to 0xc050bfa8)
  bf60: 00000001 00000000 003c4208 c0018e20 c050a000 c050a000 c054a4c8 c050a000
  bf80: c05157a8 4117b363 80503bb4 00000000 01000000 c050bfa8 c0018e2c c000e808
  bfa0: 60000013 ffffffff
   (__irq_svc+0x40/0x60) from (default_idle+0x1c/0x30)
   (default_idle+0x1c/0x30) from (cpu_idle+0x68/0xa8)
   (cpu_idle+0x68/0xa8) from (start_kernel+0x22c/0x26c)

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sascha Hauer <kernel@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-11 16:04:46 -07:00
Lee Jones ad49fcbe90 drivers/rtc/rtc-ab8500.c: ensure correct probing of the AB8500 RTC when Device Tree is enabled
Without this patch, if Device Tree is enabled the AB8500 RTC wouldn't get
probed at all, as there is no reference to it from platform code.  This
patch ensures the driver is probed during normal DT start-up.

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-11 16:04:44 -07:00
Lee Jones 3cfd16a551 drivers/rtc/rtc-ab8500.c: use IRQF_ONESHOT when requesting a threaded IRQ
This driver's IRQ registration is failing because the kernel now forces
IRQs to be ONESHOT if no IRQ handler is passed.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-11 16:04:44 -07:00
Devendra Naga 2a643893e5 drivers/rtc/rtc-spear.c: fix use-after-free in spear_rtc_remove()
`config' is freed and is then used in the rtc_device_unregister() call,
causing a kernel panic.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Reviewed-by: Viresh Kumar <viresh.linux@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-11 16:04:41 -07:00
Linus Torvalds 5f8ebd36f7 SCSI fixes on 20120711
This is a set of three fixes for data corruption (libsas task file), oops
 causing (NULL in scsi_cmd_to_driver) and driver failure (bnx2i).  The oops
 caused by the NULL in scsi_cmd_to_driver() manifests in scsi_eh_send_cmd() and
 has been seen by several people now.
 
 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJP/S5TAAoJEDeqqVYsXL0MM2EIAMQrBUamIjML5tiKwwD7zZsc
 GBNPLFD2PJNvzaRweENU+CwbHYc7ipt9FMHC89dlOR4vStKR/7nxUOnH2c/pnogM
 bbU2JCP0iG4IxU8+kcNBKCmysyu5xdd5kh0NOmwMSQrQVlTdfZz4iFXMPtGrK8H6
 vfm5w2Y6HUJEXMgmfohDurvLK3L8GvO7E1tKzEJhmfZZqtqnt5vk++tZKCpqf1lH
 et29y6Ic+daxHgEBR1gCp11Ywike7e01BJPNnTvpX4XV+E+L7fEDwl2Mb7Rsslh1
 L61m4JkR9nDSSH8jD7oqUUlbkx+XTe31M/jj9jiLu0tCxIDgOFFcn6KziM1qINI=
 =Ir0I
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a set of three fixes for data corruption (libsas task file),
  oops causing (NULL in scsi_cmd_to_driver) and driver failure (bnx2i).
  The oops caused by the NULL in scsi_cmd_to_driver() manifests in
  scsi_eh_send_cmd() and has been seen by several people now.

  Signed-off-by: James Bottomley <JBottomley@Parallels.com>"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  [SCSI] bnx2i: Removed the reference to the netdev->base_addr
  [SCSI] libsas: fix taskfile corruption in sas_ata_qc_fill_rtf
  [SCSI] Fix NULL dereferences in scsi_cmd_to_driver
2012-07-11 12:51:58 -07:00
Javier Martin 8a76e5383f media: mx2_camera: Fix mbus format handling
Do not use MX2_CAMERA_SWAP16 and MX2_CAMERA_PACK_DIR_MSB flags. The driver
must negotiate with the attached sensor whether the mbus format is UYUV or
YUYV and set CSICR1 configuration accordingly.

This is needed for the video function on mach-imx27_visstrim_m10.c to
perform properly, since an earlier version of this patch has been proven
wrong and has been reverted and a commit, depending on it: "[media]
i.MX27: visstrim_m10: Remove use of MX2_CAMERA_SWAP16" is in the mainline.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[ g.liakhovetski@gmx.de: move a macro definition to a more logical place ]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
[ Applying directly because Mauro is on vacation - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-11 12:48:24 -07:00
Linus Torvalds 887eafd29b ARM: SoC fixes for 3.5-rc
* multiple omap2+ bug fixes
 * a regression on ux500 dt support
 * a build failure on shmobile
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAT/3SwWCrR//JCVInAQIlEQ//a9f4CGJAdRFtoRwCj0C24i6n8PVJF+23
 DWHuQ+xLBJqlex5tC8I3CJUBCAO7p432/C5OeTsE1sJcYK5GnEbolHd+nLWLsSqP
 l8NO9Pw4C98vpBMrIiPM+AiE6RCsYK04su0FoS0RftCchzg9ZursdJUDP2Tlwu6i
 lAFCsZTlM66J5h0OelSDO8aTL9VuaFjYWrNXOBjwkJiEGzZo9Adw8fY7ekttLZoV
 oQRKB8jFyGvc5ih1h4WdM/J5VyY1NWkRW1VDaxLXfJlvRuD7gIpOA5v2whanVjAd
 xmJnrLpE5tadtvxJRzUKDtlIQkw/ZoCzGrJfl7EhSbZYzlu7qiLq9HeRs6/t5odU
 AnX69qGQoLU+ARdp6DdG3EpqPc1EEyjLMaU6Los8ZjWrkPRhG6kn6iRe4LRwxRS3
 7RcP8fDeAUUSBZCfAK1FRdD9xSNQB5yt1KJsjYLfKoLWehXzAMOytWeKEJ2rJzZ/
 1/rCfTDfB+Sq8GtbHGj86bv/7cZN3+seu7fNGackfOmQEKRX363SB2T5P9xjnZ5E
 K+44W71BLPT9yYZ/pQ8f6V6f/wRDeE15IMD2PLghouAXJxGtx2upOshCMkUHl9RE
 PmcLLev8qulU8UI5sPsuWZsiCPVt6ujHLDqUrk7SN7rf+Emc+Rf9roDVJcYIrqwI
 Om7AtQwKgVQ=
 =35LO
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 -  multiple omap2+ bug fixes
 - a regression on ux500 dt support
 - a build failure on shmobile

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: OMAP2+: omap2plus_defconfig: EHCI driver is not stable, disable it
  ARM: shmobile: fix platsmp.c build when ARCH_SH73A0=n
  ARM: ux500: Over-ride the DT device naming scheme for pinctrl
  ARM: ux500: Fix build errors/warnings when MACH_UX500_DT is not set
  of: address: Don't fail a lookup just because a node has no reg property
  ARM: OMAP2+: hwmod code/clockdomain data: fix 32K sync timer
2012-07-11 12:44:25 -07:00
Linus Torvalds 8daf4ded90 Power management fix for 3.5-rc7
This removes ACPICA code that had been removed once from the kernel
 already by commit 2780cc4660e1 ([ACPI] Fix suspend/resume lockup
 issue by leaving Bus Master Arbitration enabled.), because it was
 known to cause systems to lock up during resume from suspend, but was
 re-introduced by mistake during the v3.4 merge window.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJP/bXmAAoJEKhOf7ml8uNscr8P/3TFaFF7VpwPAZ6KAwqRDB/t
 JAKzPW5T7a9qmGWMdLaCwRKuqzDFwygbYbYjNK5YN/r/9clULEKuy3Gwfx9pq0w5
 yPsPn3V4Bk3BmhAHwf6VnRiGu6Gxm0c6VKTnZL1PpOBmiKuFR1eYZglsbbzQ/FTy
 HSBKLyaxIJaeBvDab72ox/jDJoR+FTVhv1RzbMmKyq6xJzkbJID1co8E4pbxZZTS
 Cl5oH/Nt15jCwf2Np4au/76Gkdc6Ql7yjLw3147+iVbX07jhsKxlRL4a7gYmuNAd
 mJA3Qy8lFXjRsRHTArEFjfjij4ccrq35kjbUMS68udvAT3cS12HEeq2vf7dnV02y
 N4blGwJOa76CRXbtNvyAAYyyfZGz5SK3OFLk4Eusj5Gp7zS6TH8hZco7h1lwNKwg
 xxM4Y6vRJ1hlRbIo59zF9qP2exhGC7HTAvMu5YTcb4rsJ3AzpdHCDJM+t77O5gPi
 nzjuIh4ze1gjR6wBhS90tPW5n8iKKlo5SXLd0QdI/0VMlnoe10KZvIKghbtuLtdU
 hXxo+JdHySHjiK13IMTEXd+8H108Tf/dFqhBdbwW0DwVQ7qucN29WS4z6N7tkLmL
 UKb1q5TLrEiAs+DyWYGK3gXGNtZtPPRIIHfcZiu0+4hXfMn3v67KaYGfXgFkhz2e
 8oog2ibIs0Jcwfzld/u2
 =GTCj
 -----END PGP SIGNATURE-----

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

Pull power management fix from Rafael Wysocki:
 "This removes ACPICA code that had already been removed once from the
  kernel already by commit 2780cc4660e1 ("[ACPI] Fix suspend/resume
  lockup issue by leaving Bus Master Arbitration enabled"), because it
  was known to cause systems to lock up during resume from suspend, but
  was re-introduced by mistake during the v3.4 merge window."

* tag 'pm-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / PM: Leave Bus Master Arbitration enabled for suspend/resume
2012-07-11 12:42:39 -07:00
Linus Torvalds 1e032dc59b USB fixes for 3.5-rc6
Here are a few fixes and new device ids for the 3.5-rc6 tree.
 
 The PCI changes resolve a long-standing issue with resuming some EHCI
 controllers.  It has been acked by the PCI maintainer, and he asked for it to
 go through my USB tree instead of his.
 
 The xhci patches also resolve a number of reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAk/9hDgACgkQMUfUDdst+yk7KACg1/6PU/Zni57kEvjypRmbMF66
 SHoAoKdR7HFUvfgnq/HbUVlAC5sM+AJH
 =zxcV
 -----END PGP SIGNATURE-----

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

Pull USB fixes from Greg Kroah-Hartman:
 "Here are a few fixes and new device ids for the 3.5-rc6 tree.

  The PCI changes resolve a long-standing issue with resuming some EHCI
  controllers.  It has been acked by the PCI maintainer, and he asked
  for it to go through my USB tree instead of his.

  The xhci patches also resolve a number of reported issues.

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

* tag 'usb-3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  PCI: EHCI: fix crash during suspend on ASUS computers
  USB: cdc-wdm: fix lockup on error in wdm_read
  USB: metro-usb: fix tty_flip_buffer_push use
  USB: option: Add MEDIATEK product ids
  USB: option: add ZTE MF60
  xhci: Fix hang on back-to-back Set TR Deq Ptr commands.
  usb: Add support for root hub port status CAS
2012-07-11 11:53:31 -07:00
Linus Torvalds 5f351f0637 MISC fix for 3.5-rc6
Here's a single MEI driver fix that resolves a regression from 3.4 that a
 number of people have reported (and sent to me in different patches.)
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAk/9hLcACgkQMUfUDdst+ynJtACgma4xNMliCdnjYf8mVJTTyJkU
 JEkAn13elEqsx86p8hJqDt1QaKxfavtA
 =fG3X
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull misc fix from Greg Kroah-Hartman:
 "Here's a single MEI driver fix that resolves a regression from 3.4
  that a number of people have reported (and sent to me in different
  patches.)

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

* tag 'char-misc-3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  mei: pci_resume: set IRQF_ONESHOT for msi request_threaded_irq
2012-07-11 11:29:59 -07:00
Linus Torvalds e6f0f4546a GPIO fixes for v3.5:
- Invalid context restore on bank 0 for OMAP driver in
   runtime suspend/resume cycle
 - Check for NULL platform data in sta-2x11 driver
 - Constrain selection of the V1 MSM GPIO driver to applicable
   platforms (Kconfig issue)
 - Make sure the correct output value is set in the wm8994 driver
 - Export devm_gpio_request_one() so it can be used in modules.
   Apparently some in-kernel modules can be configured to use this
   leading to breakage.
 - Check that the GPIO is valid in the lantiq driver
 - Fix the flag bits introduced for v3.5, so they don't overlap
 - Fix a device tree intialization bug for imx21-compatible devices
 - Carry over the OF node to the TPS65910 GPIO chip struct
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP/JcSAAoJEEEQszewGV1zaJYQAJWoHSWjzR3mDYqKWTvLsFji
 UAoS9SM9dweXbV+QlvlZDt0F8vBoWF4h76JijY8wJZqJoQnhWEQ9NQhM6v8cZmdQ
 LJi1uiUnoYUhZ9cA5SIUBeIgzbPp/FbIe5JmPjkt8dGOJ4sAQPtwchQzytKdNkdv
 0oiVFJRFoPTHc1Mw0NUCBYcg5XsQec/JpJILl8rfM9ZzlkoRGoJcO1OhhmtnIrmO
 yqPfDmfv31iH3YKVD8nQzCuG3d4PlfuNGptqaUw9bM0KObn7B5eMEyhNhFNx8Ng7
 JW7FLMw9e5UGOSU1uuUw/8/RltWjuQwTEVmeoJytml3Ivqb4B90CuwpJEGR/CXLM
 Kt6YGNfJt9FDJIyGzf8lBYye4r6l/FgbMYii23R/HUuBH2+aXlkpDKqPamH7fdx8
 ZYINGwmyPWKkDtzCLlZbcKaWJQd7eWqhsg0V/CVJm2cvDZSYqt5K2eluQHLK15DP
 Tbs6IUaAgh3ML09Huc0WWAI0UUReS3oCITdBklcHPV7dEWHvFDwyfThW4r9oYpXv
 YmnCb3zgCFG35bm9XOBUqTbrew4qAjHTDiqYROU28WBiA8Brn8v3tQmWHsbO+nzJ
 eWLPmQTfnpmLdLnGI4DiUyPvlbnEQb6kMYSo8Cv4xWU2/e8Zl8HLWUELHAKvpLIN
 A4hm4xupceCATiUZJmJ9
 =ZZq+
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v3.5-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull a late GPIO fix from Linus Walleij:
 "Grr! So typically -next washed out a bug in the bug fixes.  This v2 of
  the pull request fixes another OF/DT related issue caused by fixing
  another OF/DT related issue, courtesy of Gerard Sintselaar.

  So please pull the v2.  Or pull it on top of the other one, whatever.
  Sorry for the panic mode, I'm in the middle of the Swedish woods,
  supposedly on vacation."

* tag 'fixes-for-v3.5-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio/gpio-tps65910: gpio_chip.of_node referenced without CONFIG_OF_GPIO defined
2012-07-11 11:28:15 -07:00
Ilia Katsnelson cc71a7e899 Input: xpad - add signature for Razer Onza Tournament Edition
Signed-off-by: Ilia Katsnelson <k0009000@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-11 00:55:06 -07:00
Yuri Khan 3ffb62cb9a Input: xpad - handle all variations of Mad Catz Beat Pad
The device should be handled by xpad driver instead of generic HID driver.

Signed-off-by: Yuri Khan <yurivkhan@gmail.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-11 00:54:49 -07:00
Michael Chan c1f5163de4 bnx2: Fix bug in bnx2_free_tx_skbs().
In rare cases, bnx2x_free_tx_skbs() can unmap the wrong DMA address
when it gets to the last entry of the tx ring.  We were not using
the proper macro to skip the last entry when advancing the tx index.

Reported-by: Zongyun Lai <zlai@vmware.com>
Reviewed-by: Jeffrey Huang <huangjw@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-10 23:33:47 -07:00
Eric Dumazet b28ba72665 IPoIB: fix skb truesize underestimatiom
Or Gerlitz reported triggering of WARN_ON_ONCE(delta < len); in
skb_try_coalesce()
This warning tracks drivers that incorrectly set skb->truesize

IPoIB indeed allocates a full page to store a fragment, but only
accounts in skb->truesize the used part of the page (frame length)

This patch fixes skb truesize underestimation, and
also fixes a performance issue, because RX skbs have not enough tailroom
to allow IP and TCP stacks to pull their header in skb linear part
without an expensive call to pskb_expand_head()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Erez Shitrit <erezsh@mellanox.com>
Cc: Shlomo Pongartz <shlomop@mellanox.com>
Cc: Roland Dreier <roland@purestorage.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-10 23:33:12 -07:00
Guennadi Liakhovetski 623b51fc86 mmc: cd-gpio: pass IRQF_ONESHOT to request_threaded_irq()
Fix a boot regression on Mackerel boards with sh_mobile_sdhi
in existing kernels causing:

genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq XXX

caused by 1c6c6952 (genirq: Reject bogus threaded irq requests).

This is backported from Guennadi's patch:
"mmc: extend and rename cd-gpio helpers to handle more slot GPIO functions"

Reported-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-07-10 23:03:57 -04:00
Venkatraman S 87f761b6c0 mmc: core: Revert "skip card initialization if power class selection fails"
This reverts commit 3d93576e(skip card initialization if
power class selection fails).
Problem has been reported when this is used with eMMC4.41
card with Tegra Platform. Till the issue is root caused,
bus width selection failure should not be treated as fatal.

Reported-by: Marc Dietrich <marvin24@gmx.de>
Signed-Off-by: Venkatraman S <svenkatr@ti.com>
CC: Ulf Hansson <ulf.hansson@stericsson.com>
CC: Subhash Jadavani <subhashj@codeaurora.org>
CC: Saugata Das <saugata.das@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-07-10 22:47:13 -04:00
Jerry Snitselaar bb39b6551e gpio/gpio-tps65910: gpio_chip.of_node referenced without CONFIG_OF_GPIO defined
commit 626f9914 added code to initialize gpio_chip.of_node, but if
CONFIG_OF_GPIO is not defined gps-tps65910 fails to build with an
error complaining gpio_chip has no member of_node. I ran into this
while doing a allyesconfig build on linux-next.

Signed-off-by: Gerard Snitselaar <dev@snitselaar.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-07-10 22:53:31 +02:00
Linus Torvalds 055c9fa887 GPIO fixes for v3.5:
- Invalid context restore on bank 0 for OMAP driver in
   runtime suspend/resume cycle
 - Check for NULL platform data in sta-2x11 driver
 - Constrain selection of the V1 MSM GPIO driver to applicable
   platforms (Kconfig issue)
 - Make sure the correct output value is set in the wm8994 driver
 - Export devm_gpio_request_one() so it can be used in modules.
   Apparently some in-kernel modules can be configured to use this
   leading to breakage.
 - Check that the GPIO is valid in the lantiq driver
 - Fix the flag bits introduced for v3.5, so they don't overlap
 - Fix a device tree intialization bug for imx21-compatible devices
 - Carry over the OF node to the TPS65910 GPIO chip struct
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP/GcNAAoJEEEQszewGV1z2G4QAL3R0vT3um5hllJmp7OnWBYp
 lGFCoYnBYC77RO59t2+zS1PX6Iz+kmNzeIEHFpArN7vOClvb7vCQX6J0HyhtVgVP
 vKW4c0aMkHvv6CMfgMomTzCBtPLxFHFPd/UyTwob9ha3+/39gCTTIrlUO9C7W/pb
 rNI+bwwLiaDj5Peq91P9V2fNv9aIb0hPeCEuAuZ3gKoxgVJLCJzJj+/so2XaZGsI
 kF9WJXhlhcMf94ZP6VoUtoHfIe1NYQD1OTxWQ8es4I/BXQ8jIHkH/wt9OE196jfT
 /hlX38jEspCWnpmfY4gkIgqC6gSB2EY+KsVpZcEL1TzXi6txYWNdN1TQW6Zb1Q1p
 BOlOErwhi2xxXwn1IjGKe7R2QLpu/7r6uYNFcD06YJeGSgEHkP0Pt8Nj5wqvY/wo
 rVp8vrUo/P9bAu/5R2Ogogh7AxoSz5W0rrZfoIa8+V7Nrxcl8wPkFhu/uBuhsxE+
 TJLI4e1lvzjlwRTuFzjSBq/u87tlCseL/KLlvCjahaxKdD2ElzF+NtPKFIu+u3+Y
 WmTjaV1sfZdprMXGlIGxx+b8OIunWxdll3W9jkb20Zf8MZsjqXAfsAy+qpAHhW5A
 iTZ92EWAE1v0k6zV7TRhkm7heP8Y5zfx4ARIgobVc5Z8bVw2LnHVA2lJqprkjRLS
 A/FCESAyzSrI1oYcCQy8
 =GIRC
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 "Yes, this is a *LATE* GPIO pull request with fixes for v3.5.

  Grant moved across the planet and accidentally fell off the grid, so
  he asked me to take over the GPIO merges for a while 10 days ago.

  Since then I went over the archives and collected this pile of fixes,
  and pulled two of them from the TI maintainer Kevin Hilman.  Then
  waited for them to at least hit linux-next once or twice."

GPIO fixes for v3.5:
 - Invalid context restore on bank 0 for OMAP driver in runtime
   suspend/resume cycle
 - Check for NULL platform data in sta-2x11 driver
 - Constrain selection of the V1 MSM GPIO driver to applicable platforms
   (Kconfig issue)
 - Make sure the correct output value is set in the wm8994 driver
 - Export devm_gpio_request_one() so it can be used in modules.
   Apparently some in-kernel modules can be configured to use this
   leading to breakage.
 - Check that the GPIO is valid in the lantiq driver
 - Fix the flag bits introduced for v3.5, so they don't overlap
 - Fix a device tree intialization bug for imx21-compatible devices
 - Carry over the OF node to the TPS65910 GPIO chip struct

* tag 'fixes-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: tps65910: initialize of_node of gpio_chip
  gpio/mxc: make irqs work for fsl,imx21-gpio devices
  gpio: fix bits conflict for gpio flags
  mips: pci-lantiq: Fix check for valid gpio
  gpio: export devm_gpio_request_one
  gpiolib: wm8994: Pay attention to the value set when enabling as output
  gpio/msm_v1: CONFIG_GPIO_MSM_V1 is only available on three SoCs
  gpio-sta2x11: don't use pdata if null
  gpio/omap: fix invalid context restore of gpio bank-0
  gpio/omap: fix irq loss while in idle with debounce on
2012-07-10 13:24:48 -07:00
Linus Torvalds 310959e831 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Benjamin Herrenschmidt:
 "It looks like my rewrite of our lazy irq scheme is still exposing
  "interesting" issues left and right.  The previous fixes are now
  causing an occasional BUG_ON to trigger (which this patch turns into a
  WARN_ON while at it), due to another issue of disconnect of the lazy
  irq state vs the processor state in the idle loop on pseries and
  cell.

  This should fix it properly once for all moving the nasty code to a
  common helper function.

  There's also couple more fixes for some debug stuff that didn't build
  (and helped resolving those problems so it's worth having), along with
  a compile fix for newer gcc's."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  tty/hvc_opal: Fix debug function name
  powerpc/numa: Avoid stupid uninitialized warning from gcc
  powerpc: Fix build of some debug irq code
  powerpc: More fixes for lazy IRQ vs. idle
2012-07-10 13:06:05 -07:00
Jonathan Nieder dc332fdf9f ACPI / PM: Leave Bus Master Arbitration enabled for suspend/resume
This is an old suspend/resume lockup fix:

	commit 2780cc4660e1
	Author: Len Brown <len.brown@intel.com>
	Date:   Thu Dec 23 13:43:30 2004 -0500

	    [ACPI] Fix suspend/resume lockup issue
	    by leaving Bus Master Arbitration enabled.
	    The ACPI spec mandates it be disabled only for C3.

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

	    Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
	    Signed-off-by: Len Brown <len.brown@intel.com>

The bug snuck back in in commit 2feec47d4c (ACPICA: ACPI 5: Support
for new FADT SleepStatus, SleepControl registers, 2012-02-14),
presumably by copy/pasting a copy of the code without that fix for the
legacy case.

On affected machines, after that commit, the machine locks up hard on
resume from suspend.  The same fix as seven years ago still works.

Addresses <https://bugzilla.kernel.org/show_bug.cgi?id=43641>.

Reported-bisected-and-tested-by: Octavio Alvarez <alvarezp@alvarezp.com>
Reported-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-10 21:50:59 +02:00
Linus Torvalds bc51b0c22c Revert "of: match by compatible property first"
This reverts commit 107a84e61c.

Meelis Roos reports a regression since 3.5-rc5 that stops Sun Fire V100
and Sun Netra X1 sparc64 machines from booting, hanging after enabling
serial console.  He bisected it to commit 107a84e61c.

Rob Herring explains:
 "The problem is match combinations of compatible plus name and/or type
  fail to match correctly.  I have a fix for this, but given how late it
  is for 3.5 I think it is best to revert this for now.  There could be
  other cases that rely on the current although wrong behavior.  I will
  post an updated version for 3.6."

Bisected-and-reported-by: Meelis Roos <mroos@linux.ee>
Requested-by: Rob Herring <rob.herring@calxeda.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-10 12:49:32 -07:00
Tomas Winkler 16a50b1270 mei: pci_resume: set IRQF_ONESHOT for msi request_threaded_irq
when the default irq quick handler is used then IRQF_ONESHOT must be set
otherwise the request fails and following error is displayed:

mei 0000:00:16.0: irq 48 for MSI/MSI-X
genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 48
mei 0000:00:16.0: request_threaded_irq failed: irq = 48.
dpm_run_callback(): pci_pm_resume+0x0/0x140 returns -22
PM: Device 0000:00:16.0 failed to resume async: error -22

Reported-by: Peter Wu <lekensteyn@gmail.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Tested-by: Peter Wu <lekensteyn@gmail.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable <stable@vger.kernel.org> # 3.5
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-10 10:45:07 -07:00
Alan Stern dbf0e4c725 PCI: EHCI: fix crash during suspend on ASUS computers
Quite a few ASUS computers experience a nasty problem, related to the
EHCI controllers, when going into system suspend.  It was observed
that the problem didn't occur if the controllers were not put into the
D3 power state before starting the suspend, and commit
151b612847 (USB: EHCI: fix crash during
suspend on ASUS computers) was created to do this.

It turned out this approach messed up other computers that didn't have
the problem -- it prevented USB wakeup from working.  Consequently
commit c2fb8a3fa2 (USB: add
NO_D3_DURING_SLEEP flag and revert 151b612847) was merged; it
reverted the earlier commit and added a whitelist of known good board
names.

Now we know the actual cause of the problem.  Thanks to AceLan Kao for
tracking it down.

According to him, an engineer at ASUS explained that some of their
BIOSes contain a bug that was added in an attempt to work around a
problem in early versions of Windows.  When the computer goes into S3
suspend, the BIOS tries to verify that the EHCI controllers were first
quiesced by the OS.  Nothing's wrong with this, but the BIOS does it
by checking that the PCI COMMAND registers contain 0 without checking
the controllers' power state.  If the register isn't 0, the BIOS
assumes the controller needs to be quiesced and tries to do so.  This
involves making various MMIO accesses to the controller, which don't
work very well if the controller is already in D3.  The end result is
a system hang or memory corruption.

Since the value in the PCI COMMAND register doesn't matter once the
controller has been suspended, and since the value will be restored
anyway when the controller is resumed, we can work around the BIOS bug
simply by setting the register to 0 during system suspend.  This patch
(as1590) does so and also reverts the second commit mentioned above,
which is now unnecessary.

In theory we could do this for every PCI device.  However to avoid
introducing new problems, the patch restricts itself to EHCI host
controllers.

Finally the affected systems can suspend with USB wakeup working
properly.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=37632
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=42728
Based-on-patch-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Dâniel Fraga <fragabr@gmail.com>
Tested-by: Javier Marcet <jmarcet@gmail.com>
Tested-by: Andrey Rahmatullin <wrar@wrar.name>
Tested-by: Oleksij Rempel <bug-track@fisher-privat.net>
Tested-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Cc: stable <stable@vger.kernel.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-10 09:52:05 -07:00
Henrik Rydberg 3dde22a98e Input: bcm5974 - Add support for 2012 MacBook Pro Retina
Add support for the 15'' MacBook Pro Retina model (MacBookPro10,1).

Patch originally written by clipcarl (forums.opensuse.org).

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-10 09:45:05 -07:00
Ryan Bourgeois b2e6ad7dfe HID: add support for 2012 MacBook Pro Retina
Add support for the 15'' MacBook Pro Retina. The keyboard is
the same as recent models.

The patch needs to be synchronized with the bcm5974 patch for
the trackpad - as usual.

Patch originally written by clipcarl (forums.opensuse.org).

[rydberg@euromail.se: Amended mouse ignore lines]
Signed-off-by: Ryan Bourgeois <bluedragonx@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-10 09:44:59 -07:00
Benjamin Herrenschmidt 50fb31cfed tty/hvc_opal: Fix debug function name
udbg_init_debug_opal() should be udbg_init_debug_opal_raw() as
the caller in arch/powerpc/kernel/udbg.c expects

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-10 19:16:25 +10:00
Eric Dumazet 313b037cf0 gianfar: fix potential sk_wmem_alloc imbalance
commit db83d136d7 (gianfar: Fix missing sock reference when
processing TX time stamps) added a potential sk_wmem_alloc imbalance

If the new skb has a different truesize than old one, we can get a
negative sk_wmem_alloc once new skb is orphaned at TX completion.

Now we no longer early orphan skbs in dev_hard_start_xmit(), this
probably can lead to fatal bugs.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Manfred Rudigier <manfred.rudigier@omicron.at>
Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
Cc: Jiajun Wu <b06378@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09 15:28:03 -07:00
Julia Lawall 022f09784b drivers/net/ethernet/broadcom/cnic.c: remove invalid reference to list iterator variable
If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure.  Thus this value should not be used after
the end of the iterator.  There does not seem to be a meaningful value to
provide to netdev_warn.  Replace with pr_warn, since pr_err is used
elsewhere.

This problem was found using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09 15:24:33 -07:00
Julia Lawall 1b9faf5e66 drivers/isdn/mISDN/stack.c: remove invalid reference to list iterator variable
If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure.  Thus this value should not be used after
the end of the iterator.  The dereferences are just deleted from the
debugging statement.

This problem was found using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09 15:24:33 -07:00
Eric W. Biederman 96ca7ffe74 bonding: debugfs and network namespaces are incompatible
The bonding debugfs support has been broken in the presence of network
namespaces since it has been added.  The debugfs support does not handle
multiple bonding devices with the same name in different network
namespaces.

I haven't had any bug reports, and I'm not interested in getting any.
Disable the debugfs support when network namespaces are enabled.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09 14:49:15 -07:00
Eric W. Biederman a64d49c3dd bonding: Manage /proc/net/bonding/ entries from the netdev events
It was recently reported that moving a bonding device between network
namespaces causes warnings from /proc.  It turns out after the move we
were trying to add and to remove the /proc/net/bonding entries from the
wrong network namespace.

Move the bonding /proc registration code into the NETDEV_REGISTER and
NETDEV_UNREGISTER events where the proc registration and unregistration
will always happen at the right time.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09 14:49:15 -07:00
Deepak Sikri 684901a6df stmmac: Fix for higher mtu size handling
For the higher mtu sizes requiring the buffer size greater than 8192,
the buffers are sent or received using multiple dma descriptors/ same
descriptor with option of multi buffer handling.
It was observed during tests that the driver was missing on data
packets during the normal ping operations if the data buffers being used
catered to jumbo frame handling.

The memory barrriers are added in between preparation of dma descriptors
in the jumbo frame handling path to ensure all instructions before
enabling the dma are complete.

Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09 14:37:52 -07:00
Deepak Sikri 8e83989106 stmmac: Fix for nfs hang on multiple reboot
It was observed that during multiple reboots nfs hangs. The status of
receive descriptors shows that all the descriptors were in control of
CPU, and none were assigned to DMA.
Also the DMA status register confirmed that the Rx buffer is
unavailable.

This patch adds the fix for the same by adding the memory barriers to
ascertain that the all instructions before enabling the Rx or Tx DMA are
completed which involves the proper setting of the ownership bit in DMA
descriptors.

Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09 14:37:51 -07:00
Linus Torvalds 2437fccfbf regulator: Fix for 3.5
A smallish fix for a lock dependency issue which affects a bunch of
 Qualcomm boards that do unusually complicated things with their
 regulators, the API is unlikely to be called by any other system.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP9yyGAAoJEBus8iNuMP3dI24P/RXFIHH1dYck49uQ17moYDY+
 vQBM7amuu23Q9MJxU5rGWaqwxXR8qT3iT76BlL9bt8u91GM4tDrccLRW09+GJXNZ
 1tpFK96iOaH9ju/+FMc0nR9P385YqxRh91ZWDfyAqectBU8nFAtcl+7BakuR/9j/
 2XbftG3T555EylCfwAaw1ikOALxE47ALgKa/Hglu8RDZTQSaWWZb2o20PTXfrkUk
 Mt1Pzs9PMfmgE7VUC6Q04vEydX47L8/iwywanzcbMTKw00d3o5WXTwNqDzcPWGZv
 S9pSGQaZ10JVMO7eu4337fsfIuhUEU0Ilbaow1eLi1RymgDFIamr0SUKcpC1sPDF
 O95l1GZmEwiyDJITL4K1Ssf5TZCKmR9eMh9e1iPmOrtpK4tGHxwqO5+OHmfncISp
 g4x4G7o+aK5M9c3+9r3G7S1ZrV4LAcFLVxN9LHo0PLIG/lT7tl8e6dAlWZjKSRIC
 w18lJ7mdOCXgJqOt4UzIRbWpI0pZaXt0tk1mfU+/vfzhl9C5AVMVNGqgaiafHWGG
 Kh01vjjSIGhfE3k83eOGlkYpTGvFsZBMVUMHif8hRfrBjiHj7RnvAfXqV0ULpa50
 v0huqrPwB+384c2V6K1f6IbpyLXZQ10h4HwctxprKbO+cZZ5oYlxLlu8tkJFvNMD
 QxLC8aDIumuprilMgryd
 =x509
 -----END PGP SIGNATURE-----

Merge tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "A smallish fix for a lock dependency issue which affects a bunch of
  Qualcomm boards that do unusually complicated things with their
  regulators, the API is unlikely to be called by any other system."

* tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Fix recursive mutex lockdep warning
2012-07-09 13:43:02 -07:00
Hans de Goede 6c6ee53c55 gspca_sn9c20x: Fix NULL pointer dereference
Don't call v4l2_ctrl_g_ctrl on ctrls which the model cam in question
does not have.

Reported-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[ Taken directly, since Mauro is on vacation ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-09 13:42:29 -07:00
Linus Torvalds c5e43b83b0 Theoretical fix, which greatly simplifies upcoming balloon patches which will go in via some vm tree.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP+hnqAAoJENkgDmzRrbjxkpcP/jl53FUc6M8L9djVSu/5EIxV
 2uLCoGL7kPq2f168VJ4002f1Fa5Irld9h7A4qlqxn8sE/5OGTEvSGnw3/rkoeMeB
 NLjZAFCre+qN0kWFFeZN76TlTGIJpudjsw4EE5fV8CSEbjSRt4SzQ1r8euRKGc0m
 1mqp5rCeUAPrDhRuEyqcqKU36CjDDnNukz1Q1tADgTJ6Q0T8yBZkDqPOIpNy6LCv
 YfazFiZDox7Wx7abPGJga4mIz1OyUR6l4vD8trJHrUaWlirLZE51+Lf69tAXP+Az
 lxvCyiXVTuNuj/TI8FOejWdixmMW3GczeSn7KCzbke1GbUfne1DBfxDImdJg6VbG
 AhQHUqvJAWHuohS5mnJpFCQZIrfkScyXC0gVm+g/dIJTf+4jqirk4DZyHZecznt1
 T5FdleRqO2ws0BMxeD3r/d/q5aUR0ryS08CLzFLP0GDcFgU6wANM87G1Q4IahZ7A
 gUjQ82piy1zzYML3/4r4qPTWAk1BGCYB6yfSVlCSwwhp+U5qER7cvrTugm4/eA6g
 4QkDUlGcwGryN6/VSNIoT6ymIB5SpFgOuAcF011MKl9OMUnOyshsiLz3GuTEGYim
 GZmcJsFnV9rbGTQ2DjYw8fny+DB4wwOTkHjdwVGfKBII3nY4Puc8bzaShqbDj+nH
 G1VIKLiZPmRVgm4cc5jC
 =vMWl
 -----END PGP SIGNATURE-----

Merge tag 'virtio-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus

Pull minor virtio-balloon fix from Rusty Russell:
 "Theoretical fix, which greatly simplifies upcoming balloon patches
  which will go in via some vm tree."

* tag 'virtio-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  virtio-balloon: fix add/get API use
2012-07-09 13:39:56 -07:00
Linus Torvalds 6f5410b688 Fixing two (somewhat rare) endpoint-related race issues, both of which
were reported by Fernando Guzman Lugo.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP+dsKAAoJELLolMlTRIoMOTEQAK2WOgW4ygXDOfhwZCj4ooXG
 Mk9PUQlEBfEufvKmK/Oh3xDVeP0i4+3BeWZ4Kgmas689SJc+LIbLSS0HtARcYF1+
 ZTEj7Gnax3P3tD6GxwU5bf+jrirCbr5sSeDa7p5jh017zVsZ5MVYOYvWXKQtYAZg
 hi6m2AqOUfkI3yOnWRbNMds+x3TTwpLC/3mT9mcFiJ/3L9SGx22SVfkRIa8tstjg
 i0eJDTu9cbHHZ7wtuGQoVZDO5kHLi7dPKnFTiFat8dklaSNMzNBrs5Tl4DT0XA3s
 tzb+BrnkddL2L36cC0XIyV1L/tQCdtAWLRFx5SDfpXKNQcYpqlMAteaAXdhf4Tjl
 kJapLhGeTVRSED6TvYX9XMFbi4U8PBSBvHd4VMryN1jGcmslE3UYCPIoqOL/aIZP
 dc9POY6JM9r/pMlzhQ6VUmTiecCVeCJyCh8x8r1wj7V1mC1nCxDskxObibHFjRPk
 4xdmke0+UR3fn4/aA/PRZbiy3kpT84lK9SoPlzUKLLBMzJ3KMLl5Dug2+Y8Aeutn
 gBxt9x+FA4UgmS62St97Cu7qbzWvAbpl95rFD4aIANMNxU9OkcjgWaB7aJzr8WWt
 j8Z2OkT0WW4ka60sGj0YxAEDlKhxC8f1lzD5tuJgmVFEbXhNTZaw+GG/ZwIqb5bq
 g7KQY8FnGDETO9Tew1QQ
 =nbt8
 -----END PGP SIGNATURE-----

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

Pull rpmsg fixes from Ohad Ben-Cohen:
 "Fixing two (somewhat rare) endpoint-related race issues, both of which
  were reported by Fernando Guzman Lugo."

* tag 'rpmsg-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/rpmsg:
  rpmsg: make sure inflight messages don't invoke just-removed callbacks
  rpmsg: avoid premature deallocation of endpoints
2012-07-09 13:24:00 -07:00
Linus Torvalds 84836bf973 Two build-related remoteproc fixes for 3.5.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP+dhzAAoJELLolMlTRIoMCLoP/3k+YQ2KjIjIF76v1jS2iJC1
 CgROumUrT+FFo6MCHBAl5TgY/d5uBouKpbMqUp+F3a0mDplh7V8//VAVvLbniKfL
 BWrSZrhy64z7DPz7ad2Dm0q70CaNa8SBegQT8vR8EvE/Oja57+doZXlFJJZolMly
 bC/QLEmCDHZFIkOZ2cR6Gr1Tai+FgeYBySM6YdfA4xjDcof4JzJyaw1F/hnQIt1z
 0o8mtEKUCGyHjn2YxNJna5s3u3rYJYUxFzaxfsBIQNhh12XKAoU1lrNZ9U881rHV
 +kaZ7o5lY0lWwJihGFifZEF5SQemCp+6/wPspKEteMrSGnceDJGKrkBPQT7zokaH
 J3i5wcJ1XlvxqzdhgaBVKWLR72IHWlGz9VuTaarmp9A7N0O65L7NH57VzkS1AKrv
 EhD+zrRQxA107n8kvyCUSC/9dPZVe4+r4UVMhUcTTdel0e5x6TILg+hAkpL4hkWe
 MEXg8++pavAuyxuK/8rjGphMreRaBeyvbtd+rNtQ06CUi+viJE3bLLT5SS5WEQuY
 UfzgapAoJ1sbnjVLECLjhfRrkf7We6QMiUFNYvZPV6/vqmjK24qj0REUPLYyoZvh
 4XPqKOZoFT+kINIINoLhWdHbKXOkIcS+lnq6Ne5ilNv/pz/SE5ybUl63+X6UrKhQ
 vxGVY/Yl6BjEHAmmLoU+
 =jzGC
 -----END PGP SIGNATURE-----

Merge tag 'remoteproc-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc

Pull remoteproc fixes from Ohad Ben-Cohen:
 "Two build-related remoteproc fixes for 3.5."

* tag 'remoteproc-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc:
  remoteproc: fix missing CONFIG_FW_LOADER configurations
  remoteproc/omap: fix randconfig unmet direct dependencies
2012-07-09 13:23:21 -07:00
Linus Torvalds 17cda2082d A single hwspinlock core fix for multiple hwspinlock devices scenarios,
from Shinya Kuribayashi.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP+ZcQAAoJELLolMlTRIoMUP8P/iRgrwLmfsUN/w+/PAv8rRCP
 aprvEamj+Jq6DiA63C3Fg6j03mN4ADIzjanqupttMEJekKXyW2mJh2WzDdi5qQ39
 pWBhp8wBl0vIdZXOEpOc3baE82XQFTgv4iTxFmcjXCDRoaOlLJqNGpehs5h4yvRK
 +QoiBfucmoa7atKkOoQxlZQyUZvkuxcSnpZSd4m39ylrk4LTQHoXJ1+6OrBKFeGV
 wzHTO9kGdPdAkpW73TatBMsu2unzLAAO1ImP2ETKL/JlqG8W5NhLZwrEbtq5JKtr
 nUyskUp3xdZYcevXOzZNwTp6uRcdoUUEh3OzT+xEGpoh8V5lU5NSSFOCaR4UQrm+
 lyz1HePAc9nNG7MErpcLu4WSY5xPqukAk3ML07t2zRgzMp/8BUHKDT0n43HJchSO
 JXKz9k0x21hE+uGfyi0euC1dnJpiZxFVIsn5m7YP/WeQdyKpO4EKOi1N7LGWALUh
 s6rE7czWfpXxHfBwXpWpqIVZQsFG8KN19XAe3uEXDZVBMJwFUiJcQxBPJn7nE9Tl
 wQNeD7Lj1It4AyL8zSTRVpLjwXWbzG2LrLx5VhPDgLNGGnoFAmMb+2O6oFutCHwM
 T+zJH7il9IroSArMGDZaGWRc/+EDWTqEBBwm/JFAyAzWw/SIxkJhfdl6IrJ9cMtw
 AvW/7lYyE3EbUfZOR4sX
 =dKmT
 -----END PGP SIGNATURE-----

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

Pull hwspinlock fix from Ohad Ben-Cohen:
 "A single hwspinlock core fix for multiple hwspinlock devices
  scenarios, from Shinya Kuribayashi."

* tag 'hwspinlock-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
  hwspinlock/core: use global ID to register hwspinlocks on multiple devices
2012-07-09 13:22:40 -07:00
John W. Linville c1109736bc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2012-07-09 15:09:08 -04:00
Emmanuel Grumbach b48d966526 iwlegacy: don't mess up the SCD when removing a key
When we remove a key, we put a key index which was supposed
to tell the fw that we are actually removing the key. But
instead the fw took that index as a valid index and messed
up the SRAM of the device.

This memory corruption on the device mangled the data of
the SCD. The impact on the user is that SCD queue 2 got
stuck after having removed keys.

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Cc: stable@vger.kernel.org
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09 15:01:03 -04:00
Stanislaw Gruszka c2ca7d92ed iwlegacy: always monitor for stuck queues
This is iwlegacy version of:

commit 342bbf3fee
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Sun Mar 4 08:50:46 2012 -0800

    iwlwifi: always monitor for stuck queues

    If we only monitor while associated, the following
    can happen:
     - we're associated, and the queue stuck check
       runs, setting the queue "touch" time to X
     - we disassociate, stopping the monitoring,
       which leaves the time set to X
     - almost 2s later, we associate, and enqueue
       a frame
     - before the frame is transmitted, we monitor
       for stuck queues, and find the time set to
       X, although it is now later than X + 2000ms,
       so we decide that the queue is stuck and
       erroneously restart the device

Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09 15:01:02 -04:00
Stanislaw Gruszka efd821182c rt2x00usb: fix indexes ordering on RX queue kick
On rt2x00_dmastart() we increase index specified by Q_INDEX and on
rt2x00_dmadone() we increase index specified by Q_INDEX_DONE. So entries
between Q_INDEX_DONE and Q_INDEX are those we currently process in the
hardware. Entries between Q_INDEX and Q_INDEX_DONE are those we can
submit to the hardware.

According to that fix rt2x00usb_kick_queue(), as we need to submit RX
entries that are not processed by the hardware. It worked before only
for empty queue, otherwise was broken.

Note that for TX queues indexes ordering are ok. We need to kick entries
that have filled skb, but was not submitted to the hardware, i.e.
started from Q_INDEX_DONE and have ENTRY_DATA_PENDING bit set.

From practical standpoint this fixes RX queue stall, usually reproducible
in AP mode, like for example reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=828824

Reported-and-tested-by: Franco Miceli <fmiceli@plan.ceibal.edu.uy>
Reported-and-tested-by: Tom Horsley <horsley1953@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09 15:01:02 -04:00
Bing Zhao b3190466b0 mwifiex: fix Coverity SCAN CID 709078: Resource leak (RESOURCE_LEAK)
> *. CID 709078: Resource leak (RESOURCE_LEAK)
> 	- drivers/net/wireless/mwifiex/cfg80211.c, line: 935
> Assigning: "bss_cfg" = storage returned from "kzalloc(132UL, 208U)"
> 	- but was not free
> drivers/net/wireless/mwifiex/cfg80211.c:935

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09 15:01:01 -04:00
Linus Walleij 46bada6096 Merge branch 'kevin' into fixes 2012-07-09 20:02:28 +02:00
Linus Torvalds 17fae1cdea IOMMU fixes for Linux v3.5-rc5
The patches fix several issues in the AMD IOMMU driver, the NVidia SMMU
 driver, and the DMA debug code. The most important fix for the AMD IOMMU
 solves a problem with SR-IOV devices where virtual functions did not
 work with IOMMU enabled. The NVidia SMMU patch fixes a possible sleep
 while spin-lock situation (queued the small fix for v3.5, a better but
 more intrusive fix is coming for v3.6). The DMA debug patches fix a
 possible data corruption issue due to bool vs. u32 usage.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP8YJLAAoJECvwRC2XARrjv74QAJKyaUoXbhqst84RU1owiFcz
 A2oUC/DwqEGJD3VrixcY6Ih/2SXYuHd+Cpjd2Q8Eyc2gq66aXy7DTm/Rp+TeMxFD
 M65ZZzbbrVeU2Ym7apNeKe3AzaspVRLKThirbCK5/cMuM6l0Dmh6+X/O1iqnagju
 OLsd+rk8eMRPF7N2dFdG28OwI/rdWkkFj1apdo4BwavPjDP06C7pqd9/sbxtDc55
 u7Yxsw456U7N/aimBKn24EeXo8NmT58W+NsNMxMqrF3sJ/gzJCotnYTR/ijZCz5w
 jv1JQlhNSL+tD2F7yQMXLmhvK72UvFPrMiRK/mSgDnQUoSxxiuKDRQ+TnDardhdC
 YMTj6488cnMqjmPIlkz41Wfu7knMDZVT8yUdfBy9nWEQYe6ALfLwVWwDSZzkA4SA
 Dl0VyryIZMqeJbuCbPO5mR0Lh2WzBEapHSpoo30bz7E0n+F7Uw47XVSWfkiGEbfv
 z41oKmqEK6xD1Kl/71gzwlADMRwkIrX+qDWuOTTRuHJVhb58Kwg3/P05hTAe6E3b
 BDXROOiCO9GiNuecH0QbdBQNOEFsCdIqpqzUMaGzUOQHHP1w6Y8dMn3TZnabX5wO
 0mZWH1tzBmIPkI4G5V9h3UaurqJT0ZdsAehyjBtvACBOn8TUyricbvHF/imVS4T1
 zzHcTVEFLV4ocSpG3ZsY
 =1jsG
 -----END PGP SIGNATURE-----

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

Pull IOMMU fixes from Joerg Roedel:
 "The patches fix several issues in the AMD IOMMU driver, the NVidia
  SMMU driver, and the DMA debug code.

  The most important fix for the AMD IOMMU solves a problem with SR-IOV
  devices where virtual functions did not work with IOMMU enabled.  The
  NVidia SMMU patch fixes a possible sleep while spin-lock situation
  (queued the small fix for v3.5, a better but more intrusive fix is
  coming for v3.6).  The DMA debug patches fix a possible data
  corruption issue due to bool vs u32 usage."

* tag 'iommu-fixes-v3.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/amd: fix type bug in flush code
  dma-debug: debugfs_create_bool() takes a u32 pointer
  iommu/tegra: smmu: Fix unsleepable memory allocation
  iommu/amd: Initialize dma_ops for hotplug and sriov devices
  iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode
2012-07-09 10:57:21 -07:00
Frank Kunz 0e050923a7 HID: add Sennheiser BTD500USB device support
The Sennheiser BTD500USB composit device requires the
HID_QUIRK_NOGET flag to be set for working proper. Without the
flag the device crashes during hid intialization.

Signed-off-by: Frank Kunz <xxxxxmichl@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-07-09 16:21:32 +02:00
Michael Chan 054581e6c1 cnic: Don't use netdev->base_addr
commit c0357e975a
    bnx2: stop using net_device.{base_addr, irq}.

removed netdev->base_addr so we need to update cnic to get the MMIO
base address from pci_resource_start().  Otherwise, mmap of the uio
device will fail.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09 00:18:04 -07:00
Bjørn Mork 6fecd35d4c net: qmi_wwan: add ZTE MF60
Adding a device with limited QMI support. It does not support
normal QMI_WDS commands for connection management. Instead,
sending a QMI_CTL SET_INSTANCE_ID command is required to
enable the network interface:

  01 0f 00 00 00 00 00 00  20 00 04 00 01 01 00 00

A number of QMI_DMS and QMI_NAS commands are also supported
for optional device management.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09 00:18:04 -07:00
David Daney b93984c9af netdev/phy: Fixup lockdep warnings in mdio-mux.c
With lockdep enabled we get:

=============================================
[ INFO: possible recursive locking detected ]
3.4.4-Cavium-Octeon+ #313 Not tainted
---------------------------------------------
kworker/u:1/36 is trying to acquire lock:
(&bus->mdio_lock){+.+...}, at: [<ffffffff813da7e8>] mdio_mux_read+0x38/0xa0

but task is already holding lock:
 (&bus->mdio_lock){+.+...}, at: [<ffffffff813d79e4>] mdiobus_read+0x44/0x88

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&bus->mdio_lock);
  lock(&bus->mdio_lock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation
.
.
.

This is a false positive, since we are indeed using 'nested' locking,
we need to use mutex_lock_nested().

Now in theory we can stack multiple MDIO multiplexers, but that would
require passing the nesting level (which is difficult to know) to
mutex_lock_nested().  Instead we assume the simple case of a single
level of nesting.  Since these are only warning messages, it isn't so
important to solve the general case.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09 00:12:42 -07:00
Alexander Duyck d4e4164943 ixgbe: DCB and SR-IOV can not co-exist and will cause hangs
DCB and SR-IOV cannot currently be enabled at the same time as the queueing
schemes are incompatible.  If they are both enabled it will result in Tx
hangs since only the first Tx queue will be able to transmit any traffic.

This simple fix for this is to block us from enabling TCs in ixgbe_setup_tc
if SR-IOV is enabled.  This change will be reverted once we can support
SR-IOV and DCB coexistence.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09 00:10:06 -07:00
Cloud Ren b94e52f626 atl1c: fix issue of transmit queue 0 timed out
some people report atl1c could cause system hang with following
kernel trace info:
---------------------------------------
WARNING: at.../net/sched/sch_generic.c:258 dev_watchdog+0x1db/0x1d0()
...
NETDEV WATCHDOG: eth0 (atl1c): transmit queue 0 timed out
...
---------------------------------------
This is caused by netif_stop_queue calling when cable Link is down.
So remove netif_stop_queue, because link_watch will take it over.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Cloud Ren <cjren@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-08 23:59:53 -07:00
Eric Dumazet acfa9e94e2 net: dont use __netdev_alloc_skb for bounce buffer
commit a1c7fff7e1 (net: netdev_alloc_skb() use build_skb()) broke b44 on
some 64bit machines.

It appears b44 and b43 use __netdev_alloc_skb() instead of alloc_skb()
for their bounce buffers.

There is no need to add an extra NET_SKB_PAD reservation for bounce
buffers :

- In TX path, NET_SKB_PAD is useless

- In RX path in b44, we force a copy of incoming frames if
  GFP_DMA allocations were needed.

Reported-and-bisected-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-08 23:52:27 -07:00
NeilBrown 2d4f4f3384 md/raid1: fix use-after-free bug in RAID1 data-check code.
This bug has been present ever since data-check was introduce
in 2.6.16.  However it would only fire if a data-check were
done on a degraded array, which was only possible if the array
has 3 or more devices.  This is certainly possible, but is quite
uncommon.

Since hot-replace was added in 3.3 it can happen more often as
the same condition can arise if not all possible replacements are
present.

The problem is that as soon as we submit the last read request, the
'r1_bio' structure could be freed at any time, so we really should
stop looking at it.  If the last device is being read from we will
stop looking at it.  However if the last device is not due to be read
from, we will still check the bio pointer in the r1_bio, but the
r1_bio might already be free.

So use the read_targets counter to make sure we stop looking for bios
to submit as soon as we have submitted them all.

This fix is suitable for any -stable kernel since 2.6.16.

Cc: stable@vger.kernel.org
Reported-by: Arnold Schulz <arnysch@gmx.net>
Signed-off-by: NeilBrown <neilb@suse.de>
2012-07-09 11:34:13 +10:00
Michael S. Tsirkin 9c378abc5c virtio-balloon: fix add/get API use
Since ee7cd8981e 'virtio: expose added
descriptors immediately.', in virtio balloon virtqueue_get_buf might
now run concurrently with virtqueue_kick.  I audited both and this
seems safe in practice but this is not guaranteed by the API.
Additionally, a spurious interrupt might in theory make
virtqueue_get_buf run in parallel with virtqueue_add_buf, which is
racy.

While we might try to protect against spurious callbacks it's
easier to fix the driver: balloon seems to be the only one
(mis)using the API like this, so let's just fix balloon.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (removed unused var)
2012-07-09 09:07:22 +09:30
Graeme Gregory b330f85d3d mfd: Add missing hunk to change palmas irq to clear on read
During conversion to regmap_irq this hunk was missing being moved
to MFD driver to put the chip into clear on read mode. Also as slave
is now set use it to determine which slave for the register call.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:26 +02:00
Graeme Gregory adc20e02ae mfd: Fix palmas regulator pdata missing
Due to a merge error the section of code passing the pdata for the
regulator driver to the mfd_add_devices via the children structure
was missing. This corrects this problem.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:25 +02:00
Russ Dill c05995c3d7 mfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix issues.
'ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue' (1fcb57d0) fixes
an issue where the ULPI PHYs were not held in reset while initializing
the EHCI controller. However, it also changes behavior in
omap-usb-host.c omap_usbhs_init by releasing reset while the
configuration in that function was done.

This change caused a regression on BB-xM where USB would not function
if 'usb start' had been run from u-boot before booting. A change was
made to release reset a little bit earlier which fixed the issue on
BB-xM and did not cause any regressions on 3430 sdp, the board for
which the fix was originally made.

This new fix, 'USB: EHCI: OMAP: Finish ehci omap phy reset cycle
before adding hcd.', (3aa2ae74) caused a regression on OMAP5.

The original fix to hold the EHCI controller in reset during
initialization was correct, however it appears that changing
omap_usbhs_init to not hold the PHYs in reset during it's
configuration was incorrect. This patch first reverts both fixes, and
then changes ehci_hcd_omap_probe in ehci-omap.c to hold the PHYs in
reset as the original patch had done. It also is sure to incorporate
the _cansleep change that has been made in the meantime.

I've tested this on Beagleboard xM, I'd really like to get an ack from
the 3430 sdp and OMAP5 guys before getting this merged.

v3 - Brown paper bag its too early in the morning actually run
     git commit amend fix
v2 - Put cansleep gpiolib call outside of spinlock

Acked-by: Mantesh Sarashetti <mantesh@ti.com>
Tested-by: Mantesh Sarashetti <mantesh@ti.com>
Acked-by: Keshava Munegowda <keshava_mgowda@ti.com>
Tested-by: Keshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:25 +02:00
Peter Ujfalusi 487bae3c3a mfd: Update twl6040 Kconfig to avoid build breakage
twl6040 needs CONFIG_IRQ_DOMAIN to compile, without this we have:
drivers/mfd/twl6040-irq.c: In function 'twl6040_irq_init':
drivers/mfd/twl6040-irq.c:164:2: error: implicit declaration of function 'irq_domain_add_legacy'
drivers/mfd/twl6040-irq.c:165:11: error: 'irq_domain_simple_ops' undeclared (first use in this function)
drivers/mfd/twl6040-irq.c:165:11: note: each undeclared identifier is reported only once for each function it appears in

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:25 +02:00
Paul Bolle acb6685ef3 mfd: Delete ab5500-core.h
Commit 72fb92200d ("mfd/ab5500: delete
AB5500 support") deleted all files that used ab5500-core.h. That file
apparently was simply overlooked. Delete it too.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:25 +02:00
Philippe Rétornaz ada72d0a93 mfd: mc13xxx workaround SPI hardware bug on i.Mx
The MC13xxx PMIC is mainly used on i.Mx SoC. On those SoC the SPI
hardware will deassert CS line as soon as the SPI FIFO is empty.
The MC13xxx hardware is very sensitive to CS line change as it
corrupts the transfer if CS is deasserted in the middle of a register
read or write.
It is not possible to use the CS line as a GPIO on some SoC, so we
need to workaround this by implementing a single SPI transfer to
access the PMIC.

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Marc Reilly <marc@cpdesign.com.au>
Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:25 +02:00
Philippe Rétornaz 44716ec2f4 mfd: Fix mc13xxx SPI regmap
This fix the SPI regmap configuration, the wrong write flag was used.
Also, bits_per_word should not be set as the regmap spi implementation
uses a 8bits transfert granularity.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:24 +02:00
Axel Lin 00ba81c152 mfd: Add terminating entry for i2c_device_id palmas table
The i2c_device_id table is supposed to be zero-terminated.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:24 +02:00
Tomi Valkeinen 373b436521 OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n
If runtime PM is not enabled in the kernel config, pm_runtime_get_sync()
will always return 1 and pm_runtime_put_sync() will always return
-ENOSYS. pm_runtime_get_sync() returning 1 presents no problem to the
driver, but -ENOSYS from pm_runtime_put_sync() causes the driver to
print a warning.

One option would be to ignore errors returned by pm_runtime_put_sync()
totally, as they only say that the call was unable to put the hardware
into suspend mode.

However, I chose to ignore the returned -ENOSYS explicitly, and print a
warning for other errors, as I think we should get notified if the HW
failed to go to suspend properly.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jassi Brar <jaswinder.singh@linaro.org>
Cc: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-07-08 14:00:27 +00:00
Tomi Valkeinen 736f29cd6b OMAPDSS: Use PM notifiers for system suspend
The current way how omapdss handles system suspend and resume is that
omapdss device (a platform device, which is not part of the device
hierarchy of the DSS HW devices, like DISPC and DSI, or panels.) uses
the suspend and resume callbacks from platform_driver to handle system
suspend. It does this by disabling all enabled panels on suspend, and
resuming the previously disabled panels on resume.

This presents a few problems.

One is that as omapdss device is not related to the panel devices or the
DSS HW devices, there's no ordering in the suspend process. This means
that suspend could be first ran for DSS HW devices and panels, and only
then for omapdss device. Currently this is not a problem, as DSS HW
devices and panels do not handle suspend.

Another, more pressing problem, is that when suspending or resuming, the
runtime PM functions return -EACCES as runtime PM is disabled during
system suspend. This causes the driver to print warnings, and operations
to fail as they think that they failed to bring up the HW.

This patch changes the omapdss suspend handling to use PM notifiers,
which are called before suspend and after resume. This way we have a
normally functioning system when we are suspending and resuming the
panels.

This patch, I believe, creates a problem that somebody could enable or
disable a panel between PM_SUSPEND_PREPARE and the system suspend, and
similarly the other way around in resume. I choose to ignore the problem
for now, as it sounds rather unlikely, and if it happens, it's not
fatal.

In the long run the system suspend handling of omapdss and panels should
be thought out properly. The current approach feels rather hacky.
Perhaps the panel drivers should handle system suspend, or the users of
omapdss (omapfb, omapdrm) should handle system suspend.

Note that after this patch we could probably revert
0eaf9f52e9 (OMAPDSS: use sync versions of
pm_runtime_put). But as I said, this patch may be temporary, so let's
leave the sync version still in place.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Jassi Brar <jaswinder.singh@linaro.org>
Tested-by: Joe Woodward <jw@terrafix.co.uk>
Signed-off-by: Archit Taneja <archit@ti.com>
[fts: fixed 2 brace coding style issues]
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-07-08 14:00:26 +00:00
Eddie Wai a771718065 [SCSI] bnx2i: Removed the reference to the netdev->base_addr
The netdev->base_addr parameter has been deprecated in the L2 bnx2
driver.  This is used by bnx2i for the BARn iomapping.

This patch will directly reference the pci_resource_start instead
of using the deprecated netdev->base_addr.

This patch is actually a critical bug fix as the 1G bnx2 driver no
longer supports the netdev->base_addr in the current kernel of the scsi
tree.  This means that Broadcom's 1G Linux iSCSI offload solution would
not work at all without this patch. 

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-07-08 09:52:03 +01:00
Dan Williams 6ef1b512f4 [SCSI] libsas: fix taskfile corruption in sas_ata_qc_fill_rtf
fill_result_tf() grabs the taskfile flags from the originating qc which
sas_ata_qc_fill_rtf() promptly overwrites.  The presence of an
ata_taskfile in the sata_device makes it tempting to just copy the full
contents in sas_ata_qc_fill_rtf().  However, libata really only wants
the fis contents and expects the other portions of the taskfile to not
be touched by ->qc_fill_rtf.  To that end store a fis buffer in the
sata_device and use ata_tf_from_fis() like every other ->qc_fill_rtf()
implementation.

Cc: <stable@vger.kernel.org>
Reported-by: Praveen Murali <pmurali@logicube.com>
Tested-by: Praveen Murali <pmurali@logicube.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-07-08 09:49:14 +01:00
Shinya Kuribayashi 476a7eeb60 hwspinlock/core: use global ID to register hwspinlocks on multiple devices
Commit 300bab9770 (hwspinlock/core: register a bank of hwspinlocks in a
single API call, 2011-09-06) introduced 'hwspin_lock_register_single()'
to register numerous (a bank of) hwspinlock instances in a single API,
'hwspin_lock_register()'.

At which time, 'hwspin_lock_register()' accidentally passes 'local IDs'
to 'hwspin_lock_register_single()', despite that ..._single() requires
'global IDs' to register hwspinlocks.

We have to convert into global IDs by supplying the missing 'base_id'.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
[ohad: fix error path of hwspin_lock_register, too]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
2012-07-07 22:35:30 +03:00
Sylwester Nawrocki 4e39da0102 [media] s5p-fimc: Add missing FIMC-LITE file operations locking
commit 5126f2590b
"v4l2-dev: add flag to have the core lock all file operations"
introduced an additional bit flag (V4L2_FL_LOCK_ALL_FOPS) that
should be set by drivers that use the v4l2 core lock for all file
operations. Since this driver has been merged at the same time as
the core changes it doesn't set this flags and thus its all file
operations except IOCTL are not properly serialized. Fix this by
adding file ops locking in the driver.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-07 00:12:39 -03:00
Laurent Pinchart 5aedc10940 [media] omap3isp: preview: Fix contrast and brightness handling
Commit bac387efbb ("omap3isp: preview:
Simplify configuration parameters access") added three fields to the
preview_update structure, but failed to properly update the related
initializers. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:39 -03:00
Laurent Pinchart 7103180b43 [media] omap3isp: preview: Fix output size computation depending on input format
The preview engine crops 4 columns and 4 lines when CFA is enabled.
Commit b2da46e52f ("omap3isp: preview: Add
support for greyscale input") inverted the condition by mistake, fix
this.

Reported-by: Florian Neuhaus <florian.neuhaus@reberinformatik.ch>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Florian Neuhaus <florian.neuhaus@reberinformatik.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:39 -03:00
Anton Blanchard 8299d62843 [media] winbond-cir: Initialise timeout, driver_type and allowed_protos
We need to set a timeout so we can go idle on no activity.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:38 -03:00
Anton Blanchard 57f4422f7b [media] winbond-cir: Fix txandrx module info
We aren't getting any module info for the txandx option because
of a typo:

parm:           txandrx:bool

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:37 -03:00