summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle McMartin <kyle@redhat.com>2010-12-09 13:52:05 -0500
committerKyle McMartin <kyle@redhat.com>2010-12-09 13:52:05 -0500
commiteae11717a184705aad08a3783cba964bfa3a06dd (patch)
tree1eea57a2c772ec5b31389a2ef568056b48b4c75e
parent72b3729657a0c46f187e4a6c500b239a0e4d391a (diff)
parentcbb00197b664276f98b22d0531c342231d4d6ae0 (diff)
downloadkernel-eae11717a184705aad08a3783cba964bfa3a06dd.tar.gz
kernel-eae11717a184705aad08a3783cba964bfa3a06dd.tar.xz
kernel-eae11717a184705aad08a3783cba964bfa3a06dd.zip
Merge branch 'kernel-git'
-rw-r--r--.gitignore4
-rw-r--r--Makefile10
-rw-r--r--acpi-ec-add-delay-before-write.patch5
-rw-r--r--acpi-update-battery-information-on-notification-0x81.patch4
-rw-r--r--add-macbookair3-ids.patch264
-rw-r--r--btusb-macbookpro-6-2.patch41
-rw-r--r--btusb-macbookpro-7-1.patch42
-rw-r--r--config-arm7
-rw-r--r--config-debug6
-rw-r--r--config-generic115
-rw-r--r--config-nodebug100
-rw-r--r--config-powerpc-generic2
-rw-r--r--config-s390x5
-rw-r--r--config-sparc64-generic2
-rw-r--r--config-x86-generic21
-rw-r--r--config-x86_64-generic20
-rw-r--r--debug-tty-print-dev-name.patch14
-rw-r--r--drm-i915-reprogram-power-monitoring-registers-on-resume.patch49
-rw-r--r--drm-intel-big-hammer.patch21
-rw-r--r--drm-intel-edp-fixes.patch44
-rw-r--r--drm-intel-make-lvds-work.patch22
-rw-r--r--fix-i8k-inline-asm.patch84
-rw-r--r--hdpvr-ir-enable.patch15
-rw-r--r--inet_diag-make-sure-we-run-the-same-bytecode-we-audited.patch105
-rw-r--r--kernel.spec296
-rw-r--r--linux-2.6-32bit-mmap-exec-randomization.patch2
-rw-r--r--linux-2.6-bluetooth-autosuspend.patch159
-rw-r--r--linux-2.6-crash-driver.patch24
-rw-r--r--linux-2.6-enable-more-pci-autosuspend.patch276
-rw-r--r--linux-2.6-i386-nx-emulation.patch2
-rw-r--r--linux-2.6-qcserial-autosuspend.patch23
-rw-r--r--linux-2.6-utrace-ptrace.patch35
-rw-r--r--linux-2.6-utrace.patch6
-rw-r--r--linux-2.6-uvc-autosuspend.patch22
-rw-r--r--netlink-make-nlmsg_find_attr-take-a-const-ptr.patch29
-rw-r--r--pci-crs-fixes.patch593
-rw-r--r--pnp-log-pnp-resources-as-we-do-for-pci.patch84
-rw-r--r--posix-cpu-timers-workaround-to-suppress-problems-with-mt-exec.patch60
-rw-r--r--runtime_pm_fixups.patch2
-rw-r--r--sources4
-rw-r--r--tpm-autodetect-itpm-devices.patch65
-rw-r--r--tty-icount-changeover-for-other-main-devices.patch980
-rw-r--r--tty-make-tiocgicount-a-handler.patch218
-rw-r--r--wacom-01-add-fuzz-parameters-to-features.patch69
-rw-r--r--wacom-02-parse-the-bamboo-device-family.patch122
-rw-r--r--wacom-03-collect-device-quirks-into-single-function.patch107
-rw-r--r--wacom-04-add-support-for-the-bamboo-touch-trackpad.patch172
-rw-r--r--wacom-05-add-a-quirk-for-low-resolution-bamboo-devices.patch69
-rw-r--r--wacom-06-request-tablet-data-for-bamboo-pens.patch55
-rw-r--r--wacom-07-move-bamboo-touch-irq-to-its-own-function.patch52
-rw-r--r--wacom-08-add-support-for-bamboo-pen.patch130
-rw-r--r--wacom-09-disable-bamboo-touchpad-when-pen-is-being-used.patch31
-rw-r--r--x86-never-alloc-pci-from-the-last-1M-below-4G.patch64
-rw-r--r--xhci_hcd-suspend-resume.patch1289
54 files changed, 543 insertions, 5499 deletions
diff --git a/.gitignore b/.gitignore
index 8ee6321e0..05a9df52c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,5 +3,5 @@ patch-*.bz2
clog
*.rpm
kernel-2.6.*/
-/patch-2.6.36.1.bz2
-/patch-2.6.36.2-rc1.bz2
+/patch-2.6.37-rc5.bz2
+/patch-2.6.37-rc5-git2.bz2
diff --git a/Makefile b/Makefile
index f925397d1..ca62cce42 100644
--- a/Makefile
+++ b/Makefile
@@ -77,12 +77,13 @@ debug:
@perl -pi -e 's/# CONFIG_DEBUG_CFQ_IOSCHED is not set/CONFIG_DEBUG_CFQ_IOSCHED=y/' config-nodebug
@perl -pi -e 's/# CONFIG_DRBD_FAULT_INJECTION is not set/CONFIG_DRBD_FAULT_INJECTION=y/' config-nodebug
@perl -pi -e 's/# CONFIG_ATH_DEBUG is not set/CONFIG_ATH_DEBUG=y/' config-nodebug
+ @perl -pi -e 's/# CONFIG_CARL9170_DEBUGFS is not set/CONFIG_CARL9170_DEBUGFS=y/' config-nodebug
@perl -pi -e 's/# CONFIG_IWLWIFI_DEVICE_TRACING is not set/CONFIG_IWLWIFI_DEVICE_TRACING=y/' config-nodebug
@perl -pi -e 's/# CONFIG_DEBUG_OBJECTS_WORK is not set/CONFIG_DEBUG_OBJECTS_WORK=y/' config-nodebug
@perl -pi -e 's/# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set/CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y/' config-nodebug
@perl -pi -e 's/# CONFIG_DMADEVICES_DEBUG is not set/CONFIG_DMADEVICES_DEBUG=y/' config-nodebug
@perl -pi -e 's/# CONFIG_DMADEVICES_VDEBUG is not set/CONFIG_DMADEVICES_VDEBUG=y/' config-nodebug
- @perl -pi -e 's/# CONFIG_CEPH_FS_PRETTYDEBUG is not set/CONFIG_CEPH_FS_PRETTYDEBUG=y/' config-nodebug
+ @perl -pi -e 's/# CONFIG_CEPH_LIB_PRETTYDEBUG is not set/CONFIG_CEPH_LIB_PRETTYDEBUG=y/' config-nodebug
@perl -pi -e 's/# CONFIG_QUOTA_DEBUG is not set/CONFIG_QUOTA_DEBUG=y/' config-nodebug
@perl -pi -e 's/# CONFIG_KGDB_KDB is not set/CONFIG_KGDB_KDB=y/' config-nodebug
@perl -pi -e 's/# CONFIG_KDB_KEYBOARD is not set/CONFIG_KDB_KEYBOARD=y/' config-nodebug
@@ -90,6 +91,8 @@ debug:
@perl -pi -e 's/# CONFIG_DEBUG_PER_CPU_MAPS is not set/CONFIG_DEBUG_PER_CPU_MAPS=y/' config-nodebug
@perl -pi -e 's/CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y/# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set/' config-nodebug
#@perl -pi -e 's/# CONFIG_PCI_DEFAULT_USE_CRS is not set/CONFIG_PCI_DEFAULT_USE_CRS=y/' config-nodebug
+ @perl -pi -e 's/# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set/CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y/' config-nodebug
+ @perl -pi -e 's/# CONFIG_TEST_LIST_SORT is not set/CONFIG_TEST_LIST_SORT=y/' config-nodebug
@# just in case we're going from extremedebug -> debug
@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
@@ -151,12 +154,13 @@ release:
@perl -pi -e 's/CONFIG_DEBUG_CFQ_IOSCHED=y/# CONFIG_DEBUG_CFQ_IOSCHED is not set/' config-nodebug
@perl -pi -e 's/CONFIG_DRBD_FAULT_INJECTION=y/# CONFIG_DRBD_FAULT_INJECTION is not set/' config-nodebug
@perl -pi -e 's/CONFIG_ATH_DEBUG=y/# CONFIG_ATH_DEBUG is not set/' config-nodebug
+ @perl -pi -e 's/CONFIG_CARL9170_DEBUGFS=y/# CONFIG_CARL9170_DEBUGFS is not set/' config-nodebug
@perl -pi -e 's/CONFIG_IWLWIFI_DEVICE_TRACING=y/# CONFIG_IWLWIFI_DEVICE_TRACING is not set/' config-nodebug
@perl -pi -e 's/CONFIG_DEBUG_OBJECTS_WORK=y/# CONFIG_DEBUG_OBJECTS_WORK is not set/' config-nodebug
@perl -pi -e 's/CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y/# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set/' config-nodebug
@perl -pi -e 's/CONFIG_DMADEVICES_DEBUG=y/# CONFIG_DMADEVICES_DEBUG is not set/' config-nodebug
@perl -pi -e 's/CONFIG_DMADEVICES_VDEBUG=y/# CONFIG_DMADEVICES_VDEBUG is not set/' config-nodebug
- @perl -pi -e 's/CONFIG_CEPH_FS_PRETTYDEBUG=y/# CONFIG_CEPH_FS_PRETTYDEBUG is not set/' config-nodebug
+ @perl -pi -e 's/CONFIG_CEPH_LIB_PRETTYDEBUG=y/# CONFIG_CEPH_LIB_PRETTYDEBUG is not set/' config-nodebug
@perl -pi -e 's/CONFIG_QUOTA_DEBUG=y/# CONFIG_QUOTA_DEBUG is not set/' config-nodebug
@perl -pi -e 's/CONFIG_CPU_NOTIFIER_ERROR_INJECT=m/# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set/' config-nodebug
#@perl -pi -e 's/CONFIG_KGDB_KDB=y/# CONFIG_KGDB_KDB is not set/' config-nodebug
@@ -164,6 +168,8 @@ release:
@perl -pi -e 's/CONFIG_DEBUG_PER_CPU_MAPS=y/# CONFIG_DEBUG_PER_CPU_MAPS is not set/' config-nodebug
@perl -pi -e 's/# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set/CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y/' config-nodebug
#@perl -pi -e 's/CONFIG_PCI_DEFAULT_USE_CRS=y/# CONFIG_PCI_DEFAULT_USE_CRS is not set/' config-nodebug
+ @perl -pi -e 's/CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y/# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set/' config-nodebug
+ @perl -pi -e 's/CONFIG_TEST_LIST_SORT=y/# CONFIG_TEST_LIST_SORT is not set/' config-nodebug
@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-debug
@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
diff --git a/acpi-ec-add-delay-before-write.patch b/acpi-ec-add-delay-before-write.patch
index af49cccbd..f1cb50817 100644
--- a/acpi-ec-add-delay-before-write.patch
+++ b/acpi-ec-add-delay-before-write.patch
@@ -23,7 +23,7 @@ index 27e0b92..09fbb69 100644
pr_debug(PREFIX "controller reset, restart transaction\n");
spin_lock_irqsave(&ec->curr_lock, flags);
start_transaction(ec);
-@@ -271,15 +272,25 @@ static int ec_check_ibf0(struct acpi_ec *ec)
+@@ -271,15 +272,24 @@ static int ec_check_ibf0(struct acpi_ec *ec)
return (status & ACPI_EC_FLAG_IBF) == 0;
}
@@ -38,8 +38,7 @@ index 27e0b92..09fbb69 100644
+
static int ec_wait_ibf0(struct acpi_ec *ec)
{
-+
- unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
+ unsigned long delay = jiffies + msecs_to_jiffies(ec_delay);
/* interrupt wait manually if GPE mode is not active */
while (time_before(jiffies, delay))
if (wait_event_timeout(ec->wait, ec_check_ibf0(ec),
diff --git a/acpi-update-battery-information-on-notification-0x81.patch b/acpi-update-battery-information-on-notification-0x81.patch
index 3a8d619ce..3704b054d 100644
--- a/acpi-update-battery-information-on-notification-0x81.patch
+++ b/acpi-update-battery-information-on-notification-0x81.patch
@@ -56,9 +56,9 @@ index 95649d3..2a774a8 100644
}
@@ -914,7 +923,8 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)
- #ifdef CONFIG_ACPI_SYSFS_POWER
+ if (!battery)
+ return;
old = battery->bat.dev;
- #endif
- acpi_battery_update(battery);
+ acpi_battery_update(battery, (event == ACPI_BATTERY_NOTIFY_INFO ? true
+ : false));
diff --git a/add-macbookair3-ids.patch b/add-macbookair3-ids.patch
deleted file mode 100644
index b512eeaa2..000000000
--- a/add-macbookair3-ids.patch
+++ /dev/null
@@ -1,264 +0,0 @@
-diff -uNrp kernel-2.6.35.fc14.orig/drivers/bluetooth/btusb.c kernel-2.6.35.fc14.new/drivers/bluetooth/btusb.c
---- kernel-2.6.35.fc14.orig/drivers/bluetooth/btusb.c 2010-11-12 12:35:49.390791080 +0100
-+++ kernel-2.6.35.fc14.new/drivers/bluetooth/btusb.c 2010-11-12 12:48:22.090611963 +0100
-@@ -68,6 +68,9 @@ static struct usb_device_id btusb_table[
- /* Apple MacBookPro6,2 */
- { USB_DEVICE(0x05ac, 0x8218) },
-
-+ /* Apple MacBookAir3,1, MacBookAir3,2 */
-+ { USB_DEVICE(0x05ac, 0x821b) },
-+
- /* AVM BlueFRITZ! USB v2.0 */
- { USB_DEVICE(0x057c, 0x3800) },
-
-diff -uNrp kernel-2.6.35.fc14.orig/drivers/hid/hid-apple.c kernel-2.6.35.fc14.new/drivers/hid/hid-apple.c
---- kernel-2.6.35.fc14.orig/drivers/hid/hid-apple.c 2010-11-12 12:35:49.153805968 +0100
-+++ kernel-2.6.35.fc14.new/drivers/hid/hid-apple.c 2010-11-12 12:48:35.689816431 +0100
-@@ -59,6 +59,27 @@ struct apple_key_translation {
- u8 flags;
- };
-
-+static const struct apple_key_translation macbookair_fn_keys[] = {
-+ { KEY_BACKSPACE, KEY_DELETE },
-+ { KEY_ENTER, KEY_INSERT },
-+ { KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
-+ { KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY },
-+ { KEY_F3, KEY_SCALE, APPLE_FLAG_FKEY },
-+ { KEY_F4, KEY_DASHBOARD, APPLE_FLAG_FKEY },
-+ { KEY_F6, KEY_PREVIOUSSONG, APPLE_FLAG_FKEY },
-+ { KEY_F7, KEY_PLAYPAUSE, APPLE_FLAG_FKEY },
-+ { KEY_F8, KEY_NEXTSONG, APPLE_FLAG_FKEY },
-+ { KEY_F9, KEY_MUTE, APPLE_FLAG_FKEY },
-+ { KEY_F10, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY },
-+ { KEY_F11, KEY_VOLUMEUP, APPLE_FLAG_FKEY },
-+ { KEY_F12, KEY_EJECTCD, APPLE_FLAG_FKEY },
-+ { KEY_UP, KEY_PAGEUP },
-+ { KEY_DOWN, KEY_PAGEDOWN },
-+ { KEY_LEFT, KEY_HOME },
-+ { KEY_RIGHT, KEY_END },
-+ { }
-+};
-+
- static const struct apple_key_translation apple_fn_keys[] = {
- { KEY_BACKSPACE, KEY_DELETE },
- { KEY_ENTER, KEY_INSERT },
-@@ -157,10 +178,14 @@ static int hidinput_apple_event(struct h
- if (fnmode) {
- int do_translate;
-
-- trans = apple_find_translation((hid->product < 0x21d ||
-+ if(hid->product >= 0x023f && hid->product <= 0x0244 ) {
-+ trans = apple_find_translation(macbookair_fn_keys, usage->code);
-+ } else {
-+ trans = apple_find_translation((hid->product < 0x21d ||
- hid->product >= 0x300) ?
- powerbook_fn_keys : apple_fn_keys,
- usage->code);
-+ }
- if (trans) {
- if (test_bit(usage->code, asc->pressed_fn))
- do_translate = 1;
-@@ -435,6 +460,18 @@ static const struct hid_device_id apple_
- .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS),
- .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI),
-+ .driver_data = APPLE_HAS_FN },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ISO),
-+ .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_JIS),
-+ .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI),
-+ .driver_data = APPLE_HAS_FN },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO),
-+ .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS),
-+ .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
-diff -uNrp kernel-2.6.35.fc14.orig/drivers/hid/hid-core.c kernel-2.6.35.fc14.new/drivers/hid/hid-core.c
---- kernel-2.6.35.fc14.orig/drivers/hid/hid-core.c 2010-11-12 12:35:49.153805968 +0100
-+++ kernel-2.6.35.fc14.new/drivers/hid/hid-core.c 2010-11-12 12:48:35.690816373 +0100
-@@ -1273,6 +1273,12 @@ static const struct hid_device_id hid_bl
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ISO) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_JIS) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) },
- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
-@@ -1738,6 +1744,12 @@ static const struct hid_device_id hid_mo
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_ISO) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4_JIS) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
- { }
-diff -uNrp kernel-2.6.35.fc14.orig/drivers/hid/hid-ids.h kernel-2.6.35.fc14.new/drivers/hid/hid-ids.h
---- kernel-2.6.35.fc14.orig/drivers/hid/hid-ids.h 2010-11-12 12:35:49.153805968 +0100
-+++ kernel-2.6.35.fc14.new/drivers/hid/hid-ids.h 2010-11-12 12:48:35.691816314 +0100
-@@ -93,6 +93,12 @@
- #define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236
- #define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237
- #define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI 0x023f
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4_ISO 0x0240
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4_JIS 0x0241
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244
- #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239
- #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a
- #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b
-diff -uNrp kernel-2.6.35.fc14.orig/drivers/hwmon/applesmc.c kernel-2.6.35.fc14.new/drivers/hwmon/applesmc.c
---- kernel-2.6.35.fc14.orig/drivers/hwmon/applesmc.c 2010-11-12 12:35:49.618776754 +0100
-+++ kernel-2.6.35.fc14.new/drivers/hwmon/applesmc.c 2010-11-13 12:25:05.810472278 +0100
-@@ -162,6 +162,10 @@ static const char *temperature_sensors_s
- /* Set 22: MacBook Pro 7,1 */
- { "TB0T", "TB1T", "TB2T", "TC0D", "TC0P", "TN0D", "TN0P", "TN0S",
- "TN1D", "TN1F", "TN1G", "TN1S", "Th1H", "Ts0P", "Ts0S", NULL },
-+/* Set 23: MacBook Air 3,1 */
-+ { "TB0T", "TB1T", "TB2T", "TC0D", "TC0E", "TC0P", "TC1E", "TCZ3",
-+ "TCZ4", "TCZ5", "TG0E", "TG1E", "TG2E", "TGZ3", "TGZ4", "TGZ5",
-+ "TH0F", "TH0O", "TM0P" },
- };
-
- /* List of keys used to read/write fan speeds */
-@@ -1524,11 +1528,21 @@ static __initdata struct dmi_match_data
- { .accelerometer = 1, .light = 1, .temperature_set = 21 },
- /* MacBook Pro 7,1: accelerometer, backlight and temperature set 22 */
- { .accelerometer = 1, .light = 1, .temperature_set = 22 },
-+/* MacBook Air 3,1: accelerometer, backlight and temperature set 15 */
-+ { .accelerometer = 0, .light = 0, .temperature_set = 23 },
- };
-
- /* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
- * So we need to put "Apple MacBook Pro" before "Apple MacBook". */
- static __initdata struct dmi_system_id applesmc_whitelist[] = {
-+ { applesmc_dmi_match, "Apple MacBook Air 3", {
-+ DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
-+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir3,2") },
-+ &applesmc_dmi_data[23]},
-+ { applesmc_dmi_match, "Apple MacBook Air 3", {
-+ DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
-+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir3,1") },
-+ &applesmc_dmi_data[23]},
- { applesmc_dmi_match, "Apple MacBook Air 2", {
- DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
- DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir2") },
-diff -uNrp kernel-2.6.35.fc14.orig/drivers/input/mouse/bcm5974.c kernel-2.6.35.fc14.new/drivers/input/mouse/bcm5974.c
---- kernel-2.6.35.fc14.orig/drivers/input/mouse/bcm5974.c 2010-11-12 12:35:50.004752503 +0100
-+++ kernel-2.6.35.fc14.new/drivers/input/mouse/bcm5974.c 2010-11-12 12:48:13.140136374 +0100
-@@ -55,6 +55,14 @@
- #define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236
- #define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237
- #define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238
-+/* MacbookAir3,2 (unibody), aka wellspring5 */
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI 0x023f
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4_ISO 0x0240
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4_JIS 0x0241
-+/* MacbookAir3,1 (unibody), aka wellspring4 */
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243
-+#define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244
-
- #define BCM5974_DEVICE(prod) { \
- .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
-@@ -80,6 +88,14 @@ static const struct usb_device_id bcm597
- BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI),
- BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_ISO),
- BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_JIS),
-+ /* MacbookAir3,2 */
-+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI),
-+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_ISO),
-+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_JIS),
-+ /* MacbookAir3,1 */
-+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI),
-+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO),
-+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS),
- /* Terminating entry */
- {}
- };
-@@ -234,6 +250,30 @@ static const struct bcm5974_config bcm59
- { DIM_X, DIM_X / SN_COORD, -4460, 5166 },
- { DIM_Y, DIM_Y / SN_COORD, -75, 6700 }
- },
-+ {
-+ USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI,
-+ USB_DEVICE_ID_APPLE_WELLSPRING4_ISO,
-+ USB_DEVICE_ID_APPLE_WELLSPRING4_JIS,
-+ HAS_INTEGRATED_BUTTON,
-+ 0x84, sizeof(struct bt_data),
-+ 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
-+ { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 },
-+ { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 },
-+ { DIM_X, DIM_X / SN_COORD, -4460, 5166 },
-+ { DIM_Y, DIM_Y / SN_COORD, -75, 6700 }
-+ },
-+ {
-+ USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI,
-+ USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO,
-+ USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS,
-+ HAS_INTEGRATED_BUTTON,
-+ 0x84, sizeof(struct bt_data),
-+ 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
-+ { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 },
-+ { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 },
-+ { DIM_X, DIM_X / SN_COORD, -4460, 5166 },
-+ { DIM_Y, DIM_Y / SN_COORD, -75, 6700 }
-+ },
- {}
- };
-
-diff -uNrp kernel-2.6.35.fc14.orig/drivers/video/backlight/mbp_nvidia_bl.c kernel-2.6.35.fc14.new/drivers/video/backlight/mbp_nvidia_bl.c
---- kernel-2.6.35.fc14.orig/drivers/video/backlight/mbp_nvidia_bl.c 2010-11-12 12:35:49.159805591 +0100
-+++ kernel-2.6.35.fc14.new/drivers/video/backlight/mbp_nvidia_bl.c 2010-11-12 12:48:47.412131884 +0100
-@@ -335,6 +335,24 @@ static const struct dmi_system_id __init
- },
- .driver_data = (void *)&nvidia_chipset_data,
- },
-+ {
-+ .callback = mbp_dmi_match,
-+ .ident = "MacBookAir 3,1",
-+ .matches = {
-+ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
-+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir3,1"),
-+ },
-+ .driver_data = (void *)&nvidia_chipset_data,
-+ },
-+ {
-+ .callback = mbp_dmi_match,
-+ .ident = "MacBookAir 3,2",
-+ .matches = {
-+ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
-+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir3,2"),
-+ },
-+ .driver_data = (void *)&nvidia_chipset_data,
-+ },
- { }
- };
-
-diff -uNrp kernel-2.6.35.fc14.orig/sound/pci/hda/patch_cirrus.c kernel-2.6.35.fc14.new/sound/pci/hda/patch_cirrus.c
---- kernel-2.6.35.fc14.orig/sound/pci/hda/patch_cirrus.c 2010-11-12 12:35:49.005815268 +0100
-+++ kernel-2.6.35.fc14.new/sound/pci/hda/patch_cirrus.c 2010-11-12 12:48:40.379542432 +0100
-@@ -1139,6 +1139,8 @@ static const char *cs420x_models[CS420X_
- static struct snd_pci_quirk cs420x_cfg_tbl[] = {
- SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55),
- SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27),
-+ SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookAir 3,1", CS420X_MBP55),
-+ SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55),
- {} /* terminator */
- };
-
diff --git a/btusb-macbookpro-6-2.patch b/btusb-macbookpro-6-2.patch
deleted file mode 100644
index d65a30960..000000000
--- a/btusb-macbookpro-6-2.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From kernel-bounces@lists.fedoraproject.org Fri Sep 17 17:09:15 2010
-From: Will Woods <wwoods@redhat.com>
-To: Marcel Holtmann <marcel@holtmann.org>
-Subject: [PATCH 2/2] bluetooth: add support for controller in MacBookPro6,2
-Date: Fri, 17 Sep 2010 17:09:21 -0400
-
-Once again the device class is ff(vend.) instead of e0(wlcon).
-
-output from 'usb-devices':
-T: Bus=01 Lev=03 Prnt=03 Port=02 Cnt=03 Dev#= 8 Spd=12 MxCh= 0
-D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
-P: Vendor=05ac ProdID=8218 Rev=00.22
-S: Manufacturer=Apple Inc.
-S: Product=Bluetooth USB Host Controller
-C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
-I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
-I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
-I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
-I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
-
-Signed-off-by: Will Woods <wwoods@redhat.com>
----
- drivers/bluetooth/btusb.c | 3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
-diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
-index eac44e4..320e798 100644
---- a/drivers/bluetooth/btusb.c
-+++ b/drivers/bluetooth/btusb.c
-@@ -65,6 +65,9 @@ static struct usb_device_id btusb_table[] = {
- /* Apple iMac11,1 */
- { USB_DEVICE(0x05ac, 0x8215) },
-
-+ /* Apple MacBookPro6,2 */
-+ { USB_DEVICE(0x05ac, 0x8218) },
-+
- /* AVM BlueFRITZ! USB v2.0 */
- { USB_DEVICE(0x057c, 0x3800) },
-
---
-1.7.2.3
diff --git a/btusb-macbookpro-7-1.patch b/btusb-macbookpro-7-1.patch
deleted file mode 100644
index 3e07dd583..000000000
--- a/btusb-macbookpro-7-1.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From kernel-bounces@lists.fedoraproject.org Fri Sep 17 17:09:18 2010
-From: Will Woods <wwoods@redhat.com>
-To: Marcel Holtmann <marcel@holtmann.org>
-Subject: [PATCH 1/2] bluetooth: add support for controller in MacBookPro7,1
-Date: Fri, 17 Sep 2010 17:09:20 -0400
-
-As with iMac11,1 the device class is ff(vend.) instead of e0(wlcon).
-
-output from 'usb-devices':
-T: Bus=04 Lev=02 Prnt=04 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
-D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
-P: Vendor=05ac ProdID=8213 Rev=01.86
-S: Manufacturer=Apple Inc.
-S: Product=Bluetooth USB Host Controller
-S: SerialNumber=58B0359C28ED
-C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
-I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
-I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
-I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
-I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none)
-
-Signed-off-by: Will Woods <wwoods@redhat.com>
----
- drivers/bluetooth/btusb.c | 3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
-diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
-index d22ce3c..eac44e4 100644
---- a/drivers/bluetooth/btusb.c
-+++ b/drivers/bluetooth/btusb.c
-@@ -59,6 +59,9 @@ static struct usb_device_id btusb_table[] = {
- /* Generic Bluetooth USB device */
- { USB_DEVICE_INFO(0xe0, 0x01, 0x01) },
-
-+ /* Apple MacBookPro7,1 */
-+ { USB_DEVICE(0x05ac, 0x8213) },
-+
- /* Apple iMac11,1 */
- { USB_DEVICE(0x05ac, 0x8215) },
-
---
-1.7.2.3
diff --git a/config-arm b/config-arm
index 8d7e46a49..22335ef40 100644
--- a/config-arm
+++ b/config-arm
@@ -122,3 +122,10 @@ CONFIG_AUTO_ZRELADDR=y
# CONFIG_DEPRECATED_PARAM_STRUCT is not set
# CONFIG_ARM_SP805_WATCHDOG is not set
+
+CONFIG_PM_OPP=y
+
+CONFIG_SECCOMP=y
+CONFIG_STRICT_DEVMEM=y
+
+# CONFIG_AMBA_PL08X is not set
diff --git a/config-debug b/config-debug
index 441445364..5366a8461 100644
--- a/config-debug
+++ b/config-debug
@@ -74,6 +74,7 @@ CONFIG_DEBUG_CFQ_IOSCHED=y
CONFIG_DRBD_FAULT_INJECTION=y
CONFIG_ATH_DEBUG=y
+CONFIG_CARL9170_DEBUGFS=y
CONFIG_IWLWIFI_DEVICE_TRACING=y
CONFIG_DEBUG_OBJECTS_WORK=y
@@ -84,7 +85,7 @@ CONFIG_DMADEVICES_VDEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y
-CONFIG_CEPH_FS_PRETTYDEBUG=y
+CONFIG_CEPH_LIB_PRETTYDEBUG=y
CONFIG_QUOTA_DEBUG=y
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
@@ -93,3 +94,6 @@ CONFIG_PCI_DEFAULT_USE_CRS=y
CONFIG_KGDB_KDB=y
CONFIG_KDB_KEYBOARD=y
+
+CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
+CONFIG_TEST_LIST_SORT=y
diff --git a/config-generic b/config-generic
index 28597be1f..f12c7c7d9 100644
--- a/config-generic
+++ b/config-generic
@@ -119,12 +119,13 @@ CONFIG_PCMCIA_IOCTL=y
CONFIG_PCCARD=y
CONFIG_MMC=m
-CONFIG_MMC_BLOCK_BOUNCE=y
CONFIG_SDIO_UART=m
# CONFIG_MMC_TEST is not set
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_UNSAFE_RESUME is not set
CONFIG_MMC_BLOCK=m
+CONFIG_MMC_BLOCK_MINORS=8
+CONFIG_MMC_BLOCK_BOUNCE=y
CONFIG_MMC_SDHCI=m
CONFIG_MMC_SDHCI_PCI=m
CONFIG_MMC_SDRICOH_CS=m
@@ -134,6 +135,7 @@ CONFIG_MMC_VIA_SDMMC=m
CONFIG_MMC_SDHCI_PLTFM=m
CONFIG_MMC_CB710=m
CONFIG_MMC_RICOH_MMC=y
+CONFIG_MMC_USHC=m
CONFIG_CB710_CORE=m
# CONFIG_CB710_DEBUG is not set
@@ -154,6 +156,7 @@ CONFIG_INFINIBAND_AMSO1100=m
# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
CONFIG_INFINIBAND_CXGB3=m
CONFIG_INFINIBAND_CXGB4=m
+CONFIG_SCSI_CXGB4_ISCSI=m
# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
CONFIG_MLX4_INFINIBAND=m
CONFIG_INFINIBAND_NES=m
@@ -365,6 +368,7 @@ CONFIG_BLK_DEV_DELKIN=m
CONFIG_LBDAF=y
CONFIG_BLK_DEV_BSG=y
CONFIG_BLK_DEV_INTEGRITY=y
+CONFIG_BLK_DEV_THROTTLING=y
#
@@ -759,6 +763,7 @@ CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_NF_SECURITY=m
# CONFIG_IP_PNP is not set
CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE_DEMUX=m
CONFIG_NET_IPGRE=m
CONFIG_NET_IPGRE_BROADCAST=y
CONFIG_IP_MROUTE=y
@@ -797,6 +802,7 @@ CONFIG_IP_VS_SH=m
CONFIG_IP_VS_SED=m
CONFIG_IP_VS_NQ=m
CONFIG_IP_VS_FTP=m
+CONFIG_IP_VS_PE_SIP=m
CONFIG_IPV6=m
CONFIG_IPV6_PRIVACY=y
@@ -1100,6 +1106,7 @@ CONFIG_NET_ACT_NAT=m
CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_ACT_POLICE=m
CONFIG_NET_ACT_SIMP=m
+CONFIG_NET_ACT_CSUM=m
CONFIG_DCB=y
@@ -1150,6 +1157,7 @@ CONFIG_ATM_FORE200E_TX_RETRY=16
CONFIG_ATM_FORE200E_DEBUG=0
CONFIG_ATM_HE=m
+CONFIG_PPTP=m
CONFIG_PPPOATM=m
CONFIG_PPPOL2TP=m
CONFIG_ATM_NICSTAR=m
@@ -1195,6 +1203,7 @@ CONFIG_FIXED_PHY=y
CONFIG_MDIO_BITBANG=m
CONFIG_NATIONAL_PHY=m
CONFIG_ICPLUS_PHY=m
+CONFIG_BCM63XX_PHY=m
CONFIG_LSI_ET1011C_PHY=m
CONFIG_LXT_PHY=m
CONFIG_MARVELL_PHY=m
@@ -1212,6 +1221,12 @@ CONFIG_NET_VENDOR_3COM=y
CONFIG_VORTEX=m
CONFIG_TYPHOON=m
CONFIG_DNET=m
+CONFIG_STMMAC_ETH=m
+# CONFIG_STMMAC_DA is not set
+# CONFIG_STMMAC_DUAL_MAC is not set
+# CONFIG_STMMAC_TIMER is not set
+
+# CONFIG_PCH_GBE is not set
#
# Tulip family network device support
@@ -1329,6 +1344,7 @@ CONFIG_MLX4_EN=m
# CONFIG_MLX4_DEBUG is not set
CONFIG_QLCNIC=m
CONFIG_QLGE=m
+CONFIG_BNA=m
CONFIG_SFC=m
CONFIG_SFC_MTD=y
CONFIG_BE2NET=m
@@ -1408,6 +1424,9 @@ CONFIG_ATH9K=m
CONFIG_ATH9K_DEBUGFS=y
CONFIG_ATH9K_HTC=m
# CONFIG_ATH9K_HTC_DEBUGFS is not set
+CONFIG_ATH9K_RATE_CONTROL=y
+CONFIG_CARL9170=m
+CONFIG_CARL9170_LEDS=y
CONFIG_AT76C50X_USB=m
CONFIG_AIRO=m
CONFIG_AIRO_CS=m
@@ -1415,11 +1434,11 @@ CONFIG_ATMEL=m
CONFIG_B43=m
CONFIG_B43_PCMCIA=y
CONFIG_B43_SDIO=y
-# CONFIG_B43_DEBUG is not set
+CONFIG_B43_DEBUG=y
CONFIG_B43_PHY_LP=y
# CONFIG_B43_FORCE_PIO is not set
CONFIG_B43LEGACY=m
-# CONFIG_B43LEGACY_DEBUG is not set
+CONFIG_B43LEGACY_DEBUG=y
CONFIG_B43LEGACY_DMA=y
CONFIG_B43LEGACY_PIO=y
CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
@@ -1462,6 +1481,7 @@ CONFIG_IWL4965=y
CONFIG_IWL5000=y
CONFIG_IWL3945=m
CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
+# CONFIG_IWLWIFI_DEBUG_EXPERIMENTAL_UCODE is not set
CONFIG_IWM=m
# CONFIG_IWM_DEBUG is not set
# CONFIG_IWM_TRACING is not set
@@ -1562,6 +1582,8 @@ CONFIG_CAN_EMS_USB=m
CONFIG_CAN_ESD_USB2=m
CONFIG_CAN_KVASER_PCI=m
CONFIG_CAN_PLX_PCI=m
+CONFIG_CAN_TSCAN1=m
+CONFIG_PCH_CAN=m
CONFIG_NETROM=m
CONFIG_ROSE=m
CONFIG_MKISS=m
@@ -1800,6 +1822,7 @@ CONFIG_INPUT_TABLET=y
CONFIG_TABLET_USB_ACECAD=m
CONFIG_TABLET_USB_AIPTEK=m
CONFIG_TABLET_USB_GTCO=m
+CONFIG_TABLET_USB_HANWANG=m
CONFIG_TABLET_USB_KBTAB=m
CONFIG_TABLET_USB_WACOM=m
@@ -1823,6 +1846,7 @@ CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
CONFIG_SERIO_RAW=m
CONFIG_SERIO_ALTERA_PS2=m
+# CONFIG_SERIO_PS2MULT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
@@ -1916,6 +1940,7 @@ CONFIG_TOUCHSCREEN_USB_E2I=y
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
# CONFIG_TOUCHSCREEN_WM97XX is not set
CONFIG_TOUCHSCREEN_W90X900=m
+# CONFIG_TOUCHSCREEN_BU21013 is not set
CONFIG_INPUT_MISC=y
CONFIG_INPUT_PCSPKR=m
@@ -2041,6 +2066,7 @@ CONFIG_I2C_ALGOPCA=m
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_NFORCE2_S4985 is not set
+# CONFIG_I2C_INTEL_MID is not set
CONFIG_EEPROM_AT24=m
CONFIG_EEPROM_LEGACY=m
@@ -2135,6 +2161,11 @@ CONFIG_SENSORS_SMSC47M192=m
CONFIG_SENSORS_SMSC47B397=m
CONFIG_SENSORS_THMC50=m
CONFIG_SENSORS_TMP401=m
+CONFIG_APDS9802ALS=m
+CONFIG_ISL29020=m
+CONFIG_ISL29003=m
+CONFIG_SENSORS_BH1770=m
+CONFIG_SENSORS_APDS990X=m
CONFIG_SENSORS_TSL2550=m
CONFIG_SENSORS_VIA686A=m
CONFIG_SENSORS_VIA_CPUTEMP=m
@@ -2159,13 +2190,18 @@ CONFIG_SENSORS_ADT7411=m
CONFIG_SENSORS_ASC7621=m
CONFIG_SENSORS_EMC1403=m
CONFIG_SENSORS_TMP102=m
+CONFIG_SENSORS_LTC4261=m
# CONFIG_SENSORS_BH1780 is not set
# CONFIG_SENSORS_JC42 is not set
# CONFIG_SENSORS_SMM665 is not set
# CONFIG_SENSORS_EMC2103 is not set
+# CONFIG_SENSORS_GPIO_FAN is not set
+CONFIG_SENSORS_W83795=m
+# CONFIG_SENSORS_W83795_FANCTRL is not set
# CONFIG_HMC6352 is not set
# CONFIG_BMP085 is not set
+# CONFIG_PCH_PHUB is not set
CONFIG_W1=m
CONFIG_W1_CON=y
@@ -2304,6 +2340,7 @@ CONFIG_AGP_VIA=y
CONFIG_AGP_EFFICEON=y
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
+CONFIG_STUB_POULSBO=m
CONFIG_DRM=m
CONFIG_DRM_TDFX=m
CONFIG_DRM_R128=m
@@ -2362,7 +2399,8 @@ CONFIG_VIDEO_AU0828=m
CONFIG_VIDEO_BT848=m
CONFIG_VIDEO_BT848_DVB=y
CONFIG_VIDEO_BWQCAM=m
-# CONFIG_VIDEO_CAFE_CCIC is not set
+CONFIG_VIDEO_SR030PC30=m
+CONFIG_VIDEO_CAFE_CCIC=m
# CONFIG_VIDEO_CPIA is not set
CONFIG_VIDEO_CPIA2=m
CONFIG_VIDEO_CQCAM=m
@@ -2394,6 +2432,7 @@ CONFIG_VIDEO_SAA6588=m
CONFIG_VIDEO_SAA7134=m
CONFIG_VIDEO_SAA7134_ALSA=m
CONFIG_VIDEO_SAA7134_DVB=m
+CONFIG_VIDEO_SAA7134_RC=y
CONFIG_VIDEO_STRADIS=m
CONFIG_VIDEO_USBVISION=m
CONFIG_VIDEO_W9966=m
@@ -2436,6 +2475,7 @@ CONFIG_MEDIA_TUNER_MXL5005S=m
CONFIG_MEDIA_TUNER_MXL5007T=m
CONFIG_MEDIA_TUNER_MC44S803=m
CONFIG_MEDIA_TUNER_MAX2165=m
+CONFIG_MEDIA_TUNER_TDA18218=m
#
# Digital Video Broadcasting Devices
@@ -2475,6 +2515,8 @@ CONFIG_DVB_SP8870=m
CONFIG_DVB_SP887X=m
CONFIG_DVB_CX22700=m
CONFIG_DVB_CX22702=m
+CONFIG_DVB_S5H1432=m
+CONFIG_DVB_IX2505V=m
CONFIG_DVB_L64781=m
CONFIG_DVB_NXT6000=m
CONFIG_DVB_MT352=m
@@ -2579,6 +2621,7 @@ CONFIG_DVB_USB_UMT_010=m
CONFIG_DVB_USB_VP702X=m
CONFIG_DVB_USB_VP7045=m
CONFIG_DVB_USB_AZ6027=m
+CONFIG_DVB_USB_LME2510=m
CONFIG_DVB_PT1=m
@@ -2600,9 +2643,11 @@ CONFIG_IR_RC5_DECODER=m
CONFIG_IR_RC6_DECODER=m
CONFIG_IR_JVC_DECODER=m
CONFIG_IR_SONY_DECODER=m
+CONFIG_IR_RC5_SZ_DECODER=m
CONFIG_IR_LIRC_CODEC=m
CONFIG_IR_IMON=m
CONFIG_IR_MCEUSB=m
+CONFIG_IR_NUVOTON=m
CONFIG_V4L_MEM2MEM_DRIVERS=y
# CONFIG_VIDEO_MEM2MEM_TESTDEV is not set
@@ -2747,6 +2792,7 @@ CONFIG_SND_DYNAMIC_MINORS=y
# Generic devices
#
CONFIG_SND_DUMMY=m
+CONFIG_SND_ALOOP=m
CONFIG_SND_VIRMIDI=m
CONFIG_SND_MTPAV=m
CONFIG_SND_MTS64=m
@@ -2765,6 +2811,8 @@ CONFIG_SND_AD1889=m
# CONFIG_SND_WAVEFRONT is not set
# CONFIG_SND_MSND_PINNACLE is not set
# CONFIG_SND_MSND_CLASSIC is not set
+# CONFIG_SND_AZT1605 is not set
+# CONFIG_SND_AZT2316 is not set
#
# PCI devices
@@ -2819,6 +2867,7 @@ CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_INTELHDMI=y
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_CODEC_NVHDMI=y
+CONFIG_SND_HDA_CODEC_HDMI=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
@@ -2936,6 +2985,8 @@ CONFIG_USB_STORAGE_ONETOUCH=y
CONFIG_USB_STORAGE_ALAUDA=y
CONFIG_USB_STORAGE_KARMA=y
# CONFIG_USB_LIBUSUAL is not set
+CONFIG_USB_UAS=m
+
#
# USB Human Interface Devices (HID)
@@ -2949,6 +3000,7 @@ CONFIG_HID=m
CONFIG_HIDRAW=y
CONFIG_HID_PID=y
CONFIG_LOGITECH_FF=y
+CONFIG_LOGIWII_FF=y
CONFIG_LOGIRUMBLEPAD2_FF=y
CONFIG_PANTHERLORD_FF=y
CONFIG_THRUSTMASTER_FF=y
@@ -2990,7 +3042,9 @@ CONFIG_HID_ZEROPLUS=m
CONFIG_HID_ZYDACRON=m
CONFIG_HID_ACRUX_FF=m
CONFIG_HID_ELECOM=m
-
+CONFIG_HID_UCLOGIC=m
+CONFIG_HID_WALTOP=m
+CONFIG_HID_ROCCAT_PYRA=m
#
# USB Imaging devices
@@ -3045,6 +3099,8 @@ CONFIG_USB_GSPCA_PAC7302=m
CONFIG_USB_GSPCA_STV0680=m
CONFIG_USB_GL860=m
CONFIG_USB_GSPCA_JEILINJ=m
+CONFIG_USB_GSPCA_KONICA=m
+CONFIG_USB_GSPCA_XIRLINK_CIT=m
CONFIG_USB_GSPCA_SPCA1528=m
CONFIG_USB_GSPCA_SQ930X=m
@@ -3069,6 +3125,8 @@ CONFIG_SOC_CAMERA_OV772X=m
CONFIG_SOC_CAMERA_MT9T112=m
CONFIG_SOC_CAMERA_RJ54N1=m
CONFIG_SOC_CAMERA_OV9640=m
+CONFIG_SOC_CAMERA_OV6650=m
+CONFIG_SOC_CAMERA_IMX074=m
#
# USB Network adaptors
@@ -3091,6 +3149,7 @@ CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_NET_CDC_SUBSET=m
CONFIG_USB_NET_CDC_EEM=m
CONFIG_USB_NET_ZAURUS=m
+CONFIG_USB_NET_CX82310_ETH=m
CONFIG_USB_NET_INT51X1=m
CONFIG_USB_CDC_PHONET=m
CONFIG_USB_IPHETH=m
@@ -3183,6 +3242,7 @@ CONFIG_USB_SERIAL_QCAUX=m
CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m
CONFIG_USB_SERIAL_DEBUG=m
CONFIG_USB_SERIAL_SSU100=m
+CONFIG_USB_SERIAL_SAMBA=m
CONFIG_USB_EZUSB=y
CONFIG_USB_EMI62=m
@@ -3216,6 +3276,7 @@ CONFIG_USB_FILE_STORAGE=m
# CONFIG_USB_OXU210HP_HCD is not set
CONFIG_USB_IOWARRIOR=m
CONFIG_USB_ISIGHTFW=m
+CONFIG_USB_YUREX=m
CONFIG_USB_VST=m
CONFIG_USB_LCD=m
CONFIG_USB_LD=m
@@ -3270,6 +3331,7 @@ CONFIG_RTC_DRV_DS3232=m
CONFIG_RTC_DRV_ISL12022=m
CONFIG_MFD_SUPPORT=y
+CONFIG_MFD_VX855=m
CONFIG_MFD_SM501=m
CONFIG_MFD_SM501_GPIO=y
# CONFIG_MFD_TC6393XB is not set
@@ -3290,6 +3352,7 @@ CONFIG_MFD_WM8400=m
# CONFIG_ABX500_CORE is not set
# CONFIG_MFD_RDC321X is not set
# CONFIG_MFD_JANZ_CMODIO is not set
+# CONFIG_MFD_WM831X_I2C is not set
#
# File systems
@@ -3348,6 +3411,8 @@ CONFIG_EXOFS_FS=m
CONFIG_NILFS2_FS=m
CONFIG_LOGFS=m
CONFIG_CEPH_FS=m
+CONFIG_BLK_DEV_RBD=m
+CONFIG_CEPH_LIB=m
CONFIG_FSCACHE=m
CONFIG_FSCACHE_STATS=y
@@ -3424,6 +3489,7 @@ CONFIG_UFS_FS=m
# CONFIG_UFS_DEBUG is not set
CONFIG_9P_FS=m
CONFIG_9P_FSCACHE=y
+CONFIG_9P_FS_POSIX_ACL=y
CONFIG_FUSE_FS=m
CONFIG_OMFS_FS=m
CONFIG_CUSE=m
@@ -3443,6 +3509,8 @@ CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFS_FSCACHE=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
+# CONFIG_NFS_USE_NEW_IDMAPPER is not set
+# CONFIG_NFSD_DEPRECATED is not set
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
@@ -3460,7 +3528,8 @@ CONFIG_CIFS_EXPERIMENTAL=y
CONFIG_CIFS_UPCALL=y
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_FSCACHE is not set
+CONFIG_CIFS_FSCACHE=y
+CONFIG_CIFS_ACL=y
CONFIG_CIFS_WEAK_PW_HASH=y
# CONFIG_CIFS_DEBUG2 is not set
CONFIG_CIFS_DFS_UPCALL=y
@@ -3602,6 +3671,7 @@ CONFIG_KGDB_LOW_LEVEL_TRAP=y
# Security options
#
CONFIG_SECURITY=y
+# CONFIG_SECURITY_DMESG_RESTRICT is not set
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_NETWORK_XFRM=y
# CONFIG_SECURITY_PATH is not set
@@ -3741,10 +3811,12 @@ CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_SCHED=y
CONFIG_CGROUP_MEM_RES_CTLR=y
-CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
+CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y # XXX disabled by default, pass 'swapaccount'
+# CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED is not set
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
+# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_SYSFS_DEPRECATED_V2 is not set
CONFIG_RELAY=y
@@ -3768,7 +3840,7 @@ CONFIG_IBMASR=m
CONFIG_PM_DEBUG=y
CONFIG_PM_TRACE=y
# CONFIG_PM_VERBOSE is not set
-# CONFIG_PM_TEST_SUSPEND is not set
+CONFIG_PM_TEST_SUSPEND=y
CONFIG_PM_RUNTIME=y
## BEGIN ISA Junk.
@@ -3950,6 +4022,8 @@ CONFIG_LEDS_REGULATOR=m
CONFIG_LEDS_LT3593=m
CONFIG_LEDS_TRIGGER_GPIO=m
CONFIG_LEDS_INTEL_SS4200=m
+CONFIG_LEDS_LP5521=m
+CONFIG_LEDS_LP5523=m
CONFIG_DMADEVICES=y
CONFIG_DMA_ENGINE=y
@@ -4003,6 +4077,8 @@ CONFIG_APM_POWER=m
CONFIG_WM831X_POWER=m
# CONFIG_BATTERY_DS2760 is not set
# CONFIG_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_BQ20Z75 is not set
+# CONFIG_CHARGER_ISP1704 is not set
CONFIG_BATTERY_PMU=m
CONFIG_BATTERY_BQ27x00=m
CONFIG_BATTERY_MAX17040=m
@@ -4063,13 +4139,10 @@ CONFIG_RESOURCE_COUNTERS=y
#FIXME: x86 generic?
CONFIG_LEDS_CLEVO_MAIL=m
CONFIG_I8K=m
-CONFIG_EDAC_I3000=m
-CONFIG_EDAC_X38=m
CONFIG_INPUT_APANEL=m
# CONFIG_INTEL_MENLOW is not set
CONFIG_ENCLOSURE_SERVICES=m
-CONFIG_ISL29003=m
CONFIG_IPWIRELESS=m
CONFIG_RTC_DRV_DS1511=m
@@ -4115,6 +4188,7 @@ CONFIG_NET_SCH_MULTIQ=m
CONFIG_NET_ACT_SKBEDIT=m
CONFIG_PHONET=m
+# CONFIG_PHONET_PIPECTRLR is not set
CONFIG_ICS932S401=m
# CONFIG_C2PORT is not set
@@ -4197,6 +4271,13 @@ CONFIG_USB_ATMEL=m
# CONFIG_EASYCAP is not set
# CONFIG_SOLO6X10 is not set
# CONFIG_ACPI_QUICKSTART is not set
+# CONFIG_BRCM80211 is not set
+# CONFIG_R8712U is not set
+# CONFIG_ATH6K_LEGACY is not set
+# CONFIG_USB_ENESTORAGE is not set
+# CONFIG_BCM_WIMAX is not set
+# CONFIG_FT1000 is not set
+# CONFIG_SPEAKUP is not set
#
# Android
@@ -4206,7 +4287,7 @@ CONFIG_USB_ATMEL=m
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_FUNCTION_GRAPH_TRACER is not set
-# CONFIG_BOOT_TRACER is not set
+CONFIG_BOOT_TRACER=y
CONFIG_EARLY_PRINTK_DBGP=y
CONFIG_SECURITYFS=y
@@ -4318,7 +4399,9 @@ CONFIG_GPIO_SYSFS=y
# CONFIG_GPIO_SCH is not set
# CONFIG_GPIO_LANGWELL is not set
# CONFIG_GPIO_RDC321X is not set
-
+# CONFIG_GPIO_BASIC_MMIO is not set
+# CONFIG_GPIO_VX855 is not set
+# CONFIG_GPIO_PCH is not set
CONFIG_KSYM_TRACER=y
CONFIG_PROFILE_KSYM_TRACER=y
@@ -4334,3 +4417,9 @@ CONFIG_IR_STREAMZAP=m
# CONFIG_MFD_STMPE is not set
# CONFIG_MFD_MAX8998 is not set
# CONFIG_MFD_TPS6586X is not set
+
+CONFIG_SPARSE_RCU_POINTER=y
+
+# CONFIG_PM_OPP is not set
+
+CONFIG_BKL=y
diff --git a/config-nodebug b/config-nodebug
index b4472f9a5..ab9c209af 100644
--- a/config-nodebug
+++ b/config-nodebug
@@ -2,94 +2,98 @@ CONFIG_SND_VERBOSE_PRINTK=y
CONFIG_SND_DEBUG=y
CONFIG_SND_PCM_XRUN_DEBUG=y
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_DEBUG_VM is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_PROVE_RCU is not set
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_LOCK_ALLOC=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_DEBUG_VM=y
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_PROVE_RCU=y
# CONFIG_PROVE_RCU_REPEATEDLY is not set
-# CONFIG_DEBUG_PER_CPU_MAPS is not set
+CONFIG_DEBUG_PER_CPU_MAPS=y
CONFIG_CPUMASK_OFFSTACK=y
-# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set
+CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
-# CONFIG_FAULT_INJECTION is not set
-# CONFIG_FAILSLAB is not set
-# CONFIG_FAIL_PAGE_ALLOC is not set
-# CONFIG_FAIL_MAKE_REQUEST is not set
-# CONFIG_FAULT_INJECTION_DEBUG_FS is not set
-# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set
-# CONFIG_FAIL_IO_TIMEOUT is not set
+CONFIG_FAULT_INJECTION=y
+CONFIG_FAILSLAB=y
+CONFIG_FAIL_PAGE_ALLOC=y
+CONFIG_FAIL_MAKE_REQUEST=y
+CONFIG_FAULT_INJECTION_DEBUG_FS=y
+CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
+CONFIG_FAIL_IO_TIMEOUT=y
-# CONFIG_SLUB_DEBUG_ON is not set
+CONFIG_SLUB_DEBUG_ON=y
-# CONFIG_LOCK_STAT is not set
+CONFIG_LOCK_STAT=y
-# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_DEBUG=y
# CONFIG_ACPI_DEBUG_FUNC_TRACE is not set
-# CONFIG_DEBUG_SG is not set
+CONFIG_DEBUG_SG=y
# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUG_WRITECOUNT is not set
-# CONFIG_DEBUG_OBJECTS is not set
+CONFIG_DEBUG_WRITECOUNT=y
+CONFIG_DEBUG_OBJECTS=y
# CONFIG_DEBUG_OBJECTS_SELFTEST is not set
-# CONFIG_DEBUG_OBJECTS_FREE is not set
-# CONFIG_DEBUG_OBJECTS_TIMERS is not set
+CONFIG_DEBUG_OBJECTS_FREE=y
+CONFIG_DEBUG_OBJECTS_TIMERS=y
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
-# CONFIG_X86_PTDUMP is not set
+CONFIG_X86_PTDUMP=y
-# CONFIG_CAN_DEBUG_DEVICES is not set
+CONFIG_CAN_DEBUG_DEVICES=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODULE_FORCE_UNLOAD=y
-# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
-# CONFIG_DEBUG_NOTIFIERS is not set
+CONFIG_DEBUG_NOTIFIERS=y
-# CONFIG_DMA_API_DEBUG is not set
+CONFIG_DMA_API_DEBUG=y
-# CONFIG_MMIOTRACE is not set
+CONFIG_MMIOTRACE=y
-# CONFIG_DEBUG_CREDENTIALS is not set
+CONFIG_DEBUG_CREDENTIALS=y
# off in both production debug and nodebug builds,
# on in rawhide nodebug builds
-# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
+CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
-# CONFIG_EXT4_DEBUG is not set
+CONFIG_EXT4_DEBUG=y
-# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
+CONFIG_DEBUG_PERF_USE_VMALLOC=y
-# CONFIG_JBD2_DEBUG is not set
+CONFIG_JBD2_DEBUG=y
-# CONFIG_DEBUG_CFQ_IOSCHED is not set
+CONFIG_DEBUG_CFQ_IOSCHED=y
-# CONFIG_DRBD_FAULT_INJECTION is not set
+CONFIG_DRBD_FAULT_INJECTION=y
-# CONFIG_ATH_DEBUG is not set
-# CONFIG_IWLWIFI_DEVICE_TRACING is not set
+CONFIG_ATH_DEBUG=y
+CONFIG_CARL9170_DEBUGFS=y
+CONFIG_IWLWIFI_DEVICE_TRACING=y
-# CONFIG_DEBUG_OBJECTS_WORK is not set
-# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set
+CONFIG_DEBUG_OBJECTS_WORK=y
+CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y
-# CONFIG_DMADEVICES_DEBUG is not set
-# CONFIG_DMADEVICES_VDEBUG is not set
+CONFIG_DMADEVICES_DEBUG=y
+CONFIG_DMADEVICES_VDEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y
-# CONFIG_CEPH_FS_PRETTYDEBUG is not set
-# CONFIG_QUOTA_DEBUG is not set
+CONFIG_CEPH_LIB_PRETTYDEBUG=y
+CONFIG_QUOTA_DEBUG=y
-CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
+# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
CONFIG_PCI_DEFAULT_USE_CRS=y
CONFIG_KGDB_KDB=y
CONFIG_KDB_KEYBOARD=y
+
+CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
+CONFIG_TEST_LIST_SORT=y
diff --git a/config-powerpc-generic b/config-powerpc-generic
index 0effe3d0d..1b05f4a90 100644
--- a/config-powerpc-generic
+++ b/config-powerpc-generic
@@ -334,3 +334,5 @@ CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
# CONFIG_GPIO_SCH is not set
# CONFIG_PPC_MPC512x is not set
+
+CONFIG_KVM_GUEST=y
diff --git a/config-s390x b/config-s390x
index d9294023d..780fc9146 100644
--- a/config-s390x
+++ b/config-s390x
@@ -228,3 +228,8 @@ CONFIG_SMSGIUCV_EVENT=m
CONFIG_VMCP=y
CONFIG_ZFCP_DIF=y
+
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_BOOK=y
+
+CONFIG_STRICT_DEVMEM=y
diff --git a/config-sparc64-generic b/config-sparc64-generic
index 1d21fa781..61612cb71 100644
--- a/config-sparc64-generic
+++ b/config-sparc64-generic
@@ -201,3 +201,5 @@ CONFIG_GRETH=m
CONFIG_FB_XVR1000=y
CONFIG_CRYPTO_DEV_NIAGARA2=y
+
+CONFIG_JUMP_LABEL=y
diff --git a/config-x86-generic b/config-x86-generic
index ba3993563..68bd39b2d 100644
--- a/config-x86-generic
+++ b/config-x86-generic
@@ -284,6 +284,9 @@ CONFIG_EDAC_R82600=m
CONFIG_EDAC_AMD8131=m
CONFIG_EDAC_AMD8111=m
CONFIG_EDAC_I7CORE=m
+CONFIG_EDAC_I3000=m
+CONFIG_EDAC_I7300=m
+CONFIG_EDAC_X38=m
CONFIG_SCHED_MC=y
@@ -309,6 +312,7 @@ CONFIG_EEEPC_LAPTOP=m
CONFIG_EEEPC_WMI=m
CONFIG_FUJITSU_LAPTOP=m
# CONFIG_FUJITSU_LAPTOP_DEBUG is not set
+CONFIG_IDEAPAD_LAPTOP=m
CONFIG_MSI_LAPTOP=m
CONFIG_SONY_LAPTOP=m
CONFIG_DELL_LAPTOP=m
@@ -352,6 +356,7 @@ CONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_SPINLOCKS is not set
CONFIG_KVM_CLOCK=y
CONFIG_KVM_GUEST=y
+CONFIG_KVM_MMU_AUDIT=y # default $x would be nice...
CONFIG_LGUEST_GUEST=y
CONFIG_VMI=y
@@ -365,6 +370,7 @@ CONFIG_XEN_FBDEV_FRONTEND=y
CONFIG_XEN_KBDDEV_FRONTEND=y
CONFIG_XEN_BLKDEV_FRONTEND=m
CONFIG_XEN_NETDEV_FRONTEND=m
+CONFIG_XEN_PCIDEV_FRONTEND=m
CONFIG_XENFS=m
CONFIG_XEN_COMPAT_XENFS=y
@@ -470,7 +476,7 @@ CONFIG_SBC_FITPC2_WATCHDOG=m
CONFIG_EDAC_I3200=m
CONFIG_EDAC_DECODE_MCE=m
-CONFIG_GPIO_LANGWELL=y
+# CONFIG_GPIO_LANGWELL is not set
# CONFIG_INTEL_TXT is not set
@@ -506,4 +512,17 @@ CONFIG_XEN_PLATFORM_PCI=m
# CONFIG_ACPI_QUICKSTART is not set
CONFIG_IDEAPAD_ACPI=m
CONFIG_INTEL_IPS=m
+# CONFIG_IBM_RTL is not set
+
+CONFIG_OLPC_XO1=m
+CONFIG_XO1_RFKILL=m
+CONFIG_VIDEO_VIA_CAMERA=m
+
+CONFIG_EDAC_MCE_INJ=m
+CONFIG_IRQ_TIME_ACCOUNTING=y
+CONFIG_X86_RESERVE_LOW=64
+
+CONFIG_PCH_GBE=m
+CONFIG_PCH_PHUB=m
+CONFIG_JUMP_LABEL=y
diff --git a/config-x86_64-generic b/config-x86_64-generic
index b2e4a2531..b09e5112c 100644
--- a/config-x86_64-generic
+++ b/config-x86_64-generic
@@ -15,7 +15,7 @@ CONFIG_NUMA=y
CONFIG_K8_NUMA=y
CONFIG_X86_64_ACPI_NUMA=y
# CONFIG_NUMA_EMU is not set
-CONFIG_NR_CPUS=256
+CONFIG_NR_CPUS=512
CONFIG_X86_POWERNOW_K8=m
CONFIG_X86_P4_CLOCKMOD=m
CONFIG_IA32_EMULATION=y
@@ -204,6 +204,9 @@ CONFIG_EDAC_AMD64=m
# CONFIG_EDAC_AMD64_ERROR_INJECTION is not set
CONFIG_EDAC_DECODE_MCE=m
CONFIG_EDAC_I7CORE=m
+CONFIG_EDAC_I3000=m
+CONFIG_EDAC_I7300=m
+CONFIG_EDAC_X38=m
CONFIG_SCHED_MC=y
@@ -284,6 +287,7 @@ CONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_SPINLOCKS is not set
CONFIG_KVM_CLOCK=y
CONFIG_KVM_GUEST=y
+CONFIG_KVM_MMU_AUDIT=y
CONFIG_XEN=y
CONFIG_XEN_MAX_DOMAIN_MEMORY=32
@@ -295,6 +299,7 @@ CONFIG_XEN_FBDEV_FRONTEND=y
CONFIG_XEN_KBDDEV_FRONTEND=y
CONFIG_XEN_BLKDEV_FRONTEND=m
CONFIG_XEN_NETDEV_FRONTEND=m
+CONFIG_XEN_PCIDEV_FRONTEND=m
CONFIG_XENFS=m
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_DEV_EVTCHN=m
@@ -419,5 +424,18 @@ CONFIG_XEN_PLATFORM_PCI=m
# CONFIG_ACPI_QUICKSTART is not set
CONFIG_IDEAPAD_ACPI=m
CONFIG_INTEL_IPS=m
+CONFIG_IDEAPAD_LAPTOP=m
+# CONFIG_IBM_RTL is not set
+
+CONFIG_EDAC_MCE_INJ=m
+CONFIG_IRQ_TIME_ACCOUNTING=y
+CONFIG_X86_RESERVE_LOW=64
+
+CONFIG_PCH_GBE=m
+CONFIG_PCH_PHUB=m
+
+CONFIG_VIDEO_VIA_CAMERA=m
+
+CONFIG_JUMP_LABEL=y
CONFIG_HP_ILO=m
diff --git a/debug-tty-print-dev-name.patch b/debug-tty-print-dev-name.patch
index 507dfe5f1..5c06dd991 100644
--- a/debug-tty-print-dev-name.patch
+++ b/debug-tty-print-dev-name.patch
@@ -1,15 +1,15 @@
-diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
-index 613c852..09c86d2 100644
---- a/drivers/char/tty_io.c
-+++ b/drivers/char/tty_io.c
-@@ -1322,7 +1322,11 @@ static int tty_reopen(struct tty_struct *tty)
+diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
+index 878f6d6..8d6867d 100644
+--- a/drivers/tty/tty_io.c
++++ b/drivers/tty/tty_io.c
+@@ -1329,7 +1330,11 @@ static int tty_reopen(struct tty_struct *tty)
tty->driver = driver; /* N.B. why do this every time?? */
mutex_lock(&tty->ldisc_mutex);
- WARN_ON(!test_bit(TTY_LDISC, &tty->flags));
+ if (!test_bit(TTY_LDISC, &tty->flags)) {
-+ printk("%s: !test_bit(TTY_LDISC, &tty->flags) dev=%s ldisc=%s\n",
-+ __func__, tty->name, tty->ldisc ? tty->ldisc->ops ? tty->ldisc->ops->name : NULL : NULL);
++ printk("%s: !test_bit(TTY_LDISC, &tty->flags) dev=%s ldisc=%s flags=%x\n",
++ __func__, tty->name, tty->ldisc ? tty->ldisc->ops ? tty->ldisc->ops->name : NULL : NULL, tty->flags);
+ WARN_ON(1);
+ }
mutex_unlock(&tty->ldisc_mutex);
diff --git a/drm-i915-reprogram-power-monitoring-registers-on-resume.patch b/drm-i915-reprogram-power-monitoring-registers-on-resume.patch
deleted file mode 100644
index a37442607..000000000
--- a/drm-i915-reprogram-power-monitoring-registers-on-resume.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 48fcfc888b48ad49dd83faa107264bbfb0089cad Mon Sep 17 00:00:00 2001
-From: Kyle McMartin <kyle@redhat.com>
-Date: Wed, 3 Nov 2010 16:27:57 -0400
-Subject: [PATCH] i915: reprogram power monitoring registers on resume
-
-Fixes issue where i915_gfx_val was reporting values several
-orders of magnitude higher than physically possible (without
-leaving scorch marks on my thighs at least.)
-
-Signed-off-by: Kyle McMartin <kyle@redhat.com>
-Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-Cc: stable@kernel.org
-Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
----
- drivers/gpu/drm/i915/i915_suspend.c | 4 +++-
- drivers/gpu/drm/i915/intel_drv.h | 1 +
- 2 files changed, 4 insertions(+), 1 deletions(-)
-
-diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
-index 989c19d..454c064 100644
---- a/drivers/gpu/drm/i915/i915_suspend.c
-+++ b/drivers/gpu/drm/i915/i915_suspend.c
-@@ -862,8 +862,10 @@ int i915_restore_state(struct drm_device *dev)
- /* Clock gating state */
- intel_init_clock_gating(dev);
-
-- if (HAS_PCH_SPLIT(dev))
-+ if (HAS_PCH_SPLIT(dev)) {
- ironlake_enable_drps(dev);
-+ intel_init_emon(dev);
-+ }
-
- /* Cache mode state */
- I915_WRITE (CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000);
-diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
-index 9af9f86..21551fe 100644
---- a/drivers/gpu/drm/i915/intel_drv.h
-+++ b/drivers/gpu/drm/i915/intel_drv.h
-@@ -296,6 +296,7 @@ extern void intel_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
- extern void intel_init_clock_gating(struct drm_device *dev);
- extern void ironlake_enable_drps(struct drm_device *dev);
- extern void ironlake_disable_drps(struct drm_device *dev);
-+extern void intel_init_emon(struct drm_device *dev);
-
- extern int intel_pin_and_fence_fb_obj(struct drm_device *dev,
- struct drm_gem_object *obj,
---
-1.7.3.2
-
diff --git a/drm-intel-big-hammer.patch b/drm-intel-big-hammer.patch
index 63dc016b1..97bb2e8cd 100644
--- a/drm-intel-big-hammer.patch
+++ b/drm-intel-big-hammer.patch
@@ -1,16 +1,21 @@
+omgwtfbbqchainsaw?
+---
+ drivers/gpu/drm/i915/i915_gem.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
-index 37427e4..08af9db 100644
+index 8eb8453..36fa9d7 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
-@@ -2553,6 +2553,11 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
-
- mutex_lock(&dev->struct_mutex);
+@@ -3692,6 +3692,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
+ if (ret)
+ goto pre_mutex_err;
+ /* We don't get the flushing right for these chipsets, use the
-+ * big hamer for now to avoid random crashiness. */
++ * big hammer for now to avoid random crashiness. */
+ if (IS_I85X(dev) || IS_I865G(dev))
+ wbinvd();
+
- i915_verify_inactive(dev, __FILE__, __LINE__);
-
- if (dev_priv->mm.wedged) {
+ if (dev_priv->mm.suspended) {
+ mutex_unlock(&dev->struct_mutex);
+ ret = -EBUSY;
diff --git a/drm-intel-edp-fixes.patch b/drm-intel-edp-fixes.patch
new file mode 100644
index 000000000..c77ef116c
--- /dev/null
+++ b/drm-intel-edp-fixes.patch
@@ -0,0 +1,44 @@
+diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
+index f737960..b1f8164 100644
+--- a/drivers/gpu/drm/i915/i915_drv.c
++++ b/drivers/gpu/drm/i915/i915_drv.c
+@@ -509,6 +509,8 @@ i915_pci_remove(struct pci_dev *pdev)
+ {
+ struct drm_device *dev = pci_get_drvdata(pdev);
+
++ pci_disable_device(pdev); /* core did previous enable */
++
+ drm_put_dev(dev);
+ }
+
+diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
+index 300f64b..2e3db37 100644
+--- a/drivers/gpu/drm/i915/intel_dp.c
++++ b/drivers/gpu/drm/i915/intel_dp.c
+@@ -795,7 +795,8 @@ static bool ironlake_edp_panel_on (struct intel_dp *intel_dp)
+ {
+ struct drm_device *dev = intel_dp->base.base.dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+- u32 pp, idle_on_mask = PP_ON | PP_SEQUENCE_STATE_ON_IDLE;
++ u32 pp, idle_on = PP_ON | PP_SEQUENCE_STATE_ON_IDLE;
++ u32 idle_on_mask = PP_ON | PP_SEQUENCE_STATE_MASK;
+
+ if (I915_READ(PCH_PP_STATUS) & PP_ON)
+ return true;
+@@ -816,7 +817,7 @@ static bool ironlake_edp_panel_on (struct intel_dp *intel_dp)
+ */
+ msleep(300);
+
+- if (wait_for((I915_READ(PCH_PP_STATUS) & idle_on_mask) == idle_on_mask,
++ if (wait_for((I915_READ(PCH_PP_STATUS) & idle_on_mask) == idle_on,
+ 5000))
+ DRM_ERROR("panel on wait timed out: 0x%08x\n",
+ I915_READ(PCH_PP_STATUS));
+@@ -922,6 +923,7 @@ static void intel_dp_prepare(struct drm_encoder *encoder)
+
+ if (is_edp(intel_dp)) {
+ ironlake_edp_backlight_off(dev);
++ ironlake_edp_panel_off(dev);
+ ironlake_edp_panel_on(intel_dp);
+ if (!is_pch_edp(intel_dp))
+ ironlake_edp_pll_on(encoder);
diff --git a/drm-intel-make-lvds-work.patch b/drm-intel-make-lvds-work.patch
index 5ca0152da..209deb295 100644
--- a/drm-intel-make-lvds-work.patch
+++ b/drm-intel-make-lvds-work.patch
@@ -1,19 +1,23 @@
-diff -up linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c.orig linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c
---- linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c.orig 2010-03-31 16:59:39.901995671 -0400
-+++ linux-2.6.33.noarch/drivers/gpu/drm/i915/intel_display.c 2010-03-31 17:01:05.416996744 -0400
-@@ -3757,7 +3757,6 @@ struct drm_crtc *intel_get_load_detect_p
- void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder, int dpms_mode)
+ drivers/gpu/drm/i915/intel_display.c | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index 990f065..171a797 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -4568,7 +4568,6 @@ void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
+ struct drm_connector *connector, int dpms_mode)
{
- struct drm_encoder *encoder = &intel_encoder->enc;
+ struct drm_encoder *encoder = &intel_encoder->base;
- struct drm_device *dev = encoder->dev;
struct drm_crtc *crtc = encoder->crtc;
struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
-@@ -3767,7 +3766,6 @@ void intel_release_load_detect_pipe(stru
- intel_encoder->base.encoder = NULL;
+@@ -4578,7 +4577,6 @@ void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
+ connector->encoder = NULL;
intel_encoder->load_detect_temp = false;
crtc->enabled = drm_helper_crtc_in_use(crtc);
- drm_helper_disable_unused_functions(dev);
}
- /* Switch crtc and output back off if necessary */
+ /* Switch crtc and encoder back off if necessary */
diff --git a/fix-i8k-inline-asm.patch b/fix-i8k-inline-asm.patch
deleted file mode 100644
index 87fadc014..000000000
--- a/fix-i8k-inline-asm.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-commit 22d3243de86bc92d874abb7c5b185d5c47aba323
-Author: Jim Bos <jim876@xs4all.nl>
-Date: Mon Nov 15 21:22:37 2010 +0100
-
- Fix gcc 4.5.1 miscompiling drivers/char/i8k.c (again)
-
- The fix in commit 6b4e81db2552 ("i8k: Tell gcc that *regs gets
- clobbered") to work around the gcc miscompiling i8k.c to add "+m
- (*regs)" caused register pressure problems and a build failure.
-
- Changing the 'asm' statement to 'asm volatile' instead should prevent
- that and works around the gcc bug as well, so we can remove the "+m".
-
- [ Background on the gcc bug: a memory clobber fails to mark the function
- the asm resides in as non-pure (aka "__attribute__((const))"), so if
- the function does nothing else that triggers the non-pure logic, gcc
- will think that that function has no side effects at all. As a result,
- callers will be mis-compiled.
-
- Adding the "+m" made gcc see that it's not a pure function, and so
- does "asm volatile". The problem was never really the need to mark
- "*regs" as changed, since the memory clobber did that part - the
- problem was just a bug in the gcc "pure" function analysis - Linus ]
-
- Signed-off-by: Jim Bos <jim876@xs4all.nl>
- Acked-by: Jakub Jelinek <jakub@redhat.com>
- Cc: Andi Kleen <andi@firstfloor.org>
- Cc: Andreas Schwab <schwab@linux-m68k.org>
- Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
-commit 6b4e81db2552bad04100e7d5ddeed7e848f53b48
-Author: Jim Bos <jim876@xs4all.nl>
-Date: Sat Nov 13 12:13:53 2010 +0100
-
- i8k: Tell gcc that *regs gets clobbered
-
- More recent GCC caused the i8k driver to stop working, on Slackware
- compiler was upgraded from gcc-4.4.4 to gcc-4.5.1 after which it didn't
- work anymore, meaning the driver didn't load or gave total nonsensical
- output.
-
- As it turned out the asm(..) statement forgot to mention it modifies the
- *regs variable.
-
- Credits to Andi Kleen and Andreas Schwab for providing the fix.
-
- Signed-off-by: Jim Bos <jim876@xs4all.nl>
- Cc: Andi Kleen <andi@firstfloor.org>
- Cc: Andreas Schwab <schwab@linux-m68k.org>
- Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
----
-diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c
-index 3bc0eef..d72433f 100644
---- a/drivers/char/i8k.c
-+++ b/drivers/char/i8k.c
-@@ -120,7 +120,7 @@ static int i8k_smm(struct smm_regs *regs)
- int eax = regs->eax;
-
- #if defined(CONFIG_X86_64)
-- asm("pushq %%rax\n\t"
-+ asm volatile("pushq %%rax\n\t"
- "movl 0(%%rax),%%edx\n\t"
- "pushq %%rdx\n\t"
- "movl 4(%%rax),%%ebx\n\t"
-@@ -146,7 +146,7 @@ static int i8k_smm(struct smm_regs *regs)
- : "a"(regs)
- : "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
- #else
-- asm("pushl %%eax\n\t"
-+ asm volatile("pushl %%eax\n\t"
- "movl 0(%%eax),%%edx\n\t"
- "push %%edx\n\t"
- "movl 4(%%eax),%%ebx\n\t"
-@@ -167,7 +167,8 @@ static int i8k_smm(struct smm_regs *regs)
- "movl %%edx,0(%%eax)\n\t"
- "lahf\n\t"
- "shrl $8,%%eax\n\t"
-- "andl $1,%%eax\n":"=a"(rc)
-+ "andl $1,%%eax\n"
-+ :"=a"(rc)
- : "a"(regs)
- : "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
- #endif
diff --git a/hdpvr-ir-enable.patch b/hdpvr-ir-enable.patch
index 787c8f84c..e73c42122 100644
--- a/hdpvr-ir-enable.patch
+++ b/hdpvr-ir-enable.patch
@@ -110,7 +110,7 @@ index 463b81b..60cdc06 100644
msgs[i].len);
}
-@@ -115,31 +120,59 @@ static struct i2c_algorithm hdpvr_algo = {
+@@ -115,30 +120,58 @@ static struct i2c_algorithm hdpvr_algo = {
.functionality = hdpvr_functionality,
};
@@ -119,7 +119,6 @@ index 463b81b..60cdc06 100644
+ .owner = THIS_MODULE,
+ .id = I2C_HW_B_HDPVR,
+ .algo = &hdpvr_algo,
-+ .class = I2C_CLASS_TV_ANALOG,
+};
+
+static struct i2c_board_info hdpvr_i2c_board_info = {
@@ -160,7 +159,6 @@ index 463b81b..60cdc06 100644
- strlcpy(i2c_adap->name, "Hauppauge HD PVR I2C",
- sizeof(i2c_adap->name));
- i2c_adap->algo = &hdpvr_algo;
-- i2c_adap->class = I2C_CLASS_TV_ANALOG;
- i2c_adap->owner = THIS_MODULE;
- i2c_adap->dev.parent = &dev->udev->dev;
+ memcpy(&dev->i2c_adapter, &hdpvr_i2c_adapter_template,
@@ -218,3 +216,14 @@ index b0f046d..2107055 100644
/* I2C lock */
struct mutex i2c_mutex;
+diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
+index 4bef5c5..4385341 100644
+--- a/include/linux/i2c-id.h
++++ b/include/linux/i2c-id.h
+@@ -33,5 +33,6 @@
+
+ /* --- Bit algorithm adapters */
+ #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */
++#define I2C_HW_B_HDPVR 0x010025 /* Hauppauge HD PVR */
+
+ #endif /* LINUX_I2C_ID_H */
diff --git a/inet_diag-make-sure-we-run-the-same-bytecode-we-audited.patch b/inet_diag-make-sure-we-run-the-same-bytecode-we-audited.patch
deleted file mode 100644
index bb1693fdd..000000000
--- a/inet_diag-make-sure-we-run-the-same-bytecode-we-audited.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 83962729dfeb1586d2909ae9b5bab204786a9afc Mon Sep 17 00:00:00 2001
-From: Nelson Elhage <nelhage@ksplice.com>
-Date: Wed, 3 Nov 2010 16:35:41 +0000
-Subject: inet_diag: Make sure we actually run the same bytecode we audited.
-
-We were using nlmsg_find_attr() to look up the bytecode by attribute when
-auditing, but then just using the first attribute when actually running
-bytecode. So, if we received a message with two attribute elements, where only
-the second had type INET_DIAG_REQ_BYTECODE, we would validate and run different
-bytecode strings.
-
-Fix this by consistently using nlmsg_find_attr everywhere.
-
-Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
-Signed-off-by: Thomas Graf <tgraf@infradead.org>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- net/ipv4/inet_diag.c | 27 ++++++++++++++++-----------
- 1 files changed, 16 insertions(+), 11 deletions(-)
-
-diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
-index e5fa2dd..7403b9b 100644
---- a/net/ipv4/inet_diag.c
-+++ b/net/ipv4/inet_diag.c
-@@ -490,9 +490,11 @@ static int inet_csk_diag_dump(struct sock *sk,
- {
- struct inet_diag_req *r = NLMSG_DATA(cb->nlh);
-
-- if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) {
-+ if (nlmsg_attrlen(cb->nlh, sizeof(*r))) {
- struct inet_diag_entry entry;
-- struct rtattr *bc = (struct rtattr *)(r + 1);
-+ const struct nlattr *bc = nlmsg_find_attr(cb->nlh,
-+ sizeof(*r),
-+ INET_DIAG_REQ_BYTECODE);
- struct inet_sock *inet = inet_sk(sk);
-
- entry.family = sk->sk_family;
-@@ -512,7 +514,7 @@ static int inet_csk_diag_dump(struct sock *sk,
- entry.dport = ntohs(inet->inet_dport);
- entry.userlocks = sk->sk_userlocks;
-
-- if (!inet_diag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), &entry))
-+ if (!inet_diag_bc_run(nla_data(bc), nla_len(bc), &entry))
- return 0;
- }
-
-@@ -527,9 +529,11 @@ static int inet_twsk_diag_dump(struct inet_timewait_sock *tw,
- {
- struct inet_diag_req *r = NLMSG_DATA(cb->nlh);
-
-- if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) {
-+ if (nlmsg_attrlen(cb->nlh, sizeof(*r))) {
- struct inet_diag_entry entry;
-- struct rtattr *bc = (struct rtattr *)(r + 1);
-+ const struct nlattr *bc = nlmsg_find_attr(cb->nlh,
-+ sizeof(*r),
-+ INET_DIAG_REQ_BYTECODE);
-
- entry.family = tw->tw_family;
- #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
-@@ -548,7 +552,7 @@ static int inet_twsk_diag_dump(struct inet_timewait_sock *tw,
- entry.dport = ntohs(tw->tw_dport);
- entry.userlocks = 0;
-
-- if (!inet_diag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), &entry))
-+ if (!inet_diag_bc_run(nla_data(bc), nla_len(bc), &entry))
- return 0;
- }
-
-@@ -618,7 +622,7 @@ static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk,
- struct inet_diag_req *r = NLMSG_DATA(cb->nlh);
- struct inet_connection_sock *icsk = inet_csk(sk);
- struct listen_sock *lopt;
-- struct rtattr *bc = NULL;
-+ const struct nlattr *bc = NULL;
- struct inet_sock *inet = inet_sk(sk);
- int j, s_j;
- int reqnum, s_reqnum;
-@@ -638,8 +642,9 @@ static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk,
- if (!lopt || !lopt->qlen)
- goto out;
-
-- if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) {
-- bc = (struct rtattr *)(r + 1);
-+ if (nlmsg_attrlen(cb->nlh, sizeof(*r))) {
-+ bc = nlmsg_find_attr(cb->nlh, sizeof(*r),
-+ INET_DIAG_REQ_BYTECODE);
- entry.sport = inet->inet_num;
- entry.userlocks = sk->sk_userlocks;
- }
-@@ -672,8 +677,8 @@ static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk,
- &ireq->rmt_addr;
- entry.dport = ntohs(ireq->rmt_port);
-
-- if (!inet_diag_bc_run(RTA_DATA(bc),
-- RTA_PAYLOAD(bc), &entry))
-+ if (!inet_diag_bc_run(nla_data(bc),
-+ nla_len(bc), &entry))
- continue;
- }
-
---
-1.7.3.2
-
diff --git a/kernel.spec b/kernel.spec
index 8b30de6c4..be5fcc0ad 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -6,7 +6,7 @@ Summary: The Linux kernel
# For a stable, released kernel, released_kernel should be 1. For rawhide
# and/or a kernel built from an rc or git snapshot, released_kernel should
# be 0.
-%global released_kernel 1
+%global released_kernel 0
# Save original buildid for later if it's defined
%if 0%{?buildid:1}
@@ -51,7 +51,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be prepended with "0.", so
# for example a 3 here will become 0.3
#
-%global baserelease 12
+%global baserelease 1
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@@ -63,9 +63,9 @@ Summary: The Linux kernel
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
-%define stable_update 2
+%define stable_update 0
# Is it a -stable RC?
-%define stable_rc 1
+%define stable_rc 0
# Set rpm version accordingly
%if 0%{?stable_update}
%define stablerev .%{stable_update}
@@ -82,9 +82,9 @@ Summary: The Linux kernel
# The next upstream release sublevel (base_sublevel+1)
%define upstream_sublevel %(echo $((%{base_sublevel} + 1)))
# The rc snapshot level
-%define rcrev 0
+%define rcrev 5
# The git snapshot level
-%define gitrev 0
+%define gitrev 2
# Set rpm version accordingly
%define rpmversion 2.6.%{upstream_sublevel}
%endif
@@ -128,7 +128,7 @@ Summary: The Linux kernel
%define doc_build_fail true
%endif
-%define rawhide_skip_docs 0
+%define rawhide_skip_docs 1
%if 0%{?rawhide_skip_docs}
%define with_doc 0
%define doc_build_fail true
@@ -149,7 +149,7 @@ Summary: The Linux kernel
# Set debugbuildsenabled to 1 for production (build separate debug kernels)
# and 0 for rawhide (all kernels are debug kernels).
# See also 'make debug' and 'make release'.
-%define debugbuildsenabled 1
+%define debugbuildsenabled 0
# Want to build a vanilla kernel build without any non-upstream patches?
%define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
@@ -175,7 +175,7 @@ Summary: The Linux kernel
%else
%define gittag .git0
%endif
-%define pkg_release 0.%{fedora_build}%{?rctag}%{?gittag}%{?buildid}%{?dist}
+%define pkg_release 0%{?rctag}%{?gittag}.%{fedora_build}%{?buildid}%{?dist}
%endif
@@ -609,10 +609,6 @@ Patch202: linux-2.6-debug-taint-vm.patch
Patch203: linux-2.6-debug-vm-would-have-oomkilled.patch
Patch204: linux-2.6-debug-always-inline-kzalloc.patch
-Patch210: debug-tty-print-dev-name.patch
-
-Patch300: pnp-log-pnp-resources-as-we-do-for-pci.patch
-
Patch380: linux-2.6-defaults-pci_no_msi.patch
Patch381: linux-2.6-defaults-pci_use_crs.patch
Patch383: linux-2.6-defaults-aspm.patch
@@ -654,8 +650,12 @@ Patch1555: fix_xen_guest_on_old_EC2.patch
# nouveau + drm fixes
Patch1810: drm-nouveau-updates.patch
Patch1819: drm-intel-big-hammer.patch
+# intel drm is all merged upstream
+Patch1824: drm-intel-next.patch
# make sure the lvds comes back on lid open
Patch1825: drm-intel-make-lvds-work.patch
+Patch1826: drm-intel-edp-fixes.patch
+
Patch1900: linux-2.6-intel-iommu-igfx.patch
# linux1394 git patches
@@ -694,52 +694,20 @@ Patch12018: neuter_intel_microcode_load.patch
Patch12030: tpm-fix-stall-on-boot.patch
-# Wacom Bamboo
-Patch12100: wacom-01-add-fuzz-parameters-to-features.patch
-Patch12105: wacom-02-parse-the-bamboo-device-family.patch
-Patch12110: wacom-03-collect-device-quirks-into-single-function.patch
-Patch12115: wacom-04-add-support-for-the-bamboo-touch-trackpad.patch
-Patch12120: wacom-05-add-a-quirk-for-low-resolution-bamboo-devices.patch
-Patch12125: wacom-06-request-tablet-data-for-bamboo-pens.patch
-Patch12130: wacom-07-move-bamboo-touch-irq-to-its-own-function.patch
-Patch12135: wacom-08-add-support-for-bamboo-pen.patch
-Patch12140: wacom-09-disable-bamboo-touchpad-when-pen-is-being-used.patch
-
# Runtime power management
-Patch12200: linux-2.6-bluetooth-autosuspend.patch
-Patch12201: linux-2.6-uvc-autosuspend.patch
-Patch12202: linux-2.6-qcserial-autosuspend.patch
Patch12203: linux-2.6-usb-pci-autosuspend.patch
Patch12204: linux-2.6-enable-more-pci-autosuspend.patch
Patch12205: runtime_pm_fixups.patch
-Patch12225: pci-crs-fixes.patch
-Patch12226: x86-never-alloc-pci-from-the-last-1M-below-4G.patch
-
-Patch12300: btusb-macbookpro-7-1.patch
-Patch12301: btusb-macbookpro-6-2.patch
-Patch12304: add-macbookair3-ids.patch
-
Patch12303: dmar-disable-when-ricoh-multifunction.patch
-Patch12305: xhci_hcd-suspend-resume.patch
-
-Patch12308: fix-i8k-inline-asm.patch
-
-Patch12405: inet_diag-make-sure-we-run-the-same-bytecode-we-audited.patch
-Patch12408: netlink-make-nlmsg_find_attr-take-a-const-ptr.patch
-
-Patch12406: posix-cpu-timers-workaround-to-suppress-problems-with-mt-exec.patch
-
-Patch12410: tty-make-tiocgicount-a-handler.patch
-Patch12411: tty-icount-changeover-for-other-main-devices.patch
+Patch12401: debug-tty-print-dev-name.patch
-Patch12413: tpm-autodetect-itpm-devices.patch
+Patch12410: mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch
+Patch12411: mm-vmstat-use-a-single-setter-function-and-callback-for-adjusting-percpu-thresholds.patch
-Patch12420: mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch
-Patch12421: mm-vmstat-use-a-single-setter-function-and-callback-for-adjusting-percpu-thresholds.patch
-
-Patch12430: sched-cure-more-NO_HZ-load-average-woes.patch
+# rhbz#650934
+Patch12420: sched-cure-more-NO_HZ-load-average-woes.patch
%endif
@@ -1099,17 +1067,17 @@ else
fi
# Now build the fedora kernel tree.
-if [ -d linux-%{KVERREL} ]; then
+if [ -d linux-%{kversion}.%{_target_cpu} ]; then
# Just in case we ctrl-c'd a prep already
rm -rf deleteme.%{_target_cpu}
# Move away the stale away, and delete in background.
- mv linux-%{KVERREL} deleteme.%{_target_cpu}
+ mv linux-%{kversion}.%{_target_cpu} deleteme.%{_target_cpu}
rm -rf deleteme.%{_target_cpu} &
fi
-cp -rl vanilla-%{vanillaversion} linux-%{KVERREL}
+cp -rl vanilla-%{vanillaversion} linux-%{kversion}.%{_target_cpu}
-cd linux-%{KVERREL}
+cd linux-%{kversion}.%{_target_cpu}
# released_kernel with possible stable updates
%if 0%{?stable_base}
@@ -1216,8 +1184,6 @@ ApplyPatch linux-2.6-debug-taint-vm.patch
ApplyPatch linux-2.6-debug-vm-would-have-oomkilled.patch
ApplyPatch linux-2.6-debug-always-inline-kzalloc.patch
-ApplyPatch debug-tty-print-dev-name.patch
-
#
# PCI
#
@@ -1227,10 +1193,7 @@ ApplyPatch linux-2.6-defaults-pci_use_crs.patch
# enable ASPM by default on hardware we expect to work
ApplyPatch linux-2.6-defaults-aspm.patch
-# helps debug resource conflicts [c1f3f281]
-ApplyPatch pnp-log-pnp-resources-as-we-do-for-pci.patch
-
-ApplyPatch ima-allow-it-to-be-completely-disabled-and-default-off.patch
+#ApplyPatch ima-allow-it-to-be-completely-disabled-and-default-off.patch
#
# SCSI Bits.
@@ -1289,9 +1252,11 @@ ApplyPatch fix_xen_guest_on_old_EC2.patch
ApplyOptionalPatch drm-nouveau-updates.patch
# Intel DRM
+ApplyOptionalPatch drm-intel-next.patch
ApplyPatch drm-intel-big-hammer.patch
ApplyPatch drm-intel-make-lvds-work.patch
ApplyPatch linux-2.6-intel-iommu-igfx.patch
+ApplyPatch drm-intel-edp-fixes.patch
# linux1394 git patches
#ApplyPatch linux-2.6-firewire-git-update.patch
@@ -1325,61 +1290,21 @@ ApplyPatch neuter_intel_microcode_load.patch
# try to fix stalls during boot (#530393)
ApplyPatch tpm-fix-stall-on-boot.patch
-# Wacom Bamboo
-ApplyPatch wacom-01-add-fuzz-parameters-to-features.patch
-ApplyPatch wacom-02-parse-the-bamboo-device-family.patch
-ApplyPatch wacom-03-collect-device-quirks-into-single-function.patch
-ApplyPatch wacom-04-add-support-for-the-bamboo-touch-trackpad.patch
-ApplyPatch wacom-05-add-a-quirk-for-low-resolution-bamboo-devices.patch
-ApplyPatch wacom-06-request-tablet-data-for-bamboo-pens.patch
-ApplyPatch wacom-07-move-bamboo-touch-irq-to-its-own-function.patch
-ApplyPatch wacom-08-add-support-for-bamboo-pen.patch
-ApplyPatch wacom-09-disable-bamboo-touchpad-when-pen-is-being-used.patch
-
# Runtime PM
-ApplyPatch linux-2.6-bluetooth-autosuspend.patch
-ApplyPatch linux-2.6-uvc-autosuspend.patch
-ApplyPatch linux-2.6-qcserial-autosuspend.patch
ApplyPatch linux-2.6-usb-pci-autosuspend.patch
ApplyPatch linux-2.6-enable-more-pci-autosuspend.patch
ApplyPatch runtime_pm_fixups.patch
-# PCI patches to fix problems with _CRS
-# ( from linux-pci list )
-ApplyPatch pci-crs-fixes.patch
-ApplyPatch x86-never-alloc-pci-from-the-last-1M-below-4G.patch
-
-ApplyPatch btusb-macbookpro-7-1.patch
-ApplyPatch btusb-macbookpro-6-2.patch
-ApplyPatch add-macbookair3-ids.patch
-
# rhbz#605888
ApplyPatch dmar-disable-when-ricoh-multifunction.patch
-ApplyPatch xhci_hcd-suspend-resume.patch
-
-ApplyPatch fix-i8k-inline-asm.patch
-
-# rhbz#651264 (CVE-2010-3880)
-ApplyPatch inet_diag-make-sure-we-run-the-same-bytecode-we-audited.patch
-ApplyPatch netlink-make-nlmsg_find_attr-take-a-const-ptr.patch
-
-# rhbz#656264
-ApplyPatch posix-cpu-timers-workaround-to-suppress-problems-with-mt-exec.patch
-
-# CVE-2010-4077, CVE-2010-4075 (rhbz#648660, #648663)
-ApplyPatch tty-make-tiocgicount-a-handler.patch
-ApplyPatch tty-icount-changeover-for-other-main-devices.patch
-
-ApplyPatch tpm-autodetect-itpm-devices.patch
+# rhbz#630464
+ApplyPatch debug-tty-print-dev-name.patch
# backport some fixes for kswapd from mmotm, rhbz#649694
ApplyPatch mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch
ApplyPatch mm-vmstat-use-a-single-setter-function-and-callback-for-adjusting-percpu-thresholds.patch
-# rhbz#650934
-ApplyPatch sched-cure-more-NO_HZ-load-average-woes.patch
-
# END OF PATCH APPLICATIONS
%endif
@@ -1667,7 +1592,7 @@ rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/boot
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
-cd linux-%{KVERREL}
+cd linux-%{kversion}.%{_target_cpu}
%if %{with_debug}
BuildKernel %make_target %kernel_image debug
@@ -1698,8 +1623,7 @@ BuildKernel %make_target %kernel_image smp
%if %{with_doc}
# Make the HTML and man pages.
-# %{?_smp_mflags} frequently fails when j>8
-make htmldocs mandocs || %{doc_build_fail}
+make %{?_smp_mflags} htmldocs mandocs || %{doc_build_fail}
# sometimes non-world-readable files sneak into the kernel source tree
chmod -R a=rX Documentation
@@ -1733,7 +1657,7 @@ find Documentation -type d | xargs chmod u+w
%install
-cd linux-%{KVERREL}
+cd linux-%{kversion}.%{_target_cpu}
%if %{with_doc}
docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{rpmversion}
@@ -1994,123 +1918,113 @@ fi
# || ||
%changelog
-* Wed Dec 08 2010 Kyle McMartin <kyle@redhat.com> 2.6.36.2-12.rc1
-- Linux stable 2.6.36.2-rc1
-- Drop patches merged in stable series:
- tty-dont-allow-reopen-when-ldisc-is-changing.patch
- tty-ldisc-fix-open-flag-handling.patch
- tty-open-hangup-race-fixup.patch
- tty-restore-tty_ldisc_wait_idle.patch
- hda_realtek-handle-unset-external-amp-bits.patch
- ipc-shm-fix-information-leak-to-user.patch
- ipc-zero-struct-memory-for-compat-fns.patch
- linux-2.6-rcu-sched-warning.patch
- pnpacpi-cope-with-invalid-device-ids.patch
- radeon-mc-vram-map-needs-to-be-gt-pci-aperture.patch
-
-* Wed Dec 08 2010 Kyle McMartin <kyle@redhat.com>
+* Wed Dec 08 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.rc5.git2.1
+- Linux 2.6.37-rc5-git2
- sched-cure-more-NO_HZ-load-average-woes.patch: fix some of the complaints
in 2.6.35+ about load average with dynticks. (rhbz#650934)
+* Tue Dec 07 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.rc5.git0.1
+- Linux 2.6.37-rc5
+
* Sat Dec 04 2010 Kyle McMartin <kyle@redhat.com>
- Enable C++ symbol demangling with perf by linking against libiberty.a,
which is LGPL2.
-* Fri Dec 03 2010 Kyle McMartin <kyle@redhat.com> 2.6.36.1-11
-- Enable HP ILO on x86_64. (#571329)
+* Fri Dec 03 2010 Kyle McMartin <kyle@redhat.com>
+- Linux 2.6.37-rc4-git3
+- Enable HP ILO on x86_64 for (#571329)
+- Drop merged drm-fixes.patch, split out edp-fixes.
+- tty-dont-allow-reopen-when-ldisc-is-changing.patch: upstream.
+- tty-ldisc-fix-open-flag-handling.patch: upstream.
+- Enable CIFS_ACL.
* Thu Dec 02 2010 Kyle McMartin <kyle@redhat.com>
- Grab some of Mel's fixes from -mmotm to hopefully sort out #649694.
- They've been tested by a few on that bug on 2.6.35, but let's push
- it out to a bigger audience.
-* Mon Nov 29 2010 Kyle McMartin <kyle@redhat.com>
-- PNP: log PNP resources, as we do for PCI [c1f3f281]
- should help us debug resource conflicts (requested by bjorn.)
+* Wed Dec 01 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.rc4.git1.1
+- Linux 2.6.37-rc4-git1
+- Pull in DRM fixes that are queued for -rc5 [3074adc8]
+ + edp-fixes on top
-* Mon Nov 29 2010 Kyle McMartin <kyle@redhat.com> 2.6.36.1-10
-- tpm-autodetect-itpm-devices.patch: Auto-fix TPM issues on various
- laptops which prevented suspend/resume. (#647132)
-- tty fixes from kernel-git (#630464)
-
-* Fri Nov 26 2010 Kyle McMartin <kyle@redhat.com>
-- Quiet a build warning the previous INET_DIAG fix caused.
+* Tue Nov 30 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.rc4.git0.1
+- Linux 2.6.37-rc4
-* Fri Nov 26 2010 Kyle McMartin <kyle@redhat.com>
-- Plug stack leaks in tty/serial drivers. (#648663, #648660)
+* Mon Nov 29 2010 Kyle McMartin <kyle@redhat.com>
+- Update debug-vm-would_have_oomkilled patch.
-* Fri Nov 26 2010 Kyle McMartin <kyle@redhat.com>
-- hda/realtek: handle unset external amp config (#657388)
+* Mon Nov 29 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.rc3.git6.1
+- Linux 2.6.37-rc3-git6
+- TTY: open/hangup race fixup (rhbz#630464)
-* Wed Nov 24 2010 Kyle McMartin <kyle@redhat.com>
-- Disable FSCACHE for CIFS until issues are addressed. (#656498)
+* Fri Nov 26 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.rc3.git3.1
+- Linux 2.6.37-rc3-git3
+- Print tty->flags as well in debugging patch...
-* Wed Nov 24 2010 Kyle McMartin <kyle@redhat.com>
-- drm/radeon/kms: MC vram map needs to be >= pci aperture size (fdo#28402)
+* Fri Nov 26 2010 Kyle McMartin <kyle@redhat.com>
+- Copy tty_open WARN_ON debugging patch from rawhide.
-* Wed Nov 24 2010 Kyle McMartin <kyle@redhat.com>
-- Fix graphics on HP 2530p (korg#23542)
+* Fri Nov 26 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.rc3.git2.1
+- Linux 2.6.37-rc3-git2
+- CGROUP_MEM_RES_CTLR_SWAP_ENABLED is not set, so the cgroup memory
+ resource controller swap accounting is disabled by default. You can
+ enable it with 'swapaccount' if desired.
+- TTY: don't allow reopen when ldisc is changing (rhbz#630464)
-* Tue Nov 23 2010 Kyle McMartin <kyle@redhat.com>
-- zero struct memory in ipc compat (CVE-2010-4073) (#648658)
-- zero struct memory in ipc shm (CVE-2010-4072) (#648656)
-- fix logic error in INET_DIAG bytecode auditing (CVE-2010-3880) (#651264)
-- posix-cpu-timers: workaround to suppress the problems with mt exec
- (rhbz#656264)
+* Wed Nov 24 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.rc3.git1.1
+- Linux 2.6.37-rc3-git1
-* Tue Nov 23 2010 Kyle McMartin <kyle@redhat.com>
-- fix-i8k-inline-asm.patch: backport gcc miscompilation fix from git
- [22d3243d, 6b4e81db] (rhbz#647677)
+* Mon Nov 22 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.rc3.git0.1
+- Linux 2.6.37-rc3
-* Mon Nov 22 2010 Kyle McMartin <kyle@redhat.com>
-- Add a debugging patch to help track down which tty is being
- poked by plymouth.
+* Sat Nov 20 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.rc2.git7.1
+- Linux 2.6.37-rc2-git7
-* Mon Nov 22 2010 Kyle McMartin <kyle@redhat.com> 2.6.36.1-9
-- Linux stable 2.6.36.1
+* Fri Nov 19 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.rc2.git5.1
+- Linux 2.6.37-rc2-git5
-* Mon Nov 22 2010 Kyle McMartin <kyle@redhat.com> 2.6.36.1-8.rc1
-- Merge 100eeae2 (TTY: restore tty_ldisc_wait_idle) which should fix the WARN
- in tty_open in rawhide.
+* Thu Nov 18 2010 Kyle McMartin <kyle@redhat.com>
+- Move %{fedora_build} in the un-released (ie: -git/-rc) kernel case for
+ a variety of reasons, principally so that:
+ 1: Bumping %baserelease isn't needed if we're just updating snapshots.
+ 2: %buildid will sort as newer so we don't need to bump baserelease when
+ building bugzilla fixes.
-* Mon Nov 22 2010 Kyle McMartin <kyle@redhat.com> 2.6.36.1-7.rc1
-- Make vmlinuz world readable again.
+* Wed Nov 17 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.1.rc2.git2
+- Linux 2.6.37-rc2-git2
+- enable STRICT_DEVMEM on s390x.
-* Sat Nov 20 2010 Kyle McMartin <kyle@redhat.com>
-- Merge patch from Aris to allow kernel-debuginfo to be multiply-installed
- (means we had to move the build dir, kind of a bummer, but I verified
- that a -gitN to -gitN+1 worked.)
+* Wed Nov 17 2010 Kyle McMartin <kyle@redhat.com>
+- Make vmlinuz/System.map root read-write only by default. You can just
+ chmod 644 them later if you (unlikely) need them without root.
-* Sat Nov 20 2010 Chuck Ebbert <cebbert@redhat.com> 2.6.36.1-6.rc1
-- Linux 2.6.36.1-rc1
-- Comment out upstreamed patches:
- secmark-do-not-return-early-if-there-was-no-error.patch
+* Mon Nov 15 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.1.rc2.git0
+- Linux 2.6.37-rc2
-* Sat Nov 20 2010 Kyle McMartin <kyle@redhat.com>
-- secmark-do-not-return-early-if-there-was-no-error.patch: requested
- by eparis@. (Fixes a BUG when using secmark.)
+* Sat Nov 13 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.1.rc1.git10
+- Linux 2.6.37-rc1-git10
+- SECURITY_DMESG_RESTRICT added, the principle of least surprise dictates
+ we should probably have it off. If you want to restrict dmesg access
+ you may use the kernel.dmesg_restrict sysctl.
+- linux-2.6-bluetooth-autosuspend.patch: merged upstream.
-* Wed Nov 17 2010 Kyle McMartin <kyle@redhat.com> 2.6.36-5
-- Disable drm/intel rebase until it can be fixed.
+* Tue Nov 09 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.1.rc1.git7
+- Linux 2.6.37-rc1-git7
-* Wed Nov 17 2010 Kyle McMartin <kyle@redhat.com>
-- Make vmlinuz/System.map root read-write only by default. You can just
- chmod 644 them later if you (unlikely) need them without root.
+* Mon Nov 08 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.1.rc1.git5
+- Linux 2.6.37-rc1-git5
-* Tue Nov 16 2010 Kyle McMartin <kyle@redhat.com> 2.6.36-4
-- Disable parallel doc builds, they fail. Constantly.
+* Mon Nov 08 2010 Kyle McMartin <kyle@redhat.com>
+- Cherry-pick utrace-ptrace fixes from mayoung. Thanks!
-* Tue Nov 16 2010 Kyle McMartin <kyle@redhat.com> 2.6.36-3
-- Rebase drm/intel to 2.6.37-rc2+edp_fixes, hopefully to sort out most of
- the issues folks with eDP are having.
-- Switch to release builds and turn on debugging flavours.
+* Tue Nov 02 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.1.rc1.git0
+- Linux 2.6.37-rc1
-* Mon Nov 15 2010 Kyle McMartin <kyle@redhat.com>
-- rhbz#651019: pull in support for MBA3.
+* Tue Oct 26 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.1.rc0.git8
+- Linux 2.6.36-git8
-* Mon Nov 15 2010 Kyle McMartin <kyle@redhat.com> 2.6.36-2
-- drm-i915-reprogram-power-monitoring-registers-on-resume.patch: fix intel_ips
- driver.
+* Fri Oct 22 2010 Kyle McMartin <kyle@redhat.com> 2.6.37-0.1.rc0.git2
+- Switch to tracking git snapshots of what will become 2.6.37.
+- Fix context rejects in utrace and a few other patches.
* Wed Oct 20 2010 Chuck Ebbert <cebbert@redhat.com> 2.6.36-1
- Linux 2.6.36
diff --git a/linux-2.6-32bit-mmap-exec-randomization.patch b/linux-2.6-32bit-mmap-exec-randomization.patch
index fe91e0abf..d42638c27 100644
--- a/linux-2.6-32bit-mmap-exec-randomization.patch
+++ b/linux-2.6-32bit-mmap-exec-randomization.patch
@@ -14,9 +14,9 @@
--- b/mm/mmap.c
+++ b/mm/mmap.c
@@ -28,6 +28,7 @@
- #include <linux/rmap.h>
#include <linux/mmu_notifier.h>
#include <linux/perf_event.h>
+ #include <linux/audit.h>
+#include <linux/random.h>
#include <asm/uaccess.h>
diff --git a/linux-2.6-bluetooth-autosuspend.patch b/linux-2.6-bluetooth-autosuspend.patch
deleted file mode 100644
index 663b79979..000000000
--- a/linux-2.6-bluetooth-autosuspend.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-commit 6aa42966dea9a1fc02a714211ea489c3278bf8d4
-Author: Matthew Garrett <mjg@redhat.com>
-Date: Thu Sep 16 13:34:55 2010 -0400
-
- bluetooth: Take a runtime pm reference on hid connections
-
- Bluetooth runtime PM interacts badly with input devices - the connection
- will be dropped if the device becomes idle, resulting in noticable lag when
- the user interacts with the input device again. Bump the pm runtime count
- when the device is associated and release it when it's disassociated in
- order to avoid this.
-
- Signed-off-by: Matthew Garrett <mjg@redhat.com>
-
-diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
-index bfe641b..a4489a7 100644
---- a/net/bluetooth/hidp/core.c
-+++ b/net/bluetooth/hidp/core.c
-@@ -36,6 +36,7 @@
- #include <linux/file.h>
- #include <linux/init.h>
- #include <linux/wait.h>
-+#include <linux/pm_runtime.h>
- #include <net/sock.h>
-
- #include <linux/input.h>
-@@ -622,6 +623,14 @@ static int hidp_session(void *arg)
- return 0;
- }
-
-+static struct hci_dev *hidp_get_hci(struct hidp_session *session)
-+{
-+ bdaddr_t *src = &bt_sk(session->ctrl_sock->sk)->src;
-+ bdaddr_t *dst = &bt_sk(session->ctrl_sock->sk)->dst;
-+
-+ return hci_get_route(dst, src);
-+}
-+
- static struct device *hidp_get_device(struct hidp_session *session)
- {
- bdaddr_t *src = &bt_sk(session->ctrl_sock->sk)->src;
-@@ -819,6 +828,7 @@ fault:
- int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock)
- {
- struct hidp_session *session, *s;
-+ struct hci_dev *hdev;
- int err;
-
- BT_DBG("");
-@@ -889,6 +899,10 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock,
- hidp_input_event(session->input, EV_LED, 0, 0);
- }
-
-+ hdev = hidp_get_hci(session);
-+ pm_runtime_get(hdev->parent);
-+ hci_dev_put(hdev);
-+
- up_write(&hidp_session_sem);
- return 0;
-
-@@ -925,6 +939,7 @@ failed:
- int hidp_del_connection(struct hidp_conndel_req *req)
- {
- struct hidp_session *session;
-+ struct hci_dev *hdev;
- int err = 0;
-
- BT_DBG("");
-@@ -952,6 +967,9 @@ int hidp_del_connection(struct hidp_conndel_req *req)
- } else
- err = -ENOENT;
-
-+ hdev = hidp_get_hci(session);
-+ pm_runtime_put(hdev->parent);
-+ hci_dev_put(hdev);
- up_read(&hidp_session_sem);
- return err;
- }
-
-commit 482eca592615e85b048753750b101d051b77fde9
-Author: Matthew Garrett <mjg@redhat.com>
-Date: Thu Sep 16 13:49:24 2010 -0400
-
- bluetooth: Remove some unnecessary error messages
-
- The main reason for these urbs to error out on submission is that runtime
- pm has kicked in, which is unnecessary noise. Let's just drop them.
-
- Signed-off-by: Matthew Garrett <mjg@redhat.com>
-
-diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
-index d22ce3c..3ace025 100644
---- a/drivers/bluetooth/btusb.c
-+++ b/drivers/bluetooth/btusb.c
-@@ -229,11 +229,8 @@ static void btusb_intr_complete(struct urb *urb)
- usb_anchor_urb(urb, &data->intr_anchor);
-
- err = usb_submit_urb(urb, GFP_ATOMIC);
-- if (err < 0) {
-- BT_ERR("%s urb %p failed to resubmit (%d)",
-- hdev->name, urb, -err);
-+ if (err < 0)
- usb_unanchor_urb(urb);
-- }
- }
-
- static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags)
-@@ -313,11 +310,8 @@ static void btusb_bulk_complete(struct urb *urb)
- usb_mark_last_busy(data->udev);
-
- err = usb_submit_urb(urb, GFP_ATOMIC);
-- if (err < 0) {
-- BT_ERR("%s urb %p failed to resubmit (%d)",
-- hdev->name, urb, -err);
-+ if (err < 0)
- usb_unanchor_urb(urb);
-- }
- }
-
- static int btusb_submit_bulk_urb(struct hci_dev *hdev, gfp_t mem_flags)
-@@ -402,11 +396,8 @@ static void btusb_isoc_complete(struct urb *urb)
- usb_anchor_urb(urb, &data->isoc_anchor);
-
- err = usb_submit_urb(urb, GFP_ATOMIC);
-- if (err < 0) {
-- BT_ERR("%s urb %p failed to resubmit (%d)",
-- hdev->name, urb, -err);
-+ if (err < 0)
- usb_unanchor_urb(urb);
-- }
- }
-
- static void inline __fill_isoc_descriptor(struct urb *urb, int len, int mtu)
-
-commit fd763c5b14ed99ac2401f8e8f1a07c3687ae01cc
-Author: Matthew Garrett <mjg@redhat.com>
-Date: Thu Sep 16 13:37:38 2010 -0400
-
- bluetooth: Enable USB autosuspend by default on btusb
-
- We've done this for a while in Fedora without any obvious problems other
- than some interaction with input devices. Those should be fixed now, so
- let's try this in mainline.
-
- Signed-off-by: Matthew Garrett <mjg@redhat.com>
-
-diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
-index 3ace025..03b64e4 100644
---- a/drivers/bluetooth/btusb.c
-+++ b/drivers/bluetooth/btusb.c
-@@ -1014,6 +1014,8 @@ static int btusb_probe(struct usb_interface *intf,
-
- usb_set_intfdata(intf, data);
-
-+ usb_enable_autosuspend(interface_to_usbdev(intf));
-+
- return 0;
- }
-
diff --git a/linux-2.6-crash-driver.patch b/linux-2.6-crash-driver.patch
index 7b518bb88..0f11aba0d 100644
--- a/linux-2.6-crash-driver.patch
+++ b/linux-2.6-crash-driver.patch
@@ -233,18 +233,6 @@ index 3141dd3..153658c 100644
config LEGACY_PTY_COUNT
int "Maximum number of legacy PTY in use"
-diff --git a/drivers/char/Makefile b/drivers/char/Makefile
-index f957edf..604c418 100644
---- a/drivers/char/Makefile
-+++ b/drivers/char/Makefile
-@@ -111,6 +111,8 @@ obj-$(CONFIG_PS3_FLASH) += ps3flash.o
- obj-$(CONFIG_JS_RTC) += js-rtc.o
- js-rtc-y = rtc.o
-
-+obj-$(CONFIG_CRASH) += crash.o
-+
- # Files generated that shall be removed upon make clean
- clean-files := consolemap_deftbl.c defkeymap.c
diff --git a/drivers/char/crash.c b/drivers/char/crash.c
new file mode 100644
@@ -380,6 +368,14 @@ index 0000000..e5437de
+module_exit(crash_cleanup_module);
+
+MODULE_LICENSE("GPL");
---
-1.7.0.1
+diff --git a/drivers/char/Makefile b/drivers/char/Makefile
+index ba53ec9..6588b33 100644
+--- a/drivers/char/Makefile
++++ b/drivers/char/Makefile
+@@ -98,3 +98,5 @@ obj-$(CONFIG_RAMOOPS) += ramoops.o
+
+ obj-$(CONFIG_JS_RTC) += js-rtc.o
+ js-rtc-y = rtc.o
++
++obj-$(CONFIG_CRASH) += crash.o
diff --git a/linux-2.6-enable-more-pci-autosuspend.patch b/linux-2.6-enable-more-pci-autosuspend.patch
index b1f92b134..666ded640 100644
--- a/linux-2.6-enable-more-pci-autosuspend.patch
+++ b/linux-2.6-enable-more-pci-autosuspend.patch
@@ -1,7 +1,20 @@
-diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h.mjg linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h
---- linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h.mjg 2010-10-04 13:52:05.086789354 -0400
-+++ linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h 2010-10-04 13:52:50.948801001 -0400
-@@ -406,16 +406,15 @@ struct acpi_predefined_data {
+ drivers/acpi/acpica/aclocal.h | 7 +--
+ drivers/acpi/acpica/evgpe.c | 75 +++++++++++++++-----------------
+ drivers/acpi/acpica/evgpeinit.c | 11 +----
+ drivers/acpi/acpica/evgpeutil.c | 5 +-
+ drivers/acpi/acpica/evxface.c | 23 +++++-----
+ drivers/acpi/ec.c | 2 +-
+ drivers/acpi/pci_bind.c | 86 ++++++++++++++++++++++++++++++++++++++
+ drivers/acpi/sleep.c | 2 +-
+ drivers/char/ipmi/ipmi_si_intf.c | 2 +-
+ include/acpi/acpixf.h | 3 +-
+ 10 files changed, 143 insertions(+), 73 deletions(-)
+
+diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
+index 2ceb0c0..3663362 100644
+--- a/drivers/acpi/acpica/aclocal.h
++++ b/drivers/acpi/acpica/aclocal.h
+@@ -406,17 +406,16 @@ struct acpi_predefined_data {
*
****************************************************************************/
@@ -13,6 +26,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h.mjg linux-2.6.35.x86_
void *context; /* Context to be passed to handler */
- struct acpi_namespace_node *method_node; /* Method node for this GPE level (saved) */
u8 orig_flags; /* Original misc info about this GPE */
+ u8 orig_enabled; /* Set if the GPE was originally enabled */
};
-union acpi_gpe_dispatch_info {
@@ -20,7 +34,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h.mjg linux-2.6.35.x86_
struct acpi_namespace_node *method_node; /* Method node for this GPE level */
struct acpi_handler_info *handler;
};
-@@ -425,7 +424,7 @@ union acpi_gpe_dispatch_info {
+@@ -426,7 +425,7 @@ union acpi_gpe_dispatch_info {
* NOTE: Important to keep this struct as small as possible.
*/
struct acpi_gpe_event_info {
@@ -29,10 +43,11 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/aclocal.h.mjg linux-2.6.35.x86_
struct acpi_gpe_register_info *register_info; /* Backpointer to register info */
u8 flags; /* Misc info about this GPE */
u8 gpe_number; /* This GPE */
-diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c
---- linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg 2010-10-04 13:52:05.088789399 -0400
-+++ linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c 2010-10-04 13:52:50.950801045 -0400
-@@ -474,9 +474,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_as
+diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
+index f226eac..c4b1c4c 100644
+--- a/drivers/acpi/acpica/evgpe.c
++++ b/drivers/acpi/acpica/evgpe.c
+@@ -474,9 +474,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
* Must check for control method type dispatch one more time to avoid a
* race with ev_gpe_install_handler
*/
@@ -43,7 +58,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64
/* Allocate the evaluation information block */
info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
-@@ -575,41 +573,15 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_eve
+@@ -575,41 +573,15 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
}
/*
@@ -93,7 +108,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64
/*
* Disable the GPE, so it doesn't keep firing before the method has a
* chance to run (it runs asynchronously with interrupts enabled).
-@@ -634,10 +606,34 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_eve
+@@ -634,10 +606,34 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
"Unable to queue handler for GPE[0x%2X] - event disabled",
gpe_number));
}
@@ -111,7 +126,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64
+ dispatch.
+ handler->
+ context);
-+
+
+ /* It is now safe to clear level-triggered events. */
+
+ if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
@@ -125,12 +140,12 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64
+ }
+ }
+ }
-
++
+ if (!(gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)) {
/*
* No handler or method to run!
* 03/2010: This case should no longer be possible. We will not allow
-@@ -658,7 +654,6 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_eve
+@@ -658,7 +654,6 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
gpe_number));
return_UINT32(ACPI_INTERRUPT_NOT_HANDLED);
}
@@ -138,10 +153,11 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpe.c.mjg linux-2.6.35.x86_64
}
return_UINT32(ACPI_INTERRUPT_HANDLED);
-diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeinit.c.mjg linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeinit.c
---- linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeinit.c.mjg 2010-10-04 13:52:05.089789421 -0400
-+++ linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeinit.c 2010-10-04 13:52:50.951801067 -0400
-@@ -392,16 +392,7 @@ acpi_ev_match_gpe_method(acpi_handle obj
+diff --git a/drivers/acpi/acpica/evgpeinit.c b/drivers/acpi/acpica/evgpeinit.c
+index 2c7def9..9915b52 100644
+--- a/drivers/acpi/acpica/evgpeinit.c
++++ b/drivers/acpi/acpica/evgpeinit.c
+@@ -386,16 +386,7 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
return_ACPI_STATUS(AE_OK);
}
@@ -159,10 +175,11 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeinit.c.mjg linux-2.6.35.x8
/*
* If there is already a method, ignore this method. But check
* for a type mismatch (if both the _Lxx AND _Exx exist)
-diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeutil.c.mjg linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeutil.c
---- linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeutil.c.mjg 2010-10-04 13:52:05.090789443 -0400
-+++ linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeutil.c 2010-10-04 13:52:50.952801089 -0400
-@@ -323,12 +323,11 @@ acpi_ev_delete_gpe_handlers(struct acpi_
+diff --git a/drivers/acpi/acpica/evgpeutil.c b/drivers/acpi/acpica/evgpeutil.c
+index 19a0e51..434ad1b 100644
+--- a/drivers/acpi/acpica/evgpeutil.c
++++ b/drivers/acpi/acpica/evgpeutil.c
+@@ -323,12 +323,11 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
ACPI_GPE_REGISTER_WIDTH)
+ j];
@@ -177,10 +194,11 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evgpeutil.c.mjg linux-2.6.35.x8
}
}
}
-diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c
---- linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg 2010-10-04 13:52:05.092789487 -0400
-+++ linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c 2010-10-04 13:52:50.954801133 -0400
-@@ -662,6 +662,8 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_ha
+diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c
+index 36af222..b097136 100644
+--- a/drivers/acpi/acpica/evxface.c
++++ b/drivers/acpi/acpica/evxface.c
+@@ -662,6 +662,8 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler)
* edge- or level-triggered interrupt.
* Address - Address of the handler
* Context - Value passed to the handler on each GPE
@@ -189,7 +207,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_
*
* RETURN: Status
*
-@@ -671,7 +673,8 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_ha
+@@ -671,7 +673,8 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler)
acpi_status
acpi_install_gpe_handler(acpi_handle gpe_device,
u32 gpe_number,
@@ -199,7 +217,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_
{
struct acpi_gpe_event_info *gpe_event_info;
struct acpi_handler_info *handler;
-@@ -711,8 +714,7 @@ acpi_install_gpe_handler(acpi_handle gpe
+@@ -711,8 +714,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
/* Make sure that there isn't a handler there already */
@@ -209,7 +227,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_
status = AE_ALREADY_EXISTS;
goto free_and_exit;
}
-@@ -721,7 +723,6 @@ acpi_install_gpe_handler(acpi_handle gpe
+@@ -721,7 +723,6 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
handler->address = address;
handler->context = context;
@@ -217,15 +235,16 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_
handler->orig_flags = gpe_event_info->flags &
(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK);
-@@ -733,17 +734,17 @@ acpi_install_gpe_handler(acpi_handle gpe
+@@ -732,7 +733,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
*/
if ((handler->orig_flags & ACPI_GPE_DISPATCH_METHOD)
-- && !(gpe_event_info->flags & ACPI_GPE_CAN_WAKE))
-+ && !(gpe_event_info->flags & ACPI_GPE_CAN_WAKE) && !keep_method)
+- && gpe_event_info->runtime_count) {
++ && gpe_event_info->runtime_count && !keep_method) {
+ handler->orig_enabled = 1;
(void)acpi_raw_disable_gpe(gpe_event_info);
-
- /* Install the handler */
+ }
+@@ -741,10 +742,10 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
gpe_event_info->dispatch.handler = handler;
@@ -239,7 +258,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_
gpe_event_info->flags |= (u8) (type | ACPI_GPE_DISPATCH_HANDLER);
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
-@@ -812,8 +813,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_
+@@ -813,8 +814,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
/* Make sure that a handler is indeed installed */
@@ -249,7 +268,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_
status = AE_NOT_EXIST;
goto unlock_and_exit;
}
-@@ -829,9 +829,8 @@ acpi_remove_gpe_handler(acpi_handle gpe_
+@@ -830,9 +830,8 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
handler = gpe_event_info->dispatch.handler;
@@ -260,10 +279,11 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/acpica/evxface.c.mjg linux-2.6.35.x86_
gpe_event_info->flags &=
~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK);
gpe_event_info->flags |= handler->orig_flags;
-diff -up linux-2.6.35.x86_64/drivers/acpi/ec.c.mjg linux-2.6.35.x86_64/drivers/acpi/ec.c
---- linux-2.6.35.x86_64/drivers/acpi/ec.c.mjg 2010-10-04 13:52:05.094789531 -0400
-+++ linux-2.6.35.x86_64/drivers/acpi/ec.c 2010-10-04 13:52:50.955801156 -0400
-@@ -746,7 +746,7 @@ static int ec_install_handlers(struct ac
+diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
+index 372ff80..9a39f82 100644
+--- a/drivers/acpi/ec.c
++++ b/drivers/acpi/ec.c
+@@ -740,7 +740,7 @@ static int ec_install_handlers(struct acpi_ec *ec)
return 0;
status = acpi_install_gpe_handler(NULL, ec->gpe,
ACPI_GPE_EDGE_TRIGGERED,
@@ -272,9 +292,10 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/ec.c.mjg linux-2.6.35.x86_64/drivers/a
if (ACPI_FAILURE(status))
return -ENODEV;
-diff -up linux-2.6.35.x86_64/drivers/acpi/pci_bind.c.mjg linux-2.6.35.x86_64/drivers/acpi/pci_bind.c
---- linux-2.6.35.x86_64/drivers/acpi/pci_bind.c.mjg 2010-10-04 13:52:05.102789707 -0400
-+++ linux-2.6.35.x86_64/drivers/acpi/pci_bind.c 2010-10-04 13:52:50.962801311 -0400
+diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
+index 2ef0409..8b3cc6a 100644
+--- a/drivers/acpi/pci_bind.c
++++ b/drivers/acpi/pci_bind.c
@@ -28,6 +28,7 @@
#include <linux/pci.h>
#include <linux/pci-acpi.h>
@@ -327,7 +348,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/pci_bind.c.mjg linux-2.6.35.x86_64/dri
static int acpi_pci_unbind(struct acpi_device *device)
{
struct pci_dev *dev;
-@@ -43,6 +81,30 @@ static int acpi_pci_unbind(struct acpi_d
+@@ -43,6 +81,30 @@ static int acpi_pci_unbind(struct acpi_device *device)
if (!dev)
goto out;
@@ -358,7 +379,7 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/pci_bind.c.mjg linux-2.6.35.x86_64/dri
device_set_run_wake(&dev->dev, false);
pci_acpi_remove_pm_notifier(device);
-@@ -71,6 +133,30 @@ static int acpi_pci_bind(struct acpi_dev
+@@ -71,6 +133,30 @@ static int acpi_pci_bind(struct acpi_device *device)
return 0;
pci_acpi_add_pm_notifier(device, dev);
@@ -389,25 +410,24 @@ diff -up linux-2.6.35.x86_64/drivers/acpi/pci_bind.c.mjg linux-2.6.35.x86_64/dri
if (device->wakeup.flags.run_wake)
device_set_run_wake(&dev->dev, true);
-diff -up linux-2.6.35.x86_64/drivers/acpi/sleep.c.mjg linux-2.6.35.x86_64/drivers/acpi/sleep.c
---- linux-2.6.35.x86_64/drivers/acpi/sleep.c.mjg 2010-10-04 13:52:05.103789729 -0400
-+++ linux-2.6.35.x86_64/drivers/acpi/sleep.c 2010-10-04 13:52:50.963801333 -0400
-@@ -631,9 +631,9 @@ int acpi_pm_device_sleep_state(struct de
- acpi_method[3] = 'W';
- status = acpi_evaluate_integer(handle, acpi_method, NULL,
- &d_max);
-- if (ACPI_FAILURE(status)) {
-+ if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
- d_max = d_min;
+diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
+index 721d93b..b0ddef6 100644
+--- a/drivers/acpi/sleep.c
++++ b/drivers/acpi/sleep.c
+@@ -643,7 +643,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p)
+ if (acpi_target_sleep_state != ACPI_STATE_S0 ||
+ status != AE_NOT_FOUND)
+ d_max = d_min;
- } else if (d_max < d_min) {
+ } else if (ACPI_SUCCESS(status) && d_max < d_min) {
/* Warn the user of the broken DSDT */
printk(KERN_WARNING "ACPI: Wrong value from %s\n",
acpi_method);
-diff -up linux-2.6.35.x86_64/drivers/char/ipmi/ipmi_si_intf.c.mjg linux-2.6.35.x86_64/drivers/char/ipmi/ipmi_si_intf.c
---- linux-2.6.35.x86_64/drivers/char/ipmi/ipmi_si_intf.c.mjg 2010-10-04 13:52:05.097789597 -0400
-+++ linux-2.6.35.x86_64/drivers/char/ipmi/ipmi_si_intf.c 2010-10-04 13:52:50.958801223 -0400
-@@ -1959,7 +1959,7 @@ static int acpi_gpe_irq_setup(struct smi
+diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
+index 035da9e..62a48b2 100644
+--- a/drivers/char/ipmi/ipmi_si_intf.c
++++ b/drivers/char/ipmi/ipmi_si_intf.c
+@@ -1970,7 +1970,7 @@ static int acpi_gpe_irq_setup(struct smi_info *info)
info->irq,
ACPI_GPE_LEVEL_TRIGGERED,
&ipmi_acpi_gpe,
@@ -416,126 +436,11 @@ diff -up linux-2.6.35.x86_64/drivers/char/ipmi/ipmi_si_intf.c.mjg linux-2.6.35.x
if (status != AE_OK) {
dev_warn(info->dev, "%s unable to claim ACPI GPE %d,"
" running polled\n", DEVICE_NAME, info->irq);
-diff -up linux-2.6.35.x86_64/drivers/pci/pci.c.mjg linux-2.6.35.x86_64/drivers/pci/pci.c
---- linux-2.6.35.x86_64/drivers/pci/pci.c.mjg 2010-10-04 13:52:05.105789773 -0400
-+++ linux-2.6.35.x86_64/drivers/pci/pci.c 2010-10-04 13:52:50.965801377 -0400
-@@ -38,6 +38,19 @@ EXPORT_SYMBOL(pci_pci_problems);
-
- unsigned int pci_pm_d3_delay;
-
-+static void pci_pme_list_scan(struct work_struct *work);
-+
-+static LIST_HEAD(pci_pme_list);
-+static DEFINE_MUTEX(pci_pme_list_mutex);
-+static DECLARE_DELAYED_WORK(pci_pme_work, pci_pme_list_scan);
-+
-+struct pci_pme_device {
-+ struct list_head list;
-+ struct pci_dev *dev;
-+};
-+
-+#define PME_TIMEOUT 1000 /* How long between PME checks */
-+
- static void pci_dev_d3_sleep(struct pci_dev *dev)
- {
- unsigned int delay = dev->d3_delay;
-@@ -1331,6 +1344,32 @@ bool pci_pme_capable(struct pci_dev *dev
- return !!(dev->pme_support & (1 << state));
- }
-
-+static void pci_pme_list_scan(struct work_struct *work)
-+{
-+ struct pci_pme_device *pme_dev;
-+
-+ mutex_lock(&pci_pme_list_mutex);
-+ if (!list_empty(&pci_pme_list)) {
-+ list_for_each_entry(pme_dev, &pci_pme_list, list)
-+ pci_pme_wakeup(pme_dev->dev, NULL);
-+ schedule_delayed_work(&pci_pme_work, msecs_to_jiffies(PME_TIMEOUT));
-+ }
-+ mutex_unlock(&pci_pme_list_mutex);
-+}
-+
-+/**
-+ * pci_external_pme - is a device an external PCI PME source?
-+ * @dev: PCI device to check
-+ *
-+ */
-+
-+static bool pci_external_pme(struct pci_dev *dev)
-+{
-+ if (pci_is_pcie(dev) || dev->bus->number == 0)
-+ return false;
-+ return true;
-+}
-+
- /**
- * pci_pme_active - enable or disable PCI device's PME# function
- * @dev: PCI device to handle.
-@@ -1354,6 +1393,44 @@ void pci_pme_active(struct pci_dev *dev,
-
- pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pmcsr);
-
-+ /* PCI (as opposed to PCIe) PME requires that the device have
-+ its PME# line hooked up correctly. Not all hardware vendors
-+ do this, so the PME never gets delivered and the device
-+ remains asleep. The easiest way around this is to
-+ periodically walk the list of suspended devices and check
-+ whether any have their PME flag set. The assumption is that
-+ we'll wake up often enough anyway that this won't be a huge
-+ hit, and the power savings from the devices will still be a
-+ win. */
-+
-+ if (pci_external_pme(dev)) {
-+ struct pci_pme_device *pme_dev;
-+ if (enable) {
-+ pme_dev = kmalloc(sizeof(struct pci_pme_device),
-+ GFP_KERNEL);
-+ if (!pme_dev)
-+ goto out;
-+ pme_dev->dev = dev;
-+ mutex_lock(&pci_pme_list_mutex);
-+ list_add(&pme_dev->list, &pci_pme_list);
-+ if (list_is_singular(&pci_pme_list))
-+ schedule_delayed_work(&pci_pme_work,
-+ msecs_to_jiffies(PME_TIMEOUT));
-+ mutex_unlock(&pci_pme_list_mutex);
-+ } else {
-+ mutex_lock(&pci_pme_list_mutex);
-+ list_for_each_entry(pme_dev, &pci_pme_list, list) {
-+ if (pme_dev->dev == dev) {
-+ list_del(&pme_dev->list);
-+ kfree(pme_dev);
-+ break;
-+ }
-+ }
-+ mutex_unlock(&pci_pme_list_mutex);
-+ }
-+ }
-+
-+out:
- dev_printk(KERN_DEBUG, &dev->dev, "PME# %s\n",
- enable ? "enabled" : "disabled");
- }
-diff -up linux-2.6.35.x86_64/drivers/pci/pci.h.mjg linux-2.6.35.x86_64/drivers/pci/pci.h
---- linux-2.6.35.x86_64/drivers/pci/pci.h.mjg 2010-10-04 13:52:05.100789663 -0400
-+++ linux-2.6.35.x86_64/drivers/pci/pci.h 2010-10-04 13:52:50.960801267 -0400
-@@ -63,11 +63,8 @@ struct pci_platform_pm_ops {
- extern int pci_set_platform_pm(struct pci_platform_pm_ops *ops);
- extern void pci_update_current_state(struct pci_dev *dev, pci_power_t state);
- extern void pci_disable_enabled_device(struct pci_dev *dev);
--extern bool pci_check_pme_status(struct pci_dev *dev);
- extern int pci_finish_runtime_suspend(struct pci_dev *dev);
--extern void pci_wakeup_event(struct pci_dev *dev);
- extern int __pci_pme_wakeup(struct pci_dev *dev, void *ign);
--extern void pci_pme_wakeup_bus(struct pci_bus *bus);
- extern void pci_pm_init(struct pci_dev *dev);
- extern void platform_pci_wakeup_init(struct pci_dev *dev);
- extern void pci_allocate_cap_save_buffers(struct pci_dev *dev);
-diff -up linux-2.6.35.x86_64/include/acpi/acpixf.h.mjg linux-2.6.35.x86_64/include/acpi/acpixf.h
---- linux-2.6.35.x86_64/include/acpi/acpixf.h.mjg 2010-10-04 13:52:05.099789641 -0400
-+++ linux-2.6.35.x86_64/include/acpi/acpixf.h 2010-10-04 13:52:50.959801245 -0400
-@@ -253,7 +253,8 @@ acpi_remove_address_space_handler(acpi_h
+diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
+index 53b7cfd..740eb7e 100644
+--- a/include/acpi/acpixf.h
++++ b/include/acpi/acpixf.h
+@@ -258,7 +258,8 @@ acpi_remove_address_space_handler(acpi_handle device,
acpi_status
acpi_install_gpe_handler(acpi_handle gpe_device,
u32 gpe_number,
@@ -545,16 +450,3 @@ diff -up linux-2.6.35.x86_64/include/acpi/acpixf.h.mjg linux-2.6.35.x86_64/inclu
acpi_status
acpi_remove_gpe_handler(acpi_handle gpe_device,
-diff -up linux-2.6.35.x86_64/include/linux/pci.h.mjg linux-2.6.35.x86_64/include/linux/pci.h
---- linux-2.6.35.x86_64/include/linux/pci.h.mjg 2010-10-04 13:52:05.101789685 -0400
-+++ linux-2.6.35.x86_64/include/linux/pci.h 2010-10-04 13:52:50.962801311 -0400
-@@ -819,6 +819,9 @@ pci_power_t pci_target_state(struct pci_
- int pci_prepare_to_sleep(struct pci_dev *dev);
- int pci_back_from_sleep(struct pci_dev *dev);
- bool pci_dev_run_wake(struct pci_dev *dev);
-+bool pci_check_pme_status(struct pci_dev *dev);
-+void pci_wakeup_event(struct pci_dev *dev);
-+void pci_pme_wakeup_bus(struct pci_bus *bus);
-
- static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state,
- bool enable)
diff --git a/linux-2.6-i386-nx-emulation.patch b/linux-2.6-i386-nx-emulation.patch
index 094c5b845..24a2ed500 100644
--- a/linux-2.6-i386-nx-emulation.patch
+++ b/linux-2.6-i386-nx-emulation.patch
@@ -394,8 +394,8 @@
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -6,6 +6,7 @@
- #include <linux/interrupt.h>
#include <linux/module.h>
+ #include <linux/cpu.h>
+#include <asm/desc.h>
#include <asm/tlbflush.h>
diff --git a/linux-2.6-qcserial-autosuspend.patch b/linux-2.6-qcserial-autosuspend.patch
deleted file mode 100644
index 524898813..000000000
--- a/linux-2.6-qcserial-autosuspend.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 0fe584342da141957c8642191b508ad39e9b19e6
-Author: Matthew Garrett <mjg@redhat.com>
-Date: Thu Sep 16 13:39:31 2010 -0400
-
- usbserial: Enable USB autosuspend by default on qcserial
-
- Seems to work fine in my testing.
-
- Signed-off-by: Matthew Garrett <mjg@redhat.com>
-
-diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
-index cde67ca..2846ad8 100644
---- a/drivers/usb/serial/qcserial.c
-+++ b/drivers/usb/serial/qcserial.c
-@@ -118,6 +118,8 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
-
- spin_lock_init(&data->susp_lock);
-
-+ usb_enable_autosuspend(serial->dev);
-+
- switch (nintf) {
- case 1:
- /* QDL mode */
diff --git a/linux-2.6-utrace-ptrace.patch b/linux-2.6-utrace-ptrace.patch
index a609fb628..caeae6760 100644
--- a/linux-2.6-utrace-ptrace.patch
+++ b/linux-2.6-utrace-ptrace.patch
@@ -29,9 +29,9 @@ index a85fb41..235c1b0 100644
-
+extern void ptrace_notify_stop(struct task_struct *tracee);
- extern long arch_ptrace(struct task_struct *child, long request, long addr, long data);
+ extern long arch_ptrace(struct task_struct *child, long request,
+ unsigned long addr, unsigned long data);
extern int ptrace_traceme(void);
- extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len);
diff --git a/kernel/Makefile b/kernel/Makefile
index 6004913..b09c9a5 100644
--- a/kernel/Makefile
@@ -673,7 +673,7 @@ index ...a90078d 100644
+ * under ptrace.
+ */
+ retval = -ERESTARTNOINTR;
-+ if (mutex_lock_interruptible(&task->cred_guard_mutex))
++ if (mutex_lock_interruptible(&task->signal->cred_guard_mutex))
+ goto out;
+
+ task_lock(task);
@@ -703,7 +703,7 @@ index ...a90078d 100644
+unlock_tasklist:
+ write_unlock_irq(&tasklist_lock);
+unlock_creds:
-+ mutex_unlock(&task->cred_guard_mutex);
++ mutex_unlock(&task->signal->cred_guard_mutex);
+out:
+ return retval;
+}
@@ -1014,7 +1014,7 @@ index ...a90078d 100644
+ struct iovec *kiov);
+
+int ptrace_request(struct task_struct *child, long request,
-+ long addr, long data)
++ unsigned long addr, unsigned long data)
+{
+ struct utrace_engine *engine = ptrace_lookup_engine(child);
+ siginfo_t siginfo;
@@ -1412,7 +1412,7 @@ index 23bde94..daed9e8 100644
+#define arch_ptrace_attach(child) do { } while (0)
+#endif
+
-+SYSCALL_DEFINE4(ptrace, long, request, long, pid, long, addr, long, data)
++SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr, unsigned long, data)
+{
+ struct task_struct *child;
+ long ret;
@@ -1453,7 +1453,7 @@ index 23bde94..daed9e8 100644
+ return ret;
+}
+
-+int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
++int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr, unsigned long data)
+{
+ unsigned long tmp;
+ int copied;
@@ -1464,7 +1464,7 @@ index 23bde94..daed9e8 100644
+ return put_user(tmp, (unsigned long __user *)data);
+}
+
-+int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
++int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr, unsigned long data)
+{
+ int copied;
+
@@ -1595,7 +1595,7 @@ index 23bde94..daed9e8 100644
unlock_tasklist:
- write_unlock_irq(&tasklist_lock);
-unlock_creds:
-- mutex_unlock(&task->cred_guard_mutex);
+- mutex_unlock(&task->signal->cred_guard_mutex);
-out:
- return retval;
-}
@@ -1656,7 +1656,7 @@ index 23bde94..daed9e8 100644
- * If it should reap itself, return true.
+ write_unlock_irq(&tasklist_lock);
+unlock_creds:
-+ mutex_unlock(&task->cred_guard_mutex);
++ mutex_unlock(&task->signal->cred_guard_mutex);
+out:
+ return retval;
+}
@@ -1765,7 +1765,7 @@ index 23bde94..daed9e8 100644
- return copied;
-}
-
- static int ptrace_setoptions(struct task_struct *child, long data)
+ static int ptrace_setoptions(struct task_struct *child, unsigned long data)
{
child->ptrace &= ~PT_TRACE_MASK;
@@ -530,47 +677,6 @@ static int ptrace_resume(struct task_str
@@ -1814,9 +1814,9 @@ index 23bde94..daed9e8 100644
-#endif
-
int ptrace_request(struct task_struct *child, long request,
- long addr, long data)
+ unsigned long addr, unsigned long data)
{
-@@ -686,88 +792,7 @@ int ptrace_request(struct task_struct *c
+@@ -686,91 +792,7 @@ int ptrace_request(struct task_struct *c
return ret;
}
@@ -1839,7 +1839,8 @@ index 23bde94..daed9e8 100644
-#define arch_ptrace_attach(child) do { } while (0)
-#endif
-
--SYSCALL_DEFINE4(ptrace, long, request, long, pid, long, addr, long, data)
+-SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
+- unsigned long, data)
-{
- struct task_struct *child;
- long ret;
@@ -1880,7 +1881,8 @@ index 23bde94..daed9e8 100644
- return ret;
-}
-
--int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
+-int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
+- unsigned long data)
-{
- unsigned long tmp;
- int copied;
@@ -1891,7 +1893,8 @@ index 23bde94..daed9e8 100644
- return put_user(tmp, (unsigned long __user *)data);
-}
-
--int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
+-int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr,
+- unsigned long data)
-{
- int copied;
-
diff --git a/linux-2.6-utrace.patch b/linux-2.6-utrace.patch
index a12357e68..c50b83ea8 100644
--- a/linux-2.6-utrace.patch
+++ b/linux-2.6-utrace.patch
@@ -44,7 +44,7 @@ index 34929f2..884c36b 100644
+++ b/Documentation/DocBook/Makefile
@@ -14,7 +14,7 @@ DOCBOOKS := z8530book.xml mcabook.xml de
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
- mac80211.xml debugobjects.xml sh.xml regulator.xml \
+ 80211.xml debugobjects.xml sh.xml regulator.xml \
alsa-driver-api.xml writing-an-alsa-driver.xml \
- tracepoint.xml media.xml drm.xml
+ tracepoint.xml utrace.xml media.xml drm.xml
@@ -1636,9 +1636,9 @@ index 2de5b1c..a283086 100644
+ kernel interface exported to kernel modules, to track events in
+ user threads, extract and change user thread state.
+
- menu "RCU Subsystem"
+ source "kernel/irq/Kconfig"
- choice
+ menu "RCU Subsystem"
diff --git a/kernel/Makefile b/kernel/Makefile
index 0b72d1a..6004913 100644
--- a/kernel/Makefile
diff --git a/linux-2.6-uvc-autosuspend.patch b/linux-2.6-uvc-autosuspend.patch
deleted file mode 100644
index 6c965c62f..000000000
--- a/linux-2.6-uvc-autosuspend.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-commit 4a3757e0ae269f710292dd75013532c5a57ccb00
-Author: Matthew Garrett <mjg@redhat.com>
-Date: Thu Sep 16 13:38:38 2010 -0400
-
- uvc: Enable USB autosuspend by default on uvcvideo
-
- We've been doing this for a while in Fedora without any complaints.
-
- Signed-off-by: Matthew Garrett <mjg@redhat.com>
-
-diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c
-index 8bdd940..28ed5b4 100644
---- a/drivers/media/video/uvc/uvc_driver.c
-+++ b/drivers/media/video/uvc/uvc_driver.c
-@@ -1814,6 +1814,7 @@ static int uvc_probe(struct usb_interface *intf,
- }
-
- uvc_trace(UVC_TRACE_PROBE, "UVC device initialized.\n");
-+ usb_enable_autosuspend(udev);
- return 0;
-
- error:
diff --git a/netlink-make-nlmsg_find_attr-take-a-const-ptr.patch b/netlink-make-nlmsg_find_attr-take-a-const-ptr.patch
deleted file mode 100644
index 5b75ca400..000000000
--- a/netlink-make-nlmsg_find_attr-take-a-const-ptr.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 38f1f0db010ac5b981ae06f1fe2fd64095ebb171 Mon Sep 17 00:00:00 2001
-From: Nelson Elhage <nelhage@ksplice.com>
-Date: Wed, 3 Nov 2010 16:35:40 +0000
-Subject: [PATCH] netlink: Make nlmsg_find_attr take a const nlmsghdr*.
-
-This will let us use it on a nlmsghdr stored inside a netlink_callback.
-
-Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- include/net/netlink.h | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/include/net/netlink.h b/include/net/netlink.h
-index a63b219..c344646 100644
---- a/include/net/netlink.h
-+++ b/include/net/netlink.h
-@@ -384,7 +384,7 @@ static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen,
- *
- * Returns the first attribute which matches the specified type.
- */
--static inline struct nlattr *nlmsg_find_attr(struct nlmsghdr *nlh,
-+static inline struct nlattr *nlmsg_find_attr(const struct nlmsghdr *nlh,
- int hdrlen, int attrtype)
- {
- return nla_find(nlmsg_attrdata(nlh, hdrlen),
---
-1.7.3.2
-
diff --git a/pci-crs-fixes.patch b/pci-crs-fixes.patch
deleted file mode 100644
index b4fd01502..000000000
--- a/pci-crs-fixes.patch
+++ /dev/null
@@ -1,593 +0,0 @@
- This revision is to address two problems found by Horst H. von Brand while
- testing the v2 patches in Fedora:
- https://bugzilla.redhat.com/show_bug.cgi?id=637647
- On his machine, we don't use _CRS by default, and the BIOS left some bridge
- windows disabled.
-
- Problem 1: When we assigned space for the windows, we started at the top
- and allocated [mem 0xffffffffffe00000-0xffffffffffffffff], which is
- obviously useless because the CPU doesn't support physical addresses that
- large.
-
- Problem 2: Subsequent allocations failed because I made an error in
- find_resource(). We look for available space from [child->end + 1 to
- root->end], and if the last child ends exactly at 0xffffffffffffffff, we
- wrap around and start from zero.
-
- I made the top-down allocation conditional: an arch can select it at
- boot-time, and there's a kernel command line option to change it for
- debugging.
-
-
-When we move PCI devices, we currently allocate space bottom-up, i.e., we look
-at PCI bus resources in the order we found them, we look at gaps between child
-resources bottom-up, and we align the new space at the bottom of an available
-region.
-
-On x86, we move PCI devices more than we used to because we now pay attention
-to the PCI host bridge windows from ACPI. For example, when we find a device
-that's outside all the known host bridge windows, we try to move it into a
-window, and we look for space starting at the bottom.
-
-Windows does similar device moves, but it looks for space top-down rather than
-bottom-up. Since most machines are better-tested with Windows than Linux, this
-difference means that Linux is more likely to trip over BIOS bugs in the PCI
-host bridge window descriptions than Windows is.
-
-We've had several reports of Dell machines where the BIOS leaves the AHCI
-controller outside the host bridge windows (BIOS bug #1), *and* the lowest
-host bridge window includes an area that doesn't actually reach PCI (BIOS
-bug #2). The result is that Windows (which moves AHCI to the top of a window)
-works fine, while Linux (which moves AHCI to the bottom, buggy, area) doesn't
-work.
-
-These patches change Linux to allocate space more like Windows does:
-
- 1) The x86 pcibios_align_resource() will choose space from the
- end of an available area, not the beginning.
-
- 2) In the generic allocate_resource() path, we'll look for space
- between existing children from the top, not from the bottom.
-
- 3) When pci_bus_alloc_resource() looks for available space, it
- will start from the highest window, not the first one we found.
-
-This series fixes a 2.6.34 regression that prevents many Dell Precision
-workstations from booting:
-
- https://bugzilla.kernel.org/show_bug.cgi?id=16228
-
-Changes from v3 to v4:
- - Use round_down() rather than adding ALIGN_DOWN().
- - Replace ARCH_HAS_TOP_DOWN_ALLOC #define with a boot-time architecture
- choice and add a "resource_alloc_from_bottom" command line option to
- revert to the old behavior (NOTE: this only affects allocate_resource(),
- not pcibios_align_resource() or pci_bus_alloc_resource()).
- - Fixed find_resource_from_top() again; it still didn't handle a child
- that ended at the parent's end correctly.
-
-Changes from v2 to v3:
- - Updated iomem_resource.end to reflect the end of usable physical address
- space. Otherwise, we might allocate right up to 0xffffffff_ffffffff,
- which isn't usable.
- - Make allocate_resource() change conditional on ARCH_HAS_TOP_DOWN_ALLOC.
- Without arch-specific changes like the above, it's too dangerous to
- make this change for everybody at once.
- - Fix 64-bit wraparound in find_resource(). If the last child happened
- to end at ~0, we computed the highest available space as [child->end + 1,
- root->end], which makes us think the available space started at 0,
- which makes us return space that may already be allocated.
-
-Changes from v1 to v2:
- - Moved check for allocating before the available area from
- pcibios_align_resource() to find_resource(). Better to do it
- after the alignment callback is done, and make it generic.
- - Fixed pcibios_align_resource() alignment. If we start from the
- end of the available area, we must align *downward*, not upward.
- - Fixed pcibios_align_resource() ISA alias avoidance. Again, since
- the starting point is the end of the area, we must align downward
- when we avoid aliased areas.
----
-
-Bjorn Helgaas (6):
- resources: ensure alignment callback doesn't allocate below available start
- resources: support allocating space within a region from the top down
- PCI: allocate bus resources from the top down
- x86/PCI: allocate space from the end of a region, not the beginning
- x86: update iomem_resource end based on CPU physical address capabilities
- x86: allocate space within a region top-down
-
-
- Documentation/kernel-parameters.txt | 5 ++
- arch/x86/kernel/setup.c | 2 +
- arch/x86/pci/i386.c | 17 ++++--
- drivers/pci/bus.c | 53 +++++++++++++++++--
- include/linux/ioport.h | 1
- kernel/resource.c | 99 ++++++++++++++++++++++++++++++++++-
- 6 files changed, 163 insertions(+), 14 deletions(-)
---
-To unsubscribe from this list: send the line "unsubscribe linux-pci" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-The alignment callback returns a proposed location, which may have been
-adjusted to avoid ISA aliases or for other architecture-specific reasons.
-We already had a check ("tmp.start < tmp.end") to make sure the callback
-doesn't return a location above the available area.
-
-This patch adds a check to make sure the callback doesn't return something
-*below* the available area, as may happen if the callback tries to allocate
-top-down.
-
-Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
----
-
- kernel/resource.c | 10 ++++++++--
- 1 files changed, 8 insertions(+), 2 deletions(-)
-
-
-diff --git a/kernel/resource.c b/kernel/resource.c
-index 7b36976..ace2269 100644
---- a/kernel/resource.c
-+++ b/kernel/resource.c
-@@ -371,6 +371,7 @@ static int find_resource(struct resource *root, struct resource *new,
- {
- struct resource *this = root->child;
- struct resource tmp = *new;
-+ resource_size_t start;
-
- tmp.start = root->start;
- /*
-@@ -391,8 +392,13 @@ static int find_resource(struct resource *root, struct resource *new,
- if (tmp.end > max)
- tmp.end = max;
- tmp.start = ALIGN(tmp.start, align);
-- if (alignf)
-- tmp.start = alignf(alignf_data, &tmp, size, align);
-+ if (alignf) {
-+ start = alignf(alignf_data, &tmp, size, align);
-+ if (tmp.start <= start && start <= tmp.end)
-+ tmp.start = start;
-+ else
-+ tmp.start = tmp.end;
-+ }
- if (tmp.start < tmp.end && tmp.end - tmp.start >= size - 1) {
- new->start = tmp.start;
- new->end = tmp.start + size - 1;
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-pci" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-Allocate space from the top of a region first, then work downward,
-if an architecture desires this.
-
-When we allocate space from a resource, we look for gaps between children
-of the resource. Previously, we always looked at gaps from the bottom up.
-For example, given this:
-
- [mem 0xbff00000-0xf7ffffff] PCI Bus 0000:00
- [mem 0xbff00000-0xbfffffff] gap -- available
- [mem 0xc0000000-0xdfffffff] PCI Bus 0000:02
- [mem 0xe0000000-0xf7ffffff] gap -- available
-
-we attempted to allocate from the [mem 0xbff00000-0xbfffffff] gap first,
-then the [mem 0xe0000000-0xf7ffffff] gap.
-
-With this patch an architecture can choose to allocate from the top gap
-[mem 0xe0000000-0xf7ffffff] first.
-
-We can't do this across the board because iomem_resource.end is initialized
-to 0xffffffff_ffffffff on 64-bit architectures, and most machines can't
-address the entire 64-bit physical address space. Therefore, we only
-allocate top-down if the arch requests it by clearing
-"resource_alloc_from_bottom".
-
-Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
----
-
- Documentation/kernel-parameters.txt | 5 ++
- include/linux/ioport.h | 1
- kernel/resource.c | 89 +++++++++++++++++++++++++++++++++++
- 3 files changed, 94 insertions(+), 1 deletions(-)
-
-
-diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
-index 8dd7248..fe50cbd 100644
---- a/Documentation/kernel-parameters.txt
-+++ b/Documentation/kernel-parameters.txt
-@@ -2156,6 +2156,11 @@ and is between 256 and 4096 characters. It is defined in the file
- reset_devices [KNL] Force drivers to reset the underlying device
- during initialization.
-
-+ resource_alloc_from_bottom
-+ Allocate new resources from the beginning of available
-+ space, not the end. If you need to use this, please
-+ report a bug.
-+
- resume= [SWSUSP]
- Specify the partition device for software suspend
-
-diff --git a/include/linux/ioport.h b/include/linux/ioport.h
-index b227902..d377ea8 100644
---- a/include/linux/ioport.h
-+++ b/include/linux/ioport.h
-@@ -112,6 +112,7 @@ struct resource_list {
- /* PC/ISA/whatever - the normal PC address spaces: IO and memory */
- extern struct resource ioport_resource;
- extern struct resource iomem_resource;
-+extern int resource_alloc_from_bottom;
-
- extern struct resource *request_resource_conflict(struct resource *root, struct resource *new);
- extern int request_resource(struct resource *root, struct resource *new);
-diff --git a/kernel/resource.c b/kernel/resource.c
-index ace2269..8d337a9 100644
---- a/kernel/resource.c
-+++ b/kernel/resource.c
-@@ -40,6 +40,23 @@ EXPORT_SYMBOL(iomem_resource);
-
- static DEFINE_RWLOCK(resource_lock);
-
-+/*
-+ * By default, we allocate free space bottom-up. The architecture can request
-+ * top-down by clearing this flag. The user can override the architecture's
-+ * choice with the "resource_alloc_from_bottom" kernel boot option, but that
-+ * should only be a debugging tool.
-+ */
-+int resource_alloc_from_bottom = 1;
-+
-+static __init int setup_alloc_from_bottom(char *s)
-+{
-+ printk(KERN_INFO
-+ "resource: allocating from bottom-up; please report a bug\n");
-+ resource_alloc_from_bottom = 1;
-+ return 0;
-+}
-+early_param("resource_alloc_from_bottom", setup_alloc_from_bottom);
-+
- static void *r_next(struct seq_file *m, void *v, loff_t *pos)
- {
- struct resource *p = v;
-@@ -358,7 +375,74 @@ int __weak page_is_ram(unsigned long pfn)
- }
-
- /*
-+ * Find the resource before "child" in the sibling list of "root" children.
-+ */
-+static struct resource *find_sibling_prev(struct resource *root, struct resource *child)
-+{
-+ struct resource *this;
-+
-+ for (this = root->child; this; this = this->sibling)
-+ if (this->sibling == child)
-+ return this;
-+
-+ return NULL;
-+}
-+
-+/*
-+ * Find empty slot in the resource tree given range and alignment.
-+ * This version allocates from the end of the root resource first.
-+ */
-+static int find_resource_from_top(struct resource *root, struct resource *new,
-+ resource_size_t size, resource_size_t min,
-+ resource_size_t max, resource_size_t align,
-+ resource_size_t (*alignf)(void *,
-+ const struct resource *,
-+ resource_size_t,
-+ resource_size_t),
-+ void *alignf_data)
-+{
-+ struct resource *this;
-+ struct resource tmp = *new;
-+ resource_size_t start;
-+
-+ tmp.start = root->end;
-+ tmp.end = root->end;
-+
-+ this = find_sibling_prev(root, NULL);
-+ for (;;) {
-+ if (this) {
-+ if (this->end < root->end)
-+ tmp.start = this->end + 1;
-+ } else
-+ tmp.start = root->start;
-+ if (tmp.start < min)
-+ tmp.start = min;
-+ if (tmp.end > max)
-+ tmp.end = max;
-+ tmp.start = ALIGN(tmp.start, align);
-+ if (alignf) {
-+ start = alignf(alignf_data, &tmp, size, align);
-+ if (tmp.start <= start && start <= tmp.end)
-+ tmp.start = start;
-+ else
-+ tmp.start = tmp.end;
-+ }
-+ if (tmp.start < tmp.end && tmp.end - tmp.start >= size - 1) {
-+ new->start = tmp.start;
-+ new->end = tmp.start + size - 1;
-+ return 0;
-+ }
-+ if (!this || this->start == root->start)
-+ break;
-+ tmp.end = this->start - 1;
-+ this = find_sibling_prev(root, this);
-+ }
-+ return -EBUSY;
-+}
-+
-+/*
- * Find empty slot in the resource tree given range and alignment.
-+ * This version allocates from the beginning of the root resource first.
- */
- static int find_resource(struct resource *root, struct resource *new,
- resource_size_t size, resource_size_t min,
-@@ -435,7 +519,10 @@ int allocate_resource(struct resource *root, struct resource *new,
- int err;
-
- write_lock(&resource_lock);
-- err = find_resource(root, new, size, min, max, align, alignf, alignf_data);
-+ if (resource_alloc_from_bottom)
-+ err = find_resource(root, new, size, min, max, align, alignf, alignf_data);
-+ else
-+ err = find_resource_from_top(root, new, size, min, max, align, alignf, alignf_data);
- if (err >= 0 && __request_resource(root, new))
- err = -EBUSY;
- write_unlock(&resource_lock);
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-pci" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-Allocate space from the highest-address PCI bus resource first, then work
-downward.
-
-Previously, we looked for space in PCI host bridge windows in the order
-we discovered the windows. For example, given the following windows
-(discovered via an ACPI _CRS method):
-
- pci_root PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff]
- pci_root PNP0A03:00: host bridge window [mem 0x000c0000-0x000effff]
- pci_root PNP0A03:00: host bridge window [mem 0x000f0000-0x000fffff]
- pci_root PNP0A03:00: host bridge window [mem 0xbff00000-0xf7ffffff]
- pci_root PNP0A03:00: host bridge window [mem 0xff980000-0xff980fff]
- pci_root PNP0A03:00: host bridge window [mem 0xff97c000-0xff97ffff]
- pci_root PNP0A03:00: host bridge window [mem 0xfed20000-0xfed9ffff]
-
-we attempted to allocate from [mem 0x000a0000-0x000bffff] first, then
-[mem 0x000c0000-0x000effff], and so on.
-
-With this patch, we allocate from [mem 0xff980000-0xff980fff] first, then
-[mem 0xff97c000-0xff97ffff], [mem 0xfed20000-0xfed9ffff], etc.
-
-Allocating top-down follows Windows practice, so we're less likely to
-trip over BIOS defects in the _CRS description.
-
-On the machine above (a Dell T3500), the [mem 0xbff00000-0xbfffffff] region
-doesn't actually work and is likely a BIOS defect. The symptom is that we
-move the AHCI controller to 0xbff00000, which leads to "Boot has failed,
-sleeping forever," a BUG in ahci_stop_engine(), or some other boot failure.
-
-Reference: https://bugzilla.kernel.org/show_bug.cgi?id=16228#c43
-Reference: https://bugzilla.redhat.com/show_bug.cgi?id=620313
-Reference: https://bugzilla.redhat.com/show_bug.cgi?id=629933
-Reported-by: Brian Bloniarz <phunge0@hotmail.com>
-Reported-and-tested-by: Stefan Becker <chemobejk@gmail.com>
-Reported-by: Denys Vlasenko <dvlasenk@redhat.com>
-Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
----
-
- drivers/pci/bus.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++-----
- 1 files changed, 48 insertions(+), 5 deletions(-)
-
-
-diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
-index 7f0af0e..172bf26 100644
---- a/drivers/pci/bus.c
-+++ b/drivers/pci/bus.c
-@@ -64,6 +64,49 @@ void pci_bus_remove_resources(struct pci_bus *bus)
- }
- }
-
-+/*
-+ * Find the highest-address bus resource below the cursor "res". If the
-+ * cursor is NULL, return the highest resource.
-+ */
-+static struct resource *pci_bus_find_resource_prev(struct pci_bus *bus,
-+ unsigned int type,
-+ struct resource *res)
-+{
-+ struct resource *r, *prev = NULL;
-+ int i;
-+
-+ pci_bus_for_each_resource(bus, r, i) {
-+ if (!r)
-+ continue;
-+
-+ if ((r->flags & IORESOURCE_TYPE_BITS) != type)
-+ continue;
-+
-+ /* If this resource is at or past the cursor, skip it */
-+ if (res) {
-+ if (r == res)
-+ continue;
-+ if (r->end > res->end)
-+ continue;
-+ if (r->end == res->end && r->start > res->start)
-+ continue;
-+ }
-+
-+ if (!prev)
-+ prev = r;
-+
-+ /*
-+ * A small resource is higher than a large one that ends at
-+ * the same address.
-+ */
-+ if (r->end > prev->end ||
-+ (r->end == prev->end && r->start > prev->start))
-+ prev = r;
-+ }
-+
-+ return prev;
-+}
-+
- /**
- * pci_bus_alloc_resource - allocate a resource from a parent bus
- * @bus: PCI bus
-@@ -89,9 +132,10 @@ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
- resource_size_t),
- void *alignf_data)
- {
-- int i, ret = -ENOMEM;
-+ int ret = -ENOMEM;
- struct resource *r;
- resource_size_t max = -1;
-+ unsigned int type = res->flags & IORESOURCE_TYPE_BITS;
-
- type_mask |= IORESOURCE_IO | IORESOURCE_MEM;
-
-@@ -99,10 +143,9 @@ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
- if (!(res->flags & IORESOURCE_MEM_64))
- max = PCIBIOS_MAX_MEM_32;
-
-- pci_bus_for_each_resource(bus, r, i) {
-- if (!r)
-- continue;
--
-+ /* Look for space at highest addresses first */
-+ r = pci_bus_find_resource_prev(bus, type, NULL);
-+ for ( ; r; r = pci_bus_find_resource_prev(bus, type, r)) {
- /* type_mask must match */
- if ((res->flags ^ r->flags) & type_mask)
- continue;
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-pci" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-Allocate from the end of a region, not the beginning.
-
-For example, if we need to allocate 0x800 bytes for a device on bus
-0000:00 given these resources:
-
- [mem 0xbff00000-0xdfffffff] PCI Bus 0000:00
- [mem 0xc0000000-0xdfffffff] PCI Bus 0000:02
-
-the available space at [mem 0xbff00000-0xbfffffff] is passed to the
-alignment callback (pcibios_align_resource()). Prior to this patch, we
-would put the new 0x800 byte resource at the beginning of that available
-space, i.e., at [mem 0xbff00000-0xbff007ff].
-
-With this patch, we put it at the end, at [mem 0xbffff800-0xbfffffff].
-
-Reference: https://bugzilla.kernel.org/show_bug.cgi?id=16228#c41
-Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
----
-
- arch/x86/pci/i386.c | 17 +++++++++++------
- 1 files changed, 11 insertions(+), 6 deletions(-)
-
-
-diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
-index 5525309..826140a 100644
---- a/arch/x86/pci/i386.c
-+++ b/arch/x86/pci/i386.c
-@@ -65,16 +65,21 @@ pcibios_align_resource(void *data, const struct resource *res,
- resource_size_t size, resource_size_t align)
- {
- struct pci_dev *dev = data;
-- resource_size_t start = res->start;
-+ resource_size_t start = round_down(res->end - size + 1, align);
-
- if (res->flags & IORESOURCE_IO) {
-- if (skip_isa_ioresource_align(dev))
-- return start;
-- if (start & 0x300)
-- start = (start + 0x3ff) & ~0x3ff;
-+
-+ /*
-+ * If we're avoiding ISA aliases, the largest contiguous I/O
-+ * port space is 256 bytes. Clearing bits 9 and 10 preserves
-+ * all 256-byte and smaller alignments, so the result will
-+ * still be correctly aligned.
-+ */
-+ if (!skip_isa_ioresource_align(dev))
-+ start &= ~0x300;
- } else if (res->flags & IORESOURCE_MEM) {
- if (start < BIOS_END)
-- start = BIOS_END;
-+ start = res->end; /* fail; no space */
- }
- return start;
- }
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-pci" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-The iomem_resource map reflects the available physical address space.
-We statically initialize the end to -1, i.e., 0xffffffff_ffffffff, but
-of course we can only use as much as the CPU can address.
-
-This patch updates the end based on the CPU capabilities, so we don't
-mistakenly allocate space that isn't usable, as we're likely to do when
-allocating from the top-down.
-
-Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
----
-
- arch/x86/kernel/setup.c | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-
-diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
-index c3a4fbb..922b5a1 100644
---- a/arch/x86/kernel/setup.c
-+++ b/arch/x86/kernel/setup.c
-@@ -788,6 +788,7 @@ void __init setup_arch(char **cmdline_p)
-
- x86_init.oem.arch_setup();
-
-+ iomem_resource.end = (1ULL << boot_cpu_data.x86_phys_bits) - 1;
- setup_memory_map();
- parse_setup_data();
- /* update the e820_saved too */
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-pci" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-Request that allocate_resource() use available space from high addresses
-first, rather than the default of using low addresses first.
-
-The most common place this makes a difference is when we move or assign
-new PCI device resources. Low addresses are generally scarce, so it's
-better to use high addresses when possible. This follows Windows practice
-for PCI allocation.
-
-Reference: https://bugzilla.kernel.org/show_bug.cgi?id=16228#c42
-Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
----
-
- arch/x86/kernel/setup.c | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-
-diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
-index 922b5a1..0fe76df 100644
---- a/arch/x86/kernel/setup.c
-+++ b/arch/x86/kernel/setup.c
-@@ -788,6 +788,7 @@ void __init setup_arch(char **cmdline_p)
-
- x86_init.oem.arch_setup();
-
-+ resource_alloc_from_bottom = 0;
- iomem_resource.end = (1ULL << boot_cpu_data.x86_phys_bits) - 1;
- setup_memory_map();
- parse_setup_data();
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-pci" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html \ No newline at end of file
diff --git a/pnp-log-pnp-resources-as-we-do-for-pci.patch b/pnp-log-pnp-resources-as-we-do-for-pci.patch
deleted file mode 100644
index e3b8a2e77..000000000
--- a/pnp-log-pnp-resources-as-we-do-for-pci.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 2d28c74b75ef2900e7016eef29a5ab9a4174b1f0 Mon Sep 17 00:00:00 2001
-From: Bjorn Helgaas <bjorn.helgaas@hp.com>
-Date: Wed, 29 Sep 2010 12:24:23 -0600
-Subject: PNP: log PNP resources, as we do for PCI
-
-ACPI devices are often involved in address space conflicts with PCI devices,
-so I think it's worth logging the resources they use. Otherwise we have to
-depend on lspnp or groping around in sysfs to find them.
-
-Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
-Signed-off-by: Len Brown <len.brown@intel.com>
----
- drivers/pnp/core.c | 5 +++--
- drivers/pnp/resource.c | 10 +++++-----
- 2 files changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
-index 88b3cde..53a8f33 100644
---- a/drivers/pnp/core.c
-+++ b/drivers/pnp/core.c
-@@ -194,8 +194,9 @@ int pnp_add_device(struct pnp_dev *dev)
- for (id = dev->id; id; id = id->next)
- len += scnprintf(buf + len, sizeof(buf) - len, " %s", id->id);
-
-- pnp_dbg(&dev->dev, "%s device, IDs%s (%s)\n",
-- dev->protocol->name, buf, dev->active ? "active" : "disabled");
-+ dev_printk(KERN_DEBUG, &dev->dev, "%s device, IDs%s (%s)\n",
-+ dev->protocol->name, buf,
-+ dev->active ? "active" : "disabled");
- return 0;
- }
-
-diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
-index e3446ab..a925e6b 100644
---- a/drivers/pnp/resource.c
-+++ b/drivers/pnp/resource.c
-@@ -523,7 +523,7 @@ struct pnp_resource *pnp_add_irq_resource(struct pnp_dev *dev, int irq,
- res->start = irq;
- res->end = irq;
-
-- pnp_dbg(&dev->dev, " add %pr\n", res);
-+ dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
- return pnp_res;
- }
-
-@@ -544,7 +544,7 @@ struct pnp_resource *pnp_add_dma_resource(struct pnp_dev *dev, int dma,
- res->start = dma;
- res->end = dma;
-
-- pnp_dbg(&dev->dev, " add %pr\n", res);
-+ dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
- return pnp_res;
- }
-
-@@ -568,7 +568,7 @@ struct pnp_resource *pnp_add_io_resource(struct pnp_dev *dev,
- res->start = start;
- res->end = end;
-
-- pnp_dbg(&dev->dev, " add %pr\n", res);
-+ dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
- return pnp_res;
- }
-
-@@ -592,7 +592,7 @@ struct pnp_resource *pnp_add_mem_resource(struct pnp_dev *dev,
- res->start = start;
- res->end = end;
-
-- pnp_dbg(&dev->dev, " add %pr\n", res);
-+ dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
- return pnp_res;
- }
-
-@@ -616,7 +616,7 @@ struct pnp_resource *pnp_add_bus_resource(struct pnp_dev *dev,
- res->start = start;
- res->end = end;
-
-- pnp_dbg(&dev->dev, " add %pr\n", res);
-+ dev_printk(KERN_DEBUG, &dev->dev, "%pR\n", res);
- return pnp_res;
- }
-
---
-1.7.3.2
-
diff --git a/posix-cpu-timers-workaround-to-suppress-problems-with-mt-exec.patch b/posix-cpu-timers-workaround-to-suppress-problems-with-mt-exec.patch
deleted file mode 100644
index fbc4d7cce..000000000
--- a/posix-cpu-timers-workaround-to-suppress-problems-with-mt-exec.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 78dfb59b62d1a7735cd28fc2783e58c122954fae Mon Sep 17 00:00:00 2001
-From: Oleg Nesterov <oleg@redhat.com>
-Date: Fri, 5 Nov 2010 16:53:42 +0100
-Subject: posix-cpu-timers: workaround to suppress the problems with mt exec
-
-posix-cpu-timers.c correctly assumes that the dying process does
-posix_cpu_timers_exit_group() and removes all !CPUCLOCK_PERTHREAD
-timers from signal->cpu_timers list.
-
-But, it also assumes that timer->it.cpu.task is always the group
-leader, and thus the dead ->task means the dead thread group.
-
-This is obviously not true after de_thread() changes the leader.
-After that almost every posix_cpu_timer_ method has problems.
-
-It is not simple to fix this bug correctly. First of all, I think
-that timer->it.cpu should use struct pid instead of task_struct.
-Also, the locking should be reworked completely. In particular,
-tasklist_lock should not be used at all. This all needs a lot of
-nontrivial and hard-to-test changes.
-
-Change __exit_signal() to do posix_cpu_timers_exit_group() when
-the old leader dies during exec. This is not the fix, just the
-temporary hack to hide the problem for 2.6.37 and stable. IOW,
-this is obviously wrong but this is what we currently have anyway:
-cpu timers do not work after mt exec.
-
-In theory this change adds another race. The exiting leader can
-detach the timers which were attached to the new leader. However,
-the window between de_thread() and release_task() is small, we
-can pretend that sys_timer_create() was called before de_thread().
-
-Signed-off-by: Oleg Nesterov <oleg@redhat.com>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
----
- kernel/exit.c | 8 ++++++++
- 1 files changed, 8 insertions(+), 0 deletions(-)
-
-diff --git a/kernel/exit.c b/kernel/exit.c
-index 0312022..1eff9e4 100644
---- a/kernel/exit.c
-+++ b/kernel/exit.c
-@@ -95,6 +95,14 @@ static void __exit_signal(struct task_struct *tsk)
- sig->tty = NULL;
- } else {
- /*
-+ * This can only happen if the caller is de_thread().
-+ * FIXME: this is the temporary hack, we should teach
-+ * posix-cpu-timers to handle this case correctly.
-+ */
-+ if (unlikely(has_group_leader_pid(tsk)))
-+ posix_cpu_timers_exit_group(tsk);
-+
-+ /*
- * If there is any task waiting for the group exit
- * then notify it:
- */
---
-1.7.3.2
-
diff --git a/runtime_pm_fixups.patch b/runtime_pm_fixups.patch
index 6315dc176..789115810 100644
--- a/runtime_pm_fixups.patch
+++ b/runtime_pm_fixups.patch
@@ -110,5 +110,5 @@ index 4de84ce..284f43c 100644
-int acpi_disable_wakeup_device_power(struct acpi_device *dev);
+int acpi_disable_wakeup_device_power(struct acpi_device *dev, int state);
- #ifdef CONFIG_PM_SLEEP
+ #ifdef CONFIG_PM_OPS
int acpi_pm_device_sleep_state(struct device *, int *);
diff --git a/sources b/sources
index df0066685..d52c071f5 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
61f3739a73afb6914cb007f37fb09b62 linux-2.6.36.tar.bz2
-dd38a6caf08df2822f93541ee95aed7d patch-2.6.36.1.bz2
-33b11b4b8fcd47601a0e1e51586c4b04 patch-2.6.36.2-rc1.bz2
+a84cf559615b5168ec1d5591841601ed patch-2.6.37-rc5.bz2
+dbc90858467e28b39539ad6d3415a956 patch-2.6.37-rc5-git2.bz2
diff --git a/tpm-autodetect-itpm-devices.patch b/tpm-autodetect-itpm-devices.patch
deleted file mode 100644
index 57b5d07ed..000000000
--- a/tpm-autodetect-itpm-devices.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-commit 8cf5102c84dba60b2ea29b7e89f1a65100e20bb9
-Author: Matthew Garrett <mjg@redhat.com>
-Date: Thu Oct 21 17:31:56 2010 -0400
-
- tpm: Autodetect itpm devices
-
- Some Lenovos have TPMs that require a quirk to function correctly. This can
- be autodetected by checking whether the device has a _HID of INTC0102. This
- is an invalid PNPid, and as such is discarded by the pnp layer - however
- it's still present in the ACPI code, so we can pull it out that way. This
- means that the quirk won't be automatically applied on non-ACPI systems,
- but without ACPI we don't have any way to identify the chip anyway so I
- don't think that's a great concern.
-
- Signed-off-by: Matthew Garrett <mjg@redhat.com>
-
-diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
-index 1030f84..c17a305 100644
---- a/drivers/char/tpm/tpm_tis.c
-+++ b/drivers/char/tpm/tpm_tis.c
-@@ -25,6 +25,7 @@
- #include <linux/slab.h>
- #include <linux/interrupt.h>
- #include <linux/wait.h>
-+#include <linux/acpi.h>
- #include "tpm.h"
-
- #define TPM_HEADER_SIZE 10
-@@ -78,6 +79,26 @@ enum tis_defaults {
- static LIST_HEAD(tis_chips);
- static DEFINE_SPINLOCK(tis_lock);
-
-+#ifdef CONFIG_ACPI
-+static int is_itpm(struct pnp_dev *dev)
-+{
-+ struct acpi_device *acpi = pnp_acpi_device(dev);
-+ struct acpi_hardware_id *id;
-+
-+ list_for_each_entry(id, &acpi->pnp.ids, list) {
-+ if (!strcmp("INTC0102", id->id))
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+#else
-+static int is_itpm(struct pnp_dev *dev)
-+{
-+ return 0;
-+}
-+#endif
-+
- static int check_locality(struct tpm_chip *chip, int l)
- {
- if ((ioread8(chip->vendor.iobase + TPM_ACCESS(l)) &
-@@ -472,6 +493,9 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
- "1.2 TPM (device-id 0x%X, rev-id %d)\n",
- vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0)));
-
-+ if (is_itpm(to_pnp_dev(dev)))
-+ itpm = 1;
-+
- if (itpm)
- dev_info(dev, "Intel iTPM workaround enabled\n");
-
diff --git a/tty-icount-changeover-for-other-main-devices.patch b/tty-icount-changeover-for-other-main-devices.patch
deleted file mode 100644
index 9ea0e4566..000000000
--- a/tty-icount-changeover-for-other-main-devices.patch
+++ /dev/null
@@ -1,980 +0,0 @@
-From 9f13e0aa6e05b9b773f952a435afdc0b4d10e5dc Mon Sep 17 00:00:00 2001
-From: Alan Cox <alan@linux.intel.com>
-Date: Thu, 16 Sep 2010 18:21:52 +0100
-Subject: [PATCH 2/2] tty: icount changeover for other main devices
-
-Again basically cut and paste
-
-Convert the main driver set to use the hooks for GICOUNT
-
-Signed-off-by: Alan Cox <alan@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
----
- arch/ia64/hp/sim/simserial.c | 12 +------
- drivers/char/amiserial.c | 56 ++++++++++++++++-------------
- drivers/char/cyclades.c | 49 +++++++++++++------------
- drivers/char/ip2/ip2main.c | 72 ++++++++++++++++++++++---------------
- drivers/char/mxser.c | 62 ++++++++++++++++++--------------
- drivers/char/nozomi.c | 37 +++++++++----------
- drivers/char/pcmcia/synclink_cs.c | 60 ++++++++++++++-----------------
- drivers/char/synclink.c | 73 +++++++++++++++++--------------------
- drivers/char/synclink_gt.c | 55 +++++++++++++++-------------
- drivers/char/synclinkmp.c | 61 ++++++++++++++-----------------
- drivers/serial/68360serial.c | 51 +++++++++++++-------------
- net/bluetooth/rfcomm/tty.c | 4 --
- 12 files changed, 297 insertions(+), 295 deletions(-)
-
-diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
-index 1e8d71a..13633da 100644
---- a/arch/ia64/hp/sim/simserial.c
-+++ b/arch/ia64/hp/sim/simserial.c
-@@ -395,7 +395,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
- {
- if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
- (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
-- (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
-+ (cmd != TIOCMIWAIT)) {
- if (tty->flags & (1 << TTY_IO_ERROR))
- return -EIO;
- }
-@@ -433,16 +433,6 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
- case TIOCMIWAIT:
- printk(KERN_INFO "rs_ioctl: TIOCMIWAIT: called\n");
- return 0;
-- /*
-- * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-- * Return: write counters to the user passed counter struct
-- * NB: both 1->0 and 0->1 transitions are counted except for
-- * RI where only 0->1 is counted.
-- */
-- case TIOCGICOUNT:
-- printk(KERN_INFO "rs_ioctl: TIOCGICOUNT called\n");
-- return 0;
--
- case TIOCSERGWILD:
- case TIOCSERSWILD:
- /* "setserial -W" is called in Debian boot */
-diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c
-index a11c8c9..b0a7046 100644
---- a/drivers/char/amiserial.c
-+++ b/drivers/char/amiserial.c
-@@ -1263,6 +1263,36 @@ static int rs_break(struct tty_struct *tty, int break_state)
- return 0;
- }
-
-+/*
-+ * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-+ * Return: write counters to the user passed counter struct
-+ * NB: both 1->0 and 0->1 transitions are counted except for
-+ * RI where only 0->1 is counted.
-+ */
-+static int rs_get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount)
-+{
-+ struct async_struct *info = tty->driver_data;
-+ struct async_icount cnow;
-+ unsigned long flags;
-+
-+ local_irq_save(flags);
-+ cnow = info->state->icount;
-+ local_irq_restore(flags);
-+ icount->cts = cnow.cts;
-+ icount->dsr = cnow.dsr;
-+ icount->rng = cnow.rng;
-+ icount->dcd = cnow.dcd;
-+ icount->rx = cnow.rx;
-+ icount->tx = cnow.tx;
-+ icount->frame = cnow.frame;
-+ icount->overrun = cnow.overrun;
-+ icount->parity = cnow.parity;
-+ icount->brk = cnow.brk;
-+ icount->buf_overrun = cnow.buf_overrun;
-+
-+ return 0;
-+}
-
- static int rs_ioctl(struct tty_struct *tty, struct file * file,
- unsigned int cmd, unsigned long arg)
-@@ -1332,31 +1362,6 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
- }
- /* NOTREACHED */
-
-- /*
-- * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-- * Return: write counters to the user passed counter struct
-- * NB: both 1->0 and 0->1 transitions are counted except for
-- * RI where only 0->1 is counted.
-- */
-- case TIOCGICOUNT:
-- local_irq_save(flags);
-- cnow = info->state->icount;
-- local_irq_restore(flags);
-- icount.cts = cnow.cts;
-- icount.dsr = cnow.dsr;
-- icount.rng = cnow.rng;
-- icount.dcd = cnow.dcd;
-- icount.rx = cnow.rx;
-- icount.tx = cnow.tx;
-- icount.frame = cnow.frame;
-- icount.overrun = cnow.overrun;
-- icount.parity = cnow.parity;
-- icount.brk = cnow.brk;
-- icount.buf_overrun = cnow.buf_overrun;
--
-- if (copy_to_user(argp, &icount, sizeof(icount)))
-- return -EFAULT;
-- return 0;
- case TIOCSERGWILD:
- case TIOCSERSWILD:
- /* "setserial -W" is called in Debian boot */
-@@ -1958,6 +1963,7 @@ static const struct tty_operations serial_ops = {
- .wait_until_sent = rs_wait_until_sent,
- .tiocmget = rs_tiocmget,
- .tiocmset = rs_tiocmset,
-+ .get_icount = rs_get_icount,
- .proc_fops = &rs_proc_fops,
- };
-
-diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
-index 27aad94..4f152c2 100644
---- a/drivers/char/cyclades.c
-+++ b/drivers/char/cyclades.c
-@@ -2790,29 +2790,6 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
- * NB: both 1->0 and 0->1 transitions are counted except for
- * RI where only 0->1 is counted.
- */
-- case TIOCGICOUNT: {
-- struct serial_icounter_struct sic = { };
--
-- spin_lock_irqsave(&info->card->card_lock, flags);
-- cnow = info->icount;
-- spin_unlock_irqrestore(&info->card->card_lock, flags);
--
-- sic.cts = cnow.cts;
-- sic.dsr = cnow.dsr;
-- sic.rng = cnow.rng;
-- sic.dcd = cnow.dcd;
-- sic.rx = cnow.rx;
-- sic.tx = cnow.tx;
-- sic.frame = cnow.frame;
-- sic.overrun = cnow.overrun;
-- sic.parity = cnow.parity;
-- sic.brk = cnow.brk;
-- sic.buf_overrun = cnow.buf_overrun;
--
-- if (copy_to_user(argp, &sic, sizeof(sic)))
-- ret_val = -EFAULT;
-- break;
-- }
- default:
- ret_val = -ENOIOCTLCMD;
- }
-@@ -2823,6 +2800,31 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
- return ret_val;
- } /* cy_ioctl */
-
-+static int cy_get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *sic)
-+{
-+ struct cyclades_port *info = tty->driver_data;
-+ struct cyclades_icount cnow; /* Used to snapshot */
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&info->card->card_lock, flags);
-+ cnow = info->icount;
-+ spin_unlock_irqrestore(&info->card->card_lock, flags);
-+
-+ sic->cts = cnow.cts;
-+ sic->dsr = cnow.dsr;
-+ sic->rng = cnow.rng;
-+ sic->dcd = cnow.dcd;
-+ sic->rx = cnow.rx;
-+ sic->tx = cnow.tx;
-+ sic->frame = cnow.frame;
-+ sic->overrun = cnow.overrun;
-+ sic->parity = cnow.parity;
-+ sic->brk = cnow.brk;
-+ sic->buf_overrun = cnow.buf_overrun;
-+ return 0;
-+}
-+
- /*
- * This routine allows the tty driver to be notified when
- * device's termios settings have changed. Note that a
-@@ -4084,6 +4086,7 @@ static const struct tty_operations cy_ops = {
- .wait_until_sent = cy_wait_until_sent,
- .tiocmget = cy_tiocmget,
- .tiocmset = cy_tiocmset,
-+ .get_icount = cy_get_icount,
- .proc_fops = &cyclades_proc_fops,
- };
-
-diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
-index d4b71e8..438272c 100644
---- a/drivers/char/ip2/ip2main.c
-+++ b/drivers/char/ip2/ip2main.c
-@@ -183,6 +183,8 @@ static void ip2_hangup(PTTY);
- static int ip2_tiocmget(struct tty_struct *tty, struct file *file);
- static int ip2_tiocmset(struct tty_struct *tty, struct file *file,
- unsigned int set, unsigned int clear);
-+static int ip2_get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount);
-
- static void set_irq(int, int);
- static void ip2_interrupt_bh(struct work_struct *work);
-@@ -454,6 +456,7 @@ static const struct tty_operations ip2_ops = {
- .hangup = ip2_hangup,
- .tiocmget = ip2_tiocmget,
- .tiocmset = ip2_tiocmset,
-+ .get_icount = ip2_get_icount,
- .proc_fops = &ip2_proc_fops,
- };
-
-@@ -2128,7 +2131,6 @@ ip2_ioctl ( PTTY tty, struct file *pFile, UINT cmd, ULONG arg )
- i2ChanStrPtr pCh = DevTable[tty->index];
- i2eBordStrPtr pB;
- struct async_icount cprev, cnow; /* kernel counter temps */
-- struct serial_icounter_struct __user *p_cuser;
- int rc = 0;
- unsigned long flags;
- void __user *argp = (void __user *)arg;
-@@ -2297,34 +2299,6 @@ ip2_ioctl ( PTTY tty, struct file *pFile, UINT cmd, ULONG arg )
- break;
-
- /*
-- * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-- * Return: write counters to the user passed counter struct
-- * NB: both 1->0 and 0->1 transitions are counted except for RI where
-- * only 0->1 is counted. The controller is quite capable of counting
-- * both, but this done to preserve compatibility with the standard
-- * serial driver.
-- */
-- case TIOCGICOUNT:
-- ip2trace (CHANN, ITRC_IOCTL, 11, 1, rc );
--
-- write_lock_irqsave(&pB->read_fifo_spinlock, flags);
-- cnow = pCh->icount;
-- write_unlock_irqrestore(&pB->read_fifo_spinlock, flags);
-- p_cuser = argp;
-- rc = put_user(cnow.cts, &p_cuser->cts);
-- rc = put_user(cnow.dsr, &p_cuser->dsr);
-- rc = put_user(cnow.rng, &p_cuser->rng);
-- rc = put_user(cnow.dcd, &p_cuser->dcd);
-- rc = put_user(cnow.rx, &p_cuser->rx);
-- rc = put_user(cnow.tx, &p_cuser->tx);
-- rc = put_user(cnow.frame, &p_cuser->frame);
-- rc = put_user(cnow.overrun, &p_cuser->overrun);
-- rc = put_user(cnow.parity, &p_cuser->parity);
-- rc = put_user(cnow.brk, &p_cuser->brk);
-- rc = put_user(cnow.buf_overrun, &p_cuser->buf_overrun);
-- break;
--
-- /*
- * The rest are not supported by this driver. By returning -ENOIOCTLCMD they
- * will be passed to the line discipline for it to handle.
- */
-@@ -2348,6 +2322,46 @@ ip2_ioctl ( PTTY tty, struct file *pFile, UINT cmd, ULONG arg )
- return rc;
- }
-
-+static int ip2_get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount)
-+{
-+ i2ChanStrPtr pCh = DevTable[tty->index];
-+ i2eBordStrPtr pB;
-+ struct async_icount cnow; /* kernel counter temp */
-+ unsigned long flags;
-+
-+ if ( pCh == NULL )
-+ return -ENODEV;
-+
-+ pB = pCh->pMyBord;
-+
-+ /*
-+ * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-+ * Return: write counters to the user passed counter struct
-+ * NB: both 1->0 and 0->1 transitions are counted except for RI where
-+ * only 0->1 is counted. The controller is quite capable of counting
-+ * both, but this done to preserve compatibility with the standard
-+ * serial driver.
-+ */
-+
-+ write_lock_irqsave(&pB->read_fifo_spinlock, flags);
-+ cnow = pCh->icount;
-+ write_unlock_irqrestore(&pB->read_fifo_spinlock, flags);
-+
-+ icount->cts = cnow.cts;
-+ icount->dsr = cnow.dsr;
-+ icount->rng = cnow.rng;
-+ icount->dcd = cnow.dcd;
-+ icount->rx = cnow.rx;
-+ icount->tx = cnow.tx;
-+ icount->frame = cnow.frame;
-+ icount->overrun = cnow.overrun;
-+ icount->parity = cnow.parity;
-+ icount->brk = cnow.brk;
-+ icount->buf_overrun = cnow.buf_overrun;
-+ return 0;
-+}
-+
- /******************************************************************************/
- /* Function: GetSerialInfo() */
- /* Parameters: Pointer to channel structure */
-diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
-index 3fc89da..b3704ae7 100644
---- a/drivers/char/mxser.c
-+++ b/drivers/char/mxser.c
-@@ -1700,7 +1700,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
- return 0;
- }
-
-- if (cmd != TIOCGSERIAL && cmd != TIOCMIWAIT && cmd != TIOCGICOUNT &&
-+ if (cmd != TIOCGSERIAL && cmd != TIOCMIWAIT &&
- test_bit(TTY_IO_ERROR, &tty->flags))
- return -EIO;
-
-@@ -1730,32 +1730,6 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
-
- return wait_event_interruptible(info->port.delta_msr_wait,
- mxser_cflags_changed(info, arg, &cnow));
-- /*
-- * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-- * Return: write counters to the user passed counter struct
-- * NB: both 1->0 and 0->1 transitions are counted except for
-- * RI where only 0->1 is counted.
-- */
-- case TIOCGICOUNT: {
-- struct serial_icounter_struct icnt = { 0 };
-- spin_lock_irqsave(&info->slock, flags);
-- cnow = info->icount;
-- spin_unlock_irqrestore(&info->slock, flags);
--
-- icnt.frame = cnow.frame;
-- icnt.brk = cnow.brk;
-- icnt.overrun = cnow.overrun;
-- icnt.buf_overrun = cnow.buf_overrun;
-- icnt.parity = cnow.parity;
-- icnt.rx = cnow.rx;
-- icnt.tx = cnow.tx;
-- icnt.cts = cnow.cts;
-- icnt.dsr = cnow.dsr;
-- icnt.rng = cnow.rng;
-- icnt.dcd = cnow.dcd;
--
-- return copy_to_user(argp, &icnt, sizeof(icnt)) ? -EFAULT : 0;
-- }
- case MOXA_HighSpeedOn:
- return put_user(info->baud_base != 115200 ? 1 : 0, (int __user *)argp);
- case MOXA_SDS_RSTICOUNTER:
-@@ -1828,6 +1802,39 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
- return 0;
- }
-
-+ /*
-+ * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-+ * Return: write counters to the user passed counter struct
-+ * NB: both 1->0 and 0->1 transitions are counted except for
-+ * RI where only 0->1 is counted.
-+ */
-+
-+static int mxser_get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount)
-+
-+{
-+ struct mxser_port *info = tty->driver_data;
-+ struct async_icount cnow;
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&info->slock, flags);
-+ cnow = info->icount;
-+ spin_unlock_irqrestore(&info->slock, flags);
-+
-+ icount->frame = cnow.frame;
-+ icount->brk = cnow.brk;
-+ icount->overrun = cnow.overrun;
-+ icount->buf_overrun = cnow.buf_overrun;
-+ icount->parity = cnow.parity;
-+ icount->rx = cnow.rx;
-+ icount->tx = cnow.tx;
-+ icount->cts = cnow.cts;
-+ icount->dsr = cnow.dsr;
-+ icount->rng = cnow.rng;
-+ icount->dcd = cnow.dcd;
-+ return 0;
-+}
-+
- static void mxser_stoprx(struct tty_struct *tty)
- {
- struct mxser_port *info = tty->driver_data;
-@@ -2326,6 +2333,7 @@ static const struct tty_operations mxser_ops = {
- .wait_until_sent = mxser_wait_until_sent,
- .tiocmget = mxser_tiocmget,
- .tiocmset = mxser_tiocmset,
-+ .get_icount = mxser_get_icount,
- };
-
- struct tty_port_operations mxser_port_ops = {
-diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
-index 817169c..dd3f9b1 100644
---- a/drivers/char/nozomi.c
-+++ b/drivers/char/nozomi.c
-@@ -1804,24 +1804,24 @@ static int ntty_cflags_changed(struct port *port, unsigned long flags,
- return ret;
- }
-
--static int ntty_ioctl_tiocgicount(struct port *port, void __user *argp)
-+static int ntty_tiocgicount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount)
- {
-+ struct port *port = tty->driver_data;
- const struct async_icount cnow = port->tty_icount;
-- struct serial_icounter_struct icount;
--
-- icount.cts = cnow.cts;
-- icount.dsr = cnow.dsr;
-- icount.rng = cnow.rng;
-- icount.dcd = cnow.dcd;
-- icount.rx = cnow.rx;
-- icount.tx = cnow.tx;
-- icount.frame = cnow.frame;
-- icount.overrun = cnow.overrun;
-- icount.parity = cnow.parity;
-- icount.brk = cnow.brk;
-- icount.buf_overrun = cnow.buf_overrun;
--
-- return copy_to_user(argp, &icount, sizeof(icount)) ? -EFAULT : 0;
-+
-+ icount->cts = cnow.cts;
-+ icount->dsr = cnow.dsr;
-+ icount->rng = cnow.rng;
-+ icount->dcd = cnow.dcd;
-+ icount->rx = cnow.rx;
-+ icount->tx = cnow.tx;
-+ icount->frame = cnow.frame;
-+ icount->overrun = cnow.overrun;
-+ icount->parity = cnow.parity;
-+ icount->brk = cnow.brk;
-+ icount->buf_overrun = cnow.buf_overrun;
-+ return 0;
- }
-
- static int ntty_ioctl(struct tty_struct *tty, struct file *file,
-@@ -1840,9 +1840,7 @@ static int ntty_ioctl(struct tty_struct *tty, struct file *file,
- rval = wait_event_interruptible(port->tty_wait,
- ntty_cflags_changed(port, arg, &cprev));
- break;
-- } case TIOCGICOUNT:
-- rval = ntty_ioctl_tiocgicount(port, argp);
-- break;
-+ }
- default:
- DBG1("ERR: 0x%08X, %d", cmd, cmd);
- break;
-@@ -1922,6 +1920,7 @@ static const struct tty_operations tty_ops = {
- .chars_in_buffer = ntty_chars_in_buffer,
- .tiocmget = ntty_tiocmget,
- .tiocmset = ntty_tiocmset,
-+ .get_icount = ntty_tiocgicount,
- .install = ntty_install,
- .cleanup = ntty_cleanup,
- };
-diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
-index 45f9fad..7404809 100644
---- a/drivers/char/pcmcia/synclink_cs.c
-+++ b/drivers/char/pcmcia/synclink_cs.c
-@@ -2215,6 +2215,32 @@ static int mgslpc_break(struct tty_struct *tty, int break_state)
- return 0;
- }
-
-+static int mgslpc_get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount)
-+{
-+ MGSLPC_INFO * info = (MGSLPC_INFO *)tty->driver_data;
-+ struct mgsl_icount cnow; /* kernel counter temps */
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&info->lock,flags);
-+ cnow = info->icount;
-+ spin_unlock_irqrestore(&info->lock,flags);
-+
-+ icount->cts = cnow.cts;
-+ icount->dsr = cnow.dsr;
-+ icount->rng = cnow.rng;
-+ icount->dcd = cnow.dcd;
-+ icount->rx = cnow.rx;
-+ icount->tx = cnow.tx;
-+ icount->frame = cnow.frame;
-+ icount->overrun = cnow.overrun;
-+ icount->parity = cnow.parity;
-+ icount->brk = cnow.brk;
-+ icount->buf_overrun = cnow.buf_overrun;
-+
-+ return 0;
-+}
-+
- /* Service an IOCTL request
- *
- * Arguments:
-@@ -2230,11 +2256,7 @@ static int mgslpc_ioctl(struct tty_struct *tty, struct file * file,
- unsigned int cmd, unsigned long arg)
- {
- MGSLPC_INFO * info = (MGSLPC_INFO *)tty->driver_data;
-- int error;
-- struct mgsl_icount cnow; /* kernel counter temps */
-- struct serial_icounter_struct __user *p_cuser; /* user space */
- void __user *argp = (void __user *)arg;
-- unsigned long flags;
-
- if (debug_level >= DEBUG_LEVEL_INFO)
- printk("%s(%d):mgslpc_ioctl %s cmd=%08X\n", __FILE__,__LINE__,
-@@ -2244,7 +2266,7 @@ static int mgslpc_ioctl(struct tty_struct *tty, struct file * file,
- return -ENODEV;
-
- if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-- (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
-+ (cmd != TIOCMIWAIT)) {
- if (tty->flags & (1 << TTY_IO_ERROR))
- return -EIO;
- }
-@@ -2274,34 +2296,6 @@ static int mgslpc_ioctl(struct tty_struct *tty, struct file * file,
- return wait_events(info, argp);
- case TIOCMIWAIT:
- return modem_input_wait(info,(int)arg);
-- case TIOCGICOUNT:
-- spin_lock_irqsave(&info->lock,flags);
-- cnow = info->icount;
-- spin_unlock_irqrestore(&info->lock,flags);
-- p_cuser = argp;
-- PUT_USER(error,cnow.cts, &p_cuser->cts);
-- if (error) return error;
-- PUT_USER(error,cnow.dsr, &p_cuser->dsr);
-- if (error) return error;
-- PUT_USER(error,cnow.rng, &p_cuser->rng);
-- if (error) return error;
-- PUT_USER(error,cnow.dcd, &p_cuser->dcd);
-- if (error) return error;
-- PUT_USER(error,cnow.rx, &p_cuser->rx);
-- if (error) return error;
-- PUT_USER(error,cnow.tx, &p_cuser->tx);
-- if (error) return error;
-- PUT_USER(error,cnow.frame, &p_cuser->frame);
-- if (error) return error;
-- PUT_USER(error,cnow.overrun, &p_cuser->overrun);
-- if (error) return error;
-- PUT_USER(error,cnow.parity, &p_cuser->parity);
-- if (error) return error;
-- PUT_USER(error,cnow.brk, &p_cuser->brk);
-- if (error) return error;
-- PUT_USER(error,cnow.buf_overrun, &p_cuser->buf_overrun);
-- if (error) return error;
-- return 0;
- default:
- return -ENOIOCTLCMD;
- }
-diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
-index a2a5800..3a6824f 100644
---- a/drivers/char/synclink.c
-+++ b/drivers/char/synclink.c
-@@ -2925,6 +2925,38 @@ static int mgsl_break(struct tty_struct *tty, int break_state)
-
- } /* end of mgsl_break() */
-
-+/*
-+ * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-+ * Return: write counters to the user passed counter struct
-+ * NB: both 1->0 and 0->1 transitions are counted except for
-+ * RI where only 0->1 is counted.
-+ */
-+static int msgl_get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount)
-+
-+{
-+ struct mgsl_struct * info = tty->driver_data;
-+ struct mgsl_icount cnow; /* kernel counter temps */
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&info->irq_spinlock,flags);
-+ cnow = info->icount;
-+ spin_unlock_irqrestore(&info->irq_spinlock,flags);
-+
-+ icount->cts = cnow.cts;
-+ icount->dsr = cnow.dsr;
-+ icount->rng = cnow.rng;
-+ icount->dcd = cnow.dcd;
-+ icount->rx = cnow.rx;
-+ icount->tx = cnow.tx;
-+ icount->frame = cnow.frame;
-+ icount->overrun = cnow.overrun;
-+ icount->parity = cnow.parity;
-+ icount->brk = cnow.brk;
-+ icount->buf_overrun = cnow.buf_overrun;
-+ return 0;
-+}
-+
- /* mgsl_ioctl() Service an IOCTL request
- *
- * Arguments:
-@@ -2949,7 +2981,7 @@ static int mgsl_ioctl(struct tty_struct *tty, struct file * file,
- return -ENODEV;
-
- if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-- (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
-+ (cmd != TIOCMIWAIT)) {
- if (tty->flags & (1 << TTY_IO_ERROR))
- return -EIO;
- }
-@@ -2959,11 +2991,7 @@ static int mgsl_ioctl(struct tty_struct *tty, struct file * file,
-
- static int mgsl_ioctl_common(struct mgsl_struct *info, unsigned int cmd, unsigned long arg)
- {
-- int error;
-- struct mgsl_icount cnow; /* kernel counter temps */
- void __user *argp = (void __user *)arg;
-- struct serial_icounter_struct __user *p_cuser; /* user space */
-- unsigned long flags;
-
- switch (cmd) {
- case MGSL_IOCGPARAMS:
-@@ -2992,40 +3020,6 @@ static int mgsl_ioctl_common(struct mgsl_struct *info, unsigned int cmd, unsigne
- case TIOCMIWAIT:
- return modem_input_wait(info,(int)arg);
-
-- /*
-- * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-- * Return: write counters to the user passed counter struct
-- * NB: both 1->0 and 0->1 transitions are counted except for
-- * RI where only 0->1 is counted.
-- */
-- case TIOCGICOUNT:
-- spin_lock_irqsave(&info->irq_spinlock,flags);
-- cnow = info->icount;
-- spin_unlock_irqrestore(&info->irq_spinlock,flags);
-- p_cuser = argp;
-- PUT_USER(error,cnow.cts, &p_cuser->cts);
-- if (error) return error;
-- PUT_USER(error,cnow.dsr, &p_cuser->dsr);
-- if (error) return error;
-- PUT_USER(error,cnow.rng, &p_cuser->rng);
-- if (error) return error;
-- PUT_USER(error,cnow.dcd, &p_cuser->dcd);
-- if (error) return error;
-- PUT_USER(error,cnow.rx, &p_cuser->rx);
-- if (error) return error;
-- PUT_USER(error,cnow.tx, &p_cuser->tx);
-- if (error) return error;
-- PUT_USER(error,cnow.frame, &p_cuser->frame);
-- if (error) return error;
-- PUT_USER(error,cnow.overrun, &p_cuser->overrun);
-- if (error) return error;
-- PUT_USER(error,cnow.parity, &p_cuser->parity);
-- if (error) return error;
-- PUT_USER(error,cnow.brk, &p_cuser->brk);
-- if (error) return error;
-- PUT_USER(error,cnow.buf_overrun, &p_cuser->buf_overrun);
-- if (error) return error;
-- return 0;
- default:
- return -ENOIOCTLCMD;
- }
-@@ -4328,6 +4322,7 @@ static const struct tty_operations mgsl_ops = {
- .hangup = mgsl_hangup,
- .tiocmget = tiocmget,
- .tiocmset = tiocmset,
-+ .get_icount = msgl_get_icount,
- .proc_fops = &mgsl_proc_fops,
- };
-
-diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
-index e63b830..1746d91 100644
---- a/drivers/char/synclink_gt.c
-+++ b/drivers/char/synclink_gt.c
-@@ -1032,9 +1032,6 @@ static int ioctl(struct tty_struct *tty, struct file *file,
- unsigned int cmd, unsigned long arg)
- {
- struct slgt_info *info = tty->driver_data;
-- struct mgsl_icount cnow; /* kernel counter temps */
-- struct serial_icounter_struct __user *p_cuser; /* user space */
-- unsigned long flags;
- void __user *argp = (void __user *)arg;
- int ret;
-
-@@ -1043,7 +1040,7 @@ static int ioctl(struct tty_struct *tty, struct file *file,
- DBGINFO(("%s ioctl() cmd=%08X\n", info->device_name, cmd));
-
- if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-- (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
-+ (cmd != TIOCMIWAIT)) {
- if (tty->flags & (1 << TTY_IO_ERROR))
- return -EIO;
- }
-@@ -1053,24 +1050,6 @@ static int ioctl(struct tty_struct *tty, struct file *file,
- return wait_mgsl_event(info, argp);
- case TIOCMIWAIT:
- return modem_input_wait(info,(int)arg);
-- case TIOCGICOUNT:
-- spin_lock_irqsave(&info->lock,flags);
-- cnow = info->icount;
-- spin_unlock_irqrestore(&info->lock,flags);
-- p_cuser = argp;
-- if (put_user(cnow.cts, &p_cuser->cts) ||
-- put_user(cnow.dsr, &p_cuser->dsr) ||
-- put_user(cnow.rng, &p_cuser->rng) ||
-- put_user(cnow.dcd, &p_cuser->dcd) ||
-- put_user(cnow.rx, &p_cuser->rx) ||
-- put_user(cnow.tx, &p_cuser->tx) ||
-- put_user(cnow.frame, &p_cuser->frame) ||
-- put_user(cnow.overrun, &p_cuser->overrun) ||
-- put_user(cnow.parity, &p_cuser->parity) ||
-- put_user(cnow.brk, &p_cuser->brk) ||
-- put_user(cnow.buf_overrun, &p_cuser->buf_overrun))
-- return -EFAULT;
-- return 0;
- case MGSL_IOCSGPIO:
- return set_gpio(info, argp);
- case MGSL_IOCGGPIO:
-@@ -1117,6 +1096,33 @@ static int ioctl(struct tty_struct *tty, struct file *file,
- return ret;
- }
-
-+static int get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount)
-+
-+{
-+ struct slgt_info *info = tty->driver_data;
-+ struct mgsl_icount cnow; /* kernel counter temps */
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&info->lock,flags);
-+ cnow = info->icount;
-+ spin_unlock_irqrestore(&info->lock,flags);
-+
-+ icount->cts = cnow.cts;
-+ icount->dsr = cnow.dsr;
-+ icount->rng = cnow.rng;
-+ icount->dcd = cnow.dcd;
-+ icount->rx = cnow.rx;
-+ icount->tx = cnow.tx;
-+ icount->frame = cnow.frame;
-+ icount->overrun = cnow.overrun;
-+ icount->parity = cnow.parity;
-+ icount->brk = cnow.brk;
-+ icount->buf_overrun = cnow.buf_overrun;
-+
-+ return 0;
-+}
-+
- /*
- * support for 32 bit ioctl calls on 64 bit systems
- */
-@@ -1206,10 +1212,6 @@ static long slgt_compat_ioctl(struct tty_struct *tty, struct file *file,
- case MGSL_IOCSGPIO:
- case MGSL_IOCGGPIO:
- case MGSL_IOCWAITGPIO:
-- case TIOCGICOUNT:
-- rc = ioctl(tty, file, cmd, (unsigned long)(compat_ptr(arg)));
-- break;
--
- case MGSL_IOCSTXIDLE:
- case MGSL_IOCTXENABLE:
- case MGSL_IOCRXENABLE:
-@@ -3642,6 +3644,7 @@ static const struct tty_operations ops = {
- .hangup = hangup,
- .tiocmget = tiocmget,
- .tiocmset = tiocmset,
-+ .get_icount = get_icount,
- .proc_fops = &synclink_gt_proc_fops,
- };
-
-diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
-index e56caf7..2f9eb4b 100644
---- a/drivers/char/synclinkmp.c
-+++ b/drivers/char/synclinkmp.c
-@@ -1258,10 +1258,6 @@ static int ioctl(struct tty_struct *tty, struct file *file,
- unsigned int cmd, unsigned long arg)
- {
- SLMP_INFO *info = tty->driver_data;
-- int error;
-- struct mgsl_icount cnow; /* kernel counter temps */
-- struct serial_icounter_struct __user *p_cuser; /* user space */
-- unsigned long flags;
- void __user *argp = (void __user *)arg;
-
- if (debug_level >= DEBUG_LEVEL_INFO)
-@@ -1272,7 +1268,7 @@ static int ioctl(struct tty_struct *tty, struct file *file,
- return -ENODEV;
-
- if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-- (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
-+ (cmd != TIOCMIWAIT)) {
- if (tty->flags & (1 << TTY_IO_ERROR))
- return -EIO;
- }
-@@ -1310,40 +1306,38 @@ static int ioctl(struct tty_struct *tty, struct file *file,
- * NB: both 1->0 and 0->1 transitions are counted except for
- * RI where only 0->1 is counted.
- */
-- case TIOCGICOUNT:
-- spin_lock_irqsave(&info->lock,flags);
-- cnow = info->icount;
-- spin_unlock_irqrestore(&info->lock,flags);
-- p_cuser = argp;
-- PUT_USER(error,cnow.cts, &p_cuser->cts);
-- if (error) return error;
-- PUT_USER(error,cnow.dsr, &p_cuser->dsr);
-- if (error) return error;
-- PUT_USER(error,cnow.rng, &p_cuser->rng);
-- if (error) return error;
-- PUT_USER(error,cnow.dcd, &p_cuser->dcd);
-- if (error) return error;
-- PUT_USER(error,cnow.rx, &p_cuser->rx);
-- if (error) return error;
-- PUT_USER(error,cnow.tx, &p_cuser->tx);
-- if (error) return error;
-- PUT_USER(error,cnow.frame, &p_cuser->frame);
-- if (error) return error;
-- PUT_USER(error,cnow.overrun, &p_cuser->overrun);
-- if (error) return error;
-- PUT_USER(error,cnow.parity, &p_cuser->parity);
-- if (error) return error;
-- PUT_USER(error,cnow.brk, &p_cuser->brk);
-- if (error) return error;
-- PUT_USER(error,cnow.buf_overrun, &p_cuser->buf_overrun);
-- if (error) return error;
-- return 0;
- default:
- return -ENOIOCTLCMD;
- }
- return 0;
- }
-
-+static int get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount)
-+{
-+ SLMP_INFO *info = tty->driver_data;
-+ struct mgsl_icount cnow; /* kernel counter temps */
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&info->lock,flags);
-+ cnow = info->icount;
-+ spin_unlock_irqrestore(&info->lock,flags);
-+
-+ icount->cts = cnow.cts;
-+ icount->dsr = cnow.dsr;
-+ icount->rng = cnow.rng;
-+ icount->dcd = cnow.dcd;
-+ icount->rx = cnow.rx;
-+ icount->tx = cnow.tx;
-+ icount->frame = cnow.frame;
-+ icount->overrun = cnow.overrun;
-+ icount->parity = cnow.parity;
-+ icount->brk = cnow.brk;
-+ icount->buf_overrun = cnow.buf_overrun;
-+
-+ return 0;
-+}
-+
- /*
- * /proc fs routines....
- */
-@@ -3909,6 +3903,7 @@ static const struct tty_operations ops = {
- .hangup = hangup,
- .tiocmget = tiocmget,
- .tiocmset = tiocmset,
-+ .get_icount = get_icount,
- .proc_fops = &synclinkmp_proc_fops,
- };
-
-diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c
-index 0dff3bb..88b1335 100644
---- a/drivers/serial/68360serial.c
-+++ b/drivers/serial/68360serial.c
-@@ -1381,6 +1381,30 @@ static void send_break(ser_info_t *info, unsigned int duration)
- }
-
-
-+/*
-+ * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-+ * Return: write counters to the user passed counter struct
-+ * NB: both 1->0 and 0->1 transitions are counted except for
-+ * RI where only 0->1 is counted.
-+ */
-+static int rs_360_get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount)
-+{
-+ ser_info_t *info = (ser_info_t *)tty->driver_data;
-+ struct async_icount cnow;
-+
-+ local_irq_disable();
-+ cnow = info->state->icount;
-+ local_irq_enable();
-+
-+ icount->cts = cnow.cts;
-+ icount->dsr = cnow.dsr;
-+ icount->rng = cnow.rng;
-+ icount->dcd = cnow.dcd;
-+
-+ return 0;
-+}
-+
- static int rs_360_ioctl(struct tty_struct *tty, struct file * file,
- unsigned int cmd, unsigned long arg)
- {
-@@ -1394,7 +1418,7 @@ static int rs_360_ioctl(struct tty_struct *tty, struct file * file,
- if (serial_paranoia_check(info, tty->name, "rs_ioctl"))
- return -ENODEV;
-
-- if ((cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
-+ if (cmd != TIOCMIWAIT) {
- if (tty->flags & (1 << TTY_IO_ERROR))
- return -EIO;
- }
-@@ -1477,31 +1501,6 @@ static int rs_360_ioctl(struct tty_struct *tty, struct file * file,
- return 0;
- #endif
-
-- /*
-- * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
-- * Return: write counters to the user passed counter struct
-- * NB: both 1->0 and 0->1 transitions are counted except for
-- * RI where only 0->1 is counted.
-- */
-- case TIOCGICOUNT:
-- local_irq_disable();
-- cnow = info->state->icount;
-- local_irq_enable();
-- p_cuser = (struct serial_icounter_struct *) arg;
--/* error = put_user(cnow.cts, &p_cuser->cts); */
--/* if (error) return error; */
--/* error = put_user(cnow.dsr, &p_cuser->dsr); */
--/* if (error) return error; */
--/* error = put_user(cnow.rng, &p_cuser->rng); */
--/* if (error) return error; */
--/* error = put_user(cnow.dcd, &p_cuser->dcd); */
--/* if (error) return error; */
--
-- put_user(cnow.cts, &p_cuser->cts);
-- put_user(cnow.dsr, &p_cuser->dsr);
-- put_user(cnow.rng, &p_cuser->rng);
-- put_user(cnow.dcd, &p_cuser->dcd);
-- return 0;
-
- default:
- return -ENOIOCTLCMD;
-diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
-index befc3a5..84c2a4d 100644
---- a/net/bluetooth/rfcomm/tty.c
-+++ b/net/bluetooth/rfcomm/tty.c
-@@ -844,10 +844,6 @@ static int rfcomm_tty_ioctl(struct tty_struct *tty, struct file *filp, unsigned
- BT_DBG("TIOCMIWAIT");
- break;
-
-- case TIOCGICOUNT:
-- BT_DBG("TIOCGICOUNT");
-- break;
--
- case TIOCGSERIAL:
- BT_ERR("TIOCGSERIAL is not supported");
- return -ENOIOCTLCMD;
---
-1.7.3.2
-
diff --git a/tty-make-tiocgicount-a-handler.patch b/tty-make-tiocgicount-a-handler.patch
deleted file mode 100644
index fb88aea7d..000000000
--- a/tty-make-tiocgicount-a-handler.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-From e2047e3ffc61042a3228cd4228cd95ab0dad1d72 Mon Sep 17 00:00:00 2001
-From: Alan Cox <alan@linux.intel.com>
-Date: Thu, 16 Sep 2010 18:21:24 +0100
-Subject: [PATCH 1/2] tty: Make tiocgicount a handler
-
-Dan Rosenberg noted that various drivers return the struct with uncleared
-fields. Instead of spending forever trying to stomp all the drivers that
-get it wrong (and every new driver) do the job in one place.
-
-This first patch adds the needed operations and hooks them up, including
-the needed USB midlayer and serial core plumbing.
-
-Signed-off-by: Alan Cox <alan@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
----
- drivers/char/tty_io.c | 21 +++++++++++++++++++++
- drivers/serial/serial_core.c | 37 +++++++++++++++++--------------------
- drivers/usb/serial/usb-serial.c | 13 +++++++++++++
- include/linux/tty_driver.h | 9 +++++++++
- include/linux/usb/serial.h | 2 ++
- 5 files changed, 62 insertions(+), 20 deletions(-)
-
-diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
-index 613c852..68d7713 100644
---- a/drivers/char/tty_io.c
-+++ b/drivers/char/tty_io.c
-@@ -96,6 +96,7 @@
- #include <linux/bitops.h>
- #include <linux/delay.h>
- #include <linux/seq_file.h>
-+#include <linux/serial.h>
-
- #include <linux/uaccess.h>
- #include <asm/system.h>
-@@ -2502,6 +2503,20 @@ static int tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int
- return tty->ops->tiocmset(tty, file, set, clear);
- }
-
-+static int tty_tiocgicount(struct tty_struct *tty, void __user *arg)
-+{
-+ int retval = -EINVAL;
-+ struct serial_icounter_struct icount;
-+ memset(&icount, 0, sizeof(icount));
-+ if (tty->ops->get_icount)
-+ retval = tty->ops->get_icount(tty, &icount);
-+ if (retval != 0)
-+ return retval;
-+ if (copy_to_user(arg, &icount, sizeof(icount)))
-+ return -EFAULT;
-+ return 0;
-+}
-+
- struct tty_struct *tty_pair_get_tty(struct tty_struct *tty)
- {
- if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
-@@ -2622,6 +2637,12 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
- case TIOCMBIC:
- case TIOCMBIS:
- return tty_tiocmset(tty, file, cmd, p);
-+ case TIOCGICOUNT:
-+ retval = tty_tiocgicount(tty, p);
-+ /* For the moment allow fall through to the old method */
-+ if (retval != -EINVAL)
-+ return retval;
-+ break;
- case TCFLSH:
- switch (arg) {
- case TCIFLUSH:
-diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
-index cd85112..2ee0aec 100644
---- a/drivers/serial/serial_core.c
-+++ b/drivers/serial/serial_core.c
-@@ -1074,10 +1074,10 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)
- * NB: both 1->0 and 0->1 transitions are counted except for
- * RI where only 0->1 is counted.
- */
--static int uart_get_count(struct uart_state *state,
-- struct serial_icounter_struct __user *icnt)
-+static int uart_get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount)
- {
-- struct serial_icounter_struct icount;
-+ struct uart_state *state = tty->driver_data;
- struct uart_icount cnow;
- struct uart_port *uport = state->uart_port;
-
-@@ -1085,19 +1085,19 @@ static int uart_get_count(struct uart_state *state,
- memcpy(&cnow, &uport->icount, sizeof(struct uart_icount));
- spin_unlock_irq(&uport->lock);
-
-- icount.cts = cnow.cts;
-- icount.dsr = cnow.dsr;
-- icount.rng = cnow.rng;
-- icount.dcd = cnow.dcd;
-- icount.rx = cnow.rx;
-- icount.tx = cnow.tx;
-- icount.frame = cnow.frame;
-- icount.overrun = cnow.overrun;
-- icount.parity = cnow.parity;
-- icount.brk = cnow.brk;
-- icount.buf_overrun = cnow.buf_overrun;
-+ icount->cts = cnow.cts;
-+ icount->dsr = cnow.dsr;
-+ icount->rng = cnow.rng;
-+ icount->dcd = cnow.dcd;
-+ icount->rx = cnow.rx;
-+ icount->tx = cnow.tx;
-+ icount->frame = cnow.frame;
-+ icount->overrun = cnow.overrun;
-+ icount->parity = cnow.parity;
-+ icount->brk = cnow.brk;
-+ icount->buf_overrun = cnow.buf_overrun;
-
-- return copy_to_user(icnt, &icount, sizeof(icount)) ? -EFAULT : 0;
-+ return 0;
- }
-
- /*
-@@ -1150,10 +1150,6 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
- case TIOCMIWAIT:
- ret = uart_wait_modem_status(state, arg);
- break;
--
-- case TIOCGICOUNT:
-- ret = uart_get_count(state, uarg);
-- break;
- }
-
- if (ret != -ENOIOCTLCMD)
-@@ -2283,6 +2279,7 @@ static const struct tty_operations uart_ops = {
- #endif
- .tiocmget = uart_tiocmget,
- .tiocmset = uart_tiocmset,
-+ .get_icount = uart_get_icount,
- #ifdef CONFIG_CONSOLE_POLL
- .poll_init = uart_poll_init,
- .poll_get_char = uart_poll_get_char,
-diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
-index 7a2177c..e64da74 100644
---- a/drivers/usb/serial/usb-serial.c
-+++ b/drivers/usb/serial/usb-serial.c
-@@ -519,6 +519,18 @@ static int serial_tiocmset(struct tty_struct *tty, struct file *file,
- return -EINVAL;
- }
-
-+static int serial_get_icount(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount)
-+{
-+ struct usb_serial_port *port = tty->driver_data;
-+
-+ dbg("%s - port %d", __func__, port->number);
-+
-+ if (port->serial->type->get_icount)
-+ return port->serial->type->get_icount(tty, icount);
-+ return -EINVAL;
-+}
-+
- /*
- * We would be calling tty_wakeup here, but unfortunately some line
- * disciplines have an annoying habit of calling tty->write from
-@@ -1195,6 +1207,7 @@ static const struct tty_operations serial_ops = {
- .chars_in_buffer = serial_chars_in_buffer,
- .tiocmget = serial_tiocmget,
- .tiocmset = serial_tiocmset,
-+ .get_icount = serial_get_icount,
- .cleanup = serial_cleanup,
- .install = serial_install,
- .proc_fops = &serial_proc_fops,
-diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
-index b086779..db2d227 100644
---- a/include/linux/tty_driver.h
-+++ b/include/linux/tty_driver.h
-@@ -224,6 +224,12 @@
- * unless the tty also has a valid tty->termiox pointer.
- *
- * Optional: Called under the termios lock
-+ *
-+ * int (*get_icount)(struct tty_struct *tty, struct serial_icounter *icount);
-+ *
-+ * Called when the device receives a TIOCGICOUNT ioctl. Passed a kernel
-+ * structure to complete. This method is optional and will only be called
-+ * if provided (otherwise EINVAL will be returned).
- */
-
- #include <linux/fs.h>
-@@ -232,6 +238,7 @@
-
- struct tty_struct;
- struct tty_driver;
-+struct serial_icounter_struct;
-
- struct tty_operations {
- struct tty_struct * (*lookup)(struct tty_driver *driver,
-@@ -268,6 +275,8 @@ struct tty_operations {
- unsigned int set, unsigned int clear);
- int (*resize)(struct tty_struct *tty, struct winsize *ws);
- int (*set_termiox)(struct tty_struct *tty, struct termiox *tnew);
-+ int (*get_icount)(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount);
- #ifdef CONFIG_CONSOLE_POLL
- int (*poll_init)(struct tty_driver *driver, int line, char *options);
- int (*poll_get_char)(struct tty_driver *driver, int line);
-diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
-index 55675b1..16d682f 100644
---- a/include/linux/usb/serial.h
-+++ b/include/linux/usb/serial.h
-@@ -271,6 +271,8 @@ struct usb_serial_driver {
- int (*tiocmget)(struct tty_struct *tty, struct file *file);
- int (*tiocmset)(struct tty_struct *tty, struct file *file,
- unsigned int set, unsigned int clear);
-+ int (*get_icount)(struct tty_struct *tty,
-+ struct serial_icounter_struct *icount);
- /* Called by the tty layer for port level work. There may or may not
- be an attached tty at this point */
- void (*dtr_rts)(struct usb_serial_port *port, int on);
---
-1.7.3.2
-
diff --git a/wacom-01-add-fuzz-parameters-to-features.patch b/wacom-01-add-fuzz-parameters-to-features.patch
deleted file mode 100644
index 4162726d3..000000000
--- a/wacom-01-add-fuzz-parameters-to-features.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From: Henrik Rydberg <rydberg@euromail.se>
-Date: Sun, 5 Sep 2010 19:25:11 +0000 (-0700)
-Subject: Input: wacom - add fuzz parameters to features
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdtor%2Finput.git;a=commitdiff_plain;h=fed87e655a2c20468d628b37424af58287803afe
-
-Input: wacom - add fuzz parameters to features
-
-The signal-to-noise ratio varies between devices, but currently all
-devices are treated the same way. Add fuzz parameters to the feature
-struct, allowing for tailored treatment of devices.
-
-Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-Acked-by: Ping Cheng <pingc@wacom.com>
-Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
----
-
-diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
-index 42ba369..e510e4f 100644
---- a/drivers/input/tablet/wacom_sys.c
-+++ b/drivers/input/tablet/wacom_sys.c
-@@ -333,8 +333,12 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
- struct usb_host_interface *interface = intf->cur_altsetting;
- struct hid_descriptor *hid_desc;
-
-- /* default device to penabled */
-+ /* default features */
- features->device_type = BTN_TOOL_PEN;
-+ features->x_fuzz = 4;
-+ features->y_fuzz = 4;
-+ features->pressure_fuzz = 0;
-+ features->distance_fuzz = 0;
-
- /* only Tablet PCs need to retrieve the info */
- if ((features->type != TABLETPC) && (features->type != TABLETPC2FG))
-diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
-index 6e29bad..6d7e164 100644
---- a/drivers/input/tablet/wacom_wac.c
-+++ b/drivers/input/tablet/wacom_wac.c
-@@ -951,9 +951,12 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
-
- __set_bit(BTN_TOUCH, input_dev->keybit);
-
-- input_set_abs_params(input_dev, ABS_X, 0, features->x_max, 4, 0);
-- input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, 4, 0);
-- input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, 0, 0);
-+ input_set_abs_params(input_dev, ABS_X, 0, features->x_max,
-+ features->x_fuzz, 0);
-+ input_set_abs_params(input_dev, ABS_Y, 0, features->y_max,
-+ features->y_fuzz, 0);
-+ input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max,
-+ features->pressure_fuzz, 0);
-
- __set_bit(ABS_MISC, input_dev->absbit);
-
-diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
-index 99e1a54..d769e9a 100644
---- a/drivers/input/tablet/wacom_wac.h
-+++ b/drivers/input/tablet/wacom_wac.h
-@@ -73,6 +73,10 @@ struct wacom_features {
- int y_phy;
- unsigned char unit;
- unsigned char unitExpo;
-+ int x_fuzz;
-+ int y_fuzz;
-+ int pressure_fuzz;
-+ int distance_fuzz;
- };
-
- struct wacom_shared {
diff --git a/wacom-02-parse-the-bamboo-device-family.patch b/wacom-02-parse-the-bamboo-device-family.patch
deleted file mode 100644
index f24d04d01..000000000
--- a/wacom-02-parse-the-bamboo-device-family.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From: Ping Cheng <pinglinux@gmail.com>
-Date: Sun, 5 Sep 2010 19:25:40 +0000 (-0700)
-Subject: Input: wacom - parse the Bamboo device family
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdtor%2Finput.git;a=commitdiff_plain;h=4a88081e739a41d6d70bace7e0a027f9054ab540
-
-Input: wacom - parse the Bamboo device family
-
-The Bamboo devices have multiple interfaces which need to be setup
-separately. Use the HID parsing mechanism to achieve that.
-
-Signed-off-by: Ping Cheng <pinglinux@gmail.com>
-Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
----
-
-diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
-index e510e4f..98cba08 100644
---- a/drivers/input/tablet/wacom_sys.c
-+++ b/drivers/input/tablet/wacom_sys.c
-@@ -195,17 +195,30 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi
- features->pktlen = WACOM_PKGLEN_TPC2FG;
- features->device_type = BTN_TOOL_TRIPLETAP;
- }
-- features->x_max =
-- get_unaligned_le16(&report[i + 3]);
-- features->x_phy =
-- get_unaligned_le16(&report[i + 6]);
-- features->unit = report[i + 9];
-- features->unitExpo = report[i + 11];
-- i += 12;
-+ if (features->type == BAMBOO_PT) {
-+ /* need to reset back */
-+ features->pktlen = WACOM_PKGLEN_BBTOUCH;
-+ features->device_type = BTN_TOOL_TRIPLETAP;
-+ features->x_phy =
-+ get_unaligned_le16(&report[i + 5]);
-+ features->x_max =
-+ get_unaligned_le16(&report[i + 8]);
-+ i += 15;
-+ } else {
-+ features->x_max =
-+ get_unaligned_le16(&report[i + 3]);
-+ features->x_phy =
-+ get_unaligned_le16(&report[i + 6]);
-+ features->unit = report[i + 9];
-+ features->unitExpo = report[i + 11];
-+ i += 12;
-+ }
- } else if (pen) {
- /* penabled only accepts exact bytes of data */
- if (features->type == TABLETPC2FG)
- features->pktlen = WACOM_PKGLEN_GRAPHIRE;
-+ if (features->type == BAMBOO_PT)
-+ features->pktlen = WACOM_PKGLEN_BBFUN;
- features->device_type = BTN_TOOL_PEN;
- features->x_max =
- get_unaligned_le16(&report[i + 3]);
-@@ -234,6 +247,15 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi
- features->y_phy =
- get_unaligned_le16(&report[i + 6]);
- i += 7;
-+ } else if (features->type == BAMBOO_PT) {
-+ /* need to reset back */
-+ features->pktlen = WACOM_PKGLEN_BBTOUCH;
-+ features->device_type = BTN_TOOL_TRIPLETAP;
-+ features->y_phy =
-+ get_unaligned_le16(&report[i + 3]);
-+ features->y_max =
-+ get_unaligned_le16(&report[i + 6]);
-+ i += 12;
- } else {
- features->y_max =
- features->x_max;
-@@ -245,6 +267,8 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi
- /* penabled only accepts exact bytes of data */
- if (features->type == TABLETPC2FG)
- features->pktlen = WACOM_PKGLEN_GRAPHIRE;
-+ if (features->type == BAMBOO_PT)
-+ features->pktlen = WACOM_PKGLEN_BBFUN;
- features->device_type = BTN_TOOL_PEN;
- features->y_max =
- get_unaligned_le16(&report[i + 3]);
-@@ -341,7 +365,8 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
- features->distance_fuzz = 0;
-
- /* only Tablet PCs need to retrieve the info */
-- if ((features->type != TABLETPC) && (features->type != TABLETPC2FG))
-+ if ((features->type != TABLETPC) && (features->type != TABLETPC2FG) &&
-+ (features->type != BAMBOO_PT))
- goto out;
-
- if (usb_get_extra_descriptor(interface, HID_DEVICET_HID, &hid_desc)) {
-@@ -499,7 +524,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
-
- strlcpy(wacom_wac->name, features->name, sizeof(wacom_wac->name));
-
-- if (features->type == TABLETPC || features->type == TABLETPC2FG) {
-+ if (features->type == TABLETPC || features->type == TABLETPC2FG ||
-+ features->type == BAMBOO_PT) {
- /* Append the device type to the name */
- strlcat(wacom_wac->name,
- features->device_type == BTN_TOOL_PEN ?
-diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
-index d769e9a..fb30895 100644
---- a/drivers/input/tablet/wacom_wac.h
-+++ b/drivers/input/tablet/wacom_wac.h
-@@ -21,6 +21,7 @@
- #define WACOM_PKGLEN_INTUOS 10
- #define WACOM_PKGLEN_TPC1FG 5
- #define WACOM_PKGLEN_TPC2FG 14
-+#define WACOM_PKGLEN_BBTOUCH 20
-
- /* device IDs */
- #define STYLUS_DEVICE_ID 0x02
-@@ -44,6 +45,7 @@ enum {
- PTU,
- PL,
- DTU,
-+ BAMBOO_PT,
- INTUOS,
- INTUOS3S,
- INTUOS3,
diff --git a/wacom-03-collect-device-quirks-into-single-function.patch b/wacom-03-collect-device-quirks-into-single-function.patch
deleted file mode 100644
index 7bf768770..000000000
--- a/wacom-03-collect-device-quirks-into-single-function.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From: Henrik Rydberg <rydberg@euromail.se>
-Date: Sun, 5 Sep 2010 19:26:16 +0000 (-0700)
-Subject: Input: wacom - collect device quirks into single function
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdtor%2Finput.git;a=commitdiff_plain;h=bc73dd39e78dd6e5b34cd938b7f037a8bc041bdd
-
-Input: wacom - collect device quirks into single function
-
-Collect device-specific code into a single function, and use quirks to
-flag specific behavior instead.
-
-Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-Acked-by: Ping Cheng <pingc@wacom.com>
-Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
----
-
-diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h
-index 284dfaa..de5adb1 100644
---- a/drivers/input/tablet/wacom.h
-+++ b/drivers/input/tablet/wacom.h
-@@ -118,6 +118,7 @@ struct wacom {
- extern const struct usb_device_id wacom_ids[];
-
- void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len);
-+void wacom_setup_device_quirks(struct wacom_features *features);
- void wacom_setup_input_capabilities(struct input_dev *input_dev,
- struct wacom_wac *wacom_wac);
- #endif
-diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
-index 98cba08..fc6fd53 100644
---- a/drivers/input/tablet/wacom_sys.c
-+++ b/drivers/input/tablet/wacom_sys.c
-@@ -381,12 +381,6 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
- if (error)
- goto out;
-
-- /* touch device found but size is not defined. use default */
-- if (features->device_type == BTN_TOOL_DOUBLETAP && !features->x_max) {
-- features->x_max = 1023;
-- features->y_max = 1023;
-- }
--
- out:
- return error;
- }
-@@ -522,10 +516,11 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
- if (error)
- goto fail2;
-
-+ wacom_setup_device_quirks(features);
-+
- strlcpy(wacom_wac->name, features->name, sizeof(wacom_wac->name));
-
-- if (features->type == TABLETPC || features->type == TABLETPC2FG ||
-- features->type == BAMBOO_PT) {
-+ if (features->quirks & WACOM_QUIRK_MULTI_INPUT) {
- /* Append the device type to the name */
- strlcat(wacom_wac->name,
- features->device_type == BTN_TOOL_PEN ?
-diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
-index 6d7e164..44b4a59 100644
---- a/drivers/input/tablet/wacom_wac.c
-+++ b/drivers/input/tablet/wacom_wac.c
-@@ -941,6 +941,22 @@ static void wacom_setup_intuos(struct wacom_wac *wacom_wac)
- input_set_abs_params(input_dev, ABS_THROTTLE, -1023, 1023, 0, 0);
- }
-
-+
-+void wacom_setup_device_quirks(struct wacom_features *features)
-+{
-+
-+ /* touch device found but size is not defined. use default */
-+ if (features->device_type == BTN_TOOL_DOUBLETAP && !features->x_max) {
-+ features->x_max = 1023;
-+ features->y_max = 1023;
-+ }
-+
-+ /* these device have multiple inputs */
-+ if (features->type == TABLETPC || features->type == TABLETPC2FG ||
-+ features->type == BAMBOO_PT)
-+ features->quirks |= WACOM_QUIRK_MULTI_INPUT;
-+}
-+
- void wacom_setup_input_capabilities(struct input_dev *input_dev,
- struct wacom_wac *wacom_wac)
- {
-diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
-index fb30895..6a1ff10 100644
---- a/drivers/input/tablet/wacom_wac.h
-+++ b/drivers/input/tablet/wacom_wac.h
-@@ -38,6 +38,9 @@
- #define WACOM_REPORT_TPC1FG 6
- #define WACOM_REPORT_TPC2FG 13
-
-+/* device quirks */
-+#define WACOM_QUIRK_MULTI_INPUT 0x0001
-+
- enum {
- PENPARTNER = 0,
- GRAPHIRE,
-@@ -79,6 +82,7 @@ struct wacom_features {
- int y_fuzz;
- int pressure_fuzz;
- int distance_fuzz;
-+ unsigned quirks;
- };
-
- struct wacom_shared {
diff --git a/wacom-04-add-support-for-the-bamboo-touch-trackpad.patch b/wacom-04-add-support-for-the-bamboo-touch-trackpad.patch
deleted file mode 100644
index f104b2ce3..000000000
--- a/wacom-04-add-support-for-the-bamboo-touch-trackpad.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From: Henrik Rydberg <rydberg@euromail.se>
-Date: Sun, 5 Sep 2010 19:53:16 +0000 (-0700)
-Subject: Input: wacom - add support for the Bamboo Touch trackpad
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdtor%2Finput.git;a=commitdiff_plain;h=cb734c03680eaaad64a20a666300eafd1ac260b2
-
-Input: wacom - add support for the Bamboo Touch trackpad
-
-Add support for the Bamboo Touch trackpad, and make it work with
-both the Synaptics X Driver and the Multitouch X Driver. The device
-uses MT slots internally, so the choice of protocol is a given.
-
-Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-Acked-by: Ping Cheng <pingc@wacom.com>
-Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
----
-
-diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
-index 44b4a59..4e9b1dd 100644
---- a/drivers/input/tablet/wacom_wac.c
-+++ b/drivers/input/tablet/wacom_wac.c
-@@ -855,6 +855,53 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len)
- return retval;
- }
-
-+static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len)
-+{
-+ struct input_dev *input = wacom->input;
-+ unsigned char *data = wacom->data;
-+ int sp = 0, sx = 0, sy = 0, count = 0;
-+ int i;
-+
-+ if (len != WACOM_PKGLEN_BBTOUCH)
-+ return 0;
-+
-+ for (i = 0; i < 2; i++) {
-+ int p = data[9 * i + 2];
-+ input_mt_slot(input, i);
-+ if (p) {
-+ int x = get_unaligned_be16(&data[9 * i + 3]) & 0x7ff;
-+ int y = get_unaligned_be16(&data[9 * i + 5]) & 0x7ff;
-+ input_report_abs(input, ABS_MT_PRESSURE, p);
-+ input_report_abs(input, ABS_MT_POSITION_X, x);
-+ input_report_abs(input, ABS_MT_POSITION_Y, y);
-+ if (wacom->id[i] < 0)
-+ wacom->id[i] = wacom->trk_id++ & MAX_TRACKING_ID;
-+ if (!count++)
-+ sp = p, sx = x, sy = y;
-+ } else {
-+ wacom->id[i] = -1;
-+ }
-+ input_report_abs(input, ABS_MT_TRACKING_ID, wacom->id[i]);
-+ }
-+
-+ input_report_key(input, BTN_TOUCH, count > 0);
-+ input_report_key(input, BTN_TOOL_FINGER, count == 1);
-+ input_report_key(input, BTN_TOOL_DOUBLETAP, count == 2);
-+
-+ input_report_abs(input, ABS_PRESSURE, sp);
-+ input_report_abs(input, ABS_X, sx);
-+ input_report_abs(input, ABS_Y, sy);
-+
-+ input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0);
-+ input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0);
-+ input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0);
-+ input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0);
-+
-+ input_sync(input);
-+
-+ return 0;
-+}
-+
- void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
- {
- bool sync;
-@@ -900,6 +947,10 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
- sync = wacom_tpc_irq(wacom_wac, len);
- break;
-
-+ case BAMBOO_PT:
-+ sync = wacom_bpt_irq(wacom_wac, len);
-+ break;
-+
- default:
- sync = false;
- break;
-@@ -955,6 +1006,13 @@ void wacom_setup_device_quirks(struct wacom_features *features)
- if (features->type == TABLETPC || features->type == TABLETPC2FG ||
- features->type == BAMBOO_PT)
- features->quirks |= WACOM_QUIRK_MULTI_INPUT;
-+
-+ /* quirks for bamboo touch */
-+ if (features->type == BAMBOO_PT &&
-+ features->device_type == BTN_TOOL_TRIPLETAP) {
-+ features->pressure_max = 256;
-+ features->pressure_fuzz = 16;
-+ }
- }
-
- void wacom_setup_input_capabilities(struct input_dev *input_dev,
-@@ -1095,6 +1153,33 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
- case PENPARTNER:
- __set_bit(BTN_TOOL_RUBBER, input_dev->keybit);
- break;
-+
-+ case BAMBOO_PT:
-+ __clear_bit(ABS_MISC, input_dev->absbit);
-+
-+ if (features->device_type == BTN_TOOL_TRIPLETAP) {
-+ __set_bit(BTN_LEFT, input_dev->keybit);
-+ __set_bit(BTN_FORWARD, input_dev->keybit);
-+ __set_bit(BTN_BACK, input_dev->keybit);
-+ __set_bit(BTN_RIGHT, input_dev->keybit);
-+
-+ __set_bit(BTN_TOOL_FINGER, input_dev->keybit);
-+ __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
-+
-+ input_mt_create_slots(input_dev, 2);
-+ input_set_abs_params(input_dev, ABS_MT_POSITION_X,
-+ 0, features->x_max,
-+ features->x_fuzz, 0);
-+ input_set_abs_params(input_dev, ABS_MT_POSITION_Y,
-+ 0, features->y_max,
-+ features->y_fuzz, 0);
-+ input_set_abs_params(input_dev, ABS_MT_PRESSURE,
-+ 0, features->pressure_max,
-+ features->pressure_fuzz, 0);
-+ input_set_abs_params(input_dev, ABS_MT_TRACKING_ID, 0,
-+ MAX_TRACKING_ID, 0, 0);
-+ }
-+ break;
- }
- }
-
-@@ -1232,6 +1317,8 @@ static const struct wacom_features wacom_features_0xE3 =
- { "Wacom ISDv4 E3", WACOM_PKGLEN_TPC2FG, 26202, 16325, 255, 0, TABLETPC2FG };
- static const struct wacom_features wacom_features_0x47 =
- { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS };
-+static struct wacom_features wacom_features_0xD0 =
-+ { "Wacom Bamboo 2FG", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT };
-
- #define USB_DEVICE_WACOM(prod) \
- USB_DEVICE(USB_VENDOR_ID_WACOM, prod), \
-@@ -1296,6 +1383,7 @@ const struct usb_device_id wacom_ids[] = {
- { USB_DEVICE_WACOM(0xC6) },
- { USB_DEVICE_WACOM(0xC7) },
- { USB_DEVICE_WACOM(0xCE) },
-+ { USB_DEVICE_WACOM(0xD0) },
- { USB_DEVICE_WACOM(0xF0) },
- { USB_DEVICE_WACOM(0xCC) },
- { USB_DEVICE_WACOM(0x90) },
-diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
-index 6a1ff10..a23d6a5 100644
---- a/drivers/input/tablet/wacom_wac.h
-+++ b/drivers/input/tablet/wacom_wac.h
-@@ -41,6 +41,9 @@
- /* device quirks */
- #define WACOM_QUIRK_MULTI_INPUT 0x0001
-
-+/* largest reported tracking id */
-+#define MAX_TRACKING_ID 0xfff
-+
- enum {
- PENPARTNER = 0,
- GRAPHIRE,
-@@ -96,6 +99,7 @@ struct wacom_wac {
- int id[3];
- __u32 serial[2];
- int last_finger;
-+ int trk_id;
- struct wacom_features features;
- struct wacom_shared *shared;
- struct input_dev *input;
diff --git a/wacom-05-add-a-quirk-for-low-resolution-bamboo-devices.patch b/wacom-05-add-a-quirk-for-low-resolution-bamboo-devices.patch
deleted file mode 100644
index 1809ec03e..000000000
--- a/wacom-05-add-a-quirk-for-low-resolution-bamboo-devices.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From: Henrik Rydberg <rydberg@euromail.se>
-Date: Sun, 5 Sep 2010 19:57:13 +0000 (-0700)
-Subject: Input: wacom - add a quirk for low resolution Bamboo devices
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdtor%2Finput.git;a=commitdiff_plain;h=f4ccbef2886968ed409939531f6dd0474d53a12a
-
-Input: wacom - add a quirk for low resolution Bamboo devices
-
-The Bamboo Touch reports a sub-screen resolution of 480x320. The
-signal-to-noise ratio is only about 100, so filtering is needed in
-order to reduce the jitter to a usable level. However, the low
-resolution leads to round-off errors in the EWMA filter, resulting in
-extremely jerky pointer motion. This patch explicitly sets a higher
-resolution for those devices, and tells this to the completion handler
-via a low-resolution quirk.
-
-Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-Acked-by: Ping Cheng <pingc@wacom.com>
-Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
----
-
-diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
-index 4e9b1dd..2f4411a 100644
---- a/drivers/input/tablet/wacom_wac.c
-+++ b/drivers/input/tablet/wacom_wac.c
-@@ -857,6 +857,7 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len)
-
- static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len)
- {
-+ struct wacom_features *features = &wacom->features;
- struct input_dev *input = wacom->input;
- unsigned char *data = wacom->data;
- int sp = 0, sx = 0, sy = 0, count = 0;
-@@ -871,6 +872,10 @@ static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len)
- if (p) {
- int x = get_unaligned_be16(&data[9 * i + 3]) & 0x7ff;
- int y = get_unaligned_be16(&data[9 * i + 5]) & 0x7ff;
-+ if (features->quirks & WACOM_QUIRK_BBTOUCH_LOWRES) {
-+ x <<= 5;
-+ y <<= 5;
-+ }
- input_report_abs(input, ABS_MT_PRESSURE, p);
- input_report_abs(input, ABS_MT_POSITION_X, x);
- input_report_abs(input, ABS_MT_POSITION_Y, y);
-@@ -1010,8 +1015,13 @@ void wacom_setup_device_quirks(struct wacom_features *features)
- /* quirks for bamboo touch */
- if (features->type == BAMBOO_PT &&
- features->device_type == BTN_TOOL_TRIPLETAP) {
-+ features->x_max <<= 5;
-+ features->y_max <<= 5;
-+ features->x_fuzz <<= 5;
-+ features->y_fuzz <<= 5;
- features->pressure_max = 256;
- features->pressure_fuzz = 16;
-+ features->quirks |= WACOM_QUIRK_BBTOUCH_LOWRES;
- }
- }
-
-diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
-index a23d6a5..00ca015 100644
---- a/drivers/input/tablet/wacom_wac.h
-+++ b/drivers/input/tablet/wacom_wac.h
-@@ -40,6 +40,7 @@
-
- /* device quirks */
- #define WACOM_QUIRK_MULTI_INPUT 0x0001
-+#define WACOM_QUIRK_BBTOUCH_LOWRES 0x0002
-
- /* largest reported tracking id */
- #define MAX_TRACKING_ID 0xfff
diff --git a/wacom-06-request-tablet-data-for-bamboo-pens.patch b/wacom-06-request-tablet-data-for-bamboo-pens.patch
deleted file mode 100644
index 8b31d4eab..000000000
--- a/wacom-06-request-tablet-data-for-bamboo-pens.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From: Chris Bagwell <chris@cnpbagwell.com>
-Date: Sun, 12 Sep 2010 07:08:40 +0000 (-0700)
-Subject: Input: wacom - request tablet data for Bamboo Pens
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdtor%2Finput.git;a=commitdiff_plain;h=3dc9f40de4dddf9147b80cf15be633189a2b70f4
-
-Input: wacom - request tablet data for Bamboo Pens
-
-Bamboo P&T need to use second form of usb_set_report() to
-ask to report tablet data.
-
-With previous addition of Bamboo Touch, BTN_TOOL_TRIPLETAP is now used
-for both TABLETPC2FG and BAMBOO_PT types. So reduced check to
-match type=TABLETPC2FG.
-
-This change shows redundant check for !TABLETPC2FG in else statement.
-
-Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
-Acked-by: Ping Cheng <pingc@wacom.com>
-Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
----
-
-diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
-index fc6fd53..1e3af29 100644
---- a/drivers/input/tablet/wacom_sys.c
-+++ b/drivers/input/tablet/wacom_sys.c
-@@ -319,8 +319,9 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
- if (!rep_data)
- return error;
-
-- /* ask to report tablet data if it is 2FGT or not a Tablet PC */
-- if (features->device_type == BTN_TOOL_TRIPLETAP) {
-+ /* ask to report tablet data if it is 2FGT Tablet PC or
-+ * not a Tablet PC */
-+ if (features->type == TABLETPC2FG) {
- do {
- rep_data[0] = 3;
- rep_data[1] = 4;
-@@ -332,7 +333,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
- WAC_HID_FEATURE_REPORT, report_id,
- rep_data, 3);
- } while ((error < 0 || rep_data[1] != 4) && limit++ < 5);
-- } else if (features->type != TABLETPC && features->type != TABLETPC2FG) {
-+ } else if (features->type != TABLETPC) {
- do {
- rep_data[0] = 2;
- rep_data[1] = 2;
-@@ -364,7 +365,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
- features->pressure_fuzz = 0;
- features->distance_fuzz = 0;
-
-- /* only Tablet PCs need to retrieve the info */
-+ /* only Tablet PCs and Bamboo P&T need to retrieve the info */
- if ((features->type != TABLETPC) && (features->type != TABLETPC2FG) &&
- (features->type != BAMBOO_PT))
- goto out;
diff --git a/wacom-07-move-bamboo-touch-irq-to-its-own-function.patch b/wacom-07-move-bamboo-touch-irq-to-its-own-function.patch
deleted file mode 100644
index 7495ac390..000000000
--- a/wacom-07-move-bamboo-touch-irq-to-its-own-function.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From: Chris Bagwell <chris@cnpbagwell.com>
-Date: Sun, 12 Sep 2010 07:09:27 +0000 (-0700)
-Subject: Input: wacom - move Bamboo Touch irq to its own function
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdtor%2Finput.git;a=commitdiff_plain;h=e1d38e49ad97eec5024342e1244279b645e36688
-
-Input: wacom - move Bamboo Touch irq to its own function
-
-This is in preparation of pen support in same irq handler.
-
-Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
-Acked-by: Ping Cheng <pingc@wacom.com>
-Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
----
-
-diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
-index 2f4411a..2f7ed9a 100644
---- a/drivers/input/tablet/wacom_wac.c
-+++ b/drivers/input/tablet/wacom_wac.c
-@@ -855,7 +855,7 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len)
- return retval;
- }
-
--static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len)
-+static int wacom_bpt_touch(struct wacom_wac *wacom)
- {
- struct wacom_features *features = &wacom->features;
- struct input_dev *input = wacom->input;
-@@ -863,9 +863,6 @@ static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len)
- int sp = 0, sx = 0, sy = 0, count = 0;
- int i;
-
-- if (len != WACOM_PKGLEN_BBTOUCH)
-- return 0;
--
- for (i = 0; i < 2; i++) {
- int p = data[9 * i + 2];
- input_mt_slot(input, i);
-@@ -907,6 +904,14 @@ static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len)
- return 0;
- }
-
-+static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len)
-+{
-+ if (len == WACOM_PKGLEN_BBTOUCH)
-+ return wacom_bpt_touch(wacom);
-+
-+ return 0;
-+}
-+
- void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
- {
- bool sync;
diff --git a/wacom-08-add-support-for-bamboo-pen.patch b/wacom-08-add-support-for-bamboo-pen.patch
deleted file mode 100644
index 319bf6c53..000000000
--- a/wacom-08-add-support-for-bamboo-pen.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From: Chris Bagwell <chris@cnpbagwell.com>
-Date: Sun, 12 Sep 2010 07:11:35 +0000 (-0700)
-Subject: Input: wacom - add support for Bamboo Pen
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdtor%2Finput.git;a=commitdiff_plain;h=2aaacb153689dbe9064e4db7e9d00de0edfc1fa0
-
-Input: wacom - add support for Bamboo Pen
-
-This adds support for Pen on Bamboo Pen and Bamboo Pen&Touch devices.
-Touchpad is handled by previous Bamboo Touch logic.
-
-Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
-Acked-by: Ping Cheng <pingc@wacom.com>
-Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
----
-
-diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
-index 2f7ed9a..536156b 100644
---- a/drivers/input/tablet/wacom_wac.c
-+++ b/drivers/input/tablet/wacom_wac.c
-@@ -904,10 +904,75 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
- return 0;
- }
-
-+static int wacom_bpt_pen(struct wacom_wac *wacom)
-+{
-+ struct input_dev *input = wacom->input;
-+ unsigned char *data = wacom->data;
-+ int prox = 0, x = 0, y = 0, p = 0, d = 0, pen = 0, btn1 = 0, btn2 = 0;
-+
-+ /*
-+ * Similar to Graphire protocol, data[1] & 0x20 is proximity and
-+ * data[1] & 0x18 is tool ID. 0x30 is safety check to ignore
-+ * 2 unused tool ID's.
-+ */
-+ prox = (data[1] & 0x30) == 0x30;
-+
-+ /*
-+ * All reports shared between PEN and RUBBER tool must be
-+ * forced to a known starting value (zero) when transitioning to
-+ * out-of-prox.
-+ *
-+ * If not reset then, to userspace, it will look like lost events
-+ * if new tool comes in-prox with same values as previous tool sent.
-+ *
-+ * Hardware does report zero in most out-of-prox cases but not all.
-+ */
-+ if (prox) {
-+ if (!wacom->shared->stylus_in_proximity) {
-+ if (data[1] & 0x08) {
-+ wacom->tool[0] = BTN_TOOL_RUBBER;
-+ wacom->id[0] = ERASER_DEVICE_ID;
-+ } else {
-+ wacom->tool[0] = BTN_TOOL_PEN;
-+ wacom->id[0] = STYLUS_DEVICE_ID;
-+ }
-+ wacom->shared->stylus_in_proximity = true;
-+ }
-+ x = le16_to_cpup((__le16 *)&data[2]);
-+ y = le16_to_cpup((__le16 *)&data[4]);
-+ p = le16_to_cpup((__le16 *)&data[6]);
-+ d = data[8];
-+ pen = data[1] & 0x01;
-+ btn1 = data[1] & 0x02;
-+ btn2 = data[1] & 0x04;
-+ }
-+
-+ input_report_key(input, BTN_TOUCH, pen);
-+ input_report_key(input, BTN_STYLUS, btn1);
-+ input_report_key(input, BTN_STYLUS2, btn2);
-+
-+ input_report_abs(input, ABS_X, x);
-+ input_report_abs(input, ABS_Y, y);
-+ input_report_abs(input, ABS_PRESSURE, p);
-+ input_report_abs(input, ABS_DISTANCE, d);
-+
-+ if (!prox) {
-+ wacom->id[0] = 0;
-+ wacom->shared->stylus_in_proximity = false;
-+ }
-+
-+ input_report_key(input, wacom->tool[0], prox); /* PEN or RUBBER */
-+ input_report_abs(input, ABS_MISC, wacom->id[0]); /* TOOL ID */
-+
-+ return 1;
-+}
-+
- static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len)
- {
- if (len == WACOM_PKGLEN_BBTOUCH)
- return wacom_bpt_touch(wacom);
-+ else if (len == WACOM_PKGLEN_BBFUN)
-+ return wacom_bpt_pen(wacom);
-
- return 0;
- }
-@@ -1193,6 +1258,11 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
- features->pressure_fuzz, 0);
- input_set_abs_params(input_dev, ABS_MT_TRACKING_ID, 0,
- MAX_TRACKING_ID, 0, 0);
-+ } else if (features->device_type == BTN_TOOL_PEN) {
-+ __set_bit(BTN_TOOL_RUBBER, input_dev->keybit);
-+ __set_bit(BTN_TOOL_PEN, input_dev->keybit);
-+ __set_bit(BTN_STYLUS, input_dev->keybit);
-+ __set_bit(BTN_STYLUS2, input_dev->keybit);
- }
- break;
- }
-@@ -1334,6 +1404,12 @@ static const struct wacom_features wacom_features_0x47 =
- { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS };
- static struct wacom_features wacom_features_0xD0 =
- { "Wacom Bamboo 2FG", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT };
-+static struct wacom_features wacom_features_0xD1 =
-+ { "Wacom Bamboo 2FG 4x5", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT };
-+static struct wacom_features wacom_features_0xD2 =
-+ { "Wacom Bamboo Craft", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT };
-+static struct wacom_features wacom_features_0xD3 =
-+ { "Wacom Bamboo 2FG 6x8", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, 63, BAMBOO_PT };
-
- #define USB_DEVICE_WACOM(prod) \
- USB_DEVICE(USB_VENDOR_ID_WACOM, prod), \
-@@ -1399,6 +1475,9 @@ const struct usb_device_id wacom_ids[] = {
- { USB_DEVICE_WACOM(0xC7) },
- { USB_DEVICE_WACOM(0xCE) },
- { USB_DEVICE_WACOM(0xD0) },
-+ { USB_DEVICE_WACOM(0xD1) },
-+ { USB_DEVICE_WACOM(0xD2) },
-+ { USB_DEVICE_WACOM(0xD3) },
- { USB_DEVICE_WACOM(0xF0) },
- { USB_DEVICE_WACOM(0xCC) },
- { USB_DEVICE_WACOM(0x90) },
diff --git a/wacom-09-disable-bamboo-touchpad-when-pen-is-being-used.patch b/wacom-09-disable-bamboo-touchpad-when-pen-is-being-used.patch
deleted file mode 100644
index e14954031..000000000
--- a/wacom-09-disable-bamboo-touchpad-when-pen-is-being-used.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: Chris Bagwell <chris@cnpbagwell.com>
-Date: Sun, 12 Sep 2010 07:12:28 +0000 (-0700)
-Subject: Input: wacom - disable Bamboo touchpad when pen is being used
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdtor%2Finput.git;a=commitdiff_plain;h=33d5f713a19b0f5cb93e0594f7206d2730cf39da
-
-Input: wacom - disable Bamboo touchpad when pen is being used
-
-Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
-Acked-by: Ping Cheng <pingc@wacom.com>
-Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
----
-
-diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
-index 536156b..e1b65ba 100644
---- a/drivers/input/tablet/wacom_wac.c
-+++ b/drivers/input/tablet/wacom_wac.c
-@@ -866,7 +866,13 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
- for (i = 0; i < 2; i++) {
- int p = data[9 * i + 2];
- input_mt_slot(input, i);
-- if (p) {
-+ /*
-+ * Touch events need to be disabled while stylus is
-+ * in proximity because user's hand is resting on touchpad
-+ * and sending unwanted events. User expects tablet buttons
-+ * to continue working though.
-+ */
-+ if (p && !wacom->shared->stylus_in_proximity) {
- int x = get_unaligned_be16(&data[9 * i + 3]) & 0x7ff;
- int y = get_unaligned_be16(&data[9 * i + 5]) & 0x7ff;
- if (features->quirks & WACOM_QUIRK_BBTOUCH_LOWRES) {
diff --git a/x86-never-alloc-pci-from-the-last-1M-below-4G.patch b/x86-never-alloc-pci-from-the-last-1M-below-4G.patch
deleted file mode 100644
index 11c8304e1..000000000
--- a/x86-never-alloc-pci-from-the-last-1M-below-4G.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-commit 0dda4d7a8d071c58aa22268fd784869b28b5381b
-Author: Bjorn Helgaas <bjorn.helgaas@hp.com>
-Date: Fri Nov 19 16:25:39 2010 -0700
-
- x86/PCI: never allocate PCI space from the last 1M below 4G
-
- The last 1M before 4G contains the processor restart vector and usually
- the system ROM. We don't know the actual ROM size; I chose 1M because
- that's how much Windows 7 appears to avoid.
-
- Without this check, we can allocate PCI space that will never work. On
- Matthew's HP 2530p, we put the Intel GTT "Flush Page" at the very last
- page, which causes a spontaneous power-off:
-
- pci_root PNP0A08:00: host bridge window [mem 0xfee01000-0xffffffff]
- fffff000-ffffffff : Intel Flush Page (assigned by intel-gtt)
-
- Reference: https://bugzilla.kernel.org/show_bug.cgi?id=23542
- Reported-by: Matthew Garrett <mjg@redhat.com>
- Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
-
-diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h
-index 5be1542..c1e908f 100644
---- a/arch/x86/include/asm/e820.h
-+++ b/arch/x86/include/asm/e820.h
-@@ -72,6 +72,9 @@ struct e820map {
- #define BIOS_BEGIN 0x000a0000
- #define BIOS_END 0x00100000
-
-+#define BIOS_ROM_BASE 0xfff00000
-+#define BIOS_ROM_END 0x100000000ULL
-+
- #ifdef __KERNEL__
- /* see comment in arch/x86/kernel/e820.c */
- extern struct e820map e820;
-diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
-index c4bb261..6890241 100644
---- a/arch/x86/pci/i386.c
-+++ b/arch/x86/pci/i386.c
-@@ -65,8 +65,14 @@ pcibios_align_resource(void *data, const struct resource *res,
- resource_size_t size, resource_size_t align)
- {
- struct pci_dev *dev = data;
-- resource_size_t start = round_down(res->end - size + 1, align);
-+ resource_size_t start, end = res->end;
-
-+ /* Make sure we don't allocate from the last 1M before 4G */
-+ if (res->flags & IORESOURCE_MEM) {
-+ if (end >= BIOS_ROM_BASE && end < BIOS_ROM_END)
-+ end = BIOS_ROM_BASE - 1;
-+ }
-+ start = round_down(end - size + 1, align);
- if (res->flags & IORESOURCE_IO) {
-
- /*
-@@ -80,6 +86,8 @@ pcibios_align_resource(void *data, const struct resource *res,
- } else if (res->flags & IORESOURCE_MEM) {
- if (start < BIOS_END)
- start = res->end; /* fail; no space */
-+ if (start >= BIOS_ROM_BASE && start < BIOS_ROM_END)
-+ start = ALIGN(BIOS_ROM_END, align);
- }
- return start;
- }
diff --git a/xhci_hcd-suspend-resume.patch b/xhci_hcd-suspend-resume.patch
deleted file mode 100644
index 2f8816973..000000000
--- a/xhci_hcd-suspend-resume.patch
+++ /dev/null
@@ -1,1289 +0,0 @@
-commit 5e5563661948c57f72cc16b3a0cc5dc205ed4900
-Author: Andiry Xu <andiry.xu@amd.com>
-Date: Thu Oct 14 07:23:06 2010 -0700
-
- USB: xHCI: PCI power management implementation
-
- This patch implements the PCI suspend/resume.
-
- Please refer to xHCI spec for doing the suspend/resume operation.
-
- For S3, CSS/SRS in USBCMD is used to save/restore the internal state.
- However, an error maybe occurs while restoring the internal state.
- In this case, it means that HC internal state is wrong and HC will be
- re-initialized.
-
- Signed-off-by: Libin Yang <libin.yang@amd.com>
- Signed-off-by: Dong Nguyen <dong.nguyen@amd.com>
- Signed-off-by: Andiry Xu <andiry.xu@amd.com>
- Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
- Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-commit 96520f33d383c9a3ba1ca571cac5fa75325728f5
-Author: Andiry Xu <andiry.xu@amd.com>
-Date: Thu Oct 14 07:23:03 2010 -0700
-
- USB: xHCI: bus power management implementation
-
- This patch implements xHCI bus suspend/resume function hook.
-
- In the patch it goes through all the ports and suspend/resume
- the ports if needed.
-
- If any port is in remote wakeup, abort bus suspend as what ehci/ohci do.
-
- Signed-off-by: Libin Yang <libin.yang@amd.com>
- Signed-off-by: Crane Cai <crane.cai@amd.com>
- Signed-off-by: Andiry Xu <andiry.xu@amd.com>
- Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
- Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-commit 7b29198e193ab6f5e8bfcd48c59340b8c7689f5c
-Author: Andiry Xu <andiry.xu@amd.com>
-Date: Thu Oct 14 07:23:00 2010 -0700
-
- USB: xHCI: port remote wakeup implementation
-
- This commit implements port remote wakeup.
-
- When a port is in U3 state and resume signaling is detected from a device,
- the port transitions to the Resume state, and the xHC generates a Port Status
- Change Event.
-
- For USB3 port, software write a '0' to the PLS field to complete the resume
- signaling. For USB2 port, the resume should be signaling for at least 20ms,
- irq handler set a timer for port remote wakeup, and then finishes process in
- hub_control GetPortStatus.
-
- Some codes are borrowed from EHCI code.
-
- Signed-off-by: Andiry Xu <andiry.xu@amd.com>
- Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
- Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-commit 9ada0dec259dfe796a757ff2c9b63a05e6408e5f
-Author: Andiry Xu <andiry.xu@amd.com>
-Date: Thu Oct 14 07:22:57 2010 -0700
-
- USB: xHCI: port power management implementation
-
- Add software trigger USB device suspend resume function hook.
- Do port suspend & resume in terms of xHCI spec.
-
- Port Suspend:
- Stop all endpoints via Stop Endpoint Command with Suspend (SP) flag set.
- Place individual ports into suspend mode by writing '3' for Port Link State
- (PLS) field into PORTSC register. This can only be done when the port is in
- Enabled state. When writing, the Port Link State Write Strobe (LWS) bit shall
- be set to '1'.
- Allocate an xhci_command and stash it in xhci_virt_device to wait completion for
- the last Stop Endpoint Command. Use the Suspend bit in TRB to indicate the Stop
- Endpoint Command is for port suspend. Based on Sarah's suggestion.
-
- Port Resume:
- Write '0' in PLS field, device will transition to running state.
- Ring an endpoints' doorbell to restart it.
-
- Ref: USB device remote wake need another patch to implement. For details of
- how USB subsystem do power management, please see:
- Documentation/usb/power-management.txt
-
- Signed-off-by: Crane Cai <crane.cai@amd.com>
- Signed-off-by: Libin Yang <libin.yang@amd.com>
- Signed-off-by: Andiry Xu <andiry.xu@amd.com>
- Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
- Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
- drivers/usb/host/xhci-hub.c | 424 +++++++++++++++++++++++++++++++++++++++++-
- drivers/usb/host/xhci-mem.c | 4 +
- drivers/usb/host/xhci-pci.c | 36 ++++-
- drivers/usb/host/xhci-ring.c | 101 +++++++++-
- drivers/usb/host/xhci.c | 212 +++++++++++++++++++++-
- drivers/usb/host/xhci.h | 46 +++++-
- 6 files changed, 805 insertions(+), 18 deletions(-)
-
-diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
-index a1a7a97..7f2f63c 100644
---- a/drivers/usb/host/xhci-hub.c
-+++ b/drivers/usb/host/xhci-hub.c
-@@ -24,6 +24,10 @@
-
- #include "xhci.h"
-
-+#define PORT_WAKE_BITS (PORT_WKOC_E | PORT_WKDISC_E | PORT_WKCONN_E)
-+#define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_WRC | PORT_OCC | \
-+ PORT_RC | PORT_PLC | PORT_PE)
-+
- static void xhci_hub_descriptor(struct xhci_hcd *xhci,
- struct usb_hub_descriptor *desc)
- {
-@@ -123,12 +127,105 @@ static unsigned int xhci_port_speed(unsigned int port_status)
- * writing a 0 clears the bit and writing a 1 sets the bit (RWS).
- * For all other types (RW1S, RW1CS, RW, and RZ), writing a '0' has no effect.
- */
--static u32 xhci_port_state_to_neutral(u32 state)
-+u32 xhci_port_state_to_neutral(u32 state)
- {
- /* Save read-only status and port state */
- return (state & XHCI_PORT_RO) | (state & XHCI_PORT_RWS);
- }
-
-+/*
-+ * find slot id based on port number.
-+ */
-+int xhci_find_slot_id_by_port(struct xhci_hcd *xhci, u16 port)
-+{
-+ int slot_id;
-+ int i;
-+
-+ slot_id = 0;
-+ for (i = 0; i < MAX_HC_SLOTS; i++) {
-+ if (!xhci->devs[i])
-+ continue;
-+ if (xhci->devs[i]->port == port) {
-+ slot_id = i;
-+ break;
-+ }
-+ }
-+
-+ return slot_id;
-+}
-+
-+/*
-+ * Stop device
-+ * It issues stop endpoint command for EP 0 to 30. And wait the last command
-+ * to complete.
-+ * suspend will set to 1, if suspend bit need to set in command.
-+ */
-+static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
-+{
-+ struct xhci_virt_device *virt_dev;
-+ struct xhci_command *cmd;
-+ unsigned long flags;
-+ int timeleft;
-+ int ret;
-+ int i;
-+
-+ ret = 0;
-+ virt_dev = xhci->devs[slot_id];
-+ cmd = xhci_alloc_command(xhci, false, true, GFP_NOIO);
-+ if (!cmd) {
-+ xhci_dbg(xhci, "Couldn't allocate command structure.\n");
-+ return -ENOMEM;
-+ }
-+
-+ spin_lock_irqsave(&xhci->lock, flags);
-+ for (i = LAST_EP_INDEX; i > 0; i--) {
-+ if (virt_dev->eps[i].ring && virt_dev->eps[i].ring->dequeue)
-+ xhci_queue_stop_endpoint(xhci, slot_id, i, suspend);
-+ }
-+ cmd->command_trb = xhci->cmd_ring->enqueue;
-+ list_add_tail(&cmd->cmd_list, &virt_dev->cmd_list);
-+ xhci_queue_stop_endpoint(xhci, slot_id, 0, suspend);
-+ xhci_ring_cmd_db(xhci);
-+ spin_unlock_irqrestore(&xhci->lock, flags);
-+
-+ /* Wait for last stop endpoint command to finish */
-+ timeleft = wait_for_completion_interruptible_timeout(
-+ cmd->completion,
-+ USB_CTRL_SET_TIMEOUT);
-+ if (timeleft <= 0) {
-+ xhci_warn(xhci, "%s while waiting for stop endpoint command\n",
-+ timeleft == 0 ? "Timeout" : "Signal");
-+ spin_lock_irqsave(&xhci->lock, flags);
-+ /* The timeout might have raced with the event ring handler, so
-+ * only delete from the list if the item isn't poisoned.
-+ */
-+ if (cmd->cmd_list.next != LIST_POISON1)
-+ list_del(&cmd->cmd_list);
-+ spin_unlock_irqrestore(&xhci->lock, flags);
-+ ret = -ETIME;
-+ goto command_cleanup;
-+ }
-+
-+command_cleanup:
-+ xhci_free_command(xhci, cmd);
-+ return ret;
-+}
-+
-+/*
-+ * Ring device, it rings the all doorbells unconditionally.
-+ */
-+void xhci_ring_device(struct xhci_hcd *xhci, int slot_id)
-+{
-+ int i;
-+
-+ for (i = 0; i < LAST_EP_INDEX + 1; i++)
-+ if (xhci->devs[slot_id]->eps[i].ring &&
-+ xhci->devs[slot_id]->eps[i].ring->dequeue)
-+ xhci_ring_ep_doorbell(xhci, slot_id, i, 0);
-+
-+ return;
-+}
-+
- static void xhci_disable_port(struct xhci_hcd *xhci, u16 wIndex,
- u32 __iomem *addr, u32 port_status)
- {
-@@ -162,6 +259,10 @@ static void xhci_clear_port_change_bit(struct xhci_hcd *xhci, u16 wValue,
- status = PORT_PEC;
- port_change_bit = "enable/disable";
- break;
-+ case USB_PORT_FEAT_C_SUSPEND:
-+ status = PORT_PLC;
-+ port_change_bit = "suspend/resume";
-+ break;
- default:
- /* Should never happen */
- return;
-@@ -179,9 +280,10 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
- struct xhci_hcd *xhci = hcd_to_xhci(hcd);
- int ports;
- unsigned long flags;
-- u32 temp, status;
-+ u32 temp, temp1, status;
- int retval = 0;
- u32 __iomem *addr;
-+ int slot_id;
-
- ports = HCS_MAX_PORTS(xhci->hcs_params1);
-
-@@ -211,9 +313,49 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
- if ((temp & PORT_OCC))
- status |= USB_PORT_STAT_C_OVERCURRENT << 16;
- /*
-- * FIXME ignoring suspend, reset, and USB 2.1/3.0 specific
-+ * FIXME ignoring reset and USB 2.1/3.0 specific
- * changes
- */
-+ if ((temp & PORT_PLS_MASK) == XDEV_U3
-+ && (temp & PORT_POWER))
-+ status |= 1 << USB_PORT_FEAT_SUSPEND;
-+ if ((temp & PORT_PLS_MASK) == XDEV_RESUME) {
-+ if ((temp & PORT_RESET) || !(temp & PORT_PE))
-+ goto error;
-+ if (!DEV_SUPERSPEED(temp) && time_after_eq(jiffies,
-+ xhci->resume_done[wIndex])) {
-+ xhci_dbg(xhci, "Resume USB2 port %d\n",
-+ wIndex + 1);
-+ xhci->resume_done[wIndex] = 0;
-+ temp1 = xhci_port_state_to_neutral(temp);
-+ temp1 &= ~PORT_PLS_MASK;
-+ temp1 |= PORT_LINK_STROBE | XDEV_U0;
-+ xhci_writel(xhci, temp1, addr);
-+
-+ xhci_dbg(xhci, "set port %d resume\n",
-+ wIndex + 1);
-+ slot_id = xhci_find_slot_id_by_port(xhci,
-+ wIndex + 1);
-+ if (!slot_id) {
-+ xhci_dbg(xhci, "slot_id is zero\n");
-+ goto error;
-+ }
-+ xhci_ring_device(xhci, slot_id);
-+ xhci->port_c_suspend[wIndex >> 5] |=
-+ 1 << (wIndex & 31);
-+ xhci->suspended_ports[wIndex >> 5] &=
-+ ~(1 << (wIndex & 31));
-+ }
-+ }
-+ if ((temp & PORT_PLS_MASK) == XDEV_U0
-+ && (temp & PORT_POWER)
-+ && (xhci->suspended_ports[wIndex >> 5] &
-+ (1 << (wIndex & 31)))) {
-+ xhci->suspended_ports[wIndex >> 5] &=
-+ ~(1 << (wIndex & 31));
-+ xhci->port_c_suspend[wIndex >> 5] |=
-+ 1 << (wIndex & 31);
-+ }
- if (temp & PORT_CONNECT) {
- status |= USB_PORT_STAT_CONNECTION;
- status |= xhci_port_speed(temp);
-@@ -226,6 +368,8 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
- status |= USB_PORT_STAT_RESET;
- if (temp & PORT_POWER)
- status |= USB_PORT_STAT_POWER;
-+ if (xhci->port_c_suspend[wIndex >> 5] & (1 << (wIndex & 31)))
-+ status |= 1 << USB_PORT_FEAT_C_SUSPEND;
- xhci_dbg(xhci, "Get port status returned 0x%x\n", status);
- put_unaligned(cpu_to_le32(status), (__le32 *) buf);
- break;
-@@ -238,6 +382,42 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
- temp = xhci_readl(xhci, addr);
- temp = xhci_port_state_to_neutral(temp);
- switch (wValue) {
-+ case USB_PORT_FEAT_SUSPEND:
-+ temp = xhci_readl(xhci, addr);
-+ /* In spec software should not attempt to suspend
-+ * a port unless the port reports that it is in the
-+ * enabled (PED = ‘1’,PLS < ‘3’) state.
-+ */
-+ if ((temp & PORT_PE) == 0 || (temp & PORT_RESET)
-+ || (temp & PORT_PLS_MASK) >= XDEV_U3) {
-+ xhci_warn(xhci, "USB core suspending device "
-+ "not in U0/U1/U2.\n");
-+ goto error;
-+ }
-+
-+ slot_id = xhci_find_slot_id_by_port(xhci, wIndex + 1);
-+ if (!slot_id) {
-+ xhci_warn(xhci, "slot_id is zero\n");
-+ goto error;
-+ }
-+ /* unlock to execute stop endpoint commands */
-+ spin_unlock_irqrestore(&xhci->lock, flags);
-+ xhci_stop_device(xhci, slot_id, 1);
-+ spin_lock_irqsave(&xhci->lock, flags);
-+
-+ temp = xhci_port_state_to_neutral(temp);
-+ temp &= ~PORT_PLS_MASK;
-+ temp |= PORT_LINK_STROBE | XDEV_U3;
-+ xhci_writel(xhci, temp, addr);
-+
-+ spin_unlock_irqrestore(&xhci->lock, flags);
-+ msleep(10); /* wait device to enter */
-+ spin_lock_irqsave(&xhci->lock, flags);
-+
-+ temp = xhci_readl(xhci, addr);
-+ xhci->suspended_ports[wIndex >> 5] |=
-+ 1 << (wIndex & (31));
-+ break;
- case USB_PORT_FEAT_POWER:
- /*
- * Turn on ports, even if there isn't per-port switching.
-@@ -271,6 +451,52 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
- temp = xhci_readl(xhci, addr);
- temp = xhci_port_state_to_neutral(temp);
- switch (wValue) {
-+ case USB_PORT_FEAT_SUSPEND:
-+ temp = xhci_readl(xhci, addr);
-+ xhci_dbg(xhci, "clear USB_PORT_FEAT_SUSPEND\n");
-+ xhci_dbg(xhci, "PORTSC %04x\n", temp);
-+ if (temp & PORT_RESET)
-+ goto error;
-+ if (temp & XDEV_U3) {
-+ if ((temp & PORT_PE) == 0)
-+ goto error;
-+ if (DEV_SUPERSPEED(temp)) {
-+ temp = xhci_port_state_to_neutral(temp);
-+ temp &= ~PORT_PLS_MASK;
-+ temp |= PORT_LINK_STROBE | XDEV_U0;
-+ xhci_writel(xhci, temp, addr);
-+ xhci_readl(xhci, addr);
-+ } else {
-+ temp = xhci_port_state_to_neutral(temp);
-+ temp &= ~PORT_PLS_MASK;
-+ temp |= PORT_LINK_STROBE | XDEV_RESUME;
-+ xhci_writel(xhci, temp, addr);
-+
-+ spin_unlock_irqrestore(&xhci->lock,
-+ flags);
-+ msleep(20);
-+ spin_lock_irqsave(&xhci->lock, flags);
-+
-+ temp = xhci_readl(xhci, addr);
-+ temp = xhci_port_state_to_neutral(temp);
-+ temp &= ~PORT_PLS_MASK;
-+ temp |= PORT_LINK_STROBE | XDEV_U0;
-+ xhci_writel(xhci, temp, addr);
-+ }
-+ xhci->port_c_suspend[wIndex >> 5] |=
-+ 1 << (wIndex & 31);
-+ }
-+
-+ slot_id = xhci_find_slot_id_by_port(xhci, wIndex + 1);
-+ if (!slot_id) {
-+ xhci_dbg(xhci, "slot_id is zero\n");
-+ goto error;
-+ }
-+ xhci_ring_device(xhci, slot_id);
-+ break;
-+ case USB_PORT_FEAT_C_SUSPEND:
-+ xhci->port_c_suspend[wIndex >> 5] &=
-+ ~(1 << (wIndex & 31));
- case USB_PORT_FEAT_C_RESET:
- case USB_PORT_FEAT_C_CONNECTION:
- case USB_PORT_FEAT_C_OVER_CURRENT:
-@@ -306,6 +532,7 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
- {
- unsigned long flags;
- u32 temp, status;
-+ u32 mask;
- int i, retval;
- struct xhci_hcd *xhci = hcd_to_xhci(hcd);
- int ports;
-@@ -318,13 +545,18 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
- memset(buf, 0, retval);
- status = 0;
-
-+ mask = PORT_CSC | PORT_PEC | PORT_OCC;
-+
- spin_lock_irqsave(&xhci->lock, flags);
- /* For each port, did anything change? If so, set that bit in buf. */
- for (i = 0; i < ports; i++) {
- addr = &xhci->op_regs->port_status_base +
- NUM_PORT_REGS*i;
- temp = xhci_readl(xhci, addr);
-- if (temp & (PORT_CSC | PORT_PEC | PORT_OCC)) {
-+ if ((temp & mask) != 0 ||
-+ (xhci->port_c_suspend[i >> 5] & 1 << (i & 31)) ||
-+ (xhci->resume_done[i] && time_after_eq(
-+ jiffies, xhci->resume_done[i]))) {
- buf[(i + 1) / 8] |= 1 << (i + 1) % 8;
- status = 1;
- }
-@@ -332,3 +564,187 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
- spin_unlock_irqrestore(&xhci->lock, flags);
- return status ? retval : 0;
- }
-+
-+#ifdef CONFIG_PM
-+
-+int xhci_bus_suspend(struct usb_hcd *hcd)
-+{
-+ struct xhci_hcd *xhci = hcd_to_xhci(hcd);
-+ int port;
-+ unsigned long flags;
-+
-+ xhci_dbg(xhci, "suspend root hub\n");
-+
-+ spin_lock_irqsave(&xhci->lock, flags);
-+
-+ if (hcd->self.root_hub->do_remote_wakeup) {
-+ port = HCS_MAX_PORTS(xhci->hcs_params1);
-+ while (port--) {
-+ if (xhci->resume_done[port] != 0) {
-+ spin_unlock_irqrestore(&xhci->lock, flags);
-+ xhci_dbg(xhci, "suspend failed because "
-+ "port %d is resuming\n",
-+ port + 1);
-+ return -EBUSY;
-+ }
-+ }
-+ }
-+
-+ port = HCS_MAX_PORTS(xhci->hcs_params1);
-+ xhci->bus_suspended = 0;
-+ while (port--) {
-+ /* suspend the port if the port is not suspended */
-+ u32 __iomem *addr;
-+ u32 t1, t2;
-+ int slot_id;
-+
-+ addr = &xhci->op_regs->port_status_base +
-+ NUM_PORT_REGS * (port & 0xff);
-+ t1 = xhci_readl(xhci, addr);
-+ t2 = xhci_port_state_to_neutral(t1);
-+
-+ if ((t1 & PORT_PE) && !(t1 & PORT_PLS_MASK)) {
-+ xhci_dbg(xhci, "port %d not suspended\n", port);
-+ slot_id = xhci_find_slot_id_by_port(xhci, port + 1);
-+ if (slot_id) {
-+ spin_unlock_irqrestore(&xhci->lock, flags);
-+ xhci_stop_device(xhci, slot_id, 1);
-+ spin_lock_irqsave(&xhci->lock, flags);
-+ }
-+ t2 &= ~PORT_PLS_MASK;
-+ t2 |= PORT_LINK_STROBE | XDEV_U3;
-+ set_bit(port, &xhci->bus_suspended);
-+ }
-+ if (hcd->self.root_hub->do_remote_wakeup) {
-+ if (t1 & PORT_CONNECT) {
-+ t2 |= PORT_WKOC_E | PORT_WKDISC_E;
-+ t2 &= ~PORT_WKCONN_E;
-+ } else {
-+ t2 |= PORT_WKOC_E | PORT_WKCONN_E;
-+ t2 &= ~PORT_WKDISC_E;
-+ }
-+ } else
-+ t2 &= ~PORT_WAKE_BITS;
-+
-+ t1 = xhci_port_state_to_neutral(t1);
-+ if (t1 != t2)
-+ xhci_writel(xhci, t2, addr);
-+
-+ if (DEV_HIGHSPEED(t1)) {
-+ /* enable remote wake up for USB 2.0 */
-+ u32 __iomem *addr;
-+ u32 tmp;
-+
-+ addr = &xhci->op_regs->port_power_base +
-+ NUM_PORT_REGS * (port & 0xff);
-+ tmp = xhci_readl(xhci, addr);
-+ tmp |= PORT_RWE;
-+ xhci_writel(xhci, tmp, addr);
-+ }
-+ }
-+ hcd->state = HC_STATE_SUSPENDED;
-+ xhci->next_statechange = jiffies + msecs_to_jiffies(10);
-+ spin_unlock_irqrestore(&xhci->lock, flags);
-+ return 0;
-+}
-+
-+int xhci_bus_resume(struct usb_hcd *hcd)
-+{
-+ struct xhci_hcd *xhci = hcd_to_xhci(hcd);
-+ int port;
-+ u32 temp;
-+ unsigned long flags;
-+
-+ xhci_dbg(xhci, "resume root hub\n");
-+
-+ if (time_before(jiffies, xhci->next_statechange))
-+ msleep(5);
-+
-+ spin_lock_irqsave(&xhci->lock, flags);
-+ if (!HCD_HW_ACCESSIBLE(hcd)) {
-+ spin_unlock_irqrestore(&xhci->lock, flags);
-+ return -ESHUTDOWN;
-+ }
-+
-+ /* delay the irqs */
-+ temp = xhci_readl(xhci, &xhci->op_regs->command);
-+ temp &= ~CMD_EIE;
-+ xhci_writel(xhci, temp, &xhci->op_regs->command);
-+
-+ port = HCS_MAX_PORTS(xhci->hcs_params1);
-+ while (port--) {
-+ /* Check whether need resume ports. If needed
-+ resume port and disable remote wakeup */
-+ u32 __iomem *addr;
-+ u32 temp;
-+ int slot_id;
-+
-+ addr = &xhci->op_regs->port_status_base +
-+ NUM_PORT_REGS * (port & 0xff);
-+ temp = xhci_readl(xhci, addr);
-+ if (DEV_SUPERSPEED(temp))
-+ temp &= ~(PORT_RWC_BITS | PORT_CEC | PORT_WAKE_BITS);
-+ else
-+ temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
-+ if (test_bit(port, &xhci->bus_suspended) &&
-+ (temp & PORT_PLS_MASK)) {
-+ if (DEV_SUPERSPEED(temp)) {
-+ temp = xhci_port_state_to_neutral(temp);
-+ temp &= ~PORT_PLS_MASK;
-+ temp |= PORT_LINK_STROBE | XDEV_U0;
-+ xhci_writel(xhci, temp, addr);
-+ } else {
-+ temp = xhci_port_state_to_neutral(temp);
-+ temp &= ~PORT_PLS_MASK;
-+ temp |= PORT_LINK_STROBE | XDEV_RESUME;
-+ xhci_writel(xhci, temp, addr);
-+
-+ spin_unlock_irqrestore(&xhci->lock, flags);
-+ msleep(20);
-+ spin_lock_irqsave(&xhci->lock, flags);
-+
-+ temp = xhci_readl(xhci, addr);
-+ temp = xhci_port_state_to_neutral(temp);
-+ temp &= ~PORT_PLS_MASK;
-+ temp |= PORT_LINK_STROBE | XDEV_U0;
-+ xhci_writel(xhci, temp, addr);
-+ }
-+ slot_id = xhci_find_slot_id_by_port(xhci, port + 1);
-+ if (slot_id)
-+ xhci_ring_device(xhci, slot_id);
-+ } else
-+ xhci_writel(xhci, temp, addr);
-+
-+ if (DEV_HIGHSPEED(temp)) {
-+ /* disable remote wake up for USB 2.0 */
-+ u32 __iomem *addr;
-+ u32 tmp;
-+
-+ addr = &xhci->op_regs->port_power_base +
-+ NUM_PORT_REGS * (port & 0xff);
-+ tmp = xhci_readl(xhci, addr);
-+ tmp &= ~PORT_RWE;
-+ xhci_writel(xhci, tmp, addr);
-+ }
-+ }
-+
-+ (void) xhci_readl(xhci, &xhci->op_regs->command);
-+
-+ xhci->next_statechange = jiffies + msecs_to_jiffies(5);
-+ hcd->state = HC_STATE_RUNNING;
-+ /* re-enable irqs */
-+ temp = xhci_readl(xhci, &xhci->op_regs->command);
-+ temp |= CMD_EIE;
-+ xhci_writel(xhci, temp, &xhci->op_regs->command);
-+ temp = xhci_readl(xhci, &xhci->op_regs->command);
-+
-+ spin_unlock_irqrestore(&xhci->lock, flags);
-+ return 0;
-+}
-+
-+#else
-+
-+#define xhci_bus_suspend NULL
-+#define xhci_bus_resume NULL
-+
-+#endif
-diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
-index 4e51343..cef8d81 100644
---- a/drivers/usb/host/xhci-mem.c
-+++ b/drivers/usb/host/xhci-mem.c
-@@ -866,6 +866,7 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
- top_dev = top_dev->parent)
- /* Found device below root hub */;
- slot_ctx->dev_info2 |= (u32) ROOT_HUB_PORT(top_dev->portnum);
-+ dev->port = top_dev->portnum;
- xhci_dbg(xhci, "Set root hub portnum to %d\n", top_dev->portnum);
-
- /* Is this a LS/FS device under a HS hub? */
-@@ -1443,6 +1444,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
- scratchpad_free(xhci);
- xhci->page_size = 0;
- xhci->page_shift = 0;
-+ xhci->bus_suspended = 0;
- }
-
- static int xhci_test_trb_in_td(struct xhci_hcd *xhci,
-@@ -1801,6 +1803,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
- init_completion(&xhci->addr_dev);
- for (i = 0; i < MAX_HC_SLOTS; ++i)
- xhci->devs[i] = NULL;
-+ for (i = 0; i < MAX_HC_PORTS; ++i)
-+ xhci->resume_done[i] = 0;
-
- if (scratchpad_alloc(xhci, flags))
- goto fail;
-diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
-index f7efe02..e3a5924 100644
---- a/drivers/usb/host/xhci-pci.c
-+++ b/drivers/usb/host/xhci-pci.c
-@@ -116,6 +116,30 @@ static int xhci_pci_setup(struct usb_hcd *hcd)
- return xhci_pci_reinit(xhci, pdev);
- }
-
-+#ifdef CONFIG_PM
-+static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
-+{
-+ struct xhci_hcd *xhci = hcd_to_xhci(hcd);
-+ int retval = 0;
-+
-+ if (hcd->state != HC_STATE_SUSPENDED)
-+ return -EINVAL;
-+
-+ retval = xhci_suspend(xhci);
-+
-+ return retval;
-+}
-+
-+static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
-+{
-+ struct xhci_hcd *xhci = hcd_to_xhci(hcd);
-+ int retval = 0;
-+
-+ retval = xhci_resume(xhci, hibernated);
-+ return retval;
-+}
-+#endif /* CONFIG_PM */
-+
- static const struct hc_driver xhci_pci_hc_driver = {
- .description = hcd_name,
- .product_desc = "xHCI Host Controller",
-@@ -132,7 +156,10 @@ static const struct hc_driver xhci_pci_hc_driver = {
- */
- .reset = xhci_pci_setup,
- .start = xhci_run,
-- /* suspend and resume implemented later */
-+#ifdef CONFIG_PM
-+ .pci_suspend = xhci_pci_suspend,
-+ .pci_resume = xhci_pci_resume,
-+#endif
- .stop = xhci_stop,
- .shutdown = xhci_shutdown,
-
-@@ -162,6 +189,8 @@ static const struct hc_driver xhci_pci_hc_driver = {
- /* Root hub support */
- .hub_control = xhci_hub_control,
- .hub_status_data = xhci_hub_status_data,
-+ .bus_suspend = xhci_bus_suspend,
-+ .bus_resume = xhci_bus_resume,
- };
-
- /*-------------------------------------------------------------------------*/
-@@ -186,6 +215,11 @@ static struct pci_driver xhci_pci_driver = {
- /* suspend and resume implemented later */
-
- .shutdown = usb_hcd_pci_shutdown,
-+#ifdef CONFIG_PM_SLEEP
-+ .driver = {
-+ .pm = &usb_hcd_pci_pm_ops
-+ },
-+#endif
- };
-
- int xhci_register_pci(void)
-diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
-index 48e60d1..9f3115e 100644
---- a/drivers/usb/host/xhci-ring.c
-+++ b/drivers/usb/host/xhci-ring.c
-@@ -68,6 +68,10 @@
- #include <linux/slab.h>
- #include "xhci.h"
-
-+static int handle_cmd_in_cmd_wait_list(struct xhci_hcd *xhci,
-+ struct xhci_virt_device *virt_dev,
-+ struct xhci_event_cmd *event);
-+
- /*
- * Returns zero if the TRB isn't in this segment, otherwise it returns the DMA
- * address of the TRB.
-@@ -313,7 +317,7 @@ void xhci_ring_cmd_db(struct xhci_hcd *xhci)
- xhci_readl(xhci, &xhci->dba->doorbell[0]);
- }
-
--static void ring_ep_doorbell(struct xhci_hcd *xhci,
-+void xhci_ring_ep_doorbell(struct xhci_hcd *xhci,
- unsigned int slot_id,
- unsigned int ep_index,
- unsigned int stream_id)
-@@ -353,7 +357,7 @@ static void ring_doorbell_for_active_rings(struct xhci_hcd *xhci,
- /* A ring has pending URBs if its TD list is not empty */
- if (!(ep->ep_state & EP_HAS_STREAMS)) {
- if (!(list_empty(&ep->ring->td_list)))
-- ring_ep_doorbell(xhci, slot_id, ep_index, 0);
-+ xhci_ring_ep_doorbell(xhci, slot_id, ep_index, 0);
- return;
- }
-
-@@ -361,7 +365,8 @@ static void ring_doorbell_for_active_rings(struct xhci_hcd *xhci,
- stream_id++) {
- struct xhci_stream_info *stream_info = ep->stream_info;
- if (!list_empty(&stream_info->stream_rings[stream_id]->td_list))
-- ring_ep_doorbell(xhci, slot_id, ep_index, stream_id);
-+ xhci_ring_ep_doorbell(xhci, slot_id, ep_index,
-+ stream_id);
- }
- }
-
-@@ -626,10 +631,11 @@ static void xhci_giveback_urb_in_irq(struct xhci_hcd *xhci,
- * bit cleared) so that the HW will skip over them.
- */
- static void handle_stopped_endpoint(struct xhci_hcd *xhci,
-- union xhci_trb *trb)
-+ union xhci_trb *trb, struct xhci_event_cmd *event)
- {
- unsigned int slot_id;
- unsigned int ep_index;
-+ struct xhci_virt_device *virt_dev;
- struct xhci_ring *ep_ring;
- struct xhci_virt_ep *ep;
- struct list_head *entry;
-@@ -638,6 +644,21 @@ static void handle_stopped_endpoint(struct xhci_hcd *xhci,
-
- struct xhci_dequeue_state deq_state;
-
-+ if (unlikely(TRB_TO_SUSPEND_PORT(
-+ xhci->cmd_ring->dequeue->generic.field[3]))) {
-+ slot_id = TRB_TO_SLOT_ID(
-+ xhci->cmd_ring->dequeue->generic.field[3]);
-+ virt_dev = xhci->devs[slot_id];
-+ if (virt_dev)
-+ handle_cmd_in_cmd_wait_list(xhci, virt_dev,
-+ event);
-+ else
-+ xhci_warn(xhci, "Stop endpoint command "
-+ "completion for disabled slot %u\n",
-+ slot_id);
-+ return;
-+ }
-+
- memset(&deq_state, 0, sizeof(deq_state));
- slot_id = TRB_TO_SLOT_ID(trb->generic.field[3]);
- ep_index = TRB_TO_EP_INDEX(trb->generic.field[3]);
-@@ -1091,7 +1112,7 @@ bandwidth_change:
- complete(&xhci->addr_dev);
- break;
- case TRB_TYPE(TRB_STOP_RING):
-- handle_stopped_endpoint(xhci, xhci->cmd_ring->dequeue);
-+ handle_stopped_endpoint(xhci, xhci->cmd_ring->dequeue, event);
- break;
- case TRB_TYPE(TRB_SET_DEQ):
- handle_set_deq_completion(xhci, event, xhci->cmd_ring->dequeue);
-@@ -1144,17 +1165,72 @@ static void handle_vendor_event(struct xhci_hcd *xhci,
- static void handle_port_status(struct xhci_hcd *xhci,
- union xhci_trb *event)
- {
-+ struct usb_hcd *hcd = xhci_to_hcd(xhci);
- u32 port_id;
-+ u32 temp, temp1;
-+ u32 __iomem *addr;
-+ int ports;
-+ int slot_id;
-
- /* Port status change events always have a successful completion code */
- if (GET_COMP_CODE(event->generic.field[2]) != COMP_SUCCESS) {
- xhci_warn(xhci, "WARN: xHC returned failed port status event\n");
- xhci->error_bitmask |= 1 << 8;
- }
-- /* FIXME: core doesn't care about all port link state changes yet */
- port_id = GET_PORT_ID(event->generic.field[0]);
- xhci_dbg(xhci, "Port Status Change Event for port %d\n", port_id);
-
-+ ports = HCS_MAX_PORTS(xhci->hcs_params1);
-+ if ((port_id <= 0) || (port_id > ports)) {
-+ xhci_warn(xhci, "Invalid port id %d\n", port_id);
-+ goto cleanup;
-+ }
-+
-+ addr = &xhci->op_regs->port_status_base + NUM_PORT_REGS * (port_id - 1);
-+ temp = xhci_readl(xhci, addr);
-+ if ((temp & PORT_CONNECT) && (hcd->state == HC_STATE_SUSPENDED)) {
-+ xhci_dbg(xhci, "resume root hub\n");
-+ usb_hcd_resume_root_hub(hcd);
-+ }
-+
-+ if ((temp & PORT_PLC) && (temp & PORT_PLS_MASK) == XDEV_RESUME) {
-+ xhci_dbg(xhci, "port resume event for port %d\n", port_id);
-+
-+ temp1 = xhci_readl(xhci, &xhci->op_regs->command);
-+ if (!(temp1 & CMD_RUN)) {
-+ xhci_warn(xhci, "xHC is not running.\n");
-+ goto cleanup;
-+ }
-+
-+ if (DEV_SUPERSPEED(temp)) {
-+ xhci_dbg(xhci, "resume SS port %d\n", port_id);
-+ temp = xhci_port_state_to_neutral(temp);
-+ temp &= ~PORT_PLS_MASK;
-+ temp |= PORT_LINK_STROBE | XDEV_U0;
-+ xhci_writel(xhci, temp, addr);
-+ slot_id = xhci_find_slot_id_by_port(xhci, port_id);
-+ if (!slot_id) {
-+ xhci_dbg(xhci, "slot_id is zero\n");
-+ goto cleanup;
-+ }
-+ xhci_ring_device(xhci, slot_id);
-+ xhci_dbg(xhci, "resume SS port %d finished\n", port_id);
-+ /* Clear PORT_PLC */
-+ temp = xhci_readl(xhci, addr);
-+ temp = xhci_port_state_to_neutral(temp);
-+ temp |= PORT_PLC;
-+ xhci_writel(xhci, temp, addr);
-+ } else {
-+ xhci_dbg(xhci, "resume HS port %d\n", port_id);
-+ xhci->resume_done[port_id - 1] = jiffies +
-+ msecs_to_jiffies(20);
-+ mod_timer(&hcd->rh_timer,
-+ xhci->resume_done[port_id - 1]);
-+ /* Do the rest in GetPortStatus */
-+ }
-+ }
-+
-+cleanup:
- /* Update event ring dequeue pointer before dropping the lock */
- inc_deq(xhci, xhci->event_ring, true);
-
-@@ -2347,7 +2423,7 @@ static void giveback_first_trb(struct xhci_hcd *xhci, int slot_id,
- */
- wmb();
- start_trb->field[3] |= start_cycle;
-- ring_ep_doorbell(xhci, slot_id, ep_index, stream_id);
-+ xhci_ring_ep_doorbell(xhci, slot_id, ep_index, stream_id);
- }
-
- /*
-@@ -2931,7 +3007,7 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
- wmb();
- start_trb->field[3] |= start_cycle;
-
-- ring_ep_doorbell(xhci, slot_id, ep_index, urb->stream_id);
-+ xhci_ring_ep_doorbell(xhci, slot_id, ep_index, urb->stream_id);
- return 0;
- }
-
-@@ -3108,15 +3184,20 @@ int xhci_queue_evaluate_context(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
- false);
- }
-
-+/*
-+ * Suspend is set to indicate "Stop Endpoint Command" is being issued to stop
-+ * activity on an endpoint that is about to be suspended.
-+ */
- int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, int slot_id,
-- unsigned int ep_index)
-+ unsigned int ep_index, int suspend)
- {
- u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id);
- u32 trb_ep_index = EP_ID_FOR_TRB(ep_index);
- u32 type = TRB_TYPE(TRB_STOP_RING);
-+ u32 trb_suspend = SUSPEND_PORT_FOR_TRB(suspend);
-
- return queue_command(xhci, 0, 0, 0,
-- trb_slot_id | trb_ep_index | type, false);
-+ trb_slot_id | trb_ep_index | type | trb_suspend, false);
- }
-
- /* Set Transfer Ring Dequeue Pointer command.
-diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
-index d5c550e..34f1b3b 100644
---- a/drivers/usb/host/xhci.c
-+++ b/drivers/usb/host/xhci.c
-@@ -551,6 +551,216 @@ void xhci_shutdown(struct usb_hcd *hcd)
- xhci_readl(xhci, &xhci->op_regs->status));
- }
-
-+static void xhci_save_registers(struct xhci_hcd *xhci)
-+{
-+ xhci->s3.command = xhci_readl(xhci, &xhci->op_regs->command);
-+ xhci->s3.dev_nt = xhci_readl(xhci, &xhci->op_regs->dev_notification);
-+ xhci->s3.dcbaa_ptr = xhci_read_64(xhci, &xhci->op_regs->dcbaa_ptr);
-+ xhci->s3.config_reg = xhci_readl(xhci, &xhci->op_regs->config_reg);
-+ xhci->s3.irq_pending = xhci_readl(xhci, &xhci->ir_set->irq_pending);
-+ xhci->s3.irq_control = xhci_readl(xhci, &xhci->ir_set->irq_control);
-+ xhci->s3.erst_size = xhci_readl(xhci, &xhci->ir_set->erst_size);
-+ xhci->s3.erst_base = xhci_read_64(xhci, &xhci->ir_set->erst_base);
-+ xhci->s3.erst_dequeue = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue);
-+}
-+
-+static void xhci_restore_registers(struct xhci_hcd *xhci)
-+{
-+ xhci_writel(xhci, xhci->s3.command, &xhci->op_regs->command);
-+ xhci_writel(xhci, xhci->s3.dev_nt, &xhci->op_regs->dev_notification);
-+ xhci_write_64(xhci, xhci->s3.dcbaa_ptr, &xhci->op_regs->dcbaa_ptr);
-+ xhci_writel(xhci, xhci->s3.config_reg, &xhci->op_regs->config_reg);
-+ xhci_writel(xhci, xhci->s3.irq_pending, &xhci->ir_set->irq_pending);
-+ xhci_writel(xhci, xhci->s3.irq_control, &xhci->ir_set->irq_control);
-+ xhci_writel(xhci, xhci->s3.erst_size, &xhci->ir_set->erst_size);
-+ xhci_write_64(xhci, xhci->s3.erst_base, &xhci->ir_set->erst_base);
-+}
-+
-+/*
-+ * Stop HC (not bus-specific)
-+ *
-+ * This is called when the machine transition into S3/S4 mode.
-+ *
-+ */
-+int xhci_suspend(struct xhci_hcd *xhci)
-+{
-+ int rc = 0;
-+ struct usb_hcd *hcd = xhci_to_hcd(xhci);
-+ u32 command;
-+
-+ spin_lock_irq(&xhci->lock);
-+ clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
-+ /* step 1: stop endpoint */
-+ /* skipped assuming that port suspend has done */
-+
-+ /* step 2: clear Run/Stop bit */
-+ command = xhci_readl(xhci, &xhci->op_regs->command);
-+ command &= ~CMD_RUN;
-+ xhci_writel(xhci, command, &xhci->op_regs->command);
-+ if (handshake(xhci, &xhci->op_regs->status,
-+ STS_HALT, STS_HALT, 100*100)) {
-+ xhci_warn(xhci, "WARN: xHC CMD_RUN timeout\n");
-+ spin_unlock_irq(&xhci->lock);
-+ return -ETIMEDOUT;
-+ }
-+
-+ /* step 3: save registers */
-+ xhci_save_registers(xhci);
-+
-+ /* step 4: set CSS flag */
-+ command = xhci_readl(xhci, &xhci->op_regs->command);
-+ command |= CMD_CSS;
-+ xhci_writel(xhci, command, &xhci->op_regs->command);
-+ if (handshake(xhci, &xhci->op_regs->status, STS_SAVE, 0, 10*100)) {
-+ xhci_warn(xhci, "WARN: xHC CMD_CSS timeout\n");
-+ spin_unlock_irq(&xhci->lock);
-+ return -ETIMEDOUT;
-+ }
-+ /* step 5: remove core well power */
-+ xhci_cleanup_msix(xhci);
-+ spin_unlock_irq(&xhci->lock);
-+
-+ return rc;
-+}
-+
-+/*
-+ * start xHC (not bus-specific)
-+ *
-+ * This is called when the machine transition from S3/S4 mode.
-+ *
-+ */
-+int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
-+{
-+ u32 command, temp = 0;
-+ struct usb_hcd *hcd = xhci_to_hcd(xhci);
-+ struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
-+ u64 val_64;
-+ int old_state, retval;
-+
-+ old_state = hcd->state;
-+ if (time_before(jiffies, xhci->next_statechange))
-+ msleep(100);
-+
-+ spin_lock_irq(&xhci->lock);
-+
-+ if (!hibernated) {
-+ /* step 1: restore register */
-+ xhci_restore_registers(xhci);
-+ /* step 2: initialize command ring buffer */
-+ val_64 = xhci_read_64(xhci, &xhci->op_regs->cmd_ring);
-+ val_64 = (val_64 & (u64) CMD_RING_RSVD_BITS) |
-+ (xhci_trb_virt_to_dma(xhci->cmd_ring->deq_seg,
-+ xhci->cmd_ring->dequeue) &
-+ (u64) ~CMD_RING_RSVD_BITS) |
-+ xhci->cmd_ring->cycle_state;
-+ xhci_dbg(xhci, "// Setting command ring address to 0x%llx\n",
-+ (long unsigned long) val_64);
-+ xhci_write_64(xhci, val_64, &xhci->op_regs->cmd_ring);
-+ /* step 3: restore state and start state*/
-+ /* step 3: set CRS flag */
-+ command = xhci_readl(xhci, &xhci->op_regs->command);
-+ command |= CMD_CRS;
-+ xhci_writel(xhci, command, &xhci->op_regs->command);
-+ if (handshake(xhci, &xhci->op_regs->status,
-+ STS_RESTORE, 0, 10*100)) {
-+ xhci_dbg(xhci, "WARN: xHC CMD_CSS timeout\n");
-+ spin_unlock_irq(&xhci->lock);
-+ return -ETIMEDOUT;
-+ }
-+ temp = xhci_readl(xhci, &xhci->op_regs->status);
-+ }
-+
-+ /* If restore operation fails, re-initialize the HC during resume */
-+ if ((temp & STS_SRE) || hibernated) {
-+ usb_root_hub_lost_power(hcd->self.root_hub);
-+
-+ xhci_dbg(xhci, "Stop HCD\n");
-+ xhci_halt(xhci);
-+ xhci_reset(xhci);
-+ if (hibernated)
-+ xhci_cleanup_msix(xhci);
-+ spin_unlock_irq(&xhci->lock);
-+
-+#ifdef CONFIG_USB_XHCI_HCD_DEBUGGING
-+ /* Tell the event ring poll function not to reschedule */
-+ xhci->zombie = 1;
-+ del_timer_sync(&xhci->event_ring_timer);
-+#endif
-+
-+ xhci_dbg(xhci, "// Disabling event ring interrupts\n");
-+ temp = xhci_readl(xhci, &xhci->op_regs->status);
-+ xhci_writel(xhci, temp & ~STS_EINT, &xhci->op_regs->status);
-+ temp = xhci_readl(xhci, &xhci->ir_set->irq_pending);
-+ xhci_writel(xhci, ER_IRQ_DISABLE(temp),
-+ &xhci->ir_set->irq_pending);
-+ xhci_print_ir_set(xhci, xhci->ir_set, 0);
-+
-+ xhci_dbg(xhci, "cleaning up memory\n");
-+ xhci_mem_cleanup(xhci);
-+ xhci_dbg(xhci, "xhci_stop completed - status = %x\n",
-+ xhci_readl(xhci, &xhci->op_regs->status));
-+
-+ xhci_dbg(xhci, "Initialize the HCD\n");
-+ retval = xhci_init(hcd);
-+ if (retval)
-+ return retval;
-+
-+ xhci_dbg(xhci, "Start the HCD\n");
-+ retval = xhci_run(hcd);
-+ if (!retval)
-+ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
-+ hcd->state = HC_STATE_SUSPENDED;
-+ return retval;
-+ }
-+
-+ /* Re-setup MSI-X */
-+ if (hcd->irq)
-+ free_irq(hcd->irq, hcd);
-+ hcd->irq = -1;
-+
-+ retval = xhci_setup_msix(xhci);
-+ if (retval)
-+ /* fall back to msi*/
-+ retval = xhci_setup_msi(xhci);
-+
-+ if (retval) {
-+ /* fall back to legacy interrupt*/
-+ retval = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED,
-+ hcd->irq_descr, hcd);
-+ if (retval) {
-+ xhci_err(xhci, "request interrupt %d failed\n",
-+ pdev->irq);
-+ return retval;
-+ }
-+ hcd->irq = pdev->irq;
-+ }
-+
-+ /* step 4: set Run/Stop bit */
-+ command = xhci_readl(xhci, &xhci->op_regs->command);
-+ command |= CMD_RUN;
-+ xhci_writel(xhci, command, &xhci->op_regs->command);
-+ handshake(xhci, &xhci->op_regs->status, STS_HALT,
-+ 0, 250 * 1000);
-+
-+ /* step 5: walk topology and initialize portsc,
-+ * portpmsc and portli
-+ */
-+ /* this is done in bus_resume */
-+
-+ /* step 6: restart each of the previously
-+ * Running endpoints by ringing their doorbells
-+ */
-+
-+ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
-+ if (!hibernated)
-+ hcd->state = old_state;
-+ else
-+ hcd->state = HC_STATE_SUSPENDED;
-+
-+ spin_unlock_irq(&xhci->lock);
-+ return 0;
-+}
-+
- /*-------------------------------------------------------------------------*/
-
- /**
-@@ -956,7 +1166,7 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
- ep->stop_cmd_timer.expires = jiffies +
- XHCI_STOP_EP_CMD_TIMEOUT * HZ;
- add_timer(&ep->stop_cmd_timer);
-- xhci_queue_stop_endpoint(xhci, urb->dev->slot_id, ep_index);
-+ xhci_queue_stop_endpoint(xhci, urb->dev->slot_id, ep_index, 0);
- xhci_ring_cmd_db(xhci);
- }
- done:
-diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
-index 34a60d9..b6d8033 100644
---- a/drivers/usb/host/xhci.h
-+++ b/drivers/usb/host/xhci.h
-@@ -191,7 +191,7 @@ struct xhci_op_regs {
- /* bits 4:6 are reserved (and should be preserved on writes). */
- /* light reset (port status stays unchanged) - reset completed when this is 0 */
- #define CMD_LRESET (1 << 7)
--/* FIXME: ignoring host controller save/restore state for now. */
-+/* host controller save/restore state. */
- #define CMD_CSS (1 << 8)
- #define CMD_CRS (1 << 9)
- /* Enable Wrap Event - '1' means xHC generates an event when MFINDEX wraps. */
-@@ -269,6 +269,10 @@ struct xhci_op_regs {
- * A read gives the current link PM state of the port,
- * a write with Link State Write Strobe set sets the link state.
- */
-+#define PORT_PLS_MASK (0xf << 5)
-+#define XDEV_U0 (0x0 << 5)
-+#define XDEV_U3 (0x3 << 5)
-+#define XDEV_RESUME (0xf << 5)
- /* true: port has power (see HCC_PPC) */
- #define PORT_POWER (1 << 9)
- /* bits 10:13 indicate device speed:
-@@ -353,6 +357,8 @@ struct xhci_op_regs {
- #define PORT_U2_TIMEOUT(p) (((p) & 0xff) << 8)
- /* Bits 24:31 for port testing */
-
-+/* USB2 Protocol PORTSPMSC */
-+#define PORT_RWE (1 << 0x3)
-
- /**
- * struct xhci_intr_reg - Interrupt Register Set
-@@ -510,6 +516,7 @@ struct xhci_slot_ctx {
- #define MAX_EXIT (0xffff)
- /* Root hub port number that is needed to access the USB device */
- #define ROOT_HUB_PORT(p) (((p) & 0xff) << 16)
-+#define DEVINFO_TO_ROOT_HUB_PORT(p) (((p) >> 16) & 0xff)
- /* Maximum number of ports under a hub device */
- #define XHCI_MAX_PORTS(p) (((p) & 0xff) << 24)
-
-@@ -751,6 +758,7 @@ struct xhci_virt_device {
- /* Status of the last command issued for this device */
- u32 cmd_status;
- struct list_head cmd_list;
-+ u8 port;
- };
-
-
-@@ -881,6 +889,10 @@ struct xhci_event_cmd {
- #define TRB_TO_EP_INDEX(p) ((((p) & (0x1f << 16)) >> 16) - 1)
- #define EP_ID_FOR_TRB(p) ((((p) + 1) & 0x1f) << 16)
-
-+#define SUSPEND_PORT_FOR_TRB(p) (((p) & 1) << 23)
-+#define TRB_TO_SUSPEND_PORT(p) (((p) & (1 << 23)) >> 23)
-+#define LAST_EP_INDEX 30
-+
- /* Set TR Dequeue Pointer command TRB fields */
- #define TRB_TO_STREAM_ID(p) ((((p) & (0xffff << 16)) >> 16))
- #define STREAM_ID_FOR_TRB(p) ((((p)) & 0xffff) << 16)
-@@ -1115,6 +1127,17 @@ struct urb_priv {
- #define XHCI_STOP_EP_CMD_TIMEOUT 5
- /* XXX: Make these module parameters */
-
-+struct s3_save {
-+ u32 command;
-+ u32 dev_nt;
-+ u64 dcbaa_ptr;
-+ u32 config_reg;
-+ u32 irq_pending;
-+ u32 irq_control;
-+ u32 erst_size;
-+ u64 erst_base;
-+ u64 erst_dequeue;
-+};
-
- /* There is one ehci_hci structure per controller */
- struct xhci_hcd {
-@@ -1178,6 +1201,12 @@ struct xhci_hcd {
- #endif
- /* Host controller watchdog timer structures */
- unsigned int xhc_state;
-+
-+ unsigned long bus_suspended;
-+ unsigned long next_statechange;
-+
-+ u32 command;
-+ struct s3_save s3;
- /* Host controller is dying - not responding to commands. "I'm not dead yet!"
- *
- * xHC interrupts have been disabled and a watchdog timer will (or has already)
-@@ -1199,6 +1228,10 @@ struct xhci_hcd {
- /* Array of pointers to USB 2.0 PORTSC registers */
- u32 __iomem **usb2_ports;
- unsigned int num_usb2_ports;
-+ u32 port_c_suspend[8]; /* port suspend change*/
-+ u32 suspended_ports[8]; /* which ports are
-+ suspended */
-+ unsigned long resume_done[MAX_HC_PORTS];
- };
-
- /* For testing purposes */
-@@ -1369,6 +1402,8 @@ int xhci_init(struct usb_hcd *hcd);
- int xhci_run(struct usb_hcd *hcd);
- void xhci_stop(struct usb_hcd *hcd);
- void xhci_shutdown(struct usb_hcd *hcd);
-+int xhci_suspend(struct xhci_hcd *xhci);
-+int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
- int xhci_get_frame(struct usb_hcd *hcd);
- irqreturn_t xhci_irq(struct usb_hcd *hcd);
- irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd);
-@@ -1406,7 +1441,7 @@ int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
- int xhci_queue_vendor_command(struct xhci_hcd *xhci,
- u32 field1, u32 field2, u32 field3, u32 field4);
- int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, int slot_id,
-- unsigned int ep_index);
-+ unsigned int ep_index, int suspend);
- int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb,
- int slot_id, unsigned int ep_index);
- int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb,
-@@ -1436,11 +1471,18 @@ void xhci_queue_config_ep_quirk(struct xhci_hcd *xhci,
- unsigned int slot_id, unsigned int ep_index,
- struct xhci_dequeue_state *deq_state);
- void xhci_stop_endpoint_command_watchdog(unsigned long arg);
-+void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id,
-+ unsigned int ep_index, unsigned int stream_id);
-
- /* xHCI roothub code */
- int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
- char *buf, u16 wLength);
- int xhci_hub_status_data(struct usb_hcd *hcd, char *buf);
-+int xhci_bus_suspend(struct usb_hcd *hcd);
-+int xhci_bus_resume(struct usb_hcd *hcd);
-+u32 xhci_port_state_to_neutral(u32 state);
-+int xhci_find_slot_id_by_port(struct xhci_hcd *xhci, u16 port);
-+void xhci_ring_device(struct xhci_hcd *xhci, int slot_id);
-
- /* xHCI contexts */
- struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx);