Commit Graph

335448 Commits

Author SHA1 Message Date
Sachin Kamat b88a497701 thermal: step_wise: Add missing static storage class specifiers
Fixes the following sparse warnings:
drivers/thermal/step_wise.c:153:5: warning:
symbol 'step_wise_throttle' was not declared. Should it be static?
drivers/thermal/step_wise.c:172:25: warning:
symbol 'thermal_gov_step_wise' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:10 +08:00
Hugh Dickins 791700cdfc Thermal: Fix oops and unlocking in thermal_sys.c
This patch fixes the following mutex and NULL pointer
problems in thermal_sys.c:

 * mutex_unlock fix in update_temperature function
 * mutex_unlock fix in bind_cdev function
 * Correct early return to continue in bind_cdev function
 * NULL check fix in bind_cdev function
 * NULL check fix in bind_tz function

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Reported-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:10 +08:00
Durgadoss R a56757af8e Thermal: Provide option to choose default thermal governor
This patch provides option to choose the default thermal
governor. If no option is provided, the step_wise
governor is selected by default.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:09 +08:00
Durgadoss R 6ea083b18d Thermal: Add documentation for platform layer data
This patch adds documentation for thermal_bind_params
and thermal_zone_params structures. Also, adds details
on EXPORT_SYMBOL APIs.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:09 +08:00
Durgadoss R f2b4caafd4 Thermal: Add a notification API
This patch adds a notification API which the sensor drivers'
can use to notify the framework. The framework then takes
care of the throttling according to the configured policy.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:08 +08:00
Durgadoss R 0c01ebbfd3 Thermal: Remove throttling logic out of thermal_sys.c
This patch removes the throttling logic out of
thermal_sys.c; also refactors the code into smaller
functions so that are easy to read/maintain.
 * Seperates the handling of critical and non-critical trips
 * Re-arranges the set_polling and device_check methods, so
   that all related functions are arranged in one place.
 * Removes the 'do_update' and 'trip_update' method, as part
   of moving the throttling logic out of thermal_sys.c

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:08 +08:00
Durgadoss R 1cc807a234 Thermal: Add a thermal notifier for user space
This patch registers a governor which will let the
user land manage the platform thermals. Whenever a
trip happens, this governor just notifies the user
space using kobj_uevent().

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:08 +08:00
Durgadoss R e151a202a0 Thermal: Introduce a step_wise thermal governor
This patch adds a simple step_wise governor to the
generic thermal layer. This algorithm throttles the
cooling devices in a linear fashion. If the 'trend'
is heating, it throttles by one step. And if the
thermal trend is cooling it de-throttles by one step.

This actually moves the throttling logic from thermal_sys.c
and puts inside step_wise.c, without any change.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:07 +08:00
Durgadoss R 4ccc5743ae Thermal: Introduce fair_share thermal governor
This patch introduces a simple 'weight' based
governor named fair_share governor. Whenever the
thermal framework gets notified of the trip point
violation, this governor (if configured), throttles
the cooling devices associated with a thermal zone.

This mapping between a thermal zone and a cooling device
and the effectiveness of cooling are provided in the
platform layer.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:07 +08:00
Durgadoss R dc76548269 Thermal: Make thermal_cdev_update as a global function
This patch makes the thermal_cdev_update function as a
global one, so that other files can use it. This function
serves as a single arbitrator to set the state of a cooling
device.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:06 +08:00
Durgadoss R 7e8ee1e9d7 Thermal: Update binding logic based on platform data
This patch updates the binding logic in thermal_sys.c
It uses the platform layer data to bind a thermal zone
to a cdev for a particular trip point.

 * If we do not have platform data and do not have
   .bind defined, do not bind.
 * If we do not have platform data but .bind is
   defined, then use tz->ops->bind.
 * If we have platform data, use it to create binding.

The same logic sequence is followed for unbind also.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:06 +08:00
Durgadoss R 5a2c090b33 Thermal: Add a policy sysfs attribute
This patch adds a policy sysfs attribute to a thermal zone.
This attribute denotes the throttling governor used for the
zone. This is a RW attribute.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:05 +08:00
Durgadoss R a4a15485fb Thermal: Add thermal governor registration APIs
This patch creates a structure to hold platform
thermal governor information, and provides APIs
for individual thermal governors to register/unregister
with the Thermal framework.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 14:00:05 +08:00
Durgadoss R 50125a9b27 Thermal: Pass zone parameters as argument to tzd_register
This patch adds the thermal zone parameter as an argument to
the tzd_register() function call; and updates other drivers
using this function.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 13:59:57 +08:00
Durgadoss R ef87394791 Thermal: Add platform level information to thermal.h
This patch adds platform level information to thermal.h
by introducing two structures to hold:
 * bind parameters for a thermal zone,
 * zone level platform parameters

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 13:56:32 +08:00
Durgadoss R 9b4298a088 Thermal: Add get trend, get instance API's to thermal_sys
This patch adds the following API's to thermal_sys.c, that
can be used by other Thermal drivers.
 * get_tz_trend: obtain the trend of the given thermal zone
 * get_thermal_instance: obtain the instance corresponding
   to the given tz, cdev and the trip point.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 13:56:32 +08:00
Durgadoss R 71350db43b Thermal: Move thermal_instance to thermal_core.h
This patch creates a thermal_core.h file which can contain
all defines used by the core thermal framework files. For
now, move the thermal_instance structure to thermal_core.h
This structure is used by files under drivers/thermal/.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 13:56:32 +08:00
Durgadoss R 23064088d6 Thermal: Refactor thermal.h file
This patch rearranges the code in thermal.h file,
in the following order, so that it is easy to
read/maintain.
1. All #defines
2. All enums
3. All fops structures
4. All device structures
5. All function declarations

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05 13:56:32 +08:00
Linus Torvalds 3d70f8c617 Linux 3.7-rc4 2012-11-04 11:07:39 -08:00
Linus Torvalds d4164973a0 NFS bugfixes for Linux 3.7
- Fix a bunch of deadlock situations:
   * State recovery can deadlock if we fail to release sequence ids before
     scheduling the recovery thread.
   * Calling deactivate_super() from an RPC workqueue thread can deadlock
     because of the call to rpc_shutdown_client.
 - Display the device name correctly in /proc/*/mounts
 - Fix a number of incorrect error return values:
   * When NFSv3 mounts fail due to a timeout.
   * On NFSv4.1 backchannel setup failure
   * On NFSv4 open access checks
 - pnfs_find_alloc_layout() must check the layout pointer for NULL
 - Fix a regression in the legacy DNS resolved
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQlXRyAAoJEGcL54qWCgDy1G4QALUjERF6VBaDUVRVDe3cyrNr
 1y5niKU19ysaXuNKtsGquVr3y72c0xyzCFLan8ZqJl1kXpYTDIyoDc0NBT3reffo
 T4rbw8SXVFVk+iVcJQgnFo5tblHVsVk+fvZPezBknaBb/uI/kxIbicZHHxvASyzM
 G0Ge/MC709x07tu3wJSyOtvD55j6bfpwbon6yjOKdN8/S2nOEsNOBjAunOWrKtsa
 2v3uWC9APQqIF5z6dfhAVCEMRrQMame6W6b5LuY/MSQpLAwUUYeCGzjc1TMeWvnS
 n66iCqQ0TCVgJH+7fYnrzPm5uNk4Am2XhM3QY1B0j8zl73ZWIs4PfjdoBytLnqF+
 SykNVUl72WqdJnWPCtk6LvoctyOsSMK5pJj4jadvNqDKgFkuRZkWb28bqux2OlHg
 ZCmnEZiew5tV+2anF6sgEaEhSyKNR/1h1ilXOy2TaV93qX+ec8tg+TE6C6YQR/R+
 IoOoYD8Hbe/R/D76WK0xOOQbrXIQvKb1zvlIRx7W6d5gWpg9IceNLcBfCiF1GjPf
 0PKxTbBSbSg44IRolPIprsZx6YzCI6wj2UzdPC7riozfZdSZ+T6Hh7z8rhhTjsHS
 D5emunX93kMp5QSSrw6EtdTkRJ++DB+cpjK5SP7UydHsWSGnKbd8eIv7viZu5J5O
 FLcHHWKIan9wQCslGQkO
 =NjEu
 -----END PGP SIGNATURE-----

Merge tag 'nfs-for-3.7-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:

 - Fix a bunch of deadlock situations:
   * State recovery can deadlock if we fail to release sequence ids
     before scheduling the recovery thread.
   * Calling deactivate_super() from an RPC workqueue thread can
     deadlock because of the call to rpc_shutdown_client.

 - Display the device name correctly in /proc/*/mounts

 - Fix a number of incorrect error return values:
   * When NFSv3 mounts fail due to a timeout.
   * On NFSv4.1 backchannel setup failure
   * On NFSv4 open access checks

 - pnfs_find_alloc_layout() must check the layout pointer for NULL

 - Fix a regression in the legacy DNS resolved

* tag 'nfs-for-3.7-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS4: nfs4_opendata_access should return errno
  NFSv4: Initialise the NFSv4.1 slot table highest_used_slotid correctly
  SUNRPC: return proper errno from backchannel_rqst
  NFS: add nfs_sb_deactive_async to avoid deadlock
  nfs: Show original device name verbatim in /proc/*/mount{s,info}
  nfsv3: Make v3 mounts fail with ETIMEDOUTs instead EIO on mountd timeouts
  nfs: Check whether a layout pointer is NULL before free it
  NFS: fix bug in legacy DNS resolver.
  NFSv4: nfs4_locku_done must release the sequence id
  NFSv4.1: We must release the sequence id when we fail to get a session slot
  NFS: Wait for session recovery to finish before returning
2012-11-03 15:27:21 -07:00
Linus Torvalds 225ff868e1 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal management & ACPI update from Zhang Rui,

Ho humm.  Normally these things go through Len.  But it's just three
small fixes, I guess I can pull directly too.

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  exynos4_tmu_driver_ids should be exynos_tmu_driver_ids.
  ACPI video: Ignore errors after _DOD evaluation.
  thermal: solve compilation errors in rcar_thermal
2012-11-03 15:25:14 -07:00
Linus Torvalds 209c510e36 Merge branch 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux
Pull i2c embedded fixes from Wolfram Sang:
 "Two patches are usual stuff.

  The bigger patch is needed to correct a wrong decision made in this
  merge window.  We hoped to get the PIOQUEUE mode in the mxs driver
  working with DMA, but it turned out to be too broken (leading to data
  loss), so we now think it is best to remove it entirely and work only
  with DMA now.  The patch should be in 3.7.  IMO, so users never get
  the chance to use both modes in parallel."

* 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux:
  i2c: tegra: set irq name as device name
  i2c-nomadik: Fixup clock handling
  i2c: mxs: remove broken PIOQUEUE support
2012-11-03 15:14:54 -07:00
Linus Torvalds 53f9313f5c Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "Scattered selection of fixes:

   - radeon: load detect fixes from SuSE/AMD
   - intel: misc i830, sdvo regression, vesafb kickoff ums fix
   - exynos: maintainers entry update + fixes
   - udl: fix stride scanout issue

  it's slightly bigger than I'd probably like, but nothing looked
  dangerous enough to hold off on."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/udl: fix stride issues scanning out stride != width*bpp
  drm/radeon: add load detection support for ext DAC on R200 (v2)
  DRM/radeon: For single CRTC GPUs move handling of CRTC_CRT_ON to crtc_dpms().
  DRM/Radeon: Fix TV DAC Load Detection for single CRTC chips.
  DRM/Radeon: Clean up code in TV DAC load detection.
  drm/radeon: fix ATPX function documentation
  drivers/gpu/drm/radeon/evergreen_cs.c: Remove unnecessary semicolon
  DRM/Radeon: On DVI-I use Load Detection when EDID is bogus.
  DRM/Radeon: Fix primary DAC Load Detection for RV100 chips.
  DRM/Radeon: Fix Load Detection on legacy primary DAC.
  drm: exynos: removed warning due to missing typecast for mixer driver data
  drm/exynos: add support for ARCH_MULTIPLATFORM
  MAINTAINERS: Add git repository for Exynos DRM
  drm/exynos: fix display on issue
  drm/i915: Only kick out vesafb if we takeover the fbcon with KMS
  drm/i915: be less verbose about inability to provide vendor backlight
  drm/i915: clear the entire sdvo infoframe buffer
  drm/i915: VGA needs to be on pipe A on i830M
  drm/i915: fix overlay on i830M
2012-11-03 15:13:49 -07:00
Linus Torvalds 0f89a5733a Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
 "First post-Sandy pull request"

 1) Fix antenna gain handling and initialization of chan->max_reg_power
    in wireless, from Felix Fietkau.

 2) Fix nexthop handling in H.232 conntrack helper, from Julian
    Anastasov.

 3) Only process 80211 mesh config header in certain kinds of frames,
    from Javier Cardona.

 4) 80211 management frame header length needs to be validated, from
    Johannes Berg.

 5) Don't access free'd SKBs in ath9k driver, from Felix Fietkay.

 6) Test for permanent state correctly in VXLAN driver, from Stephen
    Hemminger.

 7) BNX2X bug fixes from Yaniv Rosner and Dmitry Kravkov.

 8) Fix off by one errors in bonding, from Nikolay ALeksandrov.

 9) Fix divide by zero in TCP-Illinois congestion control.  From Jesper
    Dangaard Brouer.

10) TCP metrics code says "Yo dawg, I heard you like sizeof, so I did a
    sizeof of a sizeof, so you can size your size" Fix from Julian
    Anastasov.

11) Several drivers do mdiobus_free without first doing an
    mdiobus_unregister leading to stray pointer references.  Fix from
    Peter Senna Tschudin.

12) Fix OOPS in l2tp_eth_create() error path, it's another danling
    pointer kinda situation.  Fix from Tom Parkin.

13) Hardware driven by the vmxnet driver can't handle larger than 16K
    fragments, so split them up when necessary.  From Eric Dumazet.

14) Handle zero length data length in tcp_send_rcvq() properly.  Fix
    from Pavel Emelyanov.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (38 commits)
  tcp-repair: Handle zero-length data put in rcv queue
  vmxnet3: must split too big fragments
  l2tp: fix oops in l2tp_eth_create() error path
  cxgb4: Fix unable to get UP event from the LLD
  drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free
  drivers/net/ethernet/nxp/lpc_eth.c: Call mdiobus_unregister before mdiobus_free
  bnx2x: fix HW initialization using fw 7.8.x
  tcp: Fix double sizeof in new tcp_metrics code
  net: fix divide by zero in tcp algorithm illinois
  net: sctp: Fix typo in net/sctp
  bonding: fix second off-by-one error
  bonding: fix off-by-one error
  bnx2x: Disable FCoE for 57840 since not yet supported by FW
  bnx2x: Fix no link on 577xx 10G-baseT
  bnx2x: Fix unrecognized SFP+ module after driver is loaded
  bnx2x: Fix potential incorrect link speed provision
  bnx2x: Restore global registers back to default.
  bnx2x: Fix link down in 57712 following LFA
  bnx2x: Fix 57810 1G-KR link against certain switches.
  ixgbe: PTP get_ts_info missing software support
  ...
2012-11-02 20:48:41 -07:00
Pavel Emelyanov c454e6111d tcp-repair: Handle zero-length data put in rcv queue
When sending data into a tcp socket in repair state we should check
for the amount of data being 0 explicitly. Otherwise we'll have an skb
with seq == end_seq in rcv queue, but tcp doesn't expect this to happen
(in particular a warn_on in tcp_recvmsg shoots).

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Reported-by: Giorgos Mavrikas <gmavrikas@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-02 22:01:45 -04:00
Eric Dumazet a4d7e485bc vmxnet3: must split too big fragments
vmxnet3 has a 16Kbytes limit per tx descriptor, that happened to work
as long as we provided PAGE_SIZE fragments.

Our stack can now build larger fragments, so we need to split them to
the 16kbytes boundary.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: jongman heo <jongman.heo@samsung.com>
Tested-by: jongman heo <jongman.heo@samsung.com>
Cc: Shreyas Bhatewara <sbhatewara@vmware.com>
Reviewed-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-02 21:58:09 -04:00
Tom Parkin 789336360e l2tp: fix oops in l2tp_eth_create() error path
When creating an L2TPv3 Ethernet session, if register_netdev() should fail for
any reason (for example, automatic naming for "l2tpeth%d" interfaces hits the
32k-interface limit), the netdev is freed in the error path.  However, the
l2tp_eth_sess structure's dev pointer is left uncleared, and this results in
l2tp_eth_delete() then attempting to unregister the same netdev later in the
session teardown.  This results in an oops.

To avoid this, clear the session dev pointer in the error path.

Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-02 21:56:35 -04:00
Jonghwan Choi 3ae53b1e13 exynos4_tmu_driver_ids should be exynos_tmu_driver_ids.
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Reviewed-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-03 09:52:55 +08:00
Igor Murzov fba4e08736 ACPI video: Ignore errors after _DOD evaluation.
There are systems where video module known to work fine regardless
of broken _DOD and ignoring returned value here doesn't cause
any issues later. This should fix brightness controls on some laptops.

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

Signed-off-by: Igor Murzov <e-mail@date.by>
Reviewed-by: Sergey V <sftp.mtuci@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-03 09:52:54 +08:00
Devendra Naga 608f62b996 thermal: solve compilation errors in rcar_thermal
following were the errors reported

drivers/thermal/rcar_thermal.c: In function ‘rcar_thermal_probe’:
drivers/thermal/rcar_thermal.c:214:10: warning: passing argument 3 of ‘thermal_zone_device_register’ makes integer from pointer without a cast [enabled by default]
include/linux/thermal.h:166:29: note: expected ‘int’ but argument is of type ‘struct rcar_thermal_priv *’
drivers/thermal/rcar_thermal.c:214:10: error: too few arguments to function ‘thermal_zone_device_register’
include/linux/thermal.h:166:29: note: declared here
make[1]: *** [drivers/thermal/rcar_thermal.o] Error 1
make: *** [drivers/thermal/rcar_thermal.o] Error 2

with gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-03 09:52:48 +08:00
Vipul Pandya e3c9851278 cxgb4: Fix unable to get UP event from the LLD
If T4 configuration file gets loaded from the /lib/firmware/cxgb4/ directory
then offload capabilities of the cards were getting disabled during
initialization. Hence ULDs do not get an UP event from the LLD.

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-02 21:41:29 -04:00
Peter Senna Tschudin aa731872f7 drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free
Based on commit b27393aecf

Calling mdiobus_free without calling mdiobus_unregister causes
BUG_ON(). This patch fixes the issue.

The semantic patch that found this issue(http://coccinelle.lip6.fr/):
// <smpl>
@@
expression E;
@@
  ... when != mdiobus_unregister(E);

+ mdiobus_unregister(E);
  mdiobus_free(E);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-02 21:36:06 -04:00
Peter Senna Tschudin 57c10b61c8 drivers/net/ethernet/nxp/lpc_eth.c: Call mdiobus_unregister before mdiobus_free
Based on commit b27393aecf

Calling mdiobus_free without calling mdiobus_unregister causes
BUG_ON(). This patch fixes the issue.

The semantic patch that found this issue(http://coccinelle.lip6.fr/):
// <smpl>
@@
expression E;
@@
  ... when != mdiobus_unregister(E);

+ mdiobus_unregister(E);
  mdiobus_free(E);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Tested-by: Roland Stigge <stigge@antcom.de>
Tested-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-02 21:36:06 -04:00
Dmitry Kravkov 2b674047be bnx2x: fix HW initialization using fw 7.8.x
Since commit 96bed4b9 (use FW 7.8.2) BRB HW block needs to be
initialized using fw values for all devices.
Otherwise ETS on 57712/578xx will not work.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-02 21:32:11 -04:00
Linus Torvalds a315b5a6d4 Power management update for 3.7-rc4
Change the email address of the powernow-k8 maintainer.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQlFWVAAoJEKhOf7ml8uNsi7MQAI5FZNla5D7fXf6JuI4n53S6
 2aLFzkf9q0ievYBBeyDphLnmIWS44yfJN+OKyhvyd/BF4tlvmrZVzUjMHAFWaLe6
 Eza8wRgtc8igGgQtE06xpnmaYOfNUU4B408SU+SqSurIvV9s2s1F3t8+gBaCPymk
 9UxYVaE1rAHxTLzoDryhQ3H2GbWle08e44ce5kLW1GEGbC0B6l6Dfsrag+lzPedd
 5QNBcoq+Fv0kvzSUJFNDwMwGrg5F7KL21EsfRJtPLXPVtMRTO1OdL1enWLDOE+jw
 K0lpw/GQQx7sqyPRHrH4hTZrPHfzeY2mRAl/Q3pro/nqEy4jhfQjrH3G0s8o/xgQ
 w1sKf0rDmUSA2+FhcGEMWm/eMYOE1oOyZVdxn0B1e8gN5yOqXfyho0CIvz8YMyAy
 DoCjURor92teddNF83THKTDlIK248x4eCKThDIXleYE+t5th6aQdHoeQgmXQ4Y+g
 eTUjFnT0glxWpyhoeTHSvhd61xgYU3aRG99OX/Y5teIIHW5rUyXhd9O1hl53UoVt
 SSq7V5LRxJTU+hnW/FX19B/1/XfDe5BW6Z9+yGtibGHq4sSCb1yJeWaLOVCg3u3D
 TOdbtl14ohq+zvs9MhKyTOxh710I+e10CGQHqY61MK5n+seG6YZw98GAepLQqnMW
 T4VZrJBNCrXd94+4OxcU
 =jN09
 -----END PGP SIGNATURE-----

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

Pull power management update from Rafael J. Wysocki:
 "Change the email address of the powernow-k8 maintainer."

* tag 'pm-for-3.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq / powernow-k8: Change maintainer's email address
2012-11-02 16:56:39 -07:00
Linus Torvalds 74fb838cd4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem fixes from Dmitry Torokhov:
 "Just a few driver fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: tsc40 - remove wrong announcement of pressure support
  Input: lpc32xx-keys - select INPUT_MATRIXKMAP
  Input: pxa27x_keypad - clear pending interrupts on keypad config
  Input: wacom - correct bad Cintiq 24HD check
  Input: wacom - add INPUT_PROP_DIRECT flag to Cintiq 24HD
  Input: egalax_ts - get gpio from devicetree
2012-11-02 16:11:15 -07:00
Weston Andros Adamson 998f40b550 NFS4: nfs4_opendata_access should return errno
Return errno - not an NFS4ERR_. This worked because NFS4ERR_ACCESS == EACCES.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-11-02 18:51:54 -04:00
Linus Torvalds 23e44302b3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull more scsi target fixes from Nicholas Bellinger:
 "This series is a second round of target fixes for v3.7-rc4 that have
  come into target-devel over the last days, and are important enough to
  be applied ASAP.

  All are being CC'ed to stable.  The most important two are:

   - target: Re-add explict zeroing of INQUIRY bounce buffer memory to
     fix a regression for handling zero-length payloads, a bug that went
     during v3.7-rc1, and hit >= v3.6.3 stable.  (nab + paolo)

   - iscsi-target: Fix a long-standing missed R2T wakeup race in TX
     thread processing when using a single queue slot.  (Roland)

  Thanks to Roland & PureStorage team for helping to track down this
  long standing race with iscsi-target single queue slot operation.

  Also, the tcm_fc(FCoE) regression bug that was observed recently with
  -rc2 code has also been resolved with the cancel_delayed_work() return
  bugfix (commit c0158ca64da5: "workqueue: cancel_delayed_work() should
  return %false if work item is idle") now in -rc3.  Thanks again to Yi
  Zou, MDR, Robert Love @ Intel for helping to track this down."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: Fix incorrect usage of nested IRQ spinlocks in ABORT_TASK path
  iscsi-target: Fix missed wakeup race in TX thread
  target: Avoid integer overflow in se_dev_align_max_sectors()
  target: Don't return success from module_init() if setup fails
  target: Re-add explict zeroing of INQUIRY bounce buffer memory
2012-11-02 15:08:20 -07:00
Linus Torvalds ae41fce3cc An e-mail address update, and fix a compile error on SPARC
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQk+S8AAoJEMsfJm/On5mB29gP/3sJkPGvtaVVgBbncmj0ySNc
 Bi3X7Dg1ud+WmkDBTp8SQmzf/Zd3lRYDdL+b3mfltjLigMbXtn6eUOb8IJ6jEfgK
 Qs20umnDHLu6dxqrH36pcTyU4bEAdnG+daZtJuQhSA+wvfDLujxHGiTBEdN+VqWt
 CjSY0nqfBvJfETEuucZNLr5Lo5oVQFIqS8PAkcaV+7we601Y918XUiETXBXuHQh7
 GuoP10bGIKh9IDUSBEdT/R5ntvytKyCNp5QPwvujw2NITDwh/Z/pTcG3YgfR8Jrc
 7rJMI6jZ6VZTp7NLKuvNHEtZ4EQFgjRn1huq6ac4PGQUOWXS+HJBu54XfjHN4VMZ
 NPj1bJ07GxeysAr9aspUxWwFWrRo49v0p24RtqMNsafGUfyg2PLcgKB1YGQuzzyy
 8ZPYx2rUE4uRChB4tc6pgebUDH6uh/ODP+/SAaceUTJ1z9dnOezW2/VsJswzlnpi
 FlmjeEHu22+JMiPeNVpB0+ezV3f+bs4dkLt+hjOVG/5qIsH6sfK+kO4kKuE6nIB0
 XgslG/NEcdZVwwksl5dn1oCLEB1KOfXJZsgFVTkbOWJ97ueCz/sLI4+18Blrh/7h
 1jwu9JOT7mADscRujQ/gwiqdTGHcE2T/5vnREZTUG6AIUSEvLp/C97uYcEjOmwZA
 Kyqs7C1Zslgz0cF33NuU
 =REN0
 -----END PGP SIGNATURE-----

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

Pull hwmon fixes from Guenter Roeck:
 "An e-mail address update, and fix a compile error on SPARC"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: Only include of_match_table with CONFIG_OF_GPIO
  hwmon, fam15h_power: Change email address, MAINTAINERS entry
2012-11-02 13:27:52 -07:00
Linus Torvalds b987a834f6 FRV fixes for 3.7
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUJP/EhOxKuMESys7AQIVrQ/8CgzkMigNI9ryQ4zURibgnK0z9b0OU6mo
 0dizoDr48JrK4+DmEmx2GjvV2C5ur6qu5dYf2NiEP2zHXDT0m1BihzVAoiqOfh9R
 TlfsSYTdmUH7s0/1VdB0IwVeh46wFYxArroyedPLjftWBK/iR/h6qJ4R1OIpwZR8
 b4f9hDwZtdWKrJSwgtJWeMDLw/phYxGDdcD77C9s1WN2OQT532N6Eoea+2kGKSNY
 C51en4uBMWajbc2iVSMLQ6dgydcEGTM3gO6gawx3uEwXjl+HoycBbGiu0b/fvnmG
 PAbMu2jBgh+uWScHkWQUa+KzYSUraQOOq1J89mfTDMZ3NZ4qUAChcPyfpz9ya0bl
 nsPX8oElOY21Hlsx532OQvlNGQTw4rt9czK81svrjbBZm94gd10LJNte/8T5wUC0
 i9BZ5ajV9bZZ3fCM+nuQhCjWITn3PSWI6v/a3bV781IkySBLuL9OtlVZrVCO/5Ew
 uG0Z64d5PNc8cZthq6PHVGbWlN2bEyx6sIB+Wr6wRPSqF5jRaS+N6oL8rUZIomC6
 DuVrZ6hxzsIHpFWYqlqGPal9ViEvnnNOPLGBPRTvXn4vdefwijHfiui2GMtQpL6D
 w8qRzJksuzqAzJ1topvgMVIoJ1HkUu30F2X5cQnOeVYanjNduJ3oAEXCDFh2qLuS
 CCje/Adr2cM=
 =6uE0
 -----END PGP SIGNATURE-----

Merge tag 'frv-fixes-20121102' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-frv

Pull FRV fixes from David Howells:
 "A collection of small fixes for the FRV architecture."

* tag 'frv-fixes-20121102' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-frv:
  frv: fix the broken preempt
  frv: switch to saner kernel_execve() semantics
  FRV: Fix the new-style kernel_thread() stuff
  FRV: Fix the preemption handling
  FRV: gcc-4.1.2 also inlines weak functions
  FRV: Don't objcopy the GNU build_id note
  FRV: Add missing linux/export.h #inclusions
2012-11-02 13:27:01 -07:00
Linus Torvalds 66b6a0c979 Bug-fixes:
* Use appropriate macros instead of hand-rolling our own (ARM).
  * Fixes if FB/KBD closed unexpectedly.
  * Fix memory leak in /dev/gntdev ioctl calls.
  * Fix overflow check in xenbus_file_write.
  * Document cleanup.
  * Performance optimization when migrating guests.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAABAgAGBQJQk9ngAAoJEFjIrFwIi8fJXOcH/jEmTaV2rbUCCnnivlQGj5B2
 AAXt03MM2F7Ohifo8IEHDhvJlUqQnglQq4wcku/8X/bqSkxtqJMfa/UAStmS2e6r
 605msiMws/GKiDPgKywWHjMPk7JJow/T7du9mpT2Swla12+DXc7e0P6Sqm6qGtB5
 tCBFYe3CS+j8Xi/siPhveAoLoDVmC8RpNzV8EWBdUKhNeD6U4s5M3+ChVexOrB/6
 43YkzurkY/FOsP+8YhNnKFSFrpYleRB1GdFcr8PN5mv85sNKts7vHCb4qJFzZdbk
 BMImdLrTUnKArE4y4FS0iqabOTGXaUplEXfyxDw5hweESGa1qzrd29ocyMQ5p/U=
 =LQxc
 -----END PGP SIGNATURE-----

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

Pull Xen bugfixes from Konrad Rzeszutek Wilk:
 - Use appropriate macros instead of hand-rolling our own (ARM).
 - Fixes if FB/KBD closed unexpectedly.
 - Fix memory leak in /dev/gntdev ioctl calls.
 - Fix overflow check in xenbus_file_write.
 - Document cleanup.
 - Performance optimization when migrating guests.

* tag 'stable/for-linus-3.7-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/mmu: Use Xen specific TLB flush instead of the generic one.
  xen/arm: use the __HVC macro
  xen/xenbus: fix overflow check in xenbus_file_write()
  xen-kbdfront: handle backend CLOSED without CLOSING
  xen-fbfront: handle backend CLOSED without CLOSING
  xen/gntdev: don't leak memory from IOCTL_GNTDEV_MAP_GRANT_REF
  x86: remove obsolete comment from asm/xen/hypervisor.h
2012-11-02 13:26:11 -07:00
Sasha Levin d9b482c8ba hashtable: introduce a small and naive hashtable
This hashtable implementation is using hlist buckets to provide a simple
hashtable to prevent it from getting reimplemented all over the kernel.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
[ Merging this now, so that subsystems can start applying Sasha's
  patches that use this   - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-11-02 12:44:51 -07:00
Al Viro 1d72d9f83d frv: fix the broken preempt
Just get %icc2 into the state we would have after local_irq_disable()
and physical IRQ having happened since then.  Then we can simply
use preempt_schedule_irq() and be done with the whole mess.

Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-11-02 12:08:25 -04:00
Al Viro 7b7ade1179 frv: switch to saner kernel_execve() semantics
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-11-02 12:05:04 -04:00
David Howells e7aa51b2e5 FRV: Fix the new-style kernel_thread() stuff
The kernel_thread() changes for FRV don't work, and FRV fails to boot,
starting with:

	commit 02ce496f15
	Author: Al Viro <viro@zeniv.linux.org.uk>
	Date:   Tue Sep 18 22:18:51 2012 -0400
	Subject: frv: split ret_from_fork, simplify kernel_thread() a lot

The problem is that the userspace registers are completely cleared when a
kernel thread is created and all subsequent user threads are then copied from
that.  Unfortunately, however, the TBR and PSR registers are restored from the
pt_regs and the values they should be set to are clobbered by the memset.

Instead, copy across the old user registers as normal, and then merely alter
GR8 and GR9 in it if we're going to execute a kernel thread.

Signed-off-by: David Howells <dhowells@redhat.com>
2012-11-02 13:20:43 +00:00
David Howells 1ee6f5669a FRV: Fix the preemption handling
Fix the preemption handling in FRV code where the PREEMPT_ACTIVE value is
incorrectly loaded into the threadinfo flags rather than the threadinfo
preemption count.

Unfortunately, the code cannot be simply converted to use
preempt_schedule_irq() as is because FRV uses virtual interrupt disablement to
cut down on the cost of actually disabling interrupts and thus
local_irq_enable() doesn't actually enable interrupts.

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Al Viro <viro@ZenIV.linux.org.uk>
2012-11-02 13:20:42 +00:00
David Howells eded09ccf5 FRV: gcc-4.1.2 also inlines weak functions
gcc-4.1.2 inlines weak functions, which causes FRV to fail when the dummy
thread_info_cache_init() gets inlined into start_kernel().

Signed-off-by: David Howells <dhowells@redhat.com>
2012-11-02 13:20:42 +00:00
David Howells 5f0231d97b FRV: Don't objcopy the GNU build_id note
Don't let objcopy transfer the GNU build_id note into the loadable image as it
is located at address 0 and the image ends up >3G in size.

Signed-off-by: David Howells <dhowells@redhat.com>
2012-11-02 13:20:42 +00:00
David Howells a5788caa26 FRV: Add missing linux/export.h #inclusions
Add missing linux/export.h #inclusions to the FRV arch.

Signed-off-by: David Howells <dhowells@redhat.com>
2012-11-02 13:20:42 +00:00
Laxman Dewangan 91b370a0db i2c: tegra: set irq name as device name
When watching the irqs name of tegra i2c, all instances
irq name shows as tegra_i2c.

Passing the device name properly to have the irq names with
instance like tegra-i2c.0, tegra-i2c.1 etc.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-11-02 10:52:52 +01:00