OSDN Git Service

android-x86/kernel.git
14 years agoBluetooth: fix hciconfig hciX up issue android-x86-1.6
Chih-Wei Huang [Fri, 6 Nov 2009 09:54:59 +0000 (17:54 +0800)]
Bluetooth: fix hciconfig hciX up issue

Do not reject to open hci device in RFKILL_STATE_SOFT_BLOCKED.

14 years agoConfigure CONFIG_TOUCHSCREEN_USB_COMPOSITE as a module. Fixes Q1U touchscreen.
Bryan Hundven [Thu, 5 Nov 2009 21:53:20 +0000 (13:53 -0800)]
Configure CONFIG_TOUCHSCREEN_USB_COMPOSITE as a module. Fixes Q1U touchscreen.

14 years agoandroid-x86: defconfig updates
Chih-Wei Huang [Thu, 5 Nov 2009 09:46:22 +0000 (17:46 +0800)]
android-x86: defconfig updates

* enable netconsole module
* change i2c drivers to be modules

14 years agoadd new vendor id and device id for 1005HA. It seems that it is using
Yi Sun [Thu, 5 Nov 2009 01:17:58 +0000 (17:17 -0800)]
add new vendor id and device id for 1005HA. It seems that it is using
more than one type of devices

14 years agotask should have been tsk
Bryan Hundven [Sat, 31 Oct 2009 20:17:08 +0000 (13:17 -0700)]
task should have been tsk

14 years agoRevert "Checking in fix for Bryan Hundven <bryanhundven@gmail.com>"
Yi Sun [Mon, 2 Nov 2009 03:35:13 +0000 (19:35 -0800)]
Revert "Checking in fix for Bryan Hundven <bryanhundven@gmail.com>"

This reverts commit 69c496c734fca2dc5bbdbd1acdd876cb05520cc9.

14 years agoChecking in fix for Bryan Hundven <bryanhundven@gmail.com>
Yi Sun [Mon, 2 Nov 2009 03:15:00 +0000 (19:15 -0800)]
Checking in fix for Bryan Hundven <bryanhundven@gmail.com>

fixed a bug in cpuset

14 years agofixed the radio status issue that causes wifi to not work
Yi Sun [Mon, 2 Nov 2009 02:31:47 +0000 (18:31 -0800)]
fixed the radio status issue that causes wifi to not work

14 years agoeeepc-laptop: fills rfkill->data with the right value
Corentin Chary [Thu, 29 Oct 2009 21:26:04 +0000 (22:26 +0100)]
eeepc-laptop: fills rfkill->data with the right value

Before this patch, all rfkill interface were controling the wlan device.
In fact, CM_ASL_WLAN = NULL = 0. :/

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
14 years agopci: enable pci hotplug
Corentin Chary [Mon, 12 Oct 2009 21:15:59 +0000 (23:15 +0200)]
pci: enable pci hotplug

This is needed for newer eeepc-laptop

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
14 years agoMerge branch 'backport-eeepc-laptop-2.6.29' of git://git.iksaif.net/acpi4asus into...
Corentin Chary [Wed, 21 Oct 2009 11:07:03 +0000 (13:07 +0200)]
Merge branch 'backport-eeepc-laptop-2.6.29' of git://git.iksaif.net/acpi4asus into android-x86

14 years agoeeepc-laptop: don't enable camera at startup if it's already on.
Luca Niccoli [Tue, 13 Oct 2009 18:28:00 +0000 (11:28 -0700)]
eeepc-laptop: don't enable camera at startup if it's already on.

Switching the camera takes 500ms, checking if it's on is almost free...
The BIOS remembers the setting through reboots, so there's good chance the
camera is already enabled.

Signed-off-by: Luca Niccoli <lultimouomo@gmail.com>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Len Brown <len.brown@intel.com>
Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
14 years agoBluetooth: Add native RFKILL soft-switch support for all devices
Corentin Chary [Fri, 9 Oct 2009 14:49:07 +0000 (16:49 +0200)]
Bluetooth: Add native RFKILL soft-switch support for all devices

With the re-write of the RFKILL subsystem it is now possible to easily
integrate RFKILL soft-switch support into the Bluetooth subsystem. All
Bluetooth devices will now get automatically RFKILL support.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
14 years agoBluetooth: Fix Kconfig issue with RFKILL integration
Marcel Holtmann [Sun, 14 Jun 2009 13:21:25 +0000 (15:21 +0200)]
Bluetooth: Fix Kconfig issue with RFKILL integration

Since the re-write of the RFKILL subsystem it is no longer good to just
select RFKILL, but it is important to add a proper depends on rule.

Based on a report by Alexander Beregalov <a.beregalov@gmail.com>

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoandroid-x86: defconfig updates, enable bluetooth drivers
Chih-Wei Huang [Tue, 6 Oct 2009 09:22:40 +0000 (17:22 +0800)]
android-x86: defconfig updates, enable bluetooth drivers

Enable more bluetooth device drivers.

14 years agoenable most drivers for auto detection
Chih-Wei Huang [Mon, 17 Aug 2009 12:17:39 +0000 (20:17 +0800)]
enable most drivers for auto detection

14 years agomove firmware to /system/lib/firmware directory
Yi Sun [Thu, 30 Jul 2009 20:59:31 +0000 (13:59 -0700)]
move firmware to /system/lib/firmware directory

14 years agoadd skge, sky2 drivers
Chih-Wei Huang [Fri, 24 Jul 2009 10:10:42 +0000 (18:10 +0800)]
add skge, sky2 drivers

14 years agoenable uvesafb
Chih-Wei Huang [Wed, 22 Jul 2009 10:59:50 +0000 (18:59 +0800)]
enable uvesafb

14 years agodisable synaptic touchpad by default. It simulates a tochscreen and we can not suppor...
Yi Sun [Tue, 21 Jul 2009 05:00:47 +0000 (22:00 -0700)]
disable synaptic touchpad by default. It simulates a tochscreen and we can not support it.
Disable it will trigger the system to use generic touchpad driver

14 years agoadd more drivers for vm
Chih-Wei Huang [Sat, 18 Jul 2009 17:23:35 +0000 (01:23 +0800)]
add more drivers for vm

14 years agoadd audio support for Eee PC 1004, 1005HA
Chih-Wei Huang [Thu, 16 Jul 2009 06:43:09 +0000 (14:43 +0800)]
add audio support for Eee PC 1004, 1005HA

14 years agoadd audio support for Eee PC 900
Chih-Wei Huang [Thu, 16 Jul 2009 02:05:22 +0000 (10:05 +0800)]
add audio support for Eee PC 900

14 years agoadd sata ahci support
Chih-Wei Huang [Tue, 14 Jul 2009 08:45:40 +0000 (16:45 +0800)]
add sata ahci support

14 years agoadd defconfig for android-x86
Chih-Wei Huang [Thu, 9 Jul 2009 09:48:41 +0000 (17:48 +0800)]
add defconfig for android-x86

14 years agoadd DRM_I915_COLOR_DEPTH to customize i915 color depth
Chih-Wei Huang [Wed, 8 Jul 2009 11:16:41 +0000 (19:16 +0800)]
add DRM_I915_COLOR_DEPTH to customize i915 color depth

14 years agofix S3 suspend and resume - by Yi
Chih-Wei Huang [Thu, 2 Jul 2009 08:59:56 +0000 (16:59 +0800)]
fix S3 suspend and resume - by Yi

14 years agofix compile error on x86
Chih-Wei Huang [Tue, 30 Jun 2009 09:18:55 +0000 (17:18 +0800)]
fix compile error on x86

14 years agommc: block: Resume multi-block reads after transient read errors.
David Ding [Fri, 9 Oct 2009 13:38:10 +0000 (06:38 -0700)]
mmc: block: Resume multi-block reads after transient read errors.

Signed-off-by: Bentao Zou <bzou1@motorola.com>
Signed-off-by: David Ding <david.j.ding@motorola.com>
Signed-off-by: San Mehat <san@google.com>
14 years agonet: ipv4: Fix race in tcp_v4_nuke_addr().
Robert Love [Thu, 8 Oct 2009 19:06:22 +0000 (15:06 -0400)]
net: ipv4: Fix race in tcp_v4_nuke_addr().

To fix a recursive deadlock in 2.6.29, we stopped holding the hash table lock
across tcp_done() calls. This fixed the deadlock, but introduced a race where
the socket could die or change state.

Fix: Before unlocking the hash table, we grab a reference to the socket. We
can then unlock the hash table without risk of the socket going away. We then
lock the socket, which is safe because it is pinned. We can then call
tcp_done() without recursive deadlock and without race. Upon return, we unlock
the socket and then unpin it, killing it.

Change-Id: Idcdae072b48238b01bdbc8823b60310f1976e045
Signed-off-by: Robert Love <rlove@google.com>
Acked-by: Dima Zavin <dima@android.com>
14 years agomtd: nand_base: fix nand_panic_wait
Tom Zhu [Sat, 3 Oct 2009 23:50:04 +0000 (18:50 -0500)]
mtd: nand_base: fix nand_panic_wait

fix the problem of nand_panic_wait

Signed-off-by: Tom Zhu <a2289c@android-hal-04.(none)>
Signed-off-by: San Mehat <san@google.com>
14 years agoBluetooth: Set general bonding security for ACL by default
Andrei Emeltchenko [Thu, 3 Sep 2009 09:34:19 +0000 (12:34 +0300)]
Bluetooth: Set general bonding security for ACL by default

This patch fixes double pairing issues with SSP.

It was observed that when pairing with SSP bluez asks confirmation
2 times.
http://www.spinics.net/lists/linux-bluetooth/msg02473.html

This also causes bug when we initiate SSP connection from Vista.

The reason is because bluetoothd does not store link keys since
ioctl  HCIGETAUTHINFO returns 0. Setting default general
bonding fixes these issues.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
14 years ago[ARM] process: Use uber-safe probe_kernel_address() to read mem when dumping.
San Mehat [Sat, 3 Oct 2009 19:24:54 +0000 (12:24 -0700)]
[ARM] process: Use uber-safe probe_kernel_address() to read mem when dumping.

This prevents the dump from taking pagefaults / external aborts.

Signed-off-by: San Mehat <san@google.com>
14 years agoeeepc-laptop: Properly annote eeepc_enable_camera().
Corentin Chary [Sat, 3 Oct 2009 07:52:02 +0000 (09:52 +0200)]
eeepc-laptop: Properly annote eeepc_enable_camera().

Currently the annotation for function eeepc_enable_camera() is
__init, and refers to a
function eeepc_hotk_add() which is non-init. Use __devinit for both
functions which is
more appropriate and fixes a section mismatch warning.

 We were warned by the following warning:

  LD      drivers/platform/x86/built-in.o
WARNING: drivers/platform/x86/built-in.o(.text+0x12e1): Section
mismatch in reference from the function eeepc_hotk_add() to the
function .init.text:eeepc_enable_camera()
The function eeepc_hotk_add() references
the function __init eeepc_enable_camera().
This is often because eeepc_hotk_add lacks a __init
annotation or the annotation of eeepc_enable_camera is wrong.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
14 years agoeeepc-laptop: disp attribute should be write-only
Corentin Chary [Fri, 2 Oct 2009 15:02:40 +0000 (17:02 +0200)]
eeepc-laptop: disp attribute should be write-only

Currently, reading from the disp attribute fails with "No such device",
which is misleading. According to CMSG table on acpi4asus project site,
no models have a getter method corresponding to SDSP. Change the file
permission to disallow reads.

If some joker changes the permission to permit reads, then return -EIO
to be consistent with sysfs' behaviour when no show() method is
provided.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
14 years agoeeepc-laptop: makes get_acpi() returns -ENODEV
Corentin Chary [Fri, 2 Oct 2009 15:01:42 +0000 (17:01 +0200)]
eeepc-laptop: makes get_acpi() returns -ENODEV

If there is there is no getter defined, get_acpi()
will return -ENODEV.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agocpufreq: ondemand: Don't synchronize sample rate unless mulitple cpus present
Jocelyn Falempe [Tue, 22 Sep 2009 12:27:24 +0000 (14:27 +0200)]
cpufreq: ondemand: Don't synchronize sample rate unless mulitple cpus present

For UP systems this is not required, and results in a more consistent
sample interval.

Signed-off-by: Jocelyn Falempe <jocelyn.falempe@motorola.com>
Signed-off-by: Mike Chan <mike@android.com>
14 years agoeeepc-laptop: add touchpad led
Corentin Chary [Wed, 30 Sep 2009 20:16:08 +0000 (22:16 +0200)]
eeepc-laptop: add touchpad led

This led can be found on Eeepc 1005 series.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
14 years agoeeepc-laptop: allow rfkill hotplug to work on the 900A model
Alan Jenkins [Sat, 29 Aug 2009 08:28:31 +0000 (10:28 +0200)]
eeepc-laptop: allow rfkill hotplug to work on the 900A model

The 900A provides hotplug notifications on a different ACPI object to
other models.

Reported-by: Trevor <trevor.chart@gmail.com>
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: whitespace for checkpatch.pl
Corentin Chary [Tue, 29 Sep 2009 14:15:50 +0000 (16:15 +0200)]
eeepc-laptop: whitespace for checkpatch.pl

checkpatch doesn't like tab+space for a return statement.

WARNING: suspect code indent for conditional statements (8, 17)
+ if (!device)
+  return -EINVAL;

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
14 years agoeeepc-laptop: add rfkill support for the Wimax in ASUS Eee PC 1000HG
Corentin Chary [Tue, 29 Sep 2009 14:15:17 +0000 (16:15 +0200)]
eeepc-laptop: add rfkill support for the Wimax in ASUS Eee PC 1000HG

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: switch to dev_pm_ops
Corentin Chary [Tue, 29 Sep 2009 14:13:11 +0000 (16:13 +0200)]
eeepc-laptop: switch to dev_pm_ops

This also involves switching the resume handler from the acpi device
to the platform device.  Using the more fine grained handlers allows
two improvements:

1. We only need to recheck rfkill state after resume from hibernation.

2. The wireless LED workaround accounts for up to 1.1s out of 1.7s
resuming devices (when wireless is enabled).  We can limit the
workaround to thaw(), so that it only delays suspend to disk.

The workaround is only likely to help when hibernation is aborted.
Suspend to ram cannot be aborted by the user.  Device suspend errors may
well happen before eeepc-laptop would even be frozen.  Suspend errors
which happen after that could be pretty funky anyway.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: correct the description of the hibernation abort bug
Alan Jenkins [Fri, 28 Aug 2009 12:56:39 +0000 (12:56 +0000)]
eeepc-laptop: correct the description of the hibernation abort bug

Actually it is only the LED which is affected.  The bios bug does not
disable the wifi.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: check the 3G rfkill state on resume
Corentin Chary [Tue, 29 Sep 2009 14:08:17 +0000 (16:08 +0200)]
eeepc-laptop: check the 3G rfkill state on resume

All the rfkill devices are treated as "persistent", 3G is no exception.
This means their state may change over hibernation.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: remove redundant rfkill_set_sw_state in resume handler
Corentin Chary [Tue, 29 Sep 2009 14:05:16 +0000 (16:05 +0200)]
eeepc-laptop: remove redundant rfkill_set_sw_state in resume handler

rfkill_set_sw_state() will already be called by eeepc_rfkill_hotplug().

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: make input device a child of the platform device
Corentin Chary [Tue, 29 Sep 2009 14:03:23 +0000 (16:03 +0200)]
eeepc-laptop: make input device a child of the platform device

Sysfs showed the ehotk input device as a "virtual" device - lies!
The input device is provided by a physical device, the eeepc platform.

This requires that we move the creation of the input device to come
after platform device is created.  Input initialization is moved from
ehotk_check() [sic] to a new function called eeepc_input_init().  This
brings the input device into line with the other eeepc-laptop devices.

Also, refuse to load if we fail to register the input device.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: fix ordering of init and exit functions
Corentin Chary [Tue, 29 Sep 2009 14:01:31 +0000 (16:01 +0200)]
eeepc-laptop: fix ordering of init and exit functions

1. input and backlight devices were registered after acpi notifications
   are enabled.  This left a window where eeepc_hotk_notify() might
   find these devices in an inconsistent (half-initialized) state.

-> Move all device registration into eeepc_hotk_add(), which is called
   before enabling acpi notifications.

2. input and backlight devices were unregistered before acpi
   notifications are disabled.  This left a window where
   eeepc_hotk_notify() might find these devices in an inconsistent
   (half-destroyed) state.

-> Move all device unregistration into eeepc_hotk_remove(), which is
   called after disabling acpi notifications.

3. The acpi driver was not freed if an error occured further down in
   eeepc_laptop_init().

-> The rest of eeepc_laptop_init() has been moved to eeepc_hotk_add(),
   so this is no longer a problem.

4. The acpi driver was unregistered before the platform driver.  This
   left a window where a sysfs access could attempt to read the ehotk
   structure after it had been freed by eeepc_hotk_remove().

-> The acpi driver is now unregistered as the last step in
   eeepc_laptop_exit(), so this is no longer a problem.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: fix pci hotplug race on load and unload
Corentin Chary [Tue, 29 Sep 2009 13:52:20 +0000 (15:52 +0200)]
eeepc-laptop: fix pci hotplug race on load and unload

Wifi rfkill state changes can race with pci hotplug cleanup.  A simple
fix is to refresh the hotplug state just before deregistering the pci
hotplug slot.

There is also potential for a hotplug notification to fire too early
during setup, while the structures it uses are still being initialised.
(This could only happen if the BIOS performs hotplug itself; a bug
triggered by removing the battery while hibernated).  Avoid this by
registering the notifier later.  The same refresh mechanism is used
to handle rfkill state changes which can now race with registration.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: use a mutex to serialize pci hotplug (resume vs. notify)
Corentin Chary [Tue, 29 Sep 2009 13:48:51 +0000 (15:48 +0200)]
eeepc-laptop: use a mutex to serialize pci hotplug (resume vs. notify)

Commit d0265f0 "eeepc-laptop: fix hot-unplug on resume" used a workqueue
to protect pci hotplug against multiple simultaneous calls during
resume.  It seems to work, but a mutex would be more appropriate.

This is in preparation to fix the potential pci hotplug race on unload.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: don't touch the pci slot if it was claimed by a different driver
Corentin Chary [Sun, 27 Sep 2009 19:09:53 +0000 (21:09 +0200)]
eeepc-laptop: don't touch the pci slot if it was claimed by a different driver

The whole point of registering as a PCI hotplug driver was to prevent
conflict with pciehp.  At the moment it happens to work because
eeepc-laptop is loaded first, but it doesn't work the other way round.
If pciehp is loaded first then we fail to claim the slot - we need to
respect this and not handle hotplug events.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: fix hot-unplug on resume
Corentin Chary [Sun, 27 Sep 2009 19:05:14 +0000 (21:05 +0200)]
eeepc-laptop: fix hot-unplug on resume

OOPS on resume when the wireless adaptor is disabled during suspend was
introduced by "eeepc-laptop: read rfkill soft-blocked state on resume".

Unable to handle kernel NULL pointer dereference

Process s2disk
Tainted: G W
IP: klist_put

Call trace:
? klist_del
? device_del
? device_unregister
? pci_stop_dev
? pci_stop_bus
? pci_remove_device
? eeepc_rfkill_hotplug [eeepc_laptop]
? eeepc_hotk_resume [eeepc_laptop]
? acpi_device_resume
? device_resume
? hibernation_snapshot

It appears the PCI device is removed twice.  The eeepc_rfkill_hotplug()
call from the resume handler is racing against the call from the ACPI
notifier callback.  The ACPI notification is triggered by the resume
handler when it refreshes the value of CM_ASL_WLAN.

The fix is to serialize hotplug calls using a workqueue.

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

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: add rfkill support for the 3G modem in Eee PC 901 Go
Corentin Chary [Thu, 25 Jun 2009 11:25:42 +0000 (13:25 +0200)]
eeepc-laptop: add rfkill support for the 3G modem in Eee PC 901 Go

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: get the right value for CMSG
Corentin Chary [Thu, 25 Jun 2009 11:25:41 +0000 (13:25 +0200)]
eeepc-laptop: get the right value for CMSG

CMSG is an ACPI method used to find features available on
an Eee PC. But some features are never repported, even if present.

If the getter of a feature is present, this patch will set
the corresponding bit in cmsg.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: right parent device
Corentin Chary [Thu, 25 Jun 2009 11:25:39 +0000 (13:25 +0200)]
eeepc-laptop: right parent device

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: rfkill refactoring
Corentin Chary [Sun, 27 Sep 2009 19:02:09 +0000 (21:02 +0200)]
eeepc-laptop: rfkill refactoring

Refactor rfkill code, because we'll add another
rfkill for wwan3g later.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: fix pr_fmt patch
Corentin Chary [Sun, 27 Sep 2009 18:48:05 +0000 (20:48 +0200)]
eeepc-laptop: fix pr_fmt patch

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
14 years agoeeepc-laptop.c: use pr_fmt and pr_<level>
Joe Perches [Thu, 25 Jun 2009 11:25:37 +0000 (13:25 +0200)]
eeepc-laptop.c: use pr_fmt and pr_<level>

Convert the unusual printk(EEEPC_<level> uses to
the more standard pr_fmt and pr_<level>(.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: Register as a pci-hotplug device
Corentin Chary [Sun, 27 Sep 2009 18:42:29 +0000 (20:42 +0200)]
eeepc-laptop: Register as a pci-hotplug device

The eee contains a logically (but not physically) hotpluggable PCIe slot.
Currently this is handled by adding or removing the PCI device in response
to rfkill events, but if a user has forced pciehp to bind to it (with the
force=1 argument) then both drivers will try to handle the event and
hilarity (in the form of oopses) will ensue. This can be avoided by having
eee-laptop register the slot as a hotplug slot. Only one of pciehp and
eee-laptop will successfully register this, avoiding the problem.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Tested-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: cpufv updates
Corentin Chary [Tue, 16 Jun 2009 19:28:56 +0000 (19:28 +0000)]
eeepc-laptop: cpufv updates

Limit cpufv input to acceptables values.
Add an available_cpufv file to show available
presets.
Change cpufv ouput format from %d to %#x, it won't
break compatibility with existing userspace tools, but
it provide a more human readable output.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: sync eeepc-laptop with asus_acpi
Corentin Chary [Tue, 16 Jun 2009 19:28:52 +0000 (19:28 +0000)]
eeepc-laptop: sync eeepc-laptop with asus_acpi

In the default Eee PC distribution, there is a modified
asus_acpi driver. eeepc-laptop is a cleaned version of this
driver. Sync ASL enum and getter/setters with asus_acpi.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: enable camera by default
Corentin Chary [Sun, 27 Sep 2009 18:39:04 +0000 (20:39 +0200)]
eeepc-laptop: enable camera by default

If we leave the camera disabled by default, userspace programs (e.g.
Skype, Cheese) leave the user out in the cold saying that the machine
"has no camera." Therefore, it's better to enable camera by default and
let people who really don't want it just disable the thing.

To reduce power usage you should enable USB autosuspend:
echo -n auto > /sys/bus/usb/drivers/uvcvideo/*:*/../power/level

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: read rfkill soft-blocked state on resume
Corentin Chary [Sun, 27 Sep 2009 18:36:31 +0000 (20:36 +0200)]
eeepc-laptop: read rfkill soft-blocked state on resume

This will respect state changes over hibernation, e.g. if the user
disables the wireless in the BIOS setup screen.

It reveals an issue where ACPI silently kills the wireless on
suspend.  Normally, the BIOS restores the correct state from
non-volatile storage on boot.  But when hibernation is aborted,
the wireless would remain killed.  Fortunately we can work around
this in the resume handler by simply writing back the same value we
read from NVS.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
14 years agoeeepc-laptop: rfkill rewrite
Corentin Chary [Sun, 27 Sep 2009 18:29:37 +0000 (20:29 +0200)]
eeepc-laptop: rfkill rewrite

Make callbacks more generic

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
14 years agoeeepc-laptop: unregister_rfkill_notifier on failure
Corentin Chary [Mon, 27 Apr 2009 07:23:43 +0000 (09:23 +0200)]
eeepc-laptop: unregister_rfkill_notifier on failure

If there is a failure during eeepc_hotk_add() we need
to remove the acpi_notify_handler.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: support for super hybrid engine (SHE)
Grigori Goronzy [Mon, 27 Apr 2009 07:23:40 +0000 (09:23 +0200)]
eeepc-laptop: support for super hybrid engine (SHE)

The older eeepc-acpi driver allowed to control the SHE performance
preset through a ACPI function for just this purpose. SHE underclocks
and undervolts the FSB and undervolts the CPU (at preset 2,
"powersave"), or slightly overclocks the CPU (at preset 0,
"performance"). Preset 1 is the default setting with default clocks and
voltage.

The new eeepc-laptop driver doesn't support it anymore.
The attached patch adds support for it to eeepc-laptop. It's very
straight-forward and almost trivial.

Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: Work around rfkill firmware bug
Alan Jenkins [Mon, 27 Apr 2009 07:23:39 +0000 (09:23 +0200)]
eeepc-laptop: Work around rfkill firmware bug

1) Buggy firmware can change the RFKILL state by itself. This is easily
   detected.  The RFKILL API states that in such cases, we should call
   rfkill_force_state() to notify the core.

   I have reported the bug to Asus. I believe this is the right thing
   to do for robustness, even if this particular firmware bug is fixed.

2) The same bug causes the wireless toggle key to be reported as 0x11
   instead of 0x10.  0x11 is otherwise unused, so it should be safe to
   add this as a new keycode.

The bug is triggered by removing the laptop battery while hibernated.

On resume, the wireless toggle key causes the firmware to toggle the
wireless state itself.  (Also, the key is reported as 0x11 when the
current wireless state is OFF).

This is very poor behaviour because the OS can't predict whether the
firmware is controlling the RFKILL state.

Without this workaround, the bug means users have to press the wireless
toggle key twice to enable, due to the OS/firmware conflict.  (Assuming
rfkill-input or equivalent is being used).  The workaround avoids this.

I believe that acpid scripts which toggle the value of the sysfs state file
when the toggle key is pressed will be rendered ineffective by the bug,
regardless of this workaround.  If they simply toggle the state, when the
firmware has already toggled it, then you will never see a state change.

Tested on "EEEPC 4G" only.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: report brightness control events via the input layer
Darren Salt [Mon, 27 Apr 2009 07:23:38 +0000 (09:23 +0200)]
eeepc-laptop: report brightness control events via the input layer

This maps the brightness control events to one of two keys, either
KEY_BRIGHTNESSDOWN or KEY_BRIGHTNESSUP, as needed.

Some mapping has to be done due to the fact that the BIOS reports them as
<base value> + <current brightness index>; the selection is done according to
the sign of the change in brightness (if this is 0, no keypress is reported).

(Ref. http://lists.alioth.debian.org/pipermail/debian-eeepc-devel/2009-April/002001.html)

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoeeepc-laptop: fix wlan rfkill state change during init
Alan Jenkins [Mon, 27 Apr 2009 07:23:37 +0000 (09:23 +0200)]
eeepc-laptop: fix wlan rfkill state change during init

When an rfkill device is registered, the rfkill core will change its
state to the system default. So we need to prepare for state changes
*before* we register it. That means installing the eeepc-specific ACPI
callback which handles the hotplug of the wireless network adaptor.

This problem doesn't occur during normal operation.  You have to

1) Boot with wireless enabled. eeepc-laptop should load automatically.
2) modprobe -r eeepc-laptop
3) modprobe eeepc-laptop

On boot, the default rfkill state will be set to enabled.
With the current core code, step 2) will disable the wireless.
Therefore in step 3), the wireless will change state during registration,
from disabled to enabled.  But without this fix, the PCI device for the
wireless adaptor will not appear.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agomisc: apanic: erase kpanic when no data
Tom Zhu [Thu, 24 Sep 2009 15:58:50 +0000 (10:58 -0500)]
misc: apanic: erase kpanic when no data

erase kpanic partition when there is no data(console and thread)

Signed-off-by: Tom Zhu <a2289c@android-hal-04.(none)>
Signed-off-by: San Mehat <san@google.com>
14 years agoBluetooth: Fix connection establishment with low security requirement
Marcel Holtmann [Tue, 28 Apr 2009 16:04:55 +0000 (09:04 -0700)]
Bluetooth: Fix connection establishment with low security requirement

The Bluetooth 2.1 specification introduced four different security modes
that can be mapped using Legacy Pairing and Simple Pairing. With the
usage of Simple Pairing it is required that all connections (except
the ones for SDP) are encrypted. So even the low security requirement
mandates an encrypted connection when using Simple Pairing. When using
Legacy Pairing (for Bluetooth 2.0 devices and older) this is not required
since it causes interoperability issues.

To support this properly the low security requirement translates into
different host controller transactions depending if Simple Pairing is
supported or not. However in case of Simple Pairing the command to
switch on encryption after a successful authentication is not triggered
for the low security mode. This patch fixes this and actually makes
the logic to differentiate between Simple Pairing and Legacy Pairing
a lot simpler.

Based on a report by Ville Tervo <ville.tervo@nokia.com>

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agomisc: apanic: Improved bad-block / watchdog handling
Tom Zhu [Tue, 22 Sep 2009 21:36:45 +0000 (16:36 -0500)]
misc: apanic: Improved bad-block / watchdog handling

1. handle cases that there is no more good blocks
2. touch softlockup watchdog at the start of apanic
3. change unsigned char get_bb() to unsigned int get_bb()
4. return idx instead of rc2, to keep the previous written pages.

Signed-off-by: Tom Zhu <ling.zhu@motorola.com>
Signed-off-by: San Mehat <san@google.com>
14 years agoBluetooth: Fallback to SCO on error code 0x10 (Connection Accept Timeout).
Nick Pelly [Tue, 22 Sep 2009 22:19:46 +0000 (15:19 -0700)]
Bluetooth: Fallback to SCO on error code 0x10 (Connection Accept Timeout).

This is to support the Motorola HF850 carkit which reports the error code 0x10
for an eSCO attempt, even though it advertises eSCO support. Here is the
hcidump:

2009-09-22 15:40:24.492391 < HCI Command: Setup Synchronous Connection
(0x01|0x0028) plen 17
    handle 1 voice setting 0x0060
2009-09-22 15:40:24.493002 > HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
2009-09-22 15:40:30.594869 > HCI Event: Synchronous Connect Complete (0x2c)
plen 17
    status 0x10 handle 257 bdaddr 00:50:CD:20:C6:84 type eSCO
    Error: Connection Accept Timeout Exceeded

With this patch we will retry with a SCO connection, which succeeds.

Unfortunately the Moto HF850 also takes 5 seconds to return the error for the
eSCO attempt, so it will still take 5 seconds to fallback to SCO with this
patch.

Signed-off-by: Nick Pelly <npelly@google.com>
14 years agoBluetooth: Do not call rfcomm_session_put() due to RFCOMM UA on closed socket.
Nick Pelly [Tue, 22 Sep 2009 01:20:03 +0000 (18:20 -0700)]
Bluetooth: Do not call rfcomm_session_put() due to RFCOMM UA on closed socket.

Processing a RFCOMM UA frame when the socket is closed and we were not the
RFCOMM initiator would cause rfcomm_session_put() to be called twice during
rfcomm_process_rx(). This would cause a kernel panic in rfcomm_session_close.

This could be easily reproduced during disconnect with devices such as
Motorola H270 that send RFCOMM UA followed quickly by L2CAP disconnect request.
This hcidump for this looks like:

2009-09-21 17:22:37.788895 < ACL data: handle 1 flags 0x02 dlen 8
   L2CAP(d): cid 0x0041 len 4 [psm 3]
     RFCOMM(s): DISC: cr 0 dlci 20 pf 1 ilen 0 fcs 0x7d
2009-09-21 17:22:37.906204 > HCI Event: Number of Completed Packets (0x13)
plen 5
   handle 1 packets 1
2009-09-21 17:22:37.933090 > ACL data: handle 1 flags 0x02 dlen 8
   L2CAP(d): cid 0x0040 len 4 [psm 3]
     RFCOMM(s): UA: cr 0 dlci 20 pf 1 ilen 0 fcs 0x57
2009-09-21 17:22:38.636764 < ACL data: handle 1 flags 0x02 dlen 8
   L2CAP(d): cid 0x0041 len 4 [psm 3]
     RFCOMM(s): DISC: cr 0 dlci 0 pf 1 ilen 0 fcs 0x9c
2009-09-21 17:22:38.744125 > HCI Event: Number of Completed Packets (0x13)
plen 5
   handle 1 packets 1
2009-09-21 17:22:38.763687 > ACL data: handle 1 flags 0x02 dlen 8
   L2CAP(d): cid 0x0040 len 4 [psm 3]
     RFCOMM(s): UA: cr 0 dlci 0 pf 1 ilen 0 fcs 0xb6
2009-09-21 17:22:38.783554 > ACL data: handle 1 flags 0x02 dlen 12
   L2CAP(s): Disconn req: dcid 0x0040 scid 0x0041

Avoid calling rfcomm_session_put() twice by skipping this call
in rfcomm_recv_ua() if the socket is closed.

Signed-off-by: Nick Pelly <npelly@google.com>
14 years agoRevert "Bluetooth: Fix kernel panic while disconnecting RFCOMM"
Nick Pelly [Tue, 22 Sep 2009 00:52:19 +0000 (17:52 -0700)]
Revert "Bluetooth: Fix kernel panic while disconnecting RFCOMM"

This reverts commit 6f505dbe5337e49302574f8d2e65fd83e30f9117.

Unfortunately this fix did not address the unbalanced rfcomm_session_put()
call, and panics during this disconnect sequence (with Moto H270)

2009-09-21 17:22:37.384811 < ACL data: handle 1 flags 0x02 dlen 22
   L2CAP(d): cid 0x0041 len 18 [psm 3]
     RFCOMM(d): UIH: cr 0 dlci 20 pf 0 ilen 14 fcs 0xeb
     0000: 0d 0a 2b 43 49 45 56 3a  20 37 2c 33 0d 0a        ..+CIEV: 7,3..
2009-09-21 17:22:37.502273 > HCI Event: Number of Completed Packets
(0x13) plen 5
   handle 1 packets 1
2009-09-21 17:22:37.788895 < ACL data: handle 1 flags 0x02 dlen 8
   L2CAP(d): cid 0x0041 len 4 [psm 3]
     RFCOMM(s): DISC: cr 0 dlci 20 pf 1 ilen 0 fcs 0x7d
2009-09-21 17:22:37.906204 > HCI Event: Number of Completed Packets
(0x13) plen 5
   handle 1 packets 1
2009-09-21 17:22:37.933090 > ACL data: handle 1 flags 0x02 dlen 8
   L2CAP(d): cid 0x0040 len 4 [psm 3]
     RFCOMM(s): UA: cr 0 dlci 20 pf 1 ilen 0 fcs 0x57
2009-09-21 17:22:38.636764 < ACL data: handle 1 flags 0x02 dlen 8
   L2CAP(d): cid 0x0041 len 4 [psm 3]
     RFCOMM(s): DISC: cr 0 dlci 0 pf 1 ilen 0 fcs 0x9c
2009-09-21 17:22:38.744125 > HCI Event: Number of Completed Packets
(0x13) plen 5
   handle 1 packets 1
2009-09-21 17:22:38.763687 > ACL data: handle 1 flags 0x02 dlen 8
   L2CAP(d): cid 0x0040 len 4 [psm 3]
     RFCOMM(s): UA: cr 0 dlci 0 pf 1 ilen 0 fcs 0xb6
2009-09-21 17:22:38.783554 > ACL data: handle 1 flags 0x02 dlen 12
   L2CAP(s): Disconn req: dcid 0x0040 scid 0x0041
2009-09-21 17:22:39.029526 < ACL data: handle 1 flags 0x02 dlen 12
   L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0041
2009-09-21 17:22:39.136581 > HCI Event: Number of Completed Packets
(0x13) plen 5
   handle 1 packets 1
2009-09-21 17:22:41.337203 > HCI Event: Disconn Complete (0x05) plen 4
   status 0x00 handle 1 reason 0x13
   Reason: Remote User Terminated Connection

Signed-off-by: Nick Pelly <npelly@google.com>
14 years agomisc: apanic: bad block handling
Tom Zhu [Mon, 21 Sep 2009 21:36:05 +0000 (16:36 -0500)]
misc: apanic: bad block handling

Add bad block handling in apanic

Signed-off-by: Tom Zhu <ling.zhu@motorola.com>
Signed-off-by: San Mehat <san@google.com>
14 years agoBluetooth: Increase timeout for legacy pairing from 10 seconds to 40 seconds.
Nick Pelly [Sat, 19 Sep 2009 01:29:23 +0000 (18:29 -0700)]
Bluetooth: Increase timeout for legacy pairing from 10 seconds to 40 seconds.

Legacy pairing is a bit of a problem because on the incoming end it is
impossible to know pairing has begun:

2009-09-18 18:29:24.115692 > HCI Event: Connect Request (0x04) plen 10
    bdaddr 00:23:D4:04:51:7A class 0x58020c type ACL
2009-09-18 18:29:24.115966 < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:23:D4:04:51:7A role 0x00
    Role: Master
2009-09-18 18:29:24.117065 > HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
2009-09-18 18:29:24.282928 > HCI Event: Role Change (0x12) plen 8
    status 0x00 bdaddr 00:23:D4:04:51:7A role 0x00
    Role: Master
2009-09-18 18:29:24.291534 > HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 1 bdaddr 00:23:D4:04:51:7A type ACL encrypt 0x00
2009-09-18 18:29:24.291839 < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 1
2009-09-18 18:29:24.292144 > HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
    bdaddr 00:23:D4:04:51:7A mode 1
2009-09-18 18:29:24.293823 > HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
2009-09-18 18:29:24.303588 > HCI Event: Max Slots Change (0x1b) plen 3
    handle 1 slots 5
2009-09-18 18:29:24.309448 > HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 1
    Features: 0xff 0xff 0x2d 0xfe 0x9b 0xff 0x79 0x83
2009-09-18 18:29:24.345916 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:23:D4:04:51:7A mode 2 clkoffset 0x0000
2009-09-18 18:29:24.346923 > HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
2009-09-18 18:29:24.375793 > HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:23:D4:04:51:7A name 'test'
2009-09-18 18:29:34.332190 < HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 1 reason 0x13

There are some mainline patches such as "Add different pairing timeout for
Legacy Pairing" but they do not address the HCI sequence above.

I think the real solution is to avoid using CreateBond(), and instead make
the profile connection immediately. This way both sides will use a longer
timeout because there is a higher level connection in progress, and we will
not end up with the useless HCI sequence above.

Signed-off-by: Nick Pelly <npelly@google.com>
14 years agoBluetooth: Ensure that HCI sysfs add/del is preempt safe
Roger Quadros [Thu, 23 Apr 2009 11:50:54 +0000 (14:50 +0300)]
Bluetooth: Ensure that HCI sysfs add/del is preempt safe

Use a different work_struct variables for add_conn() and del_conn() and
use single work queue instead of two for adding and deleting connections.

It eliminates the following error on a preemptible kernel:

[  204.358032] Unable to handle kernel NULL pointer dereference at virtual address 0000000c
[  204.370697] pgd = c0004000
[  204.373443] [0000000c] *pgd=00000000
[  204.378601] Internal error: Oops: 17 [#1] PREEMPT
[  204.383361] Modules linked in: vfat fat rfcomm sco l2cap sd_mod scsi_mod iphb pvr2d drm omaplfb ps
[  204.438537] CPU: 0    Not tainted  (2.6.28-maemo2 #1)
[  204.443664] PC is at klist_put+0x2c/0xb4
[  204.447601] LR is at klist_put+0x18/0xb4
[  204.451568] pc : [<c0270f08>]    lr : [<c0270ef4>]    psr: a0000113
[  204.451568] sp : cf1b3f10  ip : cf1b3f10  fp : cf1b3f2c
[  204.463104] r10: 00000000  r9 : 00000000  r8 : bf08029c
[  204.468353] r7 : c7869200  r6 : cfbe2690  r5 : c78692c8  r4 : 00000001
[  204.474945] r3 : 00000001  r2 : cf1b2000  r1 : 00000001  r0 : 00000000
[  204.481506] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM Segment kernel
[  204.488861] Control: 10c5387d  Table: 887fc018  DAC: 00000017
[  204.494628] Process btdelconn (pid: 515, stack limit = 0xcf1b22e0)

Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoyaffs: Don't update page read and write counts from yaffs_mtdif2.
Arve Hjønnevåg [Thu, 17 Sep 2009 21:52:42 +0000 (14:52 -0700)]
yaffs: Don't update page read and write counts from yaffs_mtdif2.

These counters are now updated from yaffs_nand.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
14 years agoMerge branch 'yaffs' into android-2.6.29
Arve Hjønnevåg [Fri, 18 Sep 2009 19:47:26 +0000 (12:47 -0700)]
Merge branch 'yaffs' into android-2.6.29

Signed-off-by: Arve Hjønnevåg <arve@android.com>
14 years agoRevert "yaffs: Fix yaffs_file_write to not return -ENOSPC when there is nothing to...
Arve Hjønnevåg [Thu, 17 Sep 2009 01:33:46 +0000 (18:33 -0700)]
Revert "yaffs: Fix yaffs_file_write to not return -ENOSPC when there is nothing to write"

This reverts commit 37db7a3d4d75ce64b621484563d852a0813737e1.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
14 years agoramconsole/apanic: Ensure ramconsole does not get cluttered by apanic threads
San Mehat [Thu, 17 Sep 2009 21:27:41 +0000 (14:27 -0700)]
ramconsole/apanic: Ensure ramconsole does not get cluttered by apanic threads

Signed-off-by: San Mehat <san@google.com>
14 years agoRevert "apanic: Send magic sequence to suspend ramconsole before we start dumping...
San Mehat [Thu, 17 Sep 2009 21:18:39 +0000 (14:18 -0700)]
Revert "apanic: Send magic sequence to suspend ramconsole before we start dumping threads"
This reverts commit 5dc3d578c42e291781ea7f7529483253aa4283c9.

Signed-off-by: San Mehat <san@google.com>
14 years agoRevert "ramconsole: Disable console capture upon receiving a magic sequence"
San Mehat [Thu, 17 Sep 2009 21:18:20 +0000 (14:18 -0700)]
Revert "ramconsole: Disable console capture upon receiving a magic sequence"
This reverts commit 70416fa2dd0095639fd9213b6d923ad442d87ec9.

Signed-off-by: San Mehat <san@google.com>
14 years agoapanic: Fix a few cases of calling non-atomic things from atomic
San Mehat [Thu, 17 Sep 2009 21:13:32 +0000 (14:13 -0700)]
apanic: Fix a few cases of calling non-atomic things from atomic

We need to pay special care to not enrage cond_resched(), and the
base nand bb stuff calls schedule() so thats out.

Signed-off-by: San Mehat <san@google.com>
14 years agoyaffs: Import yaffs from Wed Sep 9 03:03:01 2009 +0000
Arve Hjønnevåg [Thu, 17 Sep 2009 01:30:41 +0000 (18:30 -0700)]
yaffs: Import yaffs from Wed Sep 9 03:03:01 2009 +0000

Author: charles <charles>
Date:   Wed Sep 9 03:03:01 2009 +0000

    Rationalise stats gathering for nand access. Does not instrument mounting.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
14 years agoBluetooth: Fix kernel panic while disconnecting RFCOMM
Lan Zhu [Thu, 17 Sep 2009 01:07:25 +0000 (18:07 -0700)]
Bluetooth: Fix kernel panic while disconnecting RFCOMM

rfcomm_session_del() was being called after session entry removed from list.

Signed-off-by: Nick Pelly <npelly@google.com>
14 years agoproc: smaps: Allow smaps access for CAP_SYS_RESOURCE
San Mehat [Wed, 16 Sep 2009 19:39:10 +0000 (12:39 -0700)]
proc: smaps: Allow smaps access for CAP_SYS_RESOURCE

Signed-off-by: San Mehat <san@google.com>
14 years agoapanic: Send magic sequence to suspend ramconsole before we start dumping threads
San Mehat [Mon, 14 Sep 2009 21:53:56 +0000 (14:53 -0700)]
apanic: Send magic sequence to suspend ramconsole before we start dumping threads

Signed-off-by: San Mehat <san@google.com>
14 years agoramconsole: Disable console capture upon receiving a magic sequence
San Mehat [Mon, 14 Sep 2009 21:53:37 +0000 (14:53 -0700)]
ramconsole: Disable console capture upon receiving a magic sequence

Signed-off-by: San Mehat <san@google.com>
14 years agokernel: printk: Add non exported function for clearing the log ring buffer
San Mehat [Thu, 6 Aug 2009 17:25:21 +0000 (10:25 -0700)]
kernel: printk: Add non exported function for clearing the log ring buffer

Signed-off-by: San Mehat <san@google.com>
14 years agousb: gadget: f_mass_storage: Clean up wakelocks on error paths
Rebecca Schultz Zavin [Tue, 25 Aug 2009 22:46:01 +0000 (15:46 -0700)]
usb: gadget: f_mass_storage: Clean up wakelocks on error paths

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
14 years agousb: gadget: f_mass_storage: Handle setup request correctly
James Luan [Fri, 4 Sep 2009 00:47:58 +0000 (19:47 -0500)]
usb: gadget: f_mass_storage: Handle setup request correctly

Signed-off-by: Mike Lockwood <lockwood@android.com>
14 years agodrivers: apanic: Android kernel panic handler.
San Mehat [Tue, 1 Sep 2009 20:43:01 +0000 (13:43 -0700)]
drivers: apanic: Android kernel panic handler.

This driver triggers when the kernel panics and attempts to
write critical debug data to the flash.

Signed-off-by: San Mehat <san@google.com>
drivers: apanic: checkpatch fixes

Signed-off-by: San Mehat <san@google.com>
14 years agolib/genalloc.c: remove unmatched write_lock() in gen_pool_destroy
Zygo Blaxell [Wed, 17 Jun 2009 05:33:57 +0000 (22:33 -0700)]
lib/genalloc.c: remove unmatched write_lock() in gen_pool_destroy

There is a call to write_lock() in gen_pool_destroy which is not balanced
by any corresponding write_unlock().  This causes problems with preemption
because the preemption-disable counter is incremented in the write_lock()
call, but never decremented by any call to write_unlock().  This bug is
gen_pool_destroy, and one of them is non-x86 arch-specific code.

Signed-off-by: Zygo Blaxell <zygo.blaxell@xandros.com>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agousb: gadget: mass_storage: Fix Mass Storage Panic during PC reboot
Jared Suttles [Fri, 28 Aug 2009 21:53:32 +0000 (16:53 -0500)]
usb: gadget: mass_storage: Fix Mass Storage Panic during PC reboot

Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
14 years agopower: wakelocks: fix buffer overflow in print_wake_locks
Erik Gilling [Wed, 26 Aug 2009 03:09:12 +0000 (20:09 -0700)]
power: wakelocks: fix buffer overflow in print_wake_locks

Change-Id: Ic944e3b3d3bc53eddc6fd0963565fd072cac373c
Signed-off-by: Erik Gilling <konkers@android.com>
14 years agopower: Prevent spinlock recursion when wake_unlock() is called
Mike Chan [Wed, 26 Aug 2009 01:10:32 +0000 (18:10 -0700)]
power: Prevent spinlock recursion when wake_unlock() is called

Signed-off-by: Mike Chan <mike@android.com>
14 years ago[ARM] process: Add display of memory around registers when displaying regs.
San Mehat [Tue, 25 Aug 2009 23:52:22 +0000 (16:52 -0700)]
[ARM] process: Add display of memory around registers when displaying regs.

This is extremely useful in diagnosing remote crashes, and is based heavily
on original work by <md@google.com>.

Signed-off-by: San Mehat <san@google.com>
Cc: Michael Davidson <md@google.com>
14 years agonet: ipv4: Fix a spinlock recursion bug in tcp_v4_nuke.
Dima Zavin [Thu, 20 Aug 2009 20:21:24 +0000 (13:21 -0700)]
net: ipv4: Fix a spinlock recursion bug in tcp_v4_nuke.

We can't hold the lock while calling to tcp_done(), so we drop
it before calling. We then have to start at the top of the chain again.

Signed-off-by: Dima Zavin <dima@android.com>
14 years agoFAT: add 'errors' mount option
Denis Karpov [Wed, 3 Jun 2009 17:34:22 +0000 (02:34 +0900)]
FAT: add 'errors' mount option

On severe errors FAT remounts itself in read-only mode. Allow to
specify FAT fs desired behavior through 'errors' mount option:
panic, continue or remount read-only.

`mount -t [fat|vfat] -o errors=[panic,remount-ro,continue] \
<bdev> <mount point>`

This is analog to ext2 fs 'errors' mount option.

Signed-off-by: Denis Karpov <ext-denis.2.karpov@nokia.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>