Commit graph

262817 commits

Author SHA1 Message Date
Len Brown 5389102e23 Merge branch 'battery' into release 2011-08-05 22:16:42 -04:00
Sergey Senozhatsky 69d94ec6d8 Battery: sysfs_remove_battery(): possible circular locking
Commit 9c921c22a7
Author: Lan Tianyu <tianyu.lan@intel.com>

    ACPI / Battery: Resolve the race condition in the sysfs_remove_battery()

fixed BUG https://bugzilla.kernel.org/show_bug.cgi?id=35642 , but as a side
effect made lockdep unhappy with sysfs_remove_battery():

[14818.477168]
[14818.477170] =======================================================
[14818.477200] [ INFO: possible circular locking dependency detected ]
[14818.477221] 3.1.0-dbg-07865-g1280ea8-dirty #668
[14818.477236] -------------------------------------------------------
[14818.477257] s2ram/1599 is trying to acquire lock:
[14818.477276]  (s_active#8){++++.+}, at: [<ffffffff81169147>] sysfs_addrm_finish+0x31/0x5a
[14818.477323]
[14818.477325] but task is already holding lock:
[14818.477350]  (&battery->lock){+.+.+.}, at: [<ffffffffa0047278>] sysfs_remove_battery+0x10/0x4b [battery]
[14818.477395]
[14818.477397] which lock already depends on the new lock.
[14818.477399]
[..]
[14818.479121] stack backtrace:
[14818.479148] Pid: 1599, comm: s2ram Not tainted 3.1.0-dbg-07865-g1280ea8-dirty #668
[14818.479175] Call Trace:
[14818.479198]  [<ffffffff814828c3>] print_circular_bug+0x293/0x2a4
[14818.479228]  [<ffffffff81070cb5>] __lock_acquire+0xfe4/0x164b
[14818.479260]  [<ffffffff81169147>] ? sysfs_addrm_finish+0x31/0x5a
[14818.479288]  [<ffffffff810718d2>] lock_acquire+0x138/0x1ac
[14818.479316]  [<ffffffff81169147>] ? sysfs_addrm_finish+0x31/0x5a
[14818.479345]  [<ffffffff81168a79>] sysfs_deactivate+0x9b/0xec
[14818.479373]  [<ffffffff81169147>] ? sysfs_addrm_finish+0x31/0x5a
[14818.479405]  [<ffffffff81169147>] sysfs_addrm_finish+0x31/0x5a
[14818.479433]  [<ffffffff81167bc5>] sysfs_hash_and_remove+0x54/0x77
[14818.479461]  [<ffffffff811681b9>] sysfs_remove_file+0x12/0x14
[14818.479488]  [<ffffffff81385bf8>] device_remove_file+0x12/0x14
[14818.479516]  [<ffffffff81386504>] device_del+0x119/0x17c
[14818.479542]  [<ffffffff81386575>] device_unregister+0xe/0x1a
[14818.479570]  [<ffffffff813c6ef9>] power_supply_unregister+0x23/0x27
[14818.479601]  [<ffffffffa004729c>] sysfs_remove_battery+0x34/0x4b [battery]
[14818.479632]  [<ffffffffa004778f>] battery_notify+0x2c/0x3a [battery]
[14818.479662]  [<ffffffff8148fe82>] notifier_call_chain+0x74/0xa1
[14818.479692]  [<ffffffff810624b4>] __blocking_notifier_call_chain+0x6c/0x89
[14818.479722]  [<ffffffff810624e0>] blocking_notifier_call_chain+0xf/0x11
[14818.479751]  [<ffffffff8107e40e>] pm_notifier_call_chain+0x15/0x27
[14818.479770]  [<ffffffff8107ee1a>] enter_state+0xa7/0xd5
[14818.479782]  [<ffffffff8107e341>] state_store+0xaa/0xc0
[14818.479795]  [<ffffffff8107e297>] ? pm_async_store+0x45/0x45
[14818.479807]  [<ffffffff81248837>] kobj_attr_store+0x17/0x19
[14818.479820]  [<ffffffff81167e27>] sysfs_write_file+0x103/0x13f
[14818.479834]  [<ffffffff81109037>] vfs_write+0xad/0x13d
[14818.479847]  [<ffffffff811092b2>] sys_write+0x45/0x6c
[14818.479860]  [<ffffffff81492f92>] system_call_fastpath+0x16/0x1b

This patch introduces separate lock to struct acpi_battery to
grab in sysfs_remove_battery() instead of battery->lock.
So fix by Lan Tianyu is still there, we just grab independent lock.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Tested-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2011-08-05 22:15:18 -04:00
Kevin Hilman 02b26774af PM / Runtime: Allow _put_sync() from interrupts-disabled context
Currently the use of pm_runtime_put_sync() is not safe from
interrupts-disabled context because rpm_idle() will release the
spinlock and enable interrupts for the idle callbacks.  This enables
interrupts during a time where interrupts were expected to be
disabled, and can have strange side effects on drivers that expected
interrupts to be disabled.

This is not a bug since the documentation clearly states that only
_put_sync_suspend() is safe in IRQ-safe mode.

However, pm_runtime_put_sync() could be made safe when in IRQ-safe
mode by releasing the spinlock but not re-enabling interrupts, which
is what this patch aims to do.

Problem was found when using some buggy drivers that set
pm_runtime_irq_safe() and used _put_sync() in interrupts-disabled
context.

Reported-by: Colin Cross <ccross@google.com>
Tested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-08-05 21:45:20 +02:00
Rafael J. Wysocki fe202fde50 PM / Domains: Fix pm_genpd_poweron()
The local variable ret is defined twice in pm_genpd_poweron(), which
causes this function to always return 0, even if the PM domain's
.power_on() callback fails, in which case an error code should be
returned.

Remove the wrong second definition of ret and additionally remove an
unnecessary definition of wait from pm_genpd_poweron().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-08-05 21:45:11 +02:00
Lee, Chun-Yi 15b956a0b5 acer-wmi: support Lenovo ideapad S205 wifi switch
The AMW0 function in acer-wmi works on Lenovo ideapad S205 for control
the wifi hardware state. We also found there have a 0x78 EC register
exposes the state of wifi hardware switch on the machine.

So, add this patch to support Lenovo ideapad S205 wifi hardware switch
in acer-wmi driver.

Reference: bko#37892
	https://bugzilla.kernel.org/show_bug.cgi?id=37892

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Tested-by: Florian Heyer <heyho@flanto.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 15:21:52 -04:00
Anton V. Boyarshinov 2c3422d9c4 acerhdf.c: spaces in aliased changed to *
It seems that aliases shouldn't contain spaces, as
module-init-tools uses them as delimeters in module.alias file

Signed-off-by: Anton V. Boyarshinov <boyarsh@altlinux.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 15:21:51 -04:00
Axel Lin 7451a55af0 platform-drivers-x86: ideapad-laptop: add missing ideapad_input_exit in ideapad_acpi_add error path
In the case of ideapad_backlight_init() failure,
we need to free the resources allocated by ideapad_input_init().

Aslo drop __devexit annotation for ideapad_input_exit() because
we also call it in ideapad_acpi_add() error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 15:21:50 -04:00
Jesse Barnes 70fda70a72 x86 driver: fix typo in TDP override enabling
When enabling turbo, we need to set both the TDC and TDP bits.  IIRC
only the TDC one actually matters, but fix it up anyway since the
current code is confusing.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 15:21:49 -04:00
Thomas Courbon 78a7539b88 Platform: fix samsung-laptop DMI identification for N150/N210/220/N230
Some samsung latop of the N150/N2{10,20,30} serie are badly detected by the samsung-laptop platform driver, see bug # 36082.
It appears that N230 identifies itself as N150/N210/N220/N230 whereas the other identify themselves as N150/N210/220.
This patch attemtp fix #36082 allowing correct identification for all the said netbook model.

Reported-by: Daniel Eklöf <daniel@ekloef.se>
Signed-off-by: Thomas Courbon <thcourbon@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 15:21:48 -04:00
Seth Forshee f1566f0dc0 dell-wmi: Add keys for Dell XPS L502X
All of these keys are being reported on the keyboard
controller but are also generating WMI events. Add them
to the legacy keymap to silence the noise.

BugLink: http://bugs.launchpad.net/bugs/815914
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 15:21:47 -04:00
Axel Lin 046f828b41 platform-drivers-x86: samsung-q10: make dmi_check_callback return 1
We only care about if there is any successful match from the dmi table
or no match at all, we can make dmi_check_system return immediately if
we have a successful match instead of iterate thorough the whole table.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 15:21:47 -04:00
Frederick van der Wyck 78542e1833 Platform: Samsung Q10 backlight driver
This adds backlight control on the Samsung Q10 laptop, which does not support
the SABI interface. Also tested successfully on the Dell Latitude X200.

Signed-off-by: Frederick van der Wyck <fvanderwyck@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:17 -04:00
Axel Lin daa7769641 platform-drivers-x86: intel_scu_ipc: convert to DEFINE_PCI_DEVICE_TABLE
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:15 -04:00
Axel Lin b73210aec4 platform-drivers-x86: intel_rar_register: convert to DEFINE_PCI_DEVICE_TABLE
And also remove unused variable 'my_id_table'.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:14 -04:00
Axel Lin c8bb2ebd62 platform-drivers-x86: intel_menlow: add missing return AE_OK for intel_menlow_register_sensor()
Otherwise, the error path will always be executed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:12 -04:00
Axel Lin 03f8952cf6 platform-drivers-x86: intel_mid_thermal: fix memory leak
The memory for td_info which is allocated in initialize_sensor()
should be properly kfreed in mid_thermal_probe() error patch and
mid_thermal_remove().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:11 -04:00
Axel Lin 94ee48b928 platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:10 -04:00
J Witteveen 4e2441c046 Samsung Laptop platform driver: support N510
The N510 benefits from this code as well. Below is a patch to include support.

Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:08 -04:00
Corentin Chary a912d32910 asus-wmi: add uwb rfkill support
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:07 -04:00
Corentin Chary 43be8bde1f asus-wmi: add gps rfkill support
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:05 -04:00
Corentin Chary fddbfed595 asus-wmi: add CWAP support and clarify the meaning of WAPF bits
ref: http://dev.iksaif.net/projects/3/wiki/Asus-laptop_WAPF

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:04 -04:00
Corentin Chary 3df5fdadf6 asus-wmi: return proper value in store_cpufv()
Cc: stable@kernel.org
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:02 -04:00
Corentin Chary e02431d6f5 asus-wmi: check for temp1 presence
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:01 -04:00
Corentin Chary 6118b8adb5 asus-wmi: add thermal sensor
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:46:00 -04:00
Corentin Chary 79ec1172c2 asus-wmi: add some device ids
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:58 -04:00
Corentin Chary af965e9732 asus-wmi: fix keyboard backlight detection
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:57 -04:00
Corentin Chary 8fe8c25ef9 asus-wmi: fix section mismatch
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:55 -04:00
Corentin Chary e9809c0b96 asus-wmi: add keyboard backlight support
Based on a patch from Nate Weibley. <nweibley@gmail.com>.

Cc: Nate Weibley <nweibley@gmail.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:54 -04:00
Corentin Chary 57d5c8e742 asus-wmi: second part of the version starts at 16 not 8
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:52 -04:00
Seth Forshee 39bbde0599 asus-wmi: Enable autorepeat for hotkey input device
The T101MT Home/Express Gate key autorepeats in hardware, but
sparse-keymap does not support hardware autorepeat. Enable the
input core's software autorepeat to emulate the hardware behavior.
Normal hotkeys are autoreleased, so the behavior of these keys
will not be affected.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:51 -04:00
Seth Forshee 6ae8b80737 eeepc-wmi: Add support for T101MT Home/Express Gate key
This key is different than other hotkeys, having seperate scan
codes for press, release, and hold, so it requires some special
filtering. Press and release events are passed on, and hold events
are ignored since sparse-keymap does not support hardware
autorepeat.

Note that "Home" in the context of this button doesn't mean the
same thing as the usual Home key, and it really isn't clear at
all what is meant by "Home". The manufacurer's description of the
button indicates that it should launch some sort of touch screen
settings interface on short press and apply a desktop rotation on
long press.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:50 -04:00
Seth Forshee c4453f6a7c asus-wmi: Add callback for hotkey filtering
This is required for the T101MT home key, which behaves differently
than other hotkeys.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:48 -04:00
Corentin Chary 49979d091d asus-wmi: fix hwmon/pwm1
The code was completly broken, and should never had been sent
to the kernel. That's what happens when you write code without
hardware to test it.

Cc: stable@kernel.org
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:47 -04:00
Ike Panhc a4ecbb8ae7 ideapad: add backlight driver
When acpi_backlight=vendor in cmdline or no backlight support in acpi video
device, ideapad-laptop will register backlight device and control brightness
and backlight power via the command in VPC2004.

Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:45 -04:00
Ike Panhc a84511f7fb ideapad: let camera_power node invisiable if no camera
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:44 -04:00
Ike Panhc 3371f48167 ideapad: define cfg bits and create sysfs node for cfg
Create /sys/devices/platform/ideapad/cfg for showing cfg value.

Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:42 -04:00
Andy Lutomirski 33009557bd Add KEY_MICMUTE and enable it on Lenovo X220
I suspect that this works on T410.

Signed-off-by: Andy Lutomirski <luto@mit.edu>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:41 -04:00
Lee, Chun-Yi 38803141bf msi-laptop: add MSI U270 netbook to module alias and scm list
After test, msi-laptop driver also can support MSI U270 netbook.
So, add MSI U270's dmi information to module alias and scm table
for support this machine.

Tested on MSI U270 netbook.

Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:39 -04:00
Seth Forshee 1a04d8ffc0 acer-wmi: Add support for Aspire 1830 wlan hotkey
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:38 -04:00
Julien Valroff b06862ba6b acerhdf: add support for Aspire 1810TZ BIOS v1.3314
Would you please consider applying the following patch adding support for
the Aspire 1810TZ BIOS v.1.3314 version to the acerhdf module and avoids the
following error:

acerhdf: unknown (unsupported) BIOS version Acer/Aspire 1810TZ/v1.3314, ple=
ase report, aborting!

Not sure about the other Aspire models, but it seems at least 1810T should
also be updated.

Signed-off-by: Julien Valroff <julien@kirya.net>
2011-08-05 14:45:36 -04:00
Axel Lin 2605d753e4 platform-drivers-x86: dell-laptop: Remove unneeded mutex_init() for buffer_mutex
DEFINE_MUTEX() will automatically initialize buffer_mutex,
no need to call mutex_init() in dell_init().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:35 -04:00
Lee, Chun-Yi 7b8aca65db acer-wmi: schedule threeg and interface sysfs for feature removal
we can now autodetect internal 3G device and already have the threeg
rfkill device. So, we plan to remove threeg sysfs support for it's no
longer necessary.

We also plan to remove interface sysfs file that exposed which ACPI-WMI
interface that was used by acer-wmi driver. It will replaced by information
log when acer-wmi initial.

We keep it around for userspace compatibility reasons, schedule removal
in 2012.

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Acked-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2011-08-05 14:45:34 -04:00
Linus Torvalds de96355c11 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (55 commits)
  Revert "drm/i915: Try enabling RC6 by default (again)"
  drm/radeon: Extended DDC Probing for ECS A740GM-M DVI-D Connector
  drm/radeon: Log Subsystem Vendor and Device Information
  drm/radeon: Extended DDC Probing for Connectors with Improperly Wired DDC Lines (here: Asus M2A-VM HDMI)
  drm: Separate EDID Header Check from EDID Block Check
  drm: Add NULL check about irq functions
  drm: Fix irq install error handling
  drm/radeon: fix potential NULL dereference in drivers/gpu/drm/radeon/atom.c
  drm/radeon: clean reg header files
  drm/debugfs: Initialise empty variable
  drm/radeon/kms: add thermal chip quirk for asus 9600xt
  drm/radeon: off by one in check_reg() functions
  drm/radeon/kms: fix version comment due to merge timing
  drm/i915: allow cache sharing policy control
  drm/i915/hdmi: HDMI source product description infoframe support
  drm/i915/hdmi: split infoframe setting from infoframe type code
  drm: track CEA version number if present
  drm/i915: Try enabling RC6 by default (again)
  Revert "drm/i915/dp: Zero the DPCD data before connection probe"
  drm/i915/dp: wait for previous AUX channel activity to clear
  ...
2011-08-05 06:44:38 -10:00
Linus Torvalds 8cd290a07d Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: Size mondo queues more sanely.
  sparc: Access kernel TSB using physical addressing when possible.
  sparc: Fix __atomic_add_unless() return value.
  sparc: use kbuild-generic support for true asm-generic header files
  sparc: Use popc when possible for ffs/__ffs/ffz.
  sparc: Set reboot-cmd using reboot data hypervisor call if available.
  sparc: Add some missing hypervisor API groups.
  sparc: Use hweight64() in popc emulation.
  sparc: Use popc if possible for hweight routines.
  sparc: Minor tweaks to Niagara page copy/clear.
  sparc: Sanitize cpu feature detection and reporting.
2011-08-05 06:42:36 -10:00
Linus Torvalds 07d952dc66 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (54 commits)
  ipv6: check for IPv4 mapped addresses when connecting IPv6 sockets
  mlx4: decreasing ref count when removing mac
  net: Fix security_socket_sendmsg() bypass problem.
  net: Cap number of elements for sendmmsg
  net: sendmmsg should only return an error if no messages were sent
  ixgbe: fix PHY link setup for 82599
  ixgbe: fix __ixgbe_notify_dca() bail out code
  igb: fix WOL on second port of i350 device
  e1000e: minor re-order of #include files
  e1000e: remove unnecessary check for NULL pointer
  intel drivers: repair missing flush operations
  macb: restore wrap bit when performing underrun cleanup
  cdc_ncm: fix endianness problem.
  irda: use PCI_VENDOR_ID_*
  mlx4: Fixing Ethernet unicast packet steering
  net: fix NULL dereferences in check_peer_redir()
  bnx2x: Clear MDIO access warning during first driver load
  bnx2x: Fix BCM578xx MAC test
  bnx2x: Fix BCM54618se invalid link indication
  bnx2x: Fix BCM84833 link
  ...
2011-08-05 06:42:01 -10:00
Linus Torvalds 5fdb32472e Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
  drivers/ide/cy82c693.c: Add missing pci_dev_put
  ide: Fix irq flags madness
2011-08-05 06:41:10 -10:00
Jeff Layton 80975d21aa cifs: cope with negative dentries in cifs_get_root
The loop around lookup_one_len doesn't handle the case where it might
return a negative dentry, which can cause an oops on the next pass
through the loop. Check for that and break out of the loop with an
error of -ENOENT if there is one.

Fixes the panic reported here:

    https://bugzilla.redhat.com/show_bug.cgi?id=727927

Reported-by: TR Bentley <home@trarbentley.net>
Reported-by: Iain Arnell <iarnell@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: stable@kernel.org
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2011-08-05 15:03:09 +00:00
Jeff Layton f9e8c45002 cifs: convert prefixpath delimiters in cifs_build_path_to_root
Regression from 2.6.39...

The delimiters in the prefixpath are not being converted based on
whether posix paths are in effect. Fixes:

    https://bugzilla.redhat.com/show_bug.cgi?id=727834

Reported-and-Tested-by: Iain Arnell <iarnell@gmail.com>
Reported-by: Patrick Oltmann <patrick.oltmann@gmx.net>
Cc: Pavel Shilovsky <piastryyy@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2011-08-05 14:55:15 +00:00
Konrad Rzeszutek Wilk c00c8aa2d9 xen/trace: Fix compile error when CONFIG_XEN_PRIVILEGED_GUEST is not set
with CONFIG_XEN and CONFIG_FTRACE set we get this:

arch/x86/xen/trace.c:22: error: ‘__HYPERVISOR_console_io’ undeclared here (not in a function)
arch/x86/xen/trace.c:22: error: array index in initializer not of integer type
arch/x86/xen/trace.c:22: error: (near initialization for ‘xen_hypercall_names’)
arch/x86/xen/trace.c:23: error: ‘__HYPERVISOR_physdev_op_compat’ undeclared here (not in a function)

Issue was that the definitions of __HYPERVISOR were not pulled
if CONFIG_XEN_PRIVILEGED_GUEST was not set.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-08-05 09:43:02 -04:00
Max Matveev c15fea2d8c ipv6: check for IPv4 mapped addresses when connecting IPv6 sockets
When support for binding to 'mapped INADDR_ANY (::ffff.0.0.0.0)' was added
in 0f8d3c7ac3 the rest of the code
wasn't told so now it's possible to bind IPv6 datagram socket to
::ffff.0.0.0.0, connect it to another IPv4 address and it will all
work except for getsockhame() which does not return the local address
as expected.

To give getsockname() something to work with check for 'mapped INADDR_ANY'
when connecting and update the in-core source addresses appropriately.

Signed-off-by: Max Matveev <makc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-05 03:56:30 -07:00