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

140899 Commits

Author SHA1 Message Date
Jan Beulich 32050017cf drivers/rtc/rtc-efi.c: fix section mismatch warning
efi_rtc_init() uses platform_driver_probe(), so there's no need to also
set efi_rtc_driver's probe member (as it won't be used anyway).  This
fixes a modpost section mismatch warning (as efi_rtc_probe() validly is
__init).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12 13:12:12 -07:00
Andreas Dumberger bb58da08f0 drivers/rtc/rtc-r9701.c: reset registers if invalid values are detected
hwclock refuses to set date/time if RTC registers contain invalid
values.  Check the date/time register values at probe time and
initialize them to make hwclock happy.

Signed-off-by: Andreas Dumberger <andreas.dumberger@tqs.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12 13:12:12 -07:00
Mathieu Desnoyers 44e4360fa3 drivers/char/random.c: fix boot id uniqueness race
/proc/sys/kernel/random/boot_id can be read concurrently by userspace
processes.  If two (or more) user-space processes concurrently read
boot_id when sysctl_bootid is not yet assigned, a race can occur making
boot_id differ between the reads.  Because the whole point of the boot id
is to be unique across a kernel execution, fix this by protecting this
operation with a spinlock.

Given that this operation is not frequently used, hitting the spinlock
on each call should not be an issue.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-12 13:12:12 -07:00
Linus Torvalds f549e088b8 Fix regression in the /sys/class/infiniband/.../rate attribute -- old
kernels used to just return something, even if the underlying value was
 out-of-bounds, while 3.4-rc1 returned EINVAL to userspace.  This breaks
 some applications that check for the error, so go back to the old
 behavior.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABCAAGBQJPhb1PAAoJEENa44ZhAt0heLgQAI8qrLIBUyHzzfmwMYE7c+fq
 PWnXo4ZT6YLht2l7PPxZOGUYtW2FSR9uneuTRozCAyLWmMNvfHNQTIXZQpP7N4zA
 Ql3SkI08962Hhdgrd3pF9/Qv5BWrUgOEfpts4kJ3uIafG/gNCAwuEUOjFl7N9FYA
 6sGsa9uEm1KgYzH97Kn79z9qnbZYNdwsiuuwvG9gpNaW5m0zdysowheC+JMGDld/
 1Y4fMGbv3AO4K+vv8jFtkVvd2F6fa2qDlZ3cP0+o+EfQGWzdpf/BL+sK5j6R0gAw
 OFByHvZTXMK9daMOueG+s+4teYe85PFgriugA++UCTb/JAIqfQi4bwcFm3Iv1uCL
 zfIsmo6Q15KXda3xp/sUUcI97/IMFz82f8ow9LwjcfPxz1+F/OjKA/jdCw1LX7h/
 LizVLdvNp/IoQ76/0jfV0isf4BZbT1OaheMM0vDW9yTGbelNwds1KbrYyhe1IQwV
 Zjv183BLytoEzfP/1bD3y88nsgxWwqoekZ6QDca/zq4nYyf1TPerOL+wESOqsNha
 K5JtnZWFllf6dYSyLNlysfIC4RlBc/6dhJQYaCvVbI1/I3a+zLsnuFJDlGLlxyf7
 G2OedlXLggcb9RSiJxb31aQ4BS7nOVEBvnjIIo8hz31xD2Gz9PGuTdl/HOdtpr/k
 5l2bgFfrtmeClzhVjhHq
 =xYF8
 -----END PGP SIGNATURE-----

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

Pull infiniband fixes from Roland Dreier:
 "Fix a regression in the /sys/class/infiniband/.../rate attribute --
  old kernels used to just return something, even if the underlying
  value was out-of-bounds, while 3.4-rc1 returned EINVAL to userspace.
  This breaks some applications that check for the error, so go back to
  the old behavior."

* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/core: Don't return EINVAL from sysfs rate attribute for invalid speeds
  IB/mlx4: Don't return an invalid speed when a port is down
2012-04-11 13:24:52 -07:00
Linus Torvalds 39f86a608a 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:

 - dvb core: there is a regression found when used with xine.  For
   whatever unknown reason, xine (and xine-lib clients) wants that the
   frontend to tell what frequency he is using even before the PLL lock
   (or at least, it expects a non-zero frequency).

   On DVB, the frequency is only actually known after a frequency
   zig-zag seek, done by the DVB core.  Anyway, the fix was trivial.
   That solves Fedora BZ#808871.

 - ivtv: fix a regression when selecting the language channel

 - uvc: fix a race-related crash

 - it913x: fixes firmware loading

 - two trivial patches (a dependency issue at a radio driver at sound
   Kconfig, and a warning fix on dvb).

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] uvcvideo: Fix race-related crash in uvc_video_clock_update()
  [media] Drivers/media/radio: Fix build error
  [media] dvb_frontend: fix compiler warning
  [media] it913x: fix firmware loading errors
  [media] ivtv: Fix AUDIO_(BILINGUAL_)CHANNEL_SELECT regression
  [media] dvb_frontend: regression fix: userspace ABI broken for xine
2012-04-11 11:05:34 -07:00
Linus Torvalds 94fb175c04 dmaengine-fixes for 3.4-rc3
1/ regression fix for Xen as it now trips over a broken assumption
    about the dma address size on 32-bit builds
 
 2/ new quirk for netdma to ignore dma channels that cannot meet
    netdma alignment requirements
 
 3/ fixes for two long standing issues in ioatdma (ring size overflow)
    and iop-adma (potential stack corruption)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPhIfhAAoJEB7SkWpmfYgCguIQAL4qF+RC9/JggSHIjfOrYiPd
 yboV80GqqQHHBwy8hfZVUrIEPMebvD/xUIk6iUQNXR+6EA8Ln0jukvQMpWNnI+Cc
 TXgA5Ok70an4PD1MqnCsWyCJjsyPyhprbRHurxBcesf+y96POJxhING0rcKvft50
 mvYnbtrkYe9M9x3b8TBGc0JaTVeL29Ck3FtkTz4uUktbkhRNfCcfEd28NRQpf8MB
 vkjbjRGBQmGsnKxYCaEhlF1GPJyTlYjg4BBWtseJgb2R9s7tvJrkotFea/NmSfjq
 XCuVKjpiFp3YyJuxJERWdwqRWvyAZFfcYyZX440nG0b7GBgSn+T7A9XhUs8vMboi
 tLwoDfBbJDlKMaFpHex7Z6RtZZmVl3gWDNZTqpG44n4pabd4RPip04f0k7Wfs+cp
 tzU9hGAOvgsZ8w4/JgxH8YJOZbIGzbDGOA1IhWcbxIbmFTblMiFnV3TC7qfhoRbR
 8qtScIE7bUck2MYVlMMn9utd9tvKFa6HNgo41+f78/4+U7zQ/VrsbA/DWQct40R5
 5k+EEvyYFUzIXn79E0GVN5h4NHH5gfAs3MZ7jIgwgHedBp4Ki68XYKNu+pIV3YwG
 CFTPn1mVOXnCdt+fsjG5tL9Jecx1Mij6w3nWU93ZU6cHmC77YmU+DLxPIGuyR1a2
 EmpObwfq5peXzkgQpEsB
 =F3IR
 -----END PGP SIGNATURE-----

Merge tag 'dmaengine-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine

Pull dmaengine fixes from Dan Williams:

1/ regression fix for Xen as it now trips over a broken assumption
   about the dma address size on 32-bit builds

2/ new quirk for netdma to ignore dma channels that cannot meet
   netdma alignment requirements

3/ fixes for two long standing issues in ioatdma (ring size overflow)
   and iop-adma (potential stack corruption)

* tag 'dmaengine-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine:
  netdma: adding alignment check for NETDMA ops
  ioatdma: DMA copy alignment needed to address IOAT DMA silicon errata
  ioat: ring size variables need to be 32bit to avoid overflow
  iop-adma: Corrected array overflow in RAID6 Xscale(R) test.
  ioat: fix size of 'completion' for Xen
2012-04-10 15:30:16 -07:00
Linus Torvalds 53cb430755 regulator: Fix a build warning in the anatop driver for 3.4
This is a trivial rename to stop the build system complaining that we're
 referencing things we shouldn't be.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPgsruAAoJEBus8iNuMP3dhoAP/3uoRbXjrYQ7CDvcIuyoEWHo
 r969e3XTNYk6i2jAeogCkQX/aa9xl71N3XHBg6elaUEOvvnuBegwwF50AKLhocyh
 L1f2ms+XsqAYJutwszeeqjdilButwnnUpX4JXR2NqGNeFEAgQNpsoiIJoEtR0tV/
 WO12IegyC30JA8V2Hem92zvotiKX1exuKmyoyjG6AadgJauNQtm9cT7HTXq/Lcbe
 UbYVN3WRzKU11TutV/+ZrMzlqVKRXY/m+3L6xfqgTO6+Z7XLhPYpDRFfEi8fUZ/d
 FJhcmE4xvnFnPcPZnn0DLrWuS+cIkLagdN7FKWhCsBBADHafbHJJhaioI2vyCglT
 ksAJkP/f0pSeTY9izR7qCFhnbt1VXqmynbO6+39UQmlabKpXECL1TW5aKEGpHUAd
 i7Ielv7axCH0eQG7ZzkJRInefANQBt4PfmnBFVZcH1uGCXlkT+JAL3aoiNHAGMlv
 TET/gegNEKBSHkrMNKkzp1qxQniO6t9QTd5PbuzvVW9V2X1A7miResl8f7od4+Pg
 GaCR2UN3vTg8aW9SMgLcE/45tF88s0aHK4awcsJrnVcSOdMVJTNlXWcwQ21+V4Yf
 bhNVX3UsP+J/csk9Vo0aMc3/cjLdBGNrtnl68ypRMADUVHytH8/VdbFvVk53mQ5O
 +BzWdtZaV8C3BeHJ3AL0
 =45TQ
 -----END PGP SIGNATURE-----

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

Pull a regulator build fix from Mark Brown:
 "Fix a build warning in the anatop driver for 3.4

  This is a trivial rename to stop the build system complaining that
  we're referencing things we shouldn't be."

* tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: anatop: fix 'anatop_regulator' name collision
2012-04-10 10:26:41 -07:00
Kristen Carlson Accardi 3a48d1c08f i2c: prevent spurious interrupt on Designware controllers
Don't call i2c_enable on resume because it causes a spurious
interrupt.

Signed-off-by:  Kristen Carlson Accardi <kristen@linux.intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-10 08:09:03 -07:00
David Rientjes 83dbbdbb38 android, lowmemorykiller: remove task handoff notifier
The task handoff notifier leaks task_struct since it never gets freed
after the callback returns NOTIFY_OK, which means it is responsible for
doing so.

It turns out the lowmemorykiller actually doesn't need this notifier at
all.  It's used to prevent unnecessary killing by waiting for a thread
to exit as a result of lowmem_shrink(), however, it's possible to do
this in the same way the kernel oom killer works by setting TIF_MEMDIE
and avoid killing if we're still waiting for it to exit.

The kernel oom killer will already automatically set TIF_MEMDIE for
threads that are attempting to allocate memory that have a fatal signal.
The thread selected by lowmem_shrink() will have such a signal after the
lowmemorykiller sends it a SIGKILL, so this won't result in an
unnecessary use of memory reserves for the thread to exit.

This has the added benefit that we don't have to rely on
CONFIG_PROFILING to prevent needlessly killing tasks.

Reported-by: Werner Landgraf <w.landgraf@ru.ru>
Cc: stable@vger.kernel.org
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-09 20:48:44 -07:00
Laurent Pinchart ed0ee0ce0a [media] uvcvideo: Fix race-related crash in uvc_video_clock_update()
The driver frees the clock samples buffer before stopping the video
buffers queue. If a DQBUF call arrives in-between,
uvc_video_clock_update() will be called with a NULL clock samples
buffer, leading to a crash. This occurs very frequently when using the
webcam with the flash browser plugin.

Move clock initialization/cleanup to uvc_video_enable() in order to free
the clock samples buffer after the queue is stopped. Make sure the clock
is reset at resume time to avoid miscalculating timestamps.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 10:15:28 -03:00
Hans Petter Selasky c065f5b4ee [media] dvb_frontend: fix compiler warning
has_get_frontend() should return a boolean, not a pointer.

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 09:42:11 -03:00
Malcolm Priestley 4da2876614 [media] it913x: fix firmware loading errors
On some systems the device does not respond or give obscure values after cold,
warm or firmware reboot.

This patch retries to get chip version and type 5 times. If it
fails it applies chip version 0x1 and type 0x9135.

This patch does not fix warm cycle problems from other operating
systems and indeed the reverse applies. Users should power off cold boot.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 09:42:10 -03:00
Hans Verkuil bc169e35e3 [media] ivtv: Fix AUDIO_(BILINGUAL_)CHANNEL_SELECT regression
When I converted ivtv to the new decoder API I introduced a regression in the
support of the old channel select API.

Thanks to Martin Dauskardt for reporting this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 09:41:54 -03:00
Chris Rankin 556a0442e0 [media] dvb_frontend: regression fix: userspace ABI broken for xine
The commit e399ce77e6 has broken the DVB ABI for xine:

The problem is that xine is expecting every event after a successful
FE_SET_FRONTEND ioctl to have a non-zero frequency parameter, regardless
of whether the tuning process has LOCKed yet. What used to happen is
that the events inherited the initial tuning parameters from the
FE_SET_FRONTEND call. However, the fepriv->parameters_out struct is now
not initialised until the status contains the FE_HAS_LOCK bit.

You might argue that this behaviour is intentional, except that if an
application other than xine uses the DVB adapter and manages to set the
parameters_out.frequency field to something other than zero, then xine
no longer has any problems until either the adapter is replugged or the
kernel modules reloaded. This can only mean that the
fepriv->parameters_out struct still contains the (stale) tuning
information from the previous application.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Cc: stable@kernel.org # for kernel version 3.3
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 09:41:34 -03:00
Linus Torvalds f4e52e7ffd regmap: A couple of small fixes for 3.4
Two more small fixes:
 - Now we have users for it that aren't running Android it turns out that
   regcache_sync_region() is much more useful to drivers if it's exported
   for use by modules.  Who knew?
 - Make sure we don't divide by zero when doing debugfs dumps of rbtrees,
   not visible up until now because everything was providing at least
   some cache on startup.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPfMvJAAoJEBus8iNuMP3d43YQAI8IJqPoAqK2eKjQlYNRzP3O
 hWgA6oU56Yqg0PZKKTbWKkul2j9onRV7UrCsXrKo9gCVFNAROkMh9q8uZxzf7yl1
 AlOsoKDH/ijYhuAkbLri5tWc8vw5SZS/rSXx6BnVAIPgDjaCEoJcd6swJTfieuyz
 slN+y3Y3FDk7zIefkcAlMpUR5ks+jAHOHhk/Kwe5+xP3xk/09acuiNogpPYRH4Fp
 2tV9Qr9cSrDKIX8eLkR/AkRkmESMIzkpEopQY4vpYO+GiEwyKGdGjMTqkgjQ7PSk
 jL1lp36CAeVuR7Bp3OFT7bilXZKTrkOiwkC2ctFmyjYK+VO4HWBeOeMmoZvTBRCO
 +RXAZVN0zFyxPuH6ZJqOuQpCyoY0JBZPZulwRrXGsQpQOoITuEt9yJpLfDSj6hYd
 Pj8NLHT10n8DBnLk8nXuxT0mNgGDBTNOVCpVblmfm2CLcEGOQsAzWCgCKjkehCUJ
 O3I/3ZHzs1tvCZNcmt5HH8d8D+iMtkOS8bSHTHvZ2ADjSXWGPgXYlUwObYH6kV9N
 nMYi8Q6r8skkESL1jaE12XMZxGm07emIyUh+9hfM0lLGEC/cPff2gXwKhtZMDQfE
 XELx3e/EbyqNsNqFd71v9XpGyJA9si7JvPY/ZSei/CTqToIEAsX/BwGMKGAWnrNy
 ARlp9oaM6BOOg+i2Ddrg
 =qm1Q
 -----END PGP SIGNATURE-----

Merge tag 'regmap-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull two more small regmap fixes from Mark Brown:
 - Now we have users for it that aren't running Android it turns out
   that regcache_sync_region() is much more useful to drivers if it's
   exported for use by modules.  Who knew?
 - Make sure we don't divide by zero when doing debugfs dumps of
   rbtrees, not visible up until now because everything was providing at
   least some cache on startup.

* tag 'regmap-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: prevent division by zero in rbtree_show
  regmap: Export regcache_sync_region()
2012-04-07 09:56:00 -07:00
Linus Torvalds 664481ed45 SuperH updates for 3.4-rc1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAk99uBgACgkQGkmNcg7/o7hglwCgqi6CE7i5gyneNYBn2ocRps4O
 y1UAoMSIscO6YWcHPuxOiNBbJYUy/jMI
 =SEO8
 -----END PGP SIGNATURE-----

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

Pull SuperH fixes from Paul Mundt.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
  sh: fix clock-sh7757 for the latest sh_mobile_sdhi driver
  serial: sh-sci: use serial_port_in/out vs sci_in/out.
  sh: vsyscall: Fix up .eh_frame generation.
  sh: dma: Fix up device attribute mismatch from sysdev fallout.
  sh: dwarf unwinder depends on SHcompact.
  sh: fix up fallout from system.h disintegration.
2012-04-07 09:52:46 -07:00
Linus Torvalds f21fec96ea Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI & Power Management patches from Len Brown:
 "Two fixes for cpuidle merge-window changes, plus a URL fix in
  MAINTAINERS"

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  MAINTAINERS: Update git url for ACPI
  cpuidle: Fix panic in CPU off-lining with no idle driver
  ACPI processor: Use safe_halt() rather than halt() in acpi_idle_play_dead()
2012-04-06 19:56:04 -07:00
Linus Torvalds a0421da44f Merge branch '3.4-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull target fixes from Nicholas Bellinger:
 "Pull two tcm_fc fabric related fixes for -rc2:

  Note that both have been CC'ed to stable, and patch #1 is the
  important one that addresses a memory corruption bug related to FC
  exchange timeouts + command abort.

  Thanks again to MDR for tracking down this issue!"

* '3.4-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  tcm_fc: Do not free tpg structure during wq allocation failure
  tcm_fc: Add abort flag for gracefully handling exchange timeout
2012-04-06 19:54:26 -07:00
Mark Rustad 06383f10c4 tcm_fc: Do not free tpg structure during wq allocation failure
Avoid freeing a registered tpg structure if an alloc_workqueue call
fails.  This fixes a bug where the failure was leaking memory associated
with se_portal_group setup during the original core_tpg_register() call.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Acked-by: Kiran Patil <Kiran.patil@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-04-06 18:57:05 -07:00
Mark Rustad e1c4038282 tcm_fc: Add abort flag for gracefully handling exchange timeout
Add abort flag and use it to terminate processing when an exchange
is timed out or is reset. The abort flag is used in place of the
transport_generic_free_cmd function call in the reset and timeout
cases, because calling that function in that context would free
memory that was in use. The aborted flag allows the lifetime to
be managed in a more normal way, while truncating the processing.

This change eliminates a source of memory corruption which
manifested in a variety of ugly ways.

(nab: Drop unused struct fc_exch *ep in ft_recv_seq)

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Acked-by: Kiran Patil <Kiran.patil@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-04-06 18:56:43 -07:00
Len Brown eeaab2d8af Merge branches 'idle-fix' and 'misc' into release 2012-04-06 21:48:59 -04:00
Linus Torvalds 4157368edb Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile bug fixes from Chris Metcalf:
 "This includes Paul Gortmaker's change to fix the <asm/system.h>
  disintegration issues on tile, a fix to unbreak the tilepro ethernet
  driver, and a backlog of bugfix-only changes from internal Tilera
  development over the last few months.

  They have all been to LKML and on linux-next for the last few days.
  The EDAC change to MAINTAINERS is an oddity but discussion on the
  linux-edac list suggested I ask you to pull that change through my
  tree since they don't have a tree to pull edac changes from at the
  moment."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (39 commits)
  drivers/net/ethernet/tile: fix netdev_alloc_skb() bombing
  MAINTAINERS: update EDAC information
  tilepro ethernet driver: fix a few minor issues
  tile-srom.c driver: minor code cleanup
  edac: say "TILEGx" not "TILEPro" for the tilegx edac driver
  arch/tile: avoid accidentally unmasking NMI-type interrupt accidentally
  arch/tile: remove bogus performance optimization
  arch/tile: return SIGBUS for addresses that are unaligned AND invalid
  arch/tile: fix finv_buffer_remote() for tilegx
  arch/tile: use atomic exchange in arch_write_unlock()
  arch/tile: stop mentioning the "kvm" subdirectory
  arch/tile: export the page_home() function.
  arch/tile: fix pointer cast in cacheflush.c
  arch/tile: fix single-stepping over swint1 instructions on tilegx
  arch/tile: implement panic_smp_self_stop()
  arch/tile: add "nop" after "nap" to help GX idle power draw
  arch/tile: use proper memparse() for "maxmem" options
  arch/tile: fix up locking in pgtable.c slightly
  arch/tile: don't leak kernel memory when we unload modules
  arch/tile: fix bug in delay_backoff()
  ...
2012-04-06 17:56:20 -07:00
Linus Torvalds 9479f0f801 Two fixes for regressions:
* one is a workaround that will be removed in v3.5 with proper fix in the tip/x86 tree,
  * the other is to fix drivers to load on PV (a previous patch made them only
    load in PVonHVM mode).
 
 The rest are just minor fixes in the various drivers and some cleanup in the
 core code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJPfyVUAAoJEFjIrFwIi8fJUjUH/jbY5JavRqSlNELZW2A4Ta76
 8p00LqLHw/C56iHZcWKke8mqtWNb+ZfcQt7ZYcxDIYa4QWBL28x0OLAO2tOBIt37
 ZjYESWSdFJaJvmpADluWtFyGyZ9TYJllDTBm/jWj1ZtKSZvR1YkhuMXCS0f4AmGQ
 xFzSWJZUDdiOAqpN+VQD8wP00gfR8knQLg16XE2fvFdQo4XwpCtqLfHV/5pMMGdy
 Cs/ep6rq/7cdv/nshKOcBnw7RW8l3Xoi/28ht8k3DvAQ2VtFq1Tugv2G9pcCHwQG
 DIBkB3SOU6/v6P5at5+egKS5xR1fJetCWlkMd8kkbcdz2NPI4UDMkvOW6Q8yQls=
 =6Ve+
 -----END PGP SIGNATURE-----

Merge tag 'stable/for-linus-3.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

Pull xen fixes from Konrad Rzeszutek Wilk:
 "Two fixes for regressions:
   * one is a workaround that will be removed in v3.5 with proper fix in
     the tip/x86 tree,
   * the other is to fix drivers to load on PV (a previous patch made
     them only load in PVonHVM mode).

  The rest are just minor fixes in the various drivers and some cleanup
  in the core code."

* tag 'stable/for-linus-3.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/pcifront: avoid pci_frontend_enable_msix() falsely returning success
  xen/pciback: fix XEN_PCI_OP_enable_msix result
  xen/smp: Remove unnecessary call to smp_processor_id()
  xen/x86: Workaround 'x86/ioapic: Add register level checks to detect bogus io-apic entries'
  xen: only check xen_platform_pci_unplug if hvm
2012-04-06 17:54:53 -07:00
Linus Torvalds 1ddca05743 MMC fixes for 3.4-rc2:
The major fixes here are:
   * Disable use of MSI in sdhci-pci, which caused multiple chipsets to
     stop working in 3.4-rc1.  I'll wait to turn this on again until we
     have a chipset whitelist for it.
   * Fix a libertas SDIO powered-resume regression introduced in 3.3;
     thanks to Neil Brown and Rafael Wysocki for this fix.
   * Fix module reloading on omap_hsmmc.
   * Stop trusting the spec/card's specified maximum data timeout length,
     and use three seconds instead.  Previously we used 300ms.
 
  Also cleanups and fixes for s3c, atmel, sh_mmcif and omap_hsmmc.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPfzfxAAoJEHNBYZ7TNxYMGBoP/02Drw+n4c7xykXdB7SSloq8
 SGIAmh25EBFyZhcEmQ8Mm5qn4voHG8+Jm7ZXA3OipJ4xucu5fdoCIu/n8arGYa2u
 GRB+GYOz92maCNBwLGZIMm7A64m2rkrRdwTw4pkjOZuJLh28GCshK2E+ZWoMKVNU
 flaUna7NQc/p2eXulCNirry+4l1xxGW00lYaSOq78MTOKUMwWLCJZw+TUvfvxjX8
 5BFc3b2+5fQKc1M0qh23oEcneRdOUUK6dWzvZHuQso1SkDeB1cetN9fzrhnys9or
 tooIqd+GQRPJ6oGqe+VD8MT8HGMPb6oETZaFM7h7bt8nFcScu3iVjmJQLIbnsNBY
 ho8AUkMbZtDtRBWDtk11zM9qrOWGufRdB0qW4R+4Zik1JohNp6SAeV7YSllIT4sT
 lT5gdzAxAiZ992iwYKuwAn0SQOlevN2BjHMFGg8abZtlOWEWE2YIQ0nTJS2SCIyj
 qbM9wmLZ2Ymo9KabRY+huRgrbViNHDzAQOLB/LEyvbPwD97arJE1R/OVNEasiv52
 rh5pCsIa5oeUeX1fsfysfug+cO96Xm1oL/cGyLRj8WZB++nurHRm7ZAo36r8FLK1
 4LpMokEEwpoPcbNqsfFvOy3aRV4sGNTDj+U8B4zyq9GigSoUwSAK7Nn2qbY9zIWj
 W+oh3jfoyMbyVE5+00X7
 =CCKD
 -----END PGP SIGNATURE-----

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

Pull MMC fixes from Chris Ball:
 - Disable use of MSI in sdhci-pci, which caused multiple chipsets to
   stop working in 3.4-rc1.  I'll wait to turn this on again until we
   have a chipset whitelist for it.
 - Fix a libertas SDIO powered-resume regression introduced in 3.3;
   thanks to Neil Brown and Rafael Wysocki for this fix.
 - Fix module reloading on omap_hsmmc.
 - Stop trusting the spec/card's specified maximum data timeout length,
   and use three seconds instead.  Previously we used 300ms.

Also cleanups and fixes for s3c, atmel, sh_mmcif and omap_hsmmc.

* tag 'mmc-fixes-for-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (28 commits)
  mmc: use really long write timeout to deal with crappy cards
  mmc: sdhci-dove: Fix compile error by including module.h
  mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
  Revert "mmc: sdhci-pci: Add MSI support"
  Revert "mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers"
  mmc: core: fix power class selection
  mmc: omap_hsmmc: fix module re-insertion
  mmc: omap_hsmmc: convert to module_platform_driver
  mmc: omap_hsmmc: make it behave well as a module
  mmc: omap_hsmmc: trivial cleanups
  mmc: omap_hsmmc: context save after enabling runtime pm
  mmc: omap_hsmmc: use runtime put sync in probe error patch
  mmc: sdio: Use empty system suspend/resume callbacks at the bus level
  mmc: bus: print bus speed mode of UHS-I card
  mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers
  mmc: sh_mmcif: Simplify calculation of mmc->f_min
  mmc: sh_mmcif: mmc->f_max should be half of the bus clock
  mmc: sh_mmcif: double clock speed
  mmc: block: Remove use of mmc_blk_set_blksize
  mmc: atmel-mci: add support for odd clock dividers
  ...
2012-04-06 17:22:23 -07:00
Toshi Kani ee01e66337 cpuidle: Fix panic in CPU off-lining with no idle driver
Fix a NULL pointer dereference panic in cpuidle_play_dead() during
CPU off-lining when no cpuidle driver is registered.  A cpuidle
driver may be registered at boot-time based on CPU type.  This patch
allows an off-lined CPU to enter HLT-based idle in this condition.

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Cc: Boris Ostrovsky <boris.ostrovsky@amd.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Tested-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2012-04-06 15:01:25 -04:00
Linus Torvalds 23f347ef63 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking updates from David Miller:

 1) Fix inaccuracies in network driver interface documentation, from Ben
    Hutchings.

 2) Fix handling of negative offsets in BPF JITs, from Jan Seiffert.

 3) Compile warning, locking, and refcounting fixes in netfilter's
    xt_CT, from Pablo Neira Ayuso.

 4) phonet sendmsg needs to validate user length just like any other
    datagram protocol, fix from Sasha Levin.

 5) Ipv6 multicast code uses wrong loop index, from RongQing Li.

 6) Link handling and firmware fixes in bnx2x driver from Yaniv Rosner
    and Yuval Mintz.

 7) mlx4 erroneously allocates 4 pages at a time, regardless of page
    size, fix from Thadeu Lima de Souza Cascardo.

 8) SCTP socket option wasn't extended in a backwards compatible way,
    fix from Thomas Graf.

 9) Add missing address change event emissions to bonding, from Shlomo
    Pongratz.

10) /proc/net/dev regressed because it uses a private offset to track
    where we are in the hash table, but this doesn't track the offset
    pullback that the seq_file code does resulting in some entries being
    missed in large dumps.

    Fix from Eric Dumazet.

11) do_tcp_sendpage() unloads the send queue way too fast, because it
    invokes tcp_push() when it shouldn't.  Let the natural sequence
    generated by the splice paths, and the assosciated MSG_MORE
    settings, guide the tcp_push() calls.

    Otherwise what goes out of TCP is spaghetti and doesn't batch
    effectively into GSO/TSO clusters.

    From Eric Dumazet.

12) Once we put a SKB into either the netlink receiver's queue or a
    socket error queue, it can be consumed and freed up, therefore we
    cannot touch it after queueing it like that.

    Fixes from Eric Dumazet.

13) PPP has this annoying behavior in that for every transmit call it
    immediately stops the TX queue, then calls down into the next layer
    to transmit the PPP frame.

    But if that next layer can take it immediately, it just un-stops the
    TX queue right before returning from the transmit method.

    Besides being useless work, it makes several facilities unusable, in
    particular things like the equalizers.  Well behaved devices should
    only stop the TX queue when they really are full, and in PPP's case
    when it gets backlogged to the downstream device.

    David Woodhouse therefore fixed PPP to not stop the TX queue until
    it's downstream can't take data any more.

14) IFF_UNICAST_FLT got accidently lost in some recent stmmac driver
    changes, re-add.  From Marc Kleine-Budde.

15) Fix link flaps in ixgbe, from Eric W. Multanen.

16) Descriptor writeback fixes in e1000e from Matthew Vick.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
  net: fix a race in sock_queue_err_skb()
  netlink: fix races after skb queueing
  doc, net: Update ndo_start_xmit return type and values
  doc, net: Remove instruction to set net_device::trans_start
  doc, net: Update netdev operation names
  doc, net: Update documentation of synchronisation for TX multiqueue
  doc, net: Remove obsolete reference to dev->poll
  ethtool: Remove exception to the requirement of holding RTNL lock
  MAINTAINERS: update for Marvell Ethernet drivers
  bonding: properly unset current_arp_slave on slave link up
  phonet: Check input from user before allocating
  tcp: tcp_sendpages() should call tcp_push() once
  ipv6: fix array index in ip6_mc_add_src()
  mlx4: allocate just enough pages instead of always 4 pages
  stmmac: re-add IFF_UNICAST_FLT for dwmac1000
  bnx2x: Clear MDC/MDIO warning message
  bnx2x: Fix BCM57711+BCM84823 link issue
  bnx2x: Clear BCM84833 LED after fan failure
  bnx2x: Fix BCM84833 PHY FW version presentation
  bnx2x: Fix link issue for BCM8727 boards.
  ...
2012-04-06 10:37:38 -07:00
Jan Beulich f09d8432e3 xen/pcifront: avoid pci_frontend_enable_msix() falsely returning success
The original XenoLinux code has always had things this way, and for
compatibility reasons (in particular with a subsequent pciback
adjustment) upstream Linux should behave the same way (allowing for two
distinct error indications to be returned by the backend).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-04-06 12:16:02 -04:00
Jan Beulich 0ee46eca04 xen/pciback: fix XEN_PCI_OP_enable_msix result
Prior to 2.6.19 and as of 2.6.31, pci_enable_msix() can return a
positive value to indicate the number of vectors (less than the amount
requested) that can be set up for a given device. Returning this as an
operation value (secondary result) is fine, but (primary) operation
results are expected to be negative (error) or zero (success) according
to the protocol. With the frontend fixed to match the XenoLinux
behavior, the backend can now validly return zero (success) here,
passing the upper limit on the number of vectors in op->value.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-04-06 12:13:55 -04:00
Igor Mammedov e95ae5a493 xen: only check xen_platform_pci_unplug if hvm
commit b9136d207f08
  xen: initialize platform-pci even if xen_emul_unplug=never

breaks blkfront/netfront by not loading them because of
xen_platform_pci_unplug=0 and it is never set for PV guest.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-04-06 12:12:52 -04:00
Linus Torvalds 314489bd4c ARM: SoC fixes for 3.4-rc2
A bunch of fixes for regressions (and a few other problems) in 3.4-rc1:
 
 * Fix for regression of mach/io.h cleanup on platforms with PCI or PCMCIA
   (adding back the include file on those for now)
 * AT91 fixes for usb and spi
 * smsc911x ethernet fixes for i.MX
 * smsc911x fixes for OMAP
 * gpio fixes for Tegra
 * A handful of build error and warning fixes for various platforms
 * cpufreq kconfig dependencies, build and lowlevel debug fixes for
   Samsung platforms
 
 In other words, more or less the regular collection of -rc1/2 type
 material. A few of them, in particular the smsc911x for OMAP series, aren't
 technically regressions for 3.4, but they're valid fixes and we're still
 relatively early in the rc cycle so it seems appropriate to include them.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPfmp2AAoJEIwa5zzehBx31hAP/Rs3xdpOpwtPt0YKnvtg5/k7
 FyZuhrhihPd2+hJKpzUVPmaal0TdyWgt2kGCl13JrwqWu7xV6VMDakrBPAl/jXwb
 3NJU2zjfx+6YJMbgSxid2f/Gv36/p7bBusqGWiU92vOly0Tw4joqZ8ABoO4ti8mK
 O1eGbS6Rw5rpHy2u0UkgK3r9xCQxmSJQ1hCezOm7cWmwEhC5pmDe9qKO3Qdbp8tr
 XdIE3v0qSv5TuQdPedh8+3JsSx5mub+ZYKKqzWIrbQW5xrqawOKXl4nugrNnustr
 aDIoHpAoo4++qt0WJY2wg4/hHoPj2ibHzZqWhktmWj4leMttwTUFnHZm3wvZ55fA
 0kp4x6pCsa7J1FhYhCpUVZUS/CcQv8wKBA7RGGUsl/0t52droqFwfYi/YhB6nCMo
 zDRHJm+hToZN1/HPiKsyFlM+pQ2nsE/AXs7V5ohf7/GE6w66A5TU/HHolHv3ERvU
 QoshX3zPtrAUQEe8WT4bG7HqXaNr/aa080ElYSdlVQ/HfGbIcKcSxzavUvZIZmx2
 IYFF3SkpAhVtidcPzdnYJPjNF9c3Kr1w0QLUGgyRkrRp6OSPiPkksmI8gcjlf5l3
 runmq36+ktqSz1KnNHBNnSF9aQ6drzCNQ7nqpPXeMaTrZ1jdXNcKTw9eLo/Kr3vB
 4UHuqt8hfrcpiUYdXRQ1
 =RVTD
 -----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 Olof Johansson:
 "A bunch of fixes for regressions (and a few other problems) in
  3.4-rc1:

 - Fix for regression of mach/io.h cleanup on platforms with PCI or
   PCMCIA (adding back the include file on those for now)
 - AT91 fixes for usb and spi
 - smsc911x ethernet fixes for i.MX
 - smsc911x fixes for OMAP
 - gpio fixes for Tegra
 - A handful of build error and warning fixes for various platforms
 - cpufreq kconfig dependencies, build and lowlevel debug fixes for
   Samsung platforms

  In other words, more or less the regular collection of -rc1/2 type
  material.  A few of them, in particular the smsc911x for OMAP series,
  aren't technically regressions for 3.4, but they're valid fixes and
  we're still relatively early in the rc cycle so it seems appropriate
  to include them."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (60 commits)
  ARM: fix __io macro for PCMCIA
  ARM: EXYNOS: Fix compiler warning in dma.c file
  ARM: EXYNOS: fix ISO C90 warning
  ARM: OMAP2+: hwmod: Fix wrong SYSC_TYPE1_XXX_MASK bit definitions
  ARM: OMAP2+: hwmod: Make omap_hwmod_softreset wait for reset status
  ARM: OMAP2+: hwmod: Restore sysc after a reset
  ARM: OMAP2+: omap_hwmod: Allow io_ring wakeup configuration for all modules
  ARM: OMAP3: clock data: fill in some missing clockdomains
  ARM: OMAP4: clock data: Force a DPLL clkdm/pwrdm ON before a relock
  ARM: OMAP4: clock data: fix mult and div mask for USB_DPLL
  ARM: OMAP2+: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
  gpio: tegra: Iterate over the correct number of banks
  gpio: tegra: fix register address calculations for Tegra30
  EXYNOS: fix dependency for EXYNOS_CPUFREQ
  ARM: at91: dt: remove unit-address part for memory nodes
  ARM: at91: fix check of valid GPIO for SPI and USB
  USB: ehci-atmel: add needed of.h header file
  ARM: at91/NAND DT bindings: add comments
  ARM: at91/at91sam9x5.dtsi: fix NAND ale/cle in DT file
  USB: ohci-at91: trivial return code name change
  ...
2012-04-05 22:13:39 -07:00
Linus Torvalds fb9d78aca7 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm
Pull an APM fix from Jiri Kosina:
 "One deadlock/race fix from Niel that got introduced when we were
  moving away from freezer_*_count() to wait_event_freezable()."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm:
  APM: fix deadlock in APM_IOC_SUSPEND ioctl
2012-04-05 17:34:30 -07:00
Paul Walmsley 3bdc9ba892 mmc: use really long write timeout to deal with crappy cards
Several people have noticed that crappy SD cards take much longer to
complete multiple block writes than the 300ms that Linux specifies.
Try to work around this by using a three second write timeout instead.

This is a generalized version of a patch from Chase Maupin
<Chase.Maupin@ti.com>, whose patch description said:

* With certain SD cards timeouts like the following have been seen
  due to an improper calculation of the dto value:
    mmcblk0: error -110 transferring data, sector 4126233, nr 8,
    card status 0xc00
* By removing the dto calculation and setting the timeout value
  to the maximum specified by the SD card specification part A2
  section 2.2.15 these timeouts can be avoided.
* This change has been used by beagleboard users as well as the
  Texas Instruments SDK without a negative impact.
* There are multiple discussion threads about this but the most
  relevant ones are:
    * http://talk.maemo.org/showthread.php?p=1000707#post1000707
    * http://www.mail-archive.com/linux-omap@vger.kernel.org/msg42213.html
* Original proposal for this fix was done by Sukumar Ghoral of
  Texas Instruments
* Tested using a Texas Instruments AM335x EVM

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:34 -04:00
Alf Høgemark 8c2fc8e413 mmc: sdhci-dove: Fix compile error by including module.h
This patch fixes a compile error in drivers/mmc/host/sdhci-dove.c
by including the linux/module.h file.

Signed-off-by: Alf Høgemark <alf@i100.no>
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:33 -04:00
Al Cooper 4188bba0e9 mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
The driver should not try to switch to 1.8V when the SD 3.0 host
controller does not have any UHS capabilities bits set (SDR50, DDR50
or SDR104). See page 72 of "SD Specifications Part A2 SD Host
Controller Simplified Specification Version 3.00" under
"1.8V Signaling Enable". Instead of setting SDR12 and SDR25 in the host
capabilities data structure for all V3.0 host controllers, only set them
if SDR104, SDR50 or DDR50 is set in the host capabilities register. This
will prevent the switch to 1.8V later.

Signed-off-by: Al Cooper <acooper@gmail.com>
Acked-by: Arindam Nath <arindam.nath@amd.com>
Acked-by: Philip Rakity <prakity@marvell.com>
Acked-by: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:32 -04:00
Chris Ball 79263f33b0 Revert "mmc: sdhci-pci: Add MSI support"
This reverts commit e6039832be.
There are reports of MSI breaking SDHCI on multiple chipsets (JMicron
and O2Micro, at least), so this should be reverted until we come up
with a whitelist or something.

Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:32 -04:00
Chris Ball 84e41d2d56 Revert "mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers"
This reverts commit c16e981b2fd9455af670a69a84f4c8cf07e12658, because
it's no longer useful once MSI support is reverted.

Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:31 -04:00
Subhash Jadavani 93fc5a47f2 mmc: core: fix power class selection
mmc_select_powerclass() function returns error if eMMC
VDD level supported by host is between 2.7v to 3.2v.

According to eMMC specification, valid voltage for high
voltage cards is 2.7v to 3.6v. This patch ensures that
2.7v to 3.6v VDD range is treated as valid range.

Also, failure to set the power class shouldn't be treated
as fatal error because even if setting the power class
fails, card can still work in default power class.
If mmc_select_powerclass() returns error, just print
the warning message and go ahead with rest of the card
initialization.

Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Acked-by: Girish K S <girish.shivananjappa@linaro.org>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:31 -04:00
Balaji T K fc307df88f mmc: omap_hsmmc: fix module re-insertion
OMAP4 and OMAP3 HSMMC IP registers differ by 0x100 offset.
Adding the offset to platform_device resource structure
increments the start address for every insmod operation.
MMC command fails on re-insertion as module due to incorrect register
base.  Fix this by updating the ioremap base address only.

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:30 -04:00
Felipe Balbi b796450b45 mmc: omap_hsmmc: convert to module_platform_driver
This will delete some boilerplate code, no functional changes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:29 -04:00
Felipe Balbi efa25fd3a3 mmc: omap_hsmmc: make it behave well as a module
If we put probe() on __init section, that will never work for multiple
module insertions/removals.

In order to make it work properly, move probe to __devinit section and
use platform_driver_register() instead of platform_driver_probe().

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:29 -04:00
Felipe Balbi 927ce944ae mmc: omap_hsmmc: trivial cleanups
A bunch of non-functional cleanups to the omap_hsmmc driver.

It basically decreases indentation level, drop unneded dereferences
and drop unneded accesses to the platform_device structure.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:28 -04:00
Balaji T K 92a3aebf06 mmc: omap_hsmmc: context save after enabling runtime pm
Call context save api after enabling runtime pm to make sure that
register access in context save api happens with clk enabled.

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:27 -04:00
Balaji T K d59d77ed1e mmc: omap_hsmmc: use runtime put sync in probe error patch
pm_runtime_put_sync instead of autosuspend pm runtime API
because iounmap(host->base) follows immediately.

Reported-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:27 -04:00
Rafael J. Wysocki e841a7c69b mmc: sdio: Use empty system suspend/resume callbacks at the bus level
Neil Brown reports that commit 35cd133c

   PM: Run the driver callback directly if the subsystem one is not there

breaks suspend for his libertas wifi, because SDIO has a protocol
where the suspend method can return -ENOSYS and this means "There is
no point in suspending, just turn me off".  Moreover, the suspend
methods provided by SDIO drivers are not supposed to be called by
the PM core or bus-level suspend routines (which aren't presend for
SDIO).  Instead, when the SDIO core gets to suspend the device's
ancestor, it calls the device driver's suspend function, catches the
ENOSYS, and turns the device off.

The commit above breaks the SDIO core's assumption that the device
drivers' callbacks won't be executed if it doesn't provide any
bus-level callbacks.  If fact, however, this assumption has never
been really satisfied, because device class or device type suspend
might very well use the driver's callback even without that commit.

The simplest way to address this problem is to make the SDIO core
tell the PM core to ignore driver callbacks, for example by providing
no-operation suspend/resume callbacks at the bus level for it,
which is implemented by this change.

Reported-and-tested-by: Neil Brown <neilb@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
[stable: please apply to 3.3-stable only]
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:26 -04:00
Subhash Jadavani 6500c8ed95 mmc: bus: print bus speed mode of UHS-I card
When UHS-I card is detected also print the bus speed mode in which
UHS-I card will be running.

Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Acked-by: Aaron Lu <aaron.lu@amd.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:26 -04:00
Manuel Lauss 210b7d2859 mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers
MSI on my O2Micro OZ600 SD card reader is broken.  This patch adds a quirk
to disable MSI on these controllers.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:25 -04:00
Simon Horman eb91b9118d mmc: sh_mmcif: Simplify calculation of mmc->f_min
There is no need to tune mmc->f_min to a value near 400kHz as the MMC core
begins testing frequencies at 400kHz regardless of the value of mmc->f_min.

As suggested by Guennadi Liakhovetski.

Cc: Magnus Damm <magnus.damm@gmail.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Cao Minh Hiep <hiepcm@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:24 -04:00
Simon Horman 930f152cc9 mmc: sh_mmcif: mmc->f_max should be half of the bus clock
mmc->f_max should be half of the bus clock.
And now that mmc->f_max is not equal to the bus clock the
latter should be used directly to calculate mmc->f_min.

Cc: Magnus Damm <magnus.damm@gmail.com>
Tested-by: Cao Minh Hiep <hiepcm@gmail.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:24 -04:00
Simon Horman f938825704 mmc: sh_mmcif: double clock speed
Correct an off-by one error when calculating the clock divisor in cases
where the host clock is a power of two of the target clock.  Previously the
divisor was one greater than the correct value in these cases leading to
the clock being set at half the desired speed.

Thanks to Guennadi Liakhovetski for working with me on the logic for this
change.

Tested-by: Cao Minh Hiep <hiepcm@gmail.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:23 -04:00
Ulf Hansson 5865f2876b mmc: block: Remove use of mmc_blk_set_blksize
According to the specifications for SD and (e)MMC default
blocksize (named BLOCKLEN in Spec.) must always be 512
bytes. Since we hardcoded to always use 512 bytes, we do
not explicitly have to set it. Future improvements should
potentially make it possible to use a greater blocksize
than 512 bytes, but until then let's skip this.

Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-by: Subhash Jadavani <subhashj@codeauora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-05 20:32:22 -04:00