Commit graph

160729 commits

Author SHA1 Message Date
Rafael J. Wysocki 97d69dc061 ACPI / platform: Use common ACPI device resource parsing routines
Use common routines in drivers/acpi/resource.c to parse ACPI device
resources while creating platform device objects.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2012-11-15 00:30:12 +01:00
Rafael J. Wysocki 046d9ce682 ACPI: Move device resources interpretation code from PNP to ACPI core
Move some code used for parsing ACPI device resources from the PNP
subsystem to the ACPI core, so that other bus types (platform, SPI,
I2C) can use the same routines for parsing resources in a consistent
way, without duplicating code.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2012-11-15 00:30:01 +01:00
Mika Westerberg b4b6cae2f3 ACPI / platform: use ACPI device name instead of _HID._UID
Using _UID makes the ACPI platform bus code depend on BIOS to get it
right. If it doesn't we fail to create the platform device as the name
should be unique.

The ACPI core already makes a unique name when it first creates the ACPI
device so we can use that same name as the platform device name instead of
trusting that the BIOS sets the _UIDs correctly.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15 00:28:02 +01:00
Mika Westerberg 91e5687805 ACPI: Add support for platform bus type
With ACPI 5 it is now possible to enumerate traditional SoC
peripherals, like serial bus controllers and slave devices behind
them.  These devices are typically based on IP-blocks used in many
existing SoC platforms and platform drivers for them may already
be present in the kernel tree.

To make driver "porting" more straightforward, add ACPI support to
the platform bus type.  Instead of writing ACPI "glue" drivers for
the existing platform drivers, register the platform bus type with
ACPI to create platform device objects for the drivers and bind the
corresponding ACPI handles to those platform devices.

This should allow us to reuse the existing platform drivers for the
devices in question with the minimum amount of modifications.

This changeset is based on Mika Westerberg's and Mathias Nyman's
work.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15 00:28:01 +01:00
Andy Shevchenko 35e92b78c1 ACPI / x86: Export acpi_[un]register_gsi()
These functions might be called from modules as well so make sure
they are exported.

In addition, implement empty version of acpi_unregister_gsi() and
remove the one from pci_irq.c.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15 00:28:00 +01:00
Mika Westerberg cf761af9ee ACPI: Provide generic functions for matching ACPI device nodes
Introduce function acpi_match_device() allowing callers to match
struct device objects with populated acpi_handle fields against
arrays of ACPI device IDs.  Also introduce function
acpi_driver_match_device() using acpi_match_device() internally and
allowing callers to match a struct device object against an array of
ACPI device IDs provided by a device driver.

Additionally, introduce macro ACPI_PTR() that may be used by device
drivers to escape pointers to data structures whose definitions
depend on CONFIG_ACPI.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15 00:28:00 +01:00
Mika Westerberg 06f64c8f23 driver core / ACPI: Move ACPI support to core device and driver types
With ACPI 5 we are starting to see devices that don't natively support
discovery but can be enumerated with the help of the ACPI namespace.
Typically, these devices can be represented in the Linux device driver
model as platform devices or some serial bus devices, like SPI or I2C
devices.

Since we want to re-use existing drivers for those devices, we need a
way for drivers to specify the ACPI IDs of supported devices, so that
they can be matched against device nodes in the ACPI namespace.  To
this end, it is sufficient to add a pointer to an array of supported
ACPI device IDs, that can be provided by the driver, to struct device.

Moreover, things like ACPI power management need to have access to
the ACPI handle of each supported device, because that handle is used
to invoke AML methods associated with the corresponding ACPI device
node.  The ACPI handles of devices are now stored in the archdata
member structure of struct device whose definition depends on the
architecture and includes the ACPI handle only on x86 and ia64. Since
the pointer to an array of supported ACPI IDs is added to struct
device_driver in an architecture-independent way, it is logical to
move the ACPI handle from archdata to struct device itself at the same
time.  This also makes code more straightforward in some places and
follows the example of Device Trees that have a poiter to struct
device_node in there too.

This changeset is based on Mika Westerberg's work.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15 00:28:00 +01:00
Linus Torvalds b251f0f399 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
 "Bug fixes galore, mostly in drivers as is often the case:

  1) USB gadget and cdc_eem drivers need adjustments to their frame size
     lengths in order to handle VLANs correctly.  From Ian Coolidge.

  2) TIPC and several network drivers erroneously call tasklet_disable
     before tasklet_kill, fix from Xiaotian Feng.

  3) r8169 driver needs to apply the WOL suspend quirk to more chipsets,
     fix from Cyril Brulebois.

  4) Fix multicast filters on RTL_GIGA_MAC_VER_35 r8169 chips, from
     Nathan Walp.

  5) FDB netlink dumps should use RTM_NEWNEIGH as the message type, not
     zero.  From John Fastabend.

  6) Fix smsc95xx tx checksum offload on big-endian, from Steve
     Glendinning.

  7) __inet_diag_dump() needs to repsect and report the error value
     returned from inet_diag_lock_handler() rather than ignore it.
     Otherwise if an inet diag handler is not available for a particular
     protocol, we essentially report success instead of giving an error
     indication.  Fix from Cyrill Gorcunov.

  8) When the QFQ packet scheduler sees TSO/GSO packets it does not
     handle things properly, and in fact ends up corrupting it's
     datastructures as well as mis-schedule packets.  Fix from Paolo
     Valente.

  9) Fix oopser in skb_loop_sk(), from Eric Leblond.

  10) CXGB4 passes partially uninitialized datastructures in to FW
      commands, fix from Vipul Pandya.

  11) When we send unsolicited ipv6 neighbour advertisements, we should
      send them to the link-local allnodes multicast address, as per
      RFC4861.  Fix from Hannes Frederic Sowa.

  12) There is some kind of bug in the usbnet's kevent deferral
      mechanism, but more immediately when it triggers an uncontrolled
      stream of kernel messages spam the log.  Rate limit the error log
      message triggered when this problem occurs, as sending thousands
      of error messages into the kernel log doesn't help matters at all,
      and in fact makes further diagnosis more difficult.

      From Steve Glendinning.

  13) Fix gianfar restore from hibernation, from Wang Dongsheng.

  14) The netlink message attribute sizes are wrong in the ipv6 GRE
      driver, it was using the size of ipv4 addresses instead of ipv6
      ones :-) Fix from Nicolas Dichtel."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  gre6: fix rtnl dump messages
  gianfar: ethernet vanishes after restoring from hibernation
  usbnet: ratelimit kevent may have been dropped warnings
  ipv6: send unsolicited neighbour advertisements to all-nodes
  net: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs
  usb: gadget: g_ether: fix frame size check for 802.1Q
  cxgb4: Fix initialization of SGE_CONTROL register
  isdn: Make CONFIG_ISDN depend on CONFIG_NETDEVICES
  cxgb4: Initialize data structures before using.
  af-packet: fix oops when socket is not present
  pkt_sched: enable QFQ to support TSO/GSO
  net: inet_diag -- Return error code if protocol handler is missed
  net: bnx2x: Fix typo in bnx2x driver
  smsc95xx: fix tx checksum offload for big endian
  rtnetlink: Use nlmsg type RTM_NEWNEIGH from dflt fdb dump
  ptp: update adjfreq callback description
  r8169: allow multicast packets on sub-8168f chipset.
  r8169: Fix WoL on RTL8168d/8111d.
  drivers/net: use tasklet_kill in device remove/close process
  tipc: do not use tasklet_disable before tasklet_kill
2012-11-10 22:03:49 +01:00
Linus Torvalds 2b1768f39a Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixes from David Miller:
 "Several build/bug fixes for sparc, including:

  1) Configuring a mix of static vs.  modular sparc64 crypto modules
     didn't work, remove an ill-conceived attempt to only have to build
     the device match table for these drivers once to fix the problem.

     Reported by Meelis Roos.

  2) Make the montgomery multiple/square and mpmul instructions actually
     usable in 32-bit tasks.  Essentially this involves providing 32-bit
     userspace with a way to use a 64-bit stack when it needs to.

  3) Our sparc64 atomic backoffs don't yield cpu strands properly on
     Niagara chips.  Use pause instruction when available to achieve
     this, otherwise use a benign instruction we know blocks the strand
     for some time.

  4) Wire up kcmp

  5) Fix the build of various drivers by removing the unnecessary
     blocking of OF_GPIO when SPARC.

  6) Fix unintended regression wherein of_address_to_resource stopped
     being provided.  Fix from Andreas Larsson.

  7) Fix NULL dereference in leon_handle_ext_irq(), also from Andreas
     Larsson."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix build with mix of modular vs. non-modular crypto drivers.
  sparc: Support atomic64_dec_if_positive properly.
  of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again
  sparc32, leon: Check for existent irq_map entry in leon_handle_ext_irq
  sparc: Add sparc support for platform_get_irq()
  sparc: Allow OF_GPIO on sparc.
  qlogicpti: Fix build warning.
  sparc: Wire up sys_kcmp.
  sparc64: Improvde documentation and readability of atomic backoff code.
  sparc64: Use pause instruction when available.
  sparc64: Fix cpu strand yielding.
  sparc64: Make montmul/montsqr/mpmul usable in 32-bit threads.
2012-11-10 21:58:34 +01:00
Linus Torvalds 0020dd0b8c Bug-fixes:
* Fix compile issues on ARM.
  * Fix hypercall fallback code for old hypervisors.
  * Print out which HVM parameter failed if it fails.
  * Fix idle notifier call after irq_enter.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAABAgAGBQJQnQdGAAoJEFjIrFwIi8fJPBAIAMX1HRx3udqhv7fziynZvFTb
 hj47XYIJHOK7P4fK7vZoSNgMHjL6LW5cUqC8VN67G3zUSkX9JYFsPBj6v4bWn+rG
 b9CS+MW7hS80LGbbqkh1F+YSEfZ863RlF9PPX2acaHTw49MlIgIqwhxIo6hy+Nm6
 thu6SlbEIJkSUdhbYMOAmy5aH/3+UuuQg+oq3P7mzV8fZjEihnrrF0NlT4wOZK1o
 gsfrKYKJLVT526W9PF/L23/A/MCHMpvjNStpaDLOGNjV9sBMpJI8JRax6+657+q1
 0kXvN5mAwTKWOaXBl4LEC9R8n1IKB91TgOY6HJAcXkb1eoP5KAeNSmU8RbsZ2T0=
 =XZ+0
 -----END PGP SIGNATURE-----

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

Pull Xen fixes from Konrad Rzeszutek Wilk:
 "There are three ARM compile fixes (we forgot to export certain
  functions and if the drivers are built as an module - we go belly-up).

  There is also an mismatch of irq_enter() / exit_idle() calls sequence
  which were fixed some time ago in other piece of codes, but failed to
  appear in the Xen code.

  Lastly a fix for to help in the field with troubleshooting in case we
  cannot get the appropriate parameter and also fallback code when
  working with very old hypervisors."

Bug-fixes:
 - Fix compile issues on ARM.
 - Fix hypercall fallback code for old hypervisors.
 - Print out which HVM parameter failed if it fails.
 - Fix idle notifier call after irq_enter.

* tag 'stable/for-linus-3.7-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/arm: Fix compile errors when drivers are compiled as modules (export more).
  xen/arm: Fix compile errors when drivers are compiled as modules.
  xen/generic: Disable fallback build on ARM.
  xen/events: fix RCU warning, or Call idle notifier after irq_enter()
  xen/hvm: If we fail to fetch an HVM parameter print out which flag it is.
  xen/hypercall: fix hypercall fallback code for very old hypervisors
2012-11-10 06:56:21 +01:00
Andreas Larsson 5cf8f7db82 sparc: Add sparc support for platform_get_irq()
This adds sparc support for platform_get_irq that in the normal case use
platform_get_resource() to get an irq. This standard approach fails for sparc as
there are no resources of type IORESOURCE_IRQ for irqs for sparc.

Cross platform drivers can then use this standard platform function and work on
sparc instead of having to have a special case for sparc.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-09 16:30:49 -08:00
Wang Dongsheng 103cdd1d59 gianfar: ethernet vanishes after restoring from hibernation
If a gianfar ethernet device is down prior to hibernating a
system, it will no longer be present upon system restore.

For example:

	~# ifconfig eth0 down
	~# echo disk > /sys/power/state

	  <trigger a restore from hibernation>

	~# ifconfig eth0 up
	SIOCSIFFLAGS: No such device

This happens because the restore function bails out early upon
finding devices that were not up at hibernation.  In doing so,
it never gets to the netif_device_attach call at the end of
the restore function.  Adding the netif_device_attach as done
here also makes the gfar_restore code consistent with what is
done in the gfar_resume code.

Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-09 17:08:36 -05:00
Steve Glendinning 9532021da6 usbnet: ratelimit kevent may have been dropped warnings
when something goes wrong, a flood of these messages can be
generated by usbnet (thousands per second).  This doesn't
generally *help* the condition so this patch ratelimits the
rate of their generation.

There's an underlying problem in usbnet's kevent deferral
mechanism which needs fixing, specifically that events *can*
get dropped and not handled.  This patch doesn't address this,
but just mitigates fallout caused by the current implemention.

Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-09 16:59:32 -05:00
Linus Torvalds a1c2d60889 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes (again) from Dave Airlie:
 "dropped the ball on a vmware patch, so two more fixes for vmwgfx are
  here, one for hibernate issue, one for a BUG trigger."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/vmwgfx: Fix a case where the code would BUG when trying to pin GMR memory
  drm/vmwgfx: Fix hibernation device reset
2012-11-09 21:35:51 +01:00
Linus Torvalds 63d4ec8731 PCI updates for v3.7:
Power management
       PCI/PM: Fix proc config reg access for D3cold and bridge suspending
       PCI/PM: Resume device before shutdown
       PCI/PM: Fix deadlock when unbinding device if parent in D3cold
   Hotplug
       PCI/portdrv: Don't create hotplug slots unless port supports hotplug
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJQnT6FAAoJEPGMOI97Hn6zafMP/iSU/2uBShzoM72Y6GYySdfT
 X+b0mUKcTsBaptR7z8ppoQussccL1KcII4u6gREEdiByiP3aoL2ANNlOmhIELxwT
 qFivhUkQp8mVibhp7LeajWT2G5hLDgUS0VbKusO7E3+W/aBKUIc5ZQljdoLO1BG2
 gYsXqux3/JLM8kDg4vGFgZe5RO4C8jfhKArEj+u4XBdX0dmrBtAVcR/rislkiHQz
 hPN/DIsmAUWAgmMrYKIcOdzgs27Kk+kReVIZwecXxJgeBLmzSJOo+qfVWQkLNdaC
 gSekVBfmOr+pG3te+BWecJnYtqAgVeMOTnIenuGolVex5oiWU9TyPeMTSlCCeOwb
 2uGGuoClfCi5J1fpAS9NBTsCvdPEUswV/FksjqVoI5EYAe/lTKI9ddKFRPg8s0VE
 rS8WZDPu857CEIq77n1m+jatN0rLFu2BVzNKWUcAFNHKaUQtqwxMyVQISLwMqeiA
 aL8RQvEE0EfqKPUns0kc7hCATsgxLNQ30c9Jv2UgOI+q6VfivFC6Pj6uJCw615Z/
 01aQtuI7bK6KHocYEalJCND4Rf6ka4UhrKdkzS59wBmAdtp6mFgmspMpSA3YirS2
 1AIXneiSB/+ZShifs7LD7ko+EiNxUpVfHPBct3H8U6TzuaP9OdIBimdw9vtecbOj
 2eUJ2JnML78DUGO/iyhF
 =h+Y9
 -----END PGP SIGNATURE-----

Merge tag '3.7-pci-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:
 "Power management:
    - PCI/PM: Fix proc config reg access for D3cold and bridge
      suspending
    - PCI/PM: Resume device before shutdown
    - PCI/PM: Fix deadlock when unbinding device if parent in D3cold
  Hotplug:
    -  PCI/portdrv: Don't create hotplug slots unless port supports
       hotplug"

* tag '3.7-pci-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI/portdrv: Don't create hotplug slots unless port supports hotplug
  PCI/PM: Fix proc config reg access for D3cold and bridge suspending
  PCI/PM: Resume device before shutdown
  PCI/PM: Fix deadlock when unbinding device if parent in D3cold
2012-11-09 21:33:53 +01:00
Linus Torvalds a4275153cc MMC fixes for 3.7-rc5:
- sdhci: fix a NULL dereference at resume-time, seen on OLPC XO-4
  - sdhci: fix against 3.7-rc1 for UHS modes without a vqmmc regulator
  - sdhci-of-esdhc: disable CMD23 on boards where it's broken
  - sdhci-s3c: fix against 3.7-rc1 for card detection with runtime PM
  - dw_mmc, omap_hsmmc: fix potential NULL derefs, compiler warnings
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQnF8PAAoJEHNBYZ7TNxYMoe0P/0W9UtyoJ9UJy/QWQDU1vf8F
 c358UBmV3VkzlzKNEtwxjStwvHf3XcCqF1A0z1GAP5efhSQtb4aZxBYtNcA2FfJ0
 eOnrQaqi8hvy82hBHOqBTDnXA7HDRHCzb1U9x3XL5nvEXi6NLXhxiGO16PzkYDH2
 2JCxVwMpcEHSl+fVQVt+XR55HG53u3Qu17T2jKD8ys7TkEPIukch0rHsbvgri4r+
 k8OXIbxa66UMVePfdDH5inHt9jNfloBe0mc+xbIqfU740NcCH8pS9SuIX0U8Mevh
 Vmc6vzqp2X+ccuUCO+1fWw/neXfMDmyeXVFKGsoNG5LqDkLQv/58OMCAYS2DOcMX
 DhGcAujwKAlmnD0qvb1OvtppihFLfhFnn2pFbJGkynm7Lbv24fCNobkxhS9gadbr
 jrxjiZh7CkTzPz+gh61q5P50MCJRo7VhZUd8Omg7ygtWKJ/NAuf/j/BXerxMq4m8
 p7shlNgbJKTp9oezjsaKdE/pAuF38sFyp9KBGscqoWSHNpfL/U1vLyK1BQteCkYp
 j09x+dZ2aPlnPRvIu+29D4ZDR06nPxVlCqPd8iuB0POEVW9lydiuK5v0F616x1TI
 lh+wl7Ao8ufr8Zz+1ybuPFnTdGq2btRN7aCGj/48m2qOq0stHMkTKFN6jU3huZ+d
 +fZuZnrSsJ0Bm3V1aWUG
 =bi4C
 -----END PGP SIGNATURE-----

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

Pull MMC fixes from Chris Ball:
 - sdhci: fix a NULL dereference at resume-time, seen on OLPC XO-4
 - sdhci: fix against 3.7-rc1 for UHS modes without a vqmmc regulator
 - sdhci-of-esdhc: disable CMD23 on boards where it's broken
 - sdhci-s3c: fix against 3.7-rc1 for card detection with runtime PM
 - dw_mmc, omap_hsmmc: fix potential NULL derefs, compiler warnings

* tag 'mmc-fixes-for-3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
  mmc: sdhci-s3c: fix the card detection in runtime-pm
  mmc: sdhci-s3c: use clk_prepare_enable and clk_disable_unprepare
  mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end
  mmc: dw_mmc: fix modular build for exynos back-end
  mmc: sdhci: fix NULL dereference in sdhci_request() tuning
  mmc: sdhci: fix IS_ERR() checking of regulator_get()
  mmc: fix sdhci-dove probe/removal
  mmc: sh_mmcif: fix use after free
  mmc: sdhci-pci: fix 'Invalid iomem size' error message condition
  mmc: mxcmmc: Fix MODULE_ALIAS
  mmc: omap_hsmmc: fix NULL pointer dereference for dt boot
  mmc: omap_hsmmc: fix host reference after mmc_free_host
  mmc: dw_mmc: fix multiple drv_data NULL dereferences
  mmc: dw_mmc: enable controller interrupt before calling mmc_start_host
  mmc: sdhci-of-esdhc: disable CMD23 for some Freescale SoCs
  mmc: dw_mmc: remove _dev_info compile warning
  mmc: dw_mmc: convert the variable type of irq
2012-11-09 21:32:33 +01:00
Thomas Hellstrom afcc87aa6a drm/vmwgfx: Fix a case where the code would BUG when trying to pin GMR memory
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Cc: stable@vger.kernel.org
Cc: linux-graphics-maintainer@vmware.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09 20:49:06 +10:00
Thomas Hellstrom 95e8f6a219 drm/vmwgfx: Fix hibernation device reset
The device would not reset properly when resuming from hibernation.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Cc: stable@vger.kernel.org
Cc: linux-graphics-maintainer@vmware.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09 20:49:02 +10:00
Linus Torvalds a186d25de3 Some pinctrl fixes for the v3.7 series:
- A set of SPEAr pinctrl fixes that recently arrived
 - A fixup for the Samsung/Exynos Kconfig deps
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJQm230AAoJEEEQszewGV1zOwQP/1R0PCMHJhIs9V6W9RtOtFPb
 yqDPBh4ELH5P+BHfvbgeZgXWEz+y6oqLnn2JOvdIDYJbKz2w9vb1oH6vQQO/34d+
 3OY7yADIpg6wwbv9Lgb6t8MfS6OV5WqUE6yBmIhV/JqSMDPDA3FeHkQ4i2ptgEXk
 qGRR2TzwhhAuziKB0ECJrc6N9MDaf5r9O97bqv8xE0WKHSWieFHXFeUuvgQIpTjS
 1ZOv2Z45G7p8i6RcKsg0x7VAfoGJ2xs2wTjeIpPM4BcBPcxfjcrwPR2Y9v+YvlbL
 saH3rw/ZHqHel7vuXhLeFNXjh7gT88n4MEq7+Jai47C4om0H2eBNSPU09scb14bG
 4Gw9oLDeF2+0KBJVNuyJGo2lHWQ3b2TN13JuHuZxjKMPlxBtMuKObTGt3yo3kTR6
 p5Pr+Q8T5MPD0NdAjVdPECu6VdiSGViblO+MLcyIHS35cv/+HYV8M10BwHP+quXh
 8MdSgd2zSIj4c50DsiDBOkL4KNQz7v4iun25rQNZKAiSFZwjKE7K7cqco4XnMgFC
 nPpz8R8Y5B0sS9gs3qeJh1Ms5+g47egoef+H+UtQBHPeXsyi1SD7iQklr4lHO96l
 NiIpQxme+ovIeZSgswdmDpiqii5IlrODTGUguyXRhrbwkg1I12isgNLWV27WCu37
 zprLa2a61MyHNbCEg0RG
 =IsnT
 -----END PGP SIGNATURE-----

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

Pull pinctrl fixes from Linus Walleij:

 - A set of SPEAr pinctrl fixes that recently arrived

 - A fixup for the Samsung/Exynos Kconfig deps

* tag 'pinctrl-for-v3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: samsung and exynos need to depend on OF && GPIOLIB
  pinctrl: SPEAr1340: Add clcd sleep mode pin configuration
  pinctrl: SPEAr1340: Make DDR reset & clock pads as gpio
  pinctrl: SPEAr1310: add register entries for enabling pad direction
  pinctrl: SPEAr1310: Separate out pci pins from pcie_sata pin group
  pinctrl: SPEAr1310: Fix value of PERIP_CFG reigster and MCIF_SEL_SHIFT
  pinctrl: SPEAr1310: fix clcd high resolution pin group name
  pinctrl: SPEAr320: Correct pad mux entries for rmii/smii
  pinctrl: SPEAr3xx: correct register space to configure pwm
  pinctrl: SPEAr: Don't update all non muxreg bits on pinctrl_disable
2012-11-09 06:59:04 +01:00
Linus Torvalds 4ad48bb72c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky:
 "A couple of bug fixes.  I keep the fingers crossed that we now got
  transparent huge pages ready for prime time."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/cio: fix length calculation in idset.c
  s390/sclp: fix addressing mode clobber
  s390: Move css limits from drivers/s390/cio/ to include/asm/.
  s390/thp: respect page protection in pmd_none() and pmd_present()
  s390/mm: use pmd_large() instead of pmd_huge()
  s390/cio: suppress 2nd path verification during resume
2012-11-09 06:57:56 +01:00
Linus Torvalds 976bacef40 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fix from Jiri Kosina:
 "This reverts a patch that causes regression in binding between HID
  devices and drivers during device unplug/replug cycle."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: hidraw: put old deallocation mechanism in place
2012-11-09 06:56:23 +01:00
Linus Torvalds c0cba03baa Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "Just radeon and nouveau, mostly regressions fixers, and a couple of
  radeon register checker fixes."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau: fix acpi edid retrieval
  drm/nvc0/disp: fix regression in vblank semaphore release
  drm/nv40/mpeg: fix context handling
  drm/nv40/graph: fix typo in type names
  drm/nv41/vm: fix typo in type name
  drm/radeon/si: add some missing regs to the VM reg checker
  drm/radeon/cayman: add some missing regs to the VM reg checker
  drm/radeon/dce3: switch back to old pll allocation order for discrete
2012-11-09 06:49:24 +01:00
Linus Torvalds cdfe1565c0 YA module signing build tweak, and two cc'd to stable.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQnImmAAoJENkgDmzRrbjxKWEP/0RCcZpz8YDzXt+R5uHEhBCp
 LLbgtq2ytTGVytRw/6CCzCVHJM8ytlK8+GwhzwD8sqrfJyS9vm0OyyJcDDv0a+i7
 4KUKuwGX7LF1fD0e824w32xXQKzCvwcFgPjIUyXCFUthgKwl5zUWJkLD8CcRQ53w
 K/Kfn0Bz7e7+o9Jt6PpzGyC7MgEJfpTIncyw6sKZvSI8liLjlo9euve7AlF0a74O
 bYfRPtDOzbfgA8FLDPT7pqrFiBkRRD9CBKz4hSX/1GDC03g3HdP95/NLFJOmyG7J
 Z9QcQZ1HeVF/kNpGmXr7DGoGE+JzTy7vwqweI5LRg3jBcdYpFZqq5pdbPxbrJ+hP
 gYKE7eF9UMp2TQl4bOSbeCnYpJtVwfOHJkBKL6n9W4xrMpUxLgXSSlvZCpB8BnFi
 BM6oCH84M1B2tNIZ2CjNBtnBGDppSOY5oeYzz1qL23AxakVv2Iu1YVucinguQkuI
 Bjm2OUKexS9vmWmCZSL+9RtjBW0KZdaHQDdQjLUKoTjidGxZKjEckreJNdb08CsO
 mHZDHjthtjDwkd7Td7+eiUn8+Q4M9SRtXI/v7RH1BSG0N/xPe2w6APbDkkmrihW5
 +MSprfLc4MjEuf0p/NDsKNWHkjZVnQuI6SL80If8e1A31+vlFb4jphR7XZLa+LZj
 Qqgdukgud8F/oV4trk/M
 =YPU9
 -----END PGP SIGNATURE-----

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

Pull virtio and module fixes from Rusty Russell:
 "YA module signing build tweak, and two cc'd to stable."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  virtio: Don't access index after unregister.
  modules: don't break modules_install on external modules with no key.
  module: fix out-by-one error in kallsyms
2012-11-09 06:47:55 +01:00
Dave Airlie 4a48ed2334 Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes
just some misc regression fixes and typo fixes.

* 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: fix acpi edid retrieval
  drm/nvc0/disp: fix regression in vblank semaphore release
  drm/nv40/mpeg: fix context handling
  drm/nv40/graph: fix typo in type names
  drm/nv41/vm: fix typo in type name
2012-11-09 14:57:02 +10:00
Cornelia Huck 237242bddc virtio: Don't access index after unregister.
Virtio wants to release used indices after the corresponding
virtio device has been unregistered. However, virtio does not
hold an extra reference, giving up its last reference with
device_unregister(), making accessing dev->index afterwards
invalid.

I actually saw problems when testing my (not-yet-merged)
virtio-ccw code:

- device_add virtio-net,id=xxx
-> creates device virtio<n> with n>0

- device_del xxx
-> deletes virtio<n>, but calls ida_simple_remove with an
   index of 0

- device_add virtio-net,id=xxx
-> tries to add virtio0, which is still in use...

So let's save the index we want to release before calling
device_unregister().

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Cc: stable@kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-11-09 14:54:24 +10:30
Maarten Lankhorst df285500b2 drm/nouveau: fix acpi edid retrieval
Commit c0077061e7 accidentally inverted the logic for nouveau_acpi_edid,
causing it to only show a connector as connected when the edid could not
be retrieved with acpi.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-09 13:43:08 +10:00
Kelly Doran 11d92561c8 drm/nvc0/disp: fix regression in vblank semaphore release
Signed-off-by: Kelly Doran <kel.p.doran@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-09 13:43:05 +10:00
Marcin Slusarz 7707b701eb drm/nv40/mpeg: fix context handling
It slipped in thanks to typeless API.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-09 13:43:01 +10:00
Marcin Slusarz a4dd4ec250 drm/nv40/graph: fix typo in type names
nv04_graph_priv / nv04_graph_chan are not defined in this context...

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-09 13:42:56 +10:00
Marcin Slusarz 479dd56705 drm/nv41/vm: fix typo in type name
It's a miracle it compiles at all - nv04_vm_priv does not exist
anywhere in the tree.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-09 13:42:53 +10:00
Alex Deucher f418b88aad drm/radeon/si: add some missing regs to the VM reg checker
This register is needed for streamout to work properly.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-11-08 10:24:19 -05:00
Alex Deucher 860fe2f05f drm/radeon/cayman: add some missing regs to the VM reg checker
These regs were being wronly rejected leading to rendering
issues.

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

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-11-08 10:24:07 -05:00
Ian Coolidge a66fe1653f net: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs
cdc_eem frames might need to contain 802.1Q VLAN Ethernet frames.
URB/skb sizing from usbnet will default to the hard_mtu,
so account for the VLAN header by expanding that via hard_header_len

Signed-off-by: Ian Coolidge <iancoolidge@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07 21:12:26 -05:00
Ian Coolidge 4fe5f079b4 usb: gadget: g_ether: fix frame size check for 802.1Q
Checking skb->len against ETH_FRAME_LEN assumes a 1514
ethernet frame size. With an 802.1Q VLAN header, ethernet
frame length can now be 1518. Validate frame length against that.

Signed-off-by: Ian Coolidge <iancoolidge@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07 21:12:26 -05:00
Vipul Pandya 0dad9e94bd cxgb4: Fix initialization of SGE_CONTROL register
INGPADBOUNDARY_MASK is already shifted. No need to shift it again. On reloading
a driver it was resulting in a bad SGE FL MTU sizes [1536, 9088] error. This
only causes an issue on systems that have L1 cache size of 32B, 128B, 512B,
2048B or 4096B.

Signed-off-by: Jay Hernandez <jay@chelsio.com>
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07 19:02:19 -05:00
Lee Jones 7fd78edc47 isdn: Make CONFIG_ISDN depend on CONFIG_NETDEVICES
It doesn't make much sense to enable ISDN services if you don't
intend to connect to a network. Therefore insisting that ISDN
depends on NETDEVICES seems logical. We can then remove any
guards mentioning NETDEVICES inside all subordinate drivers.

This also has the nice side-effect of fixing the warning below
when ISDN_I4L && !CONFIG_NETDEVICES at compile time.

This patch fixes:
drivers/isdn/i4l/isdn_common.c: In function ‘isdn_ioctl’:
drivers/isdn/i4l/isdn_common.c:1278:8: warning: unused variable ‘s’ [-Wunused-variable]

Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07 18:59:26 -05:00
Vipul Pandya 0062b15c10 cxgb4: Initialize data structures before using.
We should not assume reserve fields to be don't cares as fields may change.
Clearing data structures before using.

Signed-off-by: Jay Hernandez <jay@chelsio.com>
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07 15:43:26 -05:00
Seungwon Jeon 0aa55c2367 mmc: sdhci-s3c: fix the card detection in runtime-pm
If host clock is disabled, host cannot detect a card in case of using
CD internal for detection.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07 15:40:52 -05:00
Thomas Abraham 0f310a057f mmc: sdhci-s3c: use clk_prepare_enable and clk_disable_unprepare
Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07 15:02:56 -05:00
Arnd Bergmann 8e2b36ea6e mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end
The of_device_id match data is now marked as const and
must not be modified. This changes the dw_mmc to mark
all pointers passing the dw_mci_drv_data or dw_mci_dma_ops
structures as const, and also marks the static definitions
as const.

drivers/mmc/host/dw_mmc-exynos.c: In function 'dw_mci_exynos_probe':
drivers/mmc/host/dw_mmc-exynos.c:234:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07 15:02:55 -05:00
Arnd Bergmann 517cb9f1bb mmc: dw_mmc: fix modular build for exynos back-end
The MODULE_DEVICE_TABLE entry for dw_mci_exynos_match
was incorrectly copied from the platform back-end, which
causes this error when building the driver as a loadable
module:

drivers/mmc/host/dw_mmc-exynos.c: At top level:
drivers/mmc/host/dw_mmc-exynos.c:226:34: error: '__mod_of_device_table' aliased to undefined symbol 'dw_mci_pltfm_match'

This patch fixes the problem by just using the correct
string.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07 15:02:55 -05:00
Chris Ball 14efd95720 mmc: sdhci: fix NULL dereference in sdhci_request() tuning
Commit 473b095a72 ("mmc: sdhci: fix incorrect command used in tuning")
introduced a NULL dereference at resume-time if an SD 3.0 host controller
raises the SDHCI_NEEDS_TUNING flag while no card is inserted.  Seen on an
OLPC XO-4 with sdhci-pxav3, but presumably affects other controllers too.

Signed-off-by: Chris Ball <cjb@laptop.org>
Cc: stable <stable@vger.kernel.org> [3.3+]
2012-11-07 15:02:05 -05:00
Kevin Liu 657d59823c mmc: sdhci: fix IS_ERR() checking of regulator_get()
There are two problems here:

The check for vmmc was printing an unnecessary pr_info() when
host->vmmc is NULL.

The intent of the check for vqmmc was to only remove UHS if we have a
regulator that doesn't support the required voltage, but since IS_ERR()
doesn't catch NULL, we were actually removing UHS modes if vqmmc isn't
present at all -- since it isn't present for most users, this breaks
UHS for them.  This patch fixes that UHS regression in 3.7-rc1.

Signed-off-by: Kevin Liu <kliu5@marvell.com>
Signed-off-by: Bin Wang <binw@marvell.com>
Reviewed-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07 15:02:04 -05:00
Russell King - ARM Linux ee3298a2b6 mmc: fix sdhci-dove probe/removal
1. Never ever publish a device in the system before it has been setup
   to a usable state.
2. Unregister the device _BEFORE_ taking away any resources it may be
   using.
3. Don't check clks against NULL.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07 15:02:03 -05:00
Guennadi Liakhovetski a0d28ba01e mmc: sh_mmcif: fix use after free
A recent commit "mmc: sh_mmcif: fix clock management" has introduced a
use after free bug in sh_mmcif.c: in sh_mmcif_remove() the call to
mmc_free_host() frees private driver data, therefore using it afterwards
is a bug. Revert that hunk.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: stable@vger.kernel.org [3.6]
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07 15:02:02 -05:00
Adrian Hunter 90b3e6c53b mmc: sdhci-pci: fix 'Invalid iomem size' error message condition
The SDHCI standard defines a 256 byte register set but a device
that specifies a larger iomem region is not an error.  Alter the
message condition accordingly.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07 15:02:01 -05:00
Fabio Estevam 6eb30adf96 mmc: mxcmmc: Fix MODULE_ALIAS
The correct name for the driver is "mxc-mmc".

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07 15:02:00 -05:00
Balaji T K 9ea28ecbeb mmc: omap_hsmmc: fix NULL pointer dereference for dt boot
dev->platform_data is NULL in case of device tree boot,
instead use the saved version in struct omap_hsmmc_host.

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-11-07 15:01:54 -05:00
Balaji T K 9d1f028644 mmc: omap_hsmmc: fix host reference after mmc_free_host
struct omap_hsmmc_host *host should not be accessed after mmc_free_host().
Reorder mmc_free_host() after iounmap(host->base).

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-11-07 14:55:31 -05:00
James Hogan cb27a843de mmc: dw_mmc: fix multiple drv_data NULL dereferences
800d78bfcc ("mmc: dw_mmc: add support for implementation specific
callbacks") -- merged in v3.7-rc1 -- introduced multiple NULL pointer
dereferences when the default dw_mci_pltfm_probe() is used, as it sets
host->drv_data to NULL, and that's only checked against NULL in 1 out of
the 7 cases where it is dereferenced.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-11-07 14:55:31 -05:00