rpms/kernel/F-11 linux-2.6-btrfs-experimental-branch.patch, 1.3, 1.4 linux-2.6-ext4-prealloc-fixes.patch, 1.3, 1.4 linux-2.6-missing-rfc2465-stats.patch, NONE, 1.1 linux-2.6-v4l-dvb-update.patch, 1.15, 1.16 via-padlock-10-enable-64bit.patch, NONE, 1.1 via-padlock-20-add-x86-dependency.patch, NONE, 1.1 via-padlock-30-fix-might-sleep.patch, NONE, 1.1 via-padlock-40-nano-ecb.patch, NONE, 1.1 via-padlock-50-nano-cbc.patch, NONE, 1.1 via-rng-enable-64bit.patch, NONE, 1.1 agp-set_memory_ucwb.patch, 1.2, 1.3 config-arm, 1.3, 1.4 config-ia64-generic, 1.25, 1.26 config-powerpc-generic, 1.41, 1.42 config-s390x, 1.13, 1.14 config-sparc64-generic, 1.26, 1.27 config-x86-generic, 1.78, 1.79 config-x86_64-generic, 1.78, 1.79 drm-modesetting-radeon.patch, 1.82, 1.83 drm-next.patch, 1.18, 1.19 drm-no-gem-on-i8xx.patch, 1.2, 1.3 drm-nouveau.patch, 1.59, 1.60 git-bluetooth.patch, 1.3, 1.4 kernel.spec, 1.1681, 1.1682 linux-2.6-defaults-pci_no_msi.patch, 1.4, 1.5 linux-2.6-execshield.patch, 1.105, 1.106 linux-2.6-tracehook.patch, 1.9, 1.10 linux-2.6-upstream-reverts.patch, 1.7, 1.8 linux-2.6-utrace.patch, 1.111, 1.112 linux-2.6-v4l-dvb-fixes.patch, 1.15, 1.16 linux-2.6.29-lirc.patch, 1.10, 1.11 alsa-dont-reset-stream-at-each-prepare-callb.patch, 1.1, NONE alsa-hda-add-debugging.patch, 1.1, NONE alsa-hda-dont-reset-BDL-unnecessarily.patch, 1.1, NONE alsa-hda_intel-fix-unexpected-ring-buffer-positio.patch, 1.1, NONE alsa-pcm-always-reset-invalid-position.patch, 1.1, NONE alsa-pcm-fix-delta-calc-at-overlap.patch, 1.1, NONE alsa-pcm-safer-boundary-checks.patch, 1.3, NONE alsa-rewrite-hw_ptr-updaters.patch, 1.1, NONE cpufreq-add-atom-to-p4-clockmod.patch, 1.1, NONE drm-connector-dpms-fix.patch, 1.1, NONE drm-copyback-ioctl-data-to-userspace-regardless-of-retcode.patch, 1.1, NONE drm-dont-frob-i2c.patch, 1.1, NONE drm-edid-ignore-tiny-modes.patch, 1.1, NONE drm-i915-apply-a-big-hammer-to-865-gem-object.patch, 1.1, NONE drm-i915-enable-mchbar.patch, 1.1, NONE drm-i915-fix-tiling-pitch.patch, 1.1, NONE drm-intel-a17-fix.patch, 1.1, NONE drm-intel-debugfs-ringbuffer.patch, 1.1, NONE drm-intel-disable-kms-i8xx.patch, 1.2, NONE drm-intel-gem-use-dma32-on-pae.patch, 1.1, NONE drm-intel-gen3-fb-hack.patch, 1.1, NONE drm-intel-hdmi-edid-fix.patch, 1.1, NONE drm-intel-i8xx-cursors.patch, 1.1, NONE drm-intel-include-965gme-pci-id.patch, 1.1, NONE drm-intel-lying-systems-without-lvds.patch, 1.4, NONE drm-intel-next.patch, 1.8, NONE drm-intel-set-domain-on-fault.patch, 1.1, NONE drm-intel-tiling-transition.patch, 1.1, NONE drm-intel-tv-fix.patch, 1.1, NONE drm-intel-vmalloc.patch, 1.2, NONE drm-modesetting-radeon-fixes.patch, 1.1, NONE drm-pnp-add-resource-range-checker.patch, 1.1, NONE drm-radeon-cs-oops-fix.patch, 1.2, NONE drm-radeon-fix-ring-commit.patch, 1.1, NONE drm-radeon-new-pciids.patch, 1.1, NONE git-bluetooth-fixes.patch, 1.1, NONE increase-MAX_LOCKDEP_ENTRIES.patch, 1.3, NONE iwl3945-add-debugging-for-wrong-command-queue.patch, 1.1, NONE iwl3945-fix-rfkill-sw-and-hw-mishmash.patch, 1.1, NONE iwl3945-release-resources-before-shutting-down.patch, 1.1, NONE linux-2.6-acpi-strict-resources.patch, 1.1, NONE linux-2.6-acpi-video-didl-intel-outputs.patch, 1.3, NONE linux-2.6-add-qcserial.patch, 1.1, NONE linux-2.6-btrfs-unstable-update.patch, 1.2, NONE linux-2.6-cdrom-door-status.patch, 1.3, NONE linux-2.6-defaults-saner-vm-settings.patch, 1.1, NONE linux-2.6-dev-zero-avoid-oom-lockup.patch, 1.1, NONE linux-2.6-dma-debug-fixes.patch, 1.1, NONE linux-2.6-drivers-char-low-latency-removal.patch, 1.2, NONE linux-2.6-dropwatch-protocol.patch, 1.1, NONE linux-2.6-e820-acpi3-bios-workaround.patch, 1.1, NONE linux-2.6-e820-guard-against-pre-acpi3.patch, 1.1, NONE linux-2.6-e820-save-restore-edi-ebp.patch, 1.1, NONE linux-2.6-fiemap-header-install.patch, 1.1, NONE linux-2.6-fs-cifs-fix-port-numbers.patch, 1.1, NONE linux-2.6-hid-apple-mini-keyboard.patch, 1.1, NONE linux-2.6-hwmon-atk0110.patch, 1.2, NONE linux-2.6-input-bcm5974-add-macbook-unibody.patch, 1.1, NONE linux-2.6-input-bcm5974-add-quad-finger.patch, 1.1, NONE linux-2.6-input-bcm5974-new-header-type.patch, 1.1, NONE linux-2.6-input-hid-extra-gamepad.patch, 1.1, NONE linux-2.6-input-wacom-bluetooth.patch, 1.1, NONE linux-2.6-iommu-fixes.patch, 1.4, NONE linux-2.6-ipw2x00-age-scan-results-on-resume.patch, 1.1, NONE linux-2.6-iwl3945-report-killswitch-changes-even-if-the-interface-is-down.patch, 1.1, NONE linux-2.6-iwl3945-use-cancel_delayed_work_sync-to-cancel-rfkill_poll.patch, 1.1, NONE linux-2.6-iwlagn-fix-hw-rfkill-while-the-interface-is-down.patch, 1.1, NONE linux-2.6-kvm-skip-pit-check.patch, 1.1, NONE linux-2.6-mac80211-fix-beacon-loss-detection-after-scan.patch, 1.1, NONE linux-2.6-mm-lru-dont-evict-mapped-executable-pages.patch, 1.2, NONE linux-2.6-mm-lru-evict-streaming-io-pages-first.patch, 1.2, NONE linux-2.6-mm-lru-report-vm-flags-in-page-referenced.patch, 1.1, NONE linux-2.6-netdev-ehea-fix-circular-locking.patch, 1.2, NONE linux-2.6-netdev-ehea-fix-page-alignment.patch, 1.1, NONE linux-2.6-netdev-ehea-remove-from-list.patch, 1.1, NONE linux-2.6-netdev-r8169-use-different-family-defaults.patch, 1.1, NONE linux-2.6-nfsd-cred-refcount-fix.patch, 1.1, NONE linux-2.6-nfsd-report-short-writes-fix.patch, 1.1, NONE linux-2.6-nfsd-report-short-writes.patch, 1.1, NONE linux-2.6-parport-quickfix-the-proc-registration-bug.patch, 1.1, NONE linux-2.6-pci-sysfs-remove-id.patch, 1.1, NONE linux-2.6-relatime-by-default.patch, 1.1, NONE linux-2.6-scsi-cpqarray-set-master.patch, 1.1, NONE linux-2.6-serial-add-txen-test-param.patch, 1.1, NONE linux-2.6-shut-up-efifb.patch, 1.1, NONE linux-2.6-sony-laptop-rfkill.patch, 1.3, NONE linux-2.6-usb-remove-low-latency-hack.patch, 1.1, NONE linux-2.6-utrace-ftrace.patch, 1.2, NONE linux-2.6-v4l-dvb-fix-uint16_t-audio-h.patch, 1.1, NONE linux-2.6-v4l-pvrusb2-fixes.patch, 1.1, NONE linux-2.6-virtio_blk-dont-bounce-highmem-requests.patch, 1.1, NONE linux-2.6-x86-delay-tsc-barrier.patch, 1.1, NONE linux-2.6-xen-check-for-nx-support.patch, 1.2, NONE linux-2.6-xen-fix_warning_when_deleting_gendisk.patch, 1.1, NONE linux-2.6.29-alsa-update-quirks.patch, 1.2, NONE linux-2.6.29-xen-disable-gbpages.patch, 1.1, NONE linux-2.6.29.3-boot-vga.patch, 1.1, NONE mac80211-don-t-drop-nullfunc-frames-during-software.patch, 1.1, NONE net-revert-forcedeth-power-down-phy-when-interface-is.patch, 1.2, NONE revert-fix-modules_install-via-nfs.patch, 1.1, NONE squashfs-broken-when-pagesize-greater-than-blocksize.patch, 1.1, NONE via-centaur-merge-32-64-bit-init.patch, 1.1, NONE via-padlock-cryptodev-1-64bit-enable.patch, 1.1, NONE via-padlock-cryptodev-2-64bit-enable.patch, 1.1, NONE via-padlock-fix-might-sleep.patch, 1.1, NONE via-padlock-nano-workarounds-cbc.patch, 1.1, NONE via-padlock-nano-workarounds-ecb.patch, 1.1, NONE via-rng-64-bit-enable.patch, 1.1, NONE

Kyle McMartin kyle at fedoraproject.org
Sat Jul 25 04:09:34 UTC 2009


Author: kyle

Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22901

Modified Files:
	agp-set_memory_ucwb.patch config-arm config-ia64-generic 
	config-powerpc-generic config-s390x config-sparc64-generic 
	config-x86-generic config-x86_64-generic 
	drm-modesetting-radeon.patch drm-next.patch 
	drm-no-gem-on-i8xx.patch drm-nouveau.patch git-bluetooth.patch 
	kernel.spec linux-2.6-defaults-pci_no_msi.patch 
	linux-2.6-execshield.patch linux-2.6-tracehook.patch 
	linux-2.6-upstream-reverts.patch linux-2.6-utrace.patch 
	linux-2.6-v4l-dvb-fixes.patch linux-2.6.29-lirc.patch 
Added Files:
	linux-2.6-btrfs-experimental-branch.patch 
	linux-2.6-ext4-prealloc-fixes.patch 
	linux-2.6-missing-rfc2465-stats.patch 
	linux-2.6-v4l-dvb-update.patch 
	via-padlock-10-enable-64bit.patch 
	via-padlock-20-add-x86-dependency.patch 
	via-padlock-30-fix-might-sleep.patch 
	via-padlock-40-nano-ecb.patch via-padlock-50-nano-cbc.patch 
	via-rng-enable-64bit.patch 
Removed Files:
	alsa-dont-reset-stream-at-each-prepare-callb.patch 
	alsa-hda-add-debugging.patch 
	alsa-hda-dont-reset-BDL-unnecessarily.patch 
	alsa-hda_intel-fix-unexpected-ring-buffer-positio.patch 
	alsa-pcm-always-reset-invalid-position.patch 
	alsa-pcm-fix-delta-calc-at-overlap.patch 
	alsa-pcm-safer-boundary-checks.patch 
	alsa-rewrite-hw_ptr-updaters.patch 
	cpufreq-add-atom-to-p4-clockmod.patch 
	drm-connector-dpms-fix.patch 
	drm-copyback-ioctl-data-to-userspace-regardless-of-retcode.patch 
	drm-dont-frob-i2c.patch drm-edid-ignore-tiny-modes.patch 
	drm-i915-apply-a-big-hammer-to-865-gem-object.patch 
	drm-i915-enable-mchbar.patch drm-i915-fix-tiling-pitch.patch 
	drm-intel-a17-fix.patch drm-intel-debugfs-ringbuffer.patch 
	drm-intel-disable-kms-i8xx.patch 
	drm-intel-gem-use-dma32-on-pae.patch 
	drm-intel-gen3-fb-hack.patch drm-intel-hdmi-edid-fix.patch 
	drm-intel-i8xx-cursors.patch 
	drm-intel-include-965gme-pci-id.patch 
	drm-intel-lying-systems-without-lvds.patch 
	drm-intel-next.patch drm-intel-set-domain-on-fault.patch 
	drm-intel-tiling-transition.patch drm-intel-tv-fix.patch 
	drm-intel-vmalloc.patch drm-modesetting-radeon-fixes.patch 
	drm-pnp-add-resource-range-checker.patch 
	drm-radeon-cs-oops-fix.patch drm-radeon-fix-ring-commit.patch 
	drm-radeon-new-pciids.patch git-bluetooth-fixes.patch 
	increase-MAX_LOCKDEP_ENTRIES.patch 
	iwl3945-add-debugging-for-wrong-command-queue.patch 
	iwl3945-fix-rfkill-sw-and-hw-mishmash.patch 
	iwl3945-release-resources-before-shutting-down.patch 
	linux-2.6-acpi-strict-resources.patch 
	linux-2.6-acpi-video-didl-intel-outputs.patch 
	linux-2.6-add-qcserial.patch 
	linux-2.6-btrfs-unstable-update.patch 
	linux-2.6-cdrom-door-status.patch 
	linux-2.6-defaults-saner-vm-settings.patch 
	linux-2.6-dev-zero-avoid-oom-lockup.patch 
	linux-2.6-dma-debug-fixes.patch 
	linux-2.6-drivers-char-low-latency-removal.patch 
	linux-2.6-dropwatch-protocol.patch 
	linux-2.6-e820-acpi3-bios-workaround.patch 
	linux-2.6-e820-guard-against-pre-acpi3.patch 
	linux-2.6-e820-save-restore-edi-ebp.patch 
	linux-2.6-fiemap-header-install.patch 
	linux-2.6-fs-cifs-fix-port-numbers.patch 
	linux-2.6-hid-apple-mini-keyboard.patch 
	linux-2.6-hwmon-atk0110.patch 
	linux-2.6-input-bcm5974-add-macbook-unibody.patch 
	linux-2.6-input-bcm5974-add-quad-finger.patch 
	linux-2.6-input-bcm5974-new-header-type.patch 
	linux-2.6-input-hid-extra-gamepad.patch 
	linux-2.6-input-wacom-bluetooth.patch 
	linux-2.6-iommu-fixes.patch 
	linux-2.6-ipw2x00-age-scan-results-on-resume.patch 
	linux-2.6-iwl3945-report-killswitch-changes-even-if-the-interface-is-down.patch 
	linux-2.6-iwl3945-use-cancel_delayed_work_sync-to-cancel-rfkill_poll.patch 
	linux-2.6-iwlagn-fix-hw-rfkill-while-the-interface-is-down.patch 
	linux-2.6-kvm-skip-pit-check.patch 
	linux-2.6-mac80211-fix-beacon-loss-detection-after-scan.patch 
	linux-2.6-mm-lru-dont-evict-mapped-executable-pages.patch 
	linux-2.6-mm-lru-evict-streaming-io-pages-first.patch 
	linux-2.6-mm-lru-report-vm-flags-in-page-referenced.patch 
	linux-2.6-netdev-ehea-fix-circular-locking.patch 
	linux-2.6-netdev-ehea-fix-page-alignment.patch 
	linux-2.6-netdev-ehea-remove-from-list.patch 
	linux-2.6-netdev-r8169-use-different-family-defaults.patch 
	linux-2.6-nfsd-cred-refcount-fix.patch 
	linux-2.6-nfsd-report-short-writes-fix.patch 
	linux-2.6-nfsd-report-short-writes.patch 
	linux-2.6-parport-quickfix-the-proc-registration-bug.patch 
	linux-2.6-pci-sysfs-remove-id.patch 
	linux-2.6-relatime-by-default.patch 
	linux-2.6-scsi-cpqarray-set-master.patch 
	linux-2.6-serial-add-txen-test-param.patch 
	linux-2.6-shut-up-efifb.patch 
	linux-2.6-sony-laptop-rfkill.patch 
	linux-2.6-usb-remove-low-latency-hack.patch 
	linux-2.6-utrace-ftrace.patch 
	linux-2.6-v4l-dvb-fix-uint16_t-audio-h.patch 
	linux-2.6-v4l-pvrusb2-fixes.patch 
	linux-2.6-virtio_blk-dont-bounce-highmem-requests.patch 
	linux-2.6-x86-delay-tsc-barrier.patch 
	linux-2.6-xen-check-for-nx-support.patch 
	linux-2.6-xen-fix_warning_when_deleting_gendisk.patch 
	linux-2.6.29-alsa-update-quirks.patch 
	linux-2.6.29-xen-disable-gbpages.patch 
	linux-2.6.29.3-boot-vga.patch 
	mac80211-don-t-drop-nullfunc-frames-during-software.patch 
	net-revert-forcedeth-power-down-phy-when-interface-is.patch 
	revert-fix-modules_install-via-nfs.patch 
	squashfs-broken-when-pagesize-greater-than-blocksize.patch 
	via-centaur-merge-32-64-bit-init.patch 
	via-padlock-cryptodev-1-64bit-enable.patch 
	via-padlock-cryptodev-2-64bit-enable.patch 
	via-padlock-fix-might-sleep.patch 
	via-padlock-nano-workarounds-cbc.patch 
	via-padlock-nano-workarounds-ecb.patch 
	via-rng-64-bit-enable.patch 
Log Message:
* Fri Jul 24 2009 Kyle McMartin <kyle at redhat.com>
- CONFIG_DEFAULT_MMAP_MIN_ADDR=65536 [i386 x86_64], 4096 elsewhere, as
  per defconfigs.
- Blat patches from other tag, now to rebase fixes, splat in the changelog,
  and tag it for building.


linux-2.6-btrfs-experimental-branch.patch:
 b/fs/btrfs/Makefile      |    2 
 b/fs/btrfs/btrfs_inode.h |   13 
 b/fs/btrfs/ctree.c       |  588 ++++++++--------
 b/fs/btrfs/ctree.h       |   27 
 b/fs/btrfs/delayed-ref.c |  665 ++++++++++++++++++
 b/fs/btrfs/delayed-ref.h |  192 +++++
 b/fs/btrfs/dir-item.c    |    3 
 b/fs/btrfs/disk-io.c     |   79 +-
 b/fs/btrfs/disk-io.h     |    1 
 b/fs/btrfs/extent-tree.c | 1668 +++++++++++++++--------------------------------
 b/fs/btrfs/extent_io.c   |   51 -
 b/fs/btrfs/extent_io.h   |    3 
 b/fs/btrfs/file-item.c   |    7 
 b/fs/btrfs/file.c        |   10 
 b/fs/btrfs/inode-item.c  |    3 
 b/fs/btrfs/inode.c       |   85 ++
 b/fs/btrfs/locking.c     |   21 
 b/fs/btrfs/transaction.c |  140 +++
 b/fs/btrfs/transaction.h |    8 
 b/fs/btrfs/tree-defrag.c |    2 
 b/fs/btrfs/tree-log.c    |  444 ++++++++++--
 b/fs/btrfs/tree-log.h    |   17 
 fs/btrfs/ctree.h         |    7 
 fs/btrfs/extent-tree.c   |    2 
 fs/btrfs/file.c          |   14 
 fs/btrfs/inode.c         |   28 
 26 files changed, 2465 insertions(+), 1615 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.3 -r 1.4 linux-2.6-btrfs-experimental-branch.patchIndex: linux-2.6-btrfs-experimental-branch.patch
===================================================================
RCS file: linux-2.6-btrfs-experimental-branch.patch
diff -N linux-2.6-btrfs-experimental-branch.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-btrfs-experimental-branch.patch	25 Jul 2009 04:09:23 -0000	1.4
@@ -0,0 +1,6150 @@
+diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile
+index d2cf5a5..9adf5e4 100644
+--- a/fs/btrfs/Makefile
++++ b/fs/btrfs/Makefile
+@@ -8,7 +8,7 @@ btrfs-y := super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \
+ 	   extent_map.o sysfs.o struct-funcs.o xattr.o ordered-data.o \
+ 	   extent_io.o volumes.o async-thread.o ioctl.o locking.o orphan.o \
+ 	   ref-cache.o export.o tree-log.o acl.o free-space-cache.o zlib.o \
+-	   compression.o
++	   compression.o delayed-ref.o
+ else
+ 
+ # Normal Makefile
+diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
+index 37f31b5..dbb7241 100644
+--- a/fs/btrfs/ctree.c
++++ b/fs/btrfs/ctree.c
+@@ -254,18 +254,13 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,
+  * empty_size -- a hint that you plan on doing more cow.  This is the size in
+  * bytes the allocator should try to find free next to the block it returns.
+  * This is just a hint and may be ignored by the allocator.
+- *
+- * prealloc_dest -- if you have already reserved a destination for the cow,
+- * this uses that block instead of allocating a new one.
+- * btrfs_alloc_reserved_extent is used to finish the allocation.
+  */
+ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
+ 			     struct btrfs_root *root,
+ 			     struct extent_buffer *buf,
+ 			     struct extent_buffer *parent, int parent_slot,
+ 			     struct extent_buffer **cow_ret,
+-			     u64 search_start, u64 empty_size,
+-			     u64 prealloc_dest)
++			     u64 search_start, u64 empty_size)
+ {
+ 	u64 parent_start;
+ 	struct extent_buffer *cow;
+@@ -291,26 +286,10 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
+ 	level = btrfs_header_level(buf);
+ 	nritems = btrfs_header_nritems(buf);
+ 
+-	if (prealloc_dest) {
+-		struct btrfs_key ins;
+-
+-		ins.objectid = prealloc_dest;
+-		ins.offset = buf->len;
+-		ins.type = BTRFS_EXTENT_ITEM_KEY;
+-
+-		ret = btrfs_alloc_reserved_extent(trans, root, parent_start,
+-						  root->root_key.objectid,
+-						  trans->transid, level, &ins);
+-		BUG_ON(ret);
+-		cow = btrfs_init_new_buffer(trans, root, prealloc_dest,
+-					    buf->len, level);
+-	} else {
+-		cow = btrfs_alloc_free_block(trans, root, buf->len,
+-					     parent_start,
+-					     root->root_key.objectid,
+-					     trans->transid, level,
+-					     search_start, empty_size);
+-	}
++	cow = btrfs_alloc_free_block(trans, root, buf->len,
++				     parent_start, root->root_key.objectid,
++				     trans->transid, level,
++				     search_start, empty_size);
+ 	if (IS_ERR(cow))
+ 		return PTR_ERR(cow);
+ 
+@@ -413,7 +392,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
+ noinline int btrfs_cow_block(struct btrfs_trans_handle *trans,
+ 		    struct btrfs_root *root, struct extent_buffer *buf,
+ 		    struct extent_buffer *parent, int parent_slot,
+-		    struct extent_buffer **cow_ret, u64 prealloc_dest)
++		    struct extent_buffer **cow_ret)
+ {
+ 	u64 search_start;
+ 	int ret;
+@@ -436,7 +415,6 @@ noinline int btrfs_cow_block(struct btrfs_trans_handle *trans,
+ 	    btrfs_header_owner(buf) == root->root_key.objectid &&
+ 	    !btrfs_header_flag(buf, BTRFS_HEADER_FLAG_WRITTEN)) {
+ 		*cow_ret = buf;
+-		WARN_ON(prealloc_dest);
+ 		return 0;
+ 	}
+ 
+@@ -447,8 +425,7 @@ noinline int btrfs_cow_block(struct btrfs_trans_handle *trans,
+ 	btrfs_set_lock_blocking(buf);
+ 
+ 	ret = __btrfs_cow_block(trans, root, buf, parent,
+-				 parent_slot, cow_ret, search_start, 0,
+-				 prealloc_dest);
++				 parent_slot, cow_ret, search_start, 0);
+ 	return ret;
+ }
+ 
+@@ -617,7 +594,7 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
+ 		err = __btrfs_cow_block(trans, root, cur, parent, i,
+ 					&cur, search_start,
+ 					min(16 * blocksize,
+-					    (end_slot - i) * blocksize), 0);
++					    (end_slot - i) * blocksize));
+ 		if (err) {
+ 			btrfs_tree_unlock(cur);
+ 			free_extent_buffer(cur);
+@@ -937,7 +914,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
+ 		BUG_ON(!child);
+ 		btrfs_tree_lock(child);
+ 		btrfs_set_lock_blocking(child);
+-		ret = btrfs_cow_block(trans, root, child, mid, 0, &child, 0);
++		ret = btrfs_cow_block(trans, root, child, mid, 0, &child);
+ 		BUG_ON(ret);
+ 
+ 		spin_lock(&root->node_lock);
+@@ -945,6 +922,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
+ 		spin_unlock(&root->node_lock);
+ 
+ 		ret = btrfs_update_extent_ref(trans, root, child->start,
++					      child->len,
+ 					      mid->start, child->start,
+ 					      root->root_key.objectid,
+ 					      trans->transid, level - 1);
+@@ -971,6 +949,10 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
+ 	    BTRFS_NODEPTRS_PER_BLOCK(root) / 4)
+ 		return 0;
+ 
++	if (trans->transaction->delayed_refs.flushing &&
++	    btrfs_header_nritems(mid) > 2)
++		return 0;
++
+ 	if (btrfs_header_nritems(mid) < 2)
+ 		err_on_enospc = 1;
+ 
+@@ -979,7 +961,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
+ 		btrfs_tree_lock(left);
+ 		btrfs_set_lock_blocking(left);
+ 		wret = btrfs_cow_block(trans, root, left,
+-				       parent, pslot - 1, &left, 0);
++				       parent, pslot - 1, &left);
+ 		if (wret) {
+ 			ret = wret;
+ 			goto enospc;
+@@ -990,7 +972,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
+ 		btrfs_tree_lock(right);
+ 		btrfs_set_lock_blocking(right);
+ 		wret = btrfs_cow_block(trans, root, right,
+-				       parent, pslot + 1, &right, 0);
++				       parent, pslot + 1, &right);
+ 		if (wret) {
+ 			ret = wret;
+ 			goto enospc;
+@@ -1171,7 +1153,7 @@ static noinline int push_nodes_for_insert(struct btrfs_trans_handle *trans,
+ 			wret = 1;
+ 		} else {
+ 			ret = btrfs_cow_block(trans, root, left, parent,
+-					      pslot - 1, &left, 0);
++					      pslot - 1, &left);
+ 			if (ret)
+ 				wret = 1;
+ 			else {
+@@ -1222,7 +1204,7 @@ static noinline int push_nodes_for_insert(struct btrfs_trans_handle *trans,
+ 		} else {
+ 			ret = btrfs_cow_block(trans, root, right,
+ 					      parent, pslot + 1,
+-					      &right, 0);
++					      &right);
+ 			if (ret)
+ 				wret = 1;
+ 			else {
+@@ -1492,7 +1474,6 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
+ 	u8 lowest_level = 0;
+ 	u64 blocknr;
+ 	u64 gen;
+-	struct btrfs_key prealloc_block;
+ 
+ 	lowest_level = p->lowest_level;
+ 	WARN_ON(lowest_level && ins_len > 0);
+@@ -1501,8 +1482,6 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
+ 	if (ins_len < 0)
+ 		lowest_unlock = 2;
+ 
+-	prealloc_block.objectid = 0;
+-
+ again:
+ 	if (p->skip_locking)
+ 		b = btrfs_root_node(root);
+@@ -1529,44 +1508,11 @@ again:
+ 			    !btrfs_header_flag(b, BTRFS_HEADER_FLAG_WRITTEN)) {
+ 				goto cow_done;
+ 			}
+-
+-			/* ok, we have to cow, is our old prealloc the right
+-			 * size?
+-			 */
[...5757 lines suppressed...]
++		goto end_no_trans;
+ 
+ 	start_log_trans(trans, root);
+-	sb = dentry->d_inode->i_sb;
+-	while (1) {
+-		ret = __btrfs_log_inode(trans, root, dentry->d_inode,
+-					inode_only);
+-		BUG_ON(ret);
+-		inode_only = LOG_INODE_EXISTS;
+ 
+-		dentry = dentry->d_parent;
+-		if (!dentry || !dentry->d_inode || sb != dentry->d_inode->i_sb)
++	ret = btrfs_log_inode(trans, root, inode, inode_only);
++	BUG_ON(ret);
++
++	/*
++	 * for regular files, if its inode is already on disk, we don't
++	 * have to worry about the parents at all.  This is because
++	 * we can use the last_unlink_trans field to record renames
++	 * and other fun in this file.
++	 */
++	if (S_ISREG(inode->i_mode) &&
++	    BTRFS_I(inode)->generation <= last_committed &&
++	    BTRFS_I(inode)->last_unlink_trans <= last_committed)
++			goto no_parent;
++
++	inode_only = LOG_INODE_EXISTS;
++	while (1) {
++		if (!parent || !parent->d_inode || sb != parent->d_inode->i_sb)
+ 			break;
+ 
+-		if (BTRFS_I(dentry->d_inode)->generation <=
+-		    root->fs_info->last_trans_committed)
++		inode = parent->d_inode;
++		if (BTRFS_I(inode)->generation >
++		    root->fs_info->last_trans_committed) {
++			ret = btrfs_log_inode(trans, root, inode, inode_only);
++			BUG_ON(ret);
++		}
++		if (parent == sb->s_root)
+ 			break;
++
++		parent = parent->d_parent;
+ 	}
+-	end_log_trans(root);
+-	return 0;
++no_parent:
++	ret = 0;
++	btrfs_end_log_trans(root);
++end_no_trans:
++	return ret;
+ }
+ 
+ /*
+@@ -2760,12 +2959,8 @@ int btrfs_log_dentry(struct btrfs_trans_handle *trans,
+ int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans,
+ 			  struct btrfs_root *root, struct dentry *dentry)
+ {
+-	u64 gen;
+-	gen = root->fs_info->last_trans_new_blockgroup;
+-	if (gen > root->fs_info->last_trans_committed)
+-		return 1;
+-	else
+-		return btrfs_log_dentry(trans, root, dentry);
++	return btrfs_log_inode_parent(trans, root, dentry->d_inode,
++				      dentry->d_parent, 0);
+ }
+ 
+ /*
+@@ -2884,3 +3079,94 @@ again:
+ 	kfree(log_root_tree);
+ 	return 0;
+ }
++
++/*
++ * there are some corner cases where we want to force a full
++ * commit instead of allowing a directory to be logged.
++ *
++ * They revolve around files there were unlinked from the directory, and
++ * this function updates the parent directory so that a full commit is
++ * properly done if it is fsync'd later after the unlinks are done.
++ */
++void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans,
++			     struct inode *dir, struct inode *inode,
++			     int for_rename)
++{
++	/*
++	 * when we're logging a file, if it hasn't been renamed
++	 * or unlinked, and its inode is fully committed on disk,
++	 * we don't have to worry about walking up the directory chain
++	 * to log its parents.
++	 *
++	 * So, we use the last_unlink_trans field to put this transid
++	 * into the file.  When the file is logged we check it and
++	 * don't log the parents if the file is fully on disk.
++	 */
++	if (S_ISREG(inode->i_mode))
++		BTRFS_I(inode)->last_unlink_trans = trans->transid;
++
++	/*
++	 * if this directory was already logged any new
++	 * names for this file/dir will get recorded
++	 */
++	smp_mb();
++	if (BTRFS_I(dir)->logged_trans == trans->transid)
++		return;
++
++	/*
++	 * if the inode we're about to unlink was logged,
++	 * the log will be properly updated for any new names
++	 */
++	if (BTRFS_I(inode)->logged_trans == trans->transid)
++		return;
++
++	/*
++	 * when renaming files across directories, if the directory
++	 * there we're unlinking from gets fsync'd later on, there's
++	 * no way to find the destination directory later and fsync it
++	 * properly.  So, we have to be conservative and force commits
++	 * so the new name gets discovered.
++	 */
++	if (for_rename)
++		goto record;
++
++	/* we can safely do the unlink without any special recording */
++	return;
++
++record:
++	BTRFS_I(dir)->last_unlink_trans = trans->transid;
++}
++
++/*
++ * Call this after adding a new name for a file and it will properly
++ * update the log to reflect the new name.
++ *
++ * It will return zero if all goes well, and it will return 1 if a
++ * full transaction commit is required.
++ */
++int btrfs_log_new_name(struct btrfs_trans_handle *trans,
++			struct inode *inode, struct inode *old_dir,
++			struct dentry *parent)
++{
++	struct btrfs_root * root = BTRFS_I(inode)->root;
++
++	/*
++	 * this will force the logging code to walk the dentry chain
++	 * up for the file
++	 */
++	if (S_ISREG(inode->i_mode))
++		BTRFS_I(inode)->last_unlink_trans = trans->transid;
++
++	/*
++	 * if this inode hasn't been logged and directory we're renaming it
++	 * from hasn't been logged, we don't need to log it
++	 */
++	if (BTRFS_I(inode)->logged_trans <=
++	    root->fs_info->last_trans_committed &&
++	    (!old_dir || BTRFS_I(old_dir)->logged_trans <=
++		    root->fs_info->last_trans_committed))
++		return 0;
++
++	return btrfs_log_inode_parent(trans, root, inode, parent, 1);
++}
++
+diff --git a/fs/btrfs/tree-log.h b/fs/btrfs/tree-log.h
+index b9409b3..d09c760 100644
+--- a/fs/btrfs/tree-log.h
++++ b/fs/btrfs/tree-log.h
+@@ -22,14 +22,9 @@
+ int btrfs_sync_log(struct btrfs_trans_handle *trans,
+ 		   struct btrfs_root *root);
+ int btrfs_free_log(struct btrfs_trans_handle *trans, struct btrfs_root *root);
+-int btrfs_log_dentry(struct btrfs_trans_handle *trans,
+-		    struct btrfs_root *root, struct dentry *dentry);
+ int btrfs_recover_log_trees(struct btrfs_root *tree_root);
+ int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans,
+ 			  struct btrfs_root *root, struct dentry *dentry);
+-int btrfs_log_inode(struct btrfs_trans_handle *trans,
+-		    struct btrfs_root *root, struct inode *inode,
+-		    int inode_only);
+ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
+ 				 struct btrfs_root *root,
+ 				 const char *name, int name_len,
+@@ -38,4 +33,16 @@ int btrfs_del_inode_ref_in_log(struct btrfs_trans_handle *trans,
+ 			       struct btrfs_root *root,
+ 			       const char *name, int name_len,
+ 			       struct inode *inode, u64 dirid);
++int btrfs_join_running_log_trans(struct btrfs_root *root);
++int btrfs_end_log_trans(struct btrfs_root *root);
++int btrfs_pin_log_trans(struct btrfs_root *root);
++int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
++		    struct btrfs_root *root, struct inode *inode,
++		    struct dentry *parent, int exists_only);
++void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans,
++			     struct inode *dir, struct inode *inode,
++			     int for_rename);
++int btrfs_log_new_name(struct btrfs_trans_handle *trans,
++			struct inode *inode, struct inode *old_dir,
++			struct dentry *parent);
+ #endif

linux-2.6-ext4-prealloc-fixes.patch:
 inode.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Index: linux-2.6-ext4-prealloc-fixes.patch
===================================================================
RCS file: linux-2.6-ext4-prealloc-fixes.patch
diff -N linux-2.6-ext4-prealloc-fixes.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ext4-prealloc-fixes.patch	25 Jul 2009 04:09:25 -0000	1.4
@@ -0,0 +1,47 @@
+We need to mark the  buffer_head mapping prealloc space
+as new during write_begin. Otherwise we don't zero out the
+page cache content properly for a partial write. This will
+cause file corruption with preallocation.
+
+Also use block number -1 as the fake block number so that
+unmap_underlying_metadata doesn't drop wrong buffer_head
+
+Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
+
+Block number '0' should not be used as the fake block number for
+the delayed new buffer. This will result in vfs calling umap_underlying_metadata for
+block number '0'. So  use -1 instead.
+
+Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
+
+---
+ fs/ext4/inode.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+Index: linux-2.6.29.noarch/fs/ext4/inode.c
+===================================================================
+--- linux-2.6.29.noarch.orig/fs/ext4/inode.c
++++ linux-2.6.29.noarch/fs/ext4/inode.c
+@@ -2318,11 +2318,21 @@ static int ext4_da_get_block_prep(struct
+ 			/* not enough space to reserve */
+ 			return ret;
+ 
+-		map_bh(bh_result, inode->i_sb, 0);
++		map_bh(bh_result, inode->i_sb, -1);
+ 		set_buffer_new(bh_result);
+ 		set_buffer_delay(bh_result);
+ 	} else if (ret > 0) {
+ 		bh_result->b_size = (ret << inode->i_blkbits);
++		/*
++		 * With sub-block writes into unwritten extents
++		 * we also need to mark the buffer as new so that
++		 * the unwritten parts of the buffer gets correctly zeroed.
++		 */
++		if (buffer_unwritten(bh_result)) {
++			bh_result->b_bdev = inode->i_sb->s_bdev;
++			set_buffer_new(bh_result);
++			bh_result->b_blocknr = -1;
++		}
+ 		ret = 0;
+ 	}
+ 

linux-2.6-missing-rfc2465-stats.patch:
 include/linux/snmp.h  |   10 ++++++++--
 include/net/ip.h      |    3 +++
 include/net/ipv6.h    |   15 ++++++++++++++-
 include/net/snmp.h    |   19 ++++++++++++++++++-
 net/ipv4/ip_input.c   |   13 ++++++++-----
 net/ipv4/ip_output.c  |   14 +++++++-------
 net/ipv4/proc.c       |   10 ++++++++--
 net/ipv6/ip6_input.c  |    7 ++++---
 net/ipv6/ip6_output.c |    9 +++++----
 net/ipv6/mcast.c      |   19 ++++++++++++-------
 net/ipv6/ndisc.c      |    4 ++--
 net/ipv6/proc.c       |   10 ++++++++--
 net/ipv6/raw.c        |    2 +-
 13 files changed, 98 insertions(+), 37 deletions(-)

--- NEW FILE linux-2.6-missing-rfc2465-stats.patch ---
diff -up linux-2.6.29.noarch/include/linux/snmp.h.orig linux-2.6.29.noarch/include/linux/snmp.h
--- linux-2.6.29.noarch/include/linux/snmp.h.orig	2009-03-23 19:12:14.000000000 -0400
+++ linux-2.6.29.noarch/include/linux/snmp.h	2009-04-27 10:15:53.000000000 -0400
@@ -18,7 +18,7 @@
 enum
 {
 	IPSTATS_MIB_NUM = 0,
-	IPSTATS_MIB_INRECEIVES,			/* InReceives */
+	IPSTATS_MIB_INPKTS,			/* InReceives */
 	IPSTATS_MIB_INHDRERRORS,		/* InHdrErrors */
 	IPSTATS_MIB_INTOOBIGERRORS,		/* InTooBigErrors */
 	IPSTATS_MIB_INNOROUTES,			/* InNoRoutes */
@@ -28,7 +28,7 @@ enum
 	IPSTATS_MIB_INDISCARDS,			/* InDiscards */
 	IPSTATS_MIB_INDELIVERS,			/* InDelivers */
 	IPSTATS_MIB_OUTFORWDATAGRAMS,		/* OutForwDatagrams */
-	IPSTATS_MIB_OUTREQUESTS,		/* OutRequests */
+	IPSTATS_MIB_OUTPKTS,			/* OutRequests */
 	IPSTATS_MIB_OUTDISCARDS,		/* OutDiscards */
 	IPSTATS_MIB_OUTNOROUTES,		/* OutNoRoutes */
 	IPSTATS_MIB_REASMTIMEOUT,		/* ReasmTimeout */
@@ -42,6 +42,12 @@ enum
 	IPSTATS_MIB_OUTMCASTPKTS,		/* OutMcastPkts */
 	IPSTATS_MIB_INBCASTPKTS,		/* InBcastPkts */
 	IPSTATS_MIB_OUTBCASTPKTS,		/* OutBcastPkts */
+	IPSTATS_MIB_INOCTETS,			/* InOctets */
+	IPSTATS_MIB_OUTOCTETS,			/* OutOctets */
+	IPSTATS_MIB_INMCASTOCTETS,		/* InMcastOctets */
+	IPSTATS_MIB_OUTMCASTOCTETS,		/* OutMcastOctets */
+	IPSTATS_MIB_INBCASTOCTETS,		/* InBcastOctets */
+	IPSTATS_MIB_OUTBCASTOCTETS,		/* OutBcastOctets */
 	__IPSTATS_MIB_MAX
 };
 
diff -up linux-2.6.29.noarch/include/net/ip.h.orig linux-2.6.29.noarch/include/net/ip.h
--- linux-2.6.29.noarch/include/net/ip.h.orig	2009-04-27 09:33:56.000000000 -0400
+++ linux-2.6.29.noarch/include/net/ip.h	2009-04-27 10:15:53.000000000 -0400
@@ -168,7 +168,10 @@ struct ipv4_config
 extern struct ipv4_config ipv4_config;
 #define IP_INC_STATS(net, field)	SNMP_INC_STATS((net)->mib.ip_statistics, field)
 #define IP_INC_STATS_BH(net, field)	SNMP_INC_STATS_BH((net)->mib.ip_statistics, field)
+#define IP_ADD_STATS(net, field, val)	SNMP_ADD_STATS((net)->mib.ip_statistics, field, val)
 #define IP_ADD_STATS_BH(net, field, val) SNMP_ADD_STATS_BH((net)->mib.ip_statistics, field, val)
+#define IP_UPD_PO_STATS(net, field, val) SNMP_UPD_PO_STATS((net)->mib.ip_statistics, field, val)
+#define IP_UPD_PO_STATS_BH(net, field, val) SNMP_UPD_PO_STATS_BH((net)->mib.ip_statistics, field, val)
 #define NET_INC_STATS(net, field)	SNMP_INC_STATS((net)->mib.net_statistics, field)
 #define NET_INC_STATS_BH(net, field)	SNMP_INC_STATS_BH((net)->mib.net_statistics, field)
 #define NET_INC_STATS_USER(net, field) 	SNMP_INC_STATS_USER((net)->mib.net_statistics, field)
diff -up linux-2.6.29.noarch/include/net/ipv6.h.orig linux-2.6.29.noarch/include/net/ipv6.h
--- linux-2.6.29.noarch/include/net/ipv6.h.orig	2009-04-27 09:33:56.000000000 -0400
+++ linux-2.6.29.noarch/include/net/ipv6.h	2009-04-27 10:15:53.000000000 -0400
@@ -126,15 +126,28 @@ extern struct ctl_path net_ipv6_ctl_path
 	SNMP_ADD_STATS##modifier((net)->mib.statname##_statistics, (field), (val));\
 })
 
+#define _DEVUPD(net, statname, modifier, idev, field, val)		\
+({									\
+	struct inet6_dev *_idev = (idev);				\
+	if (likely(_idev != NULL))					\
+		SNMP_UPD_PO_STATS##modifier((_idev)->stats.statname, field, (val)); \
+	SNMP_UPD_PO_STATS##modifier((net)->mib.statname##_statistics, field, (val));\
+})
+
 /* MIBs */
 
 #define IP6_INC_STATS(net, idev,field)		\
 		_DEVINC(net, ipv6, , idev, field)
 #define IP6_INC_STATS_BH(net, idev,field)	\
 		_DEVINC(net, ipv6, _BH, idev, field)
+#define IP6_ADD_STATS(net, idev,field,val)	\
+		_DEVADD(net, ipv6, , idev, field, val)
 #define IP6_ADD_STATS_BH(net, idev,field,val)	\
 		_DEVADD(net, ipv6, _BH, idev, field, val)
-
+#define IP6_UPD_PO_STATS(net, idev,field,val)   \
+		_DEVUPD(net, ipv6, , idev, field, val)
+#define IP6_UPD_PO_STATS_BH(net, idev,field,val)   \
+		_DEVUPD(net, ipv6, _BH, idev, field, val)
 #define ICMP6_INC_STATS(net, idev, field)	\
 		_DEVINC(net, icmpv6, , idev, field)
 #define ICMP6_INC_STATS_BH(net, idev, field)	\
diff -up linux-2.6.29.noarch/include/net/snmp.h.orig linux-2.6.29.noarch/include/net/snmp.h
--- linux-2.6.29.noarch/include/net/snmp.h.orig	2009-03-23 19:12:14.000000000 -0400
+++ linux-2.6.29.noarch/include/net/snmp.h	2009-04-27 10:15:53.000000000 -0400
@@ -153,6 +153,11 @@ struct linux_xfrm_mib {
 		per_cpu_ptr(mib[!in_softirq()], get_cpu())->mibs[field]--; \
 		put_cpu(); \
 	} while (0)
+#define SNMP_ADD_STATS(mib, field, addend) 	\
+	do { \
+		per_cpu_ptr(mib[!in_softirq()], get_cpu())->mibs[field] += addend; \
+		put_cpu(); \
+	} while (0)
 #define SNMP_ADD_STATS_BH(mib, field, addend) 	\
 	(per_cpu_ptr(mib[0], raw_smp_processor_id())->mibs[field] += addend)
 #define SNMP_ADD_STATS_USER(mib, field, addend) 	\
@@ -160,5 +165,17 @@ struct linux_xfrm_mib {
 		per_cpu_ptr(mib[1], get_cpu())->mibs[field] += addend; \
 		put_cpu(); \
 	} while (0)
-
+#define SNMP_UPD_PO_STATS(mib, basefield, addend)	\
+	do { \
+		__typeof__(mib[0]) ptr = per_cpu_ptr(mib[!in_softirq()], get_cpu());\
+		ptr->mibs[basefield##PKTS]++; \
+		ptr->mibs[basefield##OCTETS] += addend;\
+		put_cpu(); \
+	} while (0)
+#define SNMP_UPD_PO_STATS_BH(mib, basefield, addend)	\
+	do { \
+		__typeof__(mib[0]) ptr = per_cpu_ptr(mib[!in_softirq()], raw_smp_processor_id());\
+		ptr->mibs[basefield##PKTS]++; \
+		ptr->mibs[basefield##OCTETS] += addend;\
+	} while (0)
 #endif
diff -up linux-2.6.29.noarch/net/ipv4/ip_input.c.orig linux-2.6.29.noarch/net/ipv4/ip_input.c
--- linux-2.6.29.noarch/net/ipv4/ip_input.c.orig	2009-03-23 19:12:14.000000000 -0400
+++ linux-2.6.29.noarch/net/ipv4/ip_input.c	2009-04-27 10:15:53.000000000 -0400
@@ -358,10 +358,12 @@ static int ip_rcv_finish(struct sk_buff 
 		goto drop;
 
 	rt = skb->rtable;
-	if (rt->rt_type == RTN_MULTICAST)
-		IP_INC_STATS_BH(dev_net(rt->u.dst.dev), IPSTATS_MIB_INMCASTPKTS);
-	else if (rt->rt_type == RTN_BROADCAST)
-		IP_INC_STATS_BH(dev_net(rt->u.dst.dev), IPSTATS_MIB_INBCASTPKTS);
+	if (rt->rt_type == RTN_MULTICAST) {
+		IP_UPD_PO_STATS_BH(dev_net(rt->u.dst.dev), IPSTATS_MIB_INMCAST,
+				skb->len);
+	} else if (rt->rt_type == RTN_BROADCAST)
+		IP_UPD_PO_STATS_BH(dev_net(rt->u.dst.dev), IPSTATS_MIB_INBCAST,
+				skb->len);
 
 	return dst_input(skb);
 
@@ -384,7 +386,8 @@ int ip_rcv(struct sk_buff *skb, struct n
 	if (skb->pkt_type == PACKET_OTHERHOST)
 		goto drop;
 
-	IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_INRECEIVES);
+
+	IP_UPD_PO_STATS_BH(dev_net(dev), IPSTATS_MIB_IN, skb->len);
 
 	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) {
 		IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_INDISCARDS);
diff -up linux-2.6.29.noarch/net/ipv4/ip_output.c.orig linux-2.6.29.noarch/net/ipv4/ip_output.c
--- linux-2.6.29.noarch/net/ipv4/ip_output.c.orig	2009-04-27 09:33:59.000000000 -0400
+++ linux-2.6.29.noarch/net/ipv4/ip_output.c	2009-04-27 10:15:53.000000000 -0400
@@ -181,10 +181,10 @@ static inline int ip_finish_output2(stru
 	struct net_device *dev = dst->dev;
 	unsigned int hh_len = LL_RESERVED_SPACE(dev);
 
-	if (rt->rt_type == RTN_MULTICAST)
-		IP_INC_STATS(dev_net(dev), IPSTATS_MIB_OUTMCASTPKTS);
-	else if (rt->rt_type == RTN_BROADCAST)
-		IP_INC_STATS(dev_net(dev), IPSTATS_MIB_OUTBCASTPKTS);
+	if (rt->rt_type == RTN_MULTICAST) {
+		IP_UPD_PO_STATS(dev_net(dev), IPSTATS_MIB_OUTMCAST, skb->len);
+	} else if (rt->rt_type == RTN_BROADCAST)
+		IP_UPD_PO_STATS(dev_net(dev), IPSTATS_MIB_OUTBCAST, skb->len);
 
 	/* Be paranoid, rather than too clever. */
 	if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops)) {
@@ -244,8 +244,8 @@ int ip_mc_output(struct sk_buff *skb)
 	/*
 	 *	If the indicated interface is up and running, send the packet.
 	 */
-	IP_INC_STATS(dev_net(dev), IPSTATS_MIB_OUTREQUESTS);
-
+	IP_UPD_PO_STATS(dev_net(dev), IPSTATS_MIB_OUT, skb->len);
+	
 	skb->dev = dev;
 	skb->protocol = htons(ETH_P_IP);
 
@@ -298,7 +298,7 @@ int ip_output(struct sk_buff *skb)
 {
 	struct net_device *dev = skb->dst->dev;
 
-	IP_INC_STATS(dev_net(dev), IPSTATS_MIB_OUTREQUESTS);
+	IP_UPD_PO_STATS(dev_net(dev), IPSTATS_MIB_OUT, skb->len);
 
 	skb->dev = dev;
 	skb->protocol = htons(ETH_P_IP);
diff -up linux-2.6.29.noarch/net/ipv4/proc.c.orig linux-2.6.29.noarch/net/ipv4/proc.c
--- linux-2.6.29.noarch/net/ipv4/proc.c.orig	2009-04-27 09:34:00.000000000 -0400
+++ linux-2.6.29.noarch/net/ipv4/proc.c	2009-04-27 10:15:53.000000000 -0400
@@ -90,14 +90,14 @@ static const struct file_operations sock
 
 /* snmp items */
 static const struct snmp_mib snmp4_ipstats_list[] = {
-	SNMP_MIB_ITEM("InReceives", IPSTATS_MIB_INRECEIVES),
+	SNMP_MIB_ITEM("InReceives", IPSTATS_MIB_INPKTS),
 	SNMP_MIB_ITEM("InHdrErrors", IPSTATS_MIB_INHDRERRORS),
 	SNMP_MIB_ITEM("InAddrErrors", IPSTATS_MIB_INADDRERRORS),
 	SNMP_MIB_ITEM("ForwDatagrams", IPSTATS_MIB_OUTFORWDATAGRAMS),
 	SNMP_MIB_ITEM("InUnknownProtos", IPSTATS_MIB_INUNKNOWNPROTOS),
 	SNMP_MIB_ITEM("InDiscards", IPSTATS_MIB_INDISCARDS),
 	SNMP_MIB_ITEM("InDelivers", IPSTATS_MIB_INDELIVERS),
-	SNMP_MIB_ITEM("OutRequests", IPSTATS_MIB_OUTREQUESTS),
+	SNMP_MIB_ITEM("OutRequests", IPSTATS_MIB_OUTPKTS),
 	SNMP_MIB_ITEM("OutDiscards", IPSTATS_MIB_OUTDISCARDS),
 	SNMP_MIB_ITEM("OutNoRoutes", IPSTATS_MIB_OUTNOROUTES),
 	SNMP_MIB_ITEM("ReasmTimeout", IPSTATS_MIB_REASMTIMEOUT),
@@ -118,6 +118,12 @@ static const struct snmp_mib snmp4_ipext
 	SNMP_MIB_ITEM("OutMcastPkts", IPSTATS_MIB_OUTMCASTPKTS),
 	SNMP_MIB_ITEM("InBcastPkts", IPSTATS_MIB_INBCASTPKTS),
 	SNMP_MIB_ITEM("OutBcastPkts", IPSTATS_MIB_OUTBCASTPKTS),
+	SNMP_MIB_ITEM("InOctets", IPSTATS_MIB_INOCTETS),
+	SNMP_MIB_ITEM("OutOctets", IPSTATS_MIB_OUTOCTETS),
+	SNMP_MIB_ITEM("InMcastOctets", IPSTATS_MIB_INMCASTOCTETS),
+	SNMP_MIB_ITEM("OutMcastOctets", IPSTATS_MIB_OUTMCASTOCTETS),
+	SNMP_MIB_ITEM("InBcastOctets", IPSTATS_MIB_INBCASTOCTETS),
+	SNMP_MIB_ITEM("OutBcastOctets", IPSTATS_MIB_OUTBCASTOCTETS),
 	SNMP_MIB_SENTINEL
 };
 
diff -up linux-2.6.29.noarch/net/ipv6/ip6_input.c.orig linux-2.6.29.noarch/net/ipv6/ip6_input.c
--- linux-2.6.29.noarch/net/ipv6/ip6_input.c.orig	2009-04-27 09:34:00.000000000 -0400
+++ linux-2.6.29.noarch/net/ipv6/ip6_input.c	2009-04-27 10:15:53.000000000 -0400
@@ -70,7 +70,7 @@ int ipv6_rcv(struct sk_buff *skb, struct
 
 	idev = __in6_dev_get(skb->dev);
 
-	IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INRECEIVES);
+	IP6_UPD_PO_STATS_BH(net, idev, IPSTATS_MIB_IN, skb->len);
 
 	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL ||
 	    !idev || unlikely(idev->cnf.disable_ipv6)) {
@@ -242,8 +242,9 @@ int ip6_mc_input(struct sk_buff *skb)
 	struct ipv6hdr *hdr;
 	int deliver;
 
-	IP6_INC_STATS_BH(dev_net(skb->dst->dev),
-			 ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS);
+	IP6_UPD_PO_STATS_BH(dev_net(skb->dst->dev),
+			 ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCAST,
+			 skb->len);
 
 	hdr = ipv6_hdr(skb);
 	deliver = ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);
diff -up linux-2.6.29.noarch/net/ipv6/ip6_output.c.orig linux-2.6.29.noarch/net/ipv6/ip6_output.c
--- linux-2.6.29.noarch/net/ipv6/ip6_output.c.orig	2009-03-23 19:12:14.000000000 -0400
+++ linux-2.6.29.noarch/net/ipv6/ip6_output.c	2009-04-27 10:15:53.000000000 -0400
@@ -159,7 +159,8 @@ static int ip6_output2(struct sk_buff *s
 			}
 		}
 
-		IP6_INC_STATS(dev_net(dev), idev, IPSTATS_MIB_OUTMCASTPKTS);
+		IP6_UPD_PO_STATS(dev_net(dev), idev, IPSTATS_MIB_OUTMCAST,
+				skb->len);
 	}
 
 	return NF_HOOK(PF_INET6, NF_INET_POST_ROUTING, skb, NULL, skb->dev,
@@ -275,8 +276,8 @@ int ip6_xmit(struct sock *sk, struct sk_
 
 	mtu = dst_mtu(dst);
 	if ((skb->len <= mtu) || skb->local_df || skb_is_gso(skb)) {
-		IP6_INC_STATS(net, ip6_dst_idev(skb->dst),
-			      IPSTATS_MIB_OUTREQUESTS);
+		IP6_UPD_PO_STATS(net, ip6_dst_idev(skb->dst),
+			      IPSTATS_MIB_OUT, skb->len);
 		return NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, dst->dev,
 				dst_output);
 	}
@@ -1516,7 +1517,7 @@ int ip6_push_pending_frames(struct sock 
 	skb->mark = sk->sk_mark;
 
 	skb->dst = dst_clone(&rt->u.dst);
-	IP6_INC_STATS(net, rt->rt6i_idev, IPSTATS_MIB_OUTREQUESTS);
+	IP6_UPD_PO_STATS(net, rt->rt6i_idev, IPSTATS_MIB_OUT, skb->len);
 	if (proto == IPPROTO_ICMPV6) {
 		struct inet6_dev *idev = ip6_dst_idev(skb->dst);
 
diff -up linux-2.6.29.noarch/net/ipv6/mcast.c.orig linux-2.6.29.noarch/net/ipv6/mcast.c
--- linux-2.6.29.noarch/net/ipv6/mcast.c.orig	2009-03-23 19:12:14.000000000 -0400
+++ linux-2.6.29.noarch/net/ipv6/mcast.c	2009-04-27 10:15:53.000000000 -0400
@@ -1449,7 +1449,8 @@ static void mld_sendpack(struct sk_buff 
 	int err;
 	struct flowi fl;
 
-	IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTREQUESTS);
+	IP6_UPD_PO_STATS(net, idev, IPSTATS_MIB_OUT, skb->len);
+
 	payload_len = (skb->tail - skb->network_header) - sizeof(*pip6);
 	mldlen = skb->tail - skb->transport_header;
 	pip6->payload_len = htons(payload_len);
@@ -1473,13 +1474,15 @@ static void mld_sendpack(struct sk_buff 
 	if (err)
 		goto err_out;
 
+	payload_len = skb->len;
+
 	err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, skb->dev,
 		      dst_output);
 out:
 	if (!err) {
 		ICMP6MSGOUT_INC_STATS_BH(net, idev, ICMPV6_MLD2_REPORT);
 		ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTMSGS);
-		IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_OUTMCASTPKTS);
+		IP6_UPD_PO_STATS_BH(net, idev, IPSTATS_MIB_OUTMCAST, payload_len);
 	} else
 		IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_OUTDISCARDS);
 
@@ -1773,10 +1776,6 @@ static void igmp6_send(struct in6_addr *
 		     IPV6_TLV_PADN, 0 };
 	struct flowi fl;
 
-	rcu_read_lock();
-	IP6_INC_STATS(net, __in6_dev_get(dev),
-		      IPSTATS_MIB_OUTREQUESTS);
-	rcu_read_unlock();
 	if (type == ICMPV6_MGM_REDUCTION)
 		snd_addr = &in6addr_linklocal_allrouters;
 	else
@@ -1786,6 +1785,11 @@ static void igmp6_send(struct in6_addr *
 	payload_len = len + sizeof(ra);
 	full_len = sizeof(struct ipv6hdr) + payload_len;
 
+	rcu_read_lock();
+	IP6_UPD_PO_STATS(net, __in6_dev_get(dev),
+		      IPSTATS_MIB_OUT, full_len);
+	rcu_read_unlock();
+
 	skb = sock_alloc_send_skb(sk, LL_ALLOCATED_SPACE(dev) + full_len, 1, &err);
 
 	if (skb == NULL) {
@@ -1838,13 +1842,14 @@ static void igmp6_send(struct in6_addr *
 	if (err)
 		goto err_out;
 
+
 	err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, skb->dev,
 		      dst_output);
 out:
 	if (!err) {
 		ICMP6MSGOUT_INC_STATS(net, idev, type);
 		ICMP6_INC_STATS(net, idev, ICMP6_MIB_OUTMSGS);
-		IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTMCASTPKTS);
+		IP6_UPD_PO_STATS(net, idev, IPSTATS_MIB_OUTMCAST, full_len);
 	} else
 		IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTDISCARDS);
 
diff -up linux-2.6.29.noarch/net/ipv6/ndisc.c.orig linux-2.6.29.noarch/net/ipv6/ndisc.c
--- linux-2.6.29.noarch/net/ipv6/ndisc.c.orig	2009-04-27 09:34:00.000000000 -0400
+++ linux-2.6.29.noarch/net/ipv6/ndisc.c	2009-04-27 10:15:53.000000000 -0400
@@ -533,7 +533,7 @@ void ndisc_send_skb(struct sk_buff *skb,
 	skb->dst = dst;
 
 	idev = in6_dev_get(dst->dev);
-	IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTREQUESTS);
+	IP6_UPD_PO_STATS(net, idev, IPSTATS_MIB_OUT, skb->len);
 
 	err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, dst->dev,
 		      dst_output);
@@ -1613,7 +1613,7 @@ void ndisc_send_redirect(struct sk_buff 
 
 	buff->dst = dst;
 	idev = in6_dev_get(dst->dev);
-	IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTREQUESTS);
+	IP6_UPD_PO_STATS(net, idev, IPSTATS_MIB_OUT, skb->len);
 	err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, buff, NULL, dst->dev,
 		      dst_output);
 	if (!err) {
diff -up linux-2.6.29.noarch/net/ipv6/proc.c.orig linux-2.6.29.noarch/net/ipv6/proc.c
--- linux-2.6.29.noarch/net/ipv6/proc.c.orig	2009-03-23 19:12:14.000000000 -0400
+++ linux-2.6.29.noarch/net/ipv6/proc.c	2009-04-27 10:15:53.000000000 -0400
@@ -61,7 +61,7 @@ static const struct file_operations sock
 
 static struct snmp_mib snmp6_ipstats_list[] = {
 /* ipv6 mib according to RFC 2465 */
-	SNMP_MIB_ITEM("Ip6InReceives", IPSTATS_MIB_INRECEIVES),
+	SNMP_MIB_ITEM("Ip6InReceives", IPSTATS_MIB_INPKTS),
 	SNMP_MIB_ITEM("Ip6InHdrErrors", IPSTATS_MIB_INHDRERRORS),
 	SNMP_MIB_ITEM("Ip6InTooBigErrors", IPSTATS_MIB_INTOOBIGERRORS),
 	SNMP_MIB_ITEM("Ip6InNoRoutes", IPSTATS_MIB_INNOROUTES),
@@ -71,7 +71,7 @@ static struct snmp_mib snmp6_ipstats_lis
 	SNMP_MIB_ITEM("Ip6InDiscards", IPSTATS_MIB_INDISCARDS),
 	SNMP_MIB_ITEM("Ip6InDelivers", IPSTATS_MIB_INDELIVERS),
 	SNMP_MIB_ITEM("Ip6OutForwDatagrams", IPSTATS_MIB_OUTFORWDATAGRAMS),
-	SNMP_MIB_ITEM("Ip6OutRequests", IPSTATS_MIB_OUTREQUESTS),
+	SNMP_MIB_ITEM("Ip6OutRequests", IPSTATS_MIB_OUTPKTS),
 	SNMP_MIB_ITEM("Ip6OutDiscards", IPSTATS_MIB_OUTDISCARDS),
 	SNMP_MIB_ITEM("Ip6OutNoRoutes", IPSTATS_MIB_OUTNOROUTES),
 	SNMP_MIB_ITEM("Ip6ReasmTimeout", IPSTATS_MIB_REASMTIMEOUT),
@@ -83,6 +83,12 @@ static struct snmp_mib snmp6_ipstats_lis
 	SNMP_MIB_ITEM("Ip6FragCreates", IPSTATS_MIB_FRAGCREATES),
 	SNMP_MIB_ITEM("Ip6InMcastPkts", IPSTATS_MIB_INMCASTPKTS),
 	SNMP_MIB_ITEM("Ip6OutMcastPkts", IPSTATS_MIB_OUTMCASTPKTS),
+	SNMP_MIB_ITEM("Ip6InOctets", IPSTATS_MIB_INOCTETS),
+	SNMP_MIB_ITEM("Ip6OutOctets", IPSTATS_MIB_OUTOCTETS),
+	SNMP_MIB_ITEM("Ip6InMcastOctets", IPSTATS_MIB_INMCASTOCTETS),
+	SNMP_MIB_ITEM("Ip6OutMcastOctets", IPSTATS_MIB_OUTMCASTOCTETS),
+	SNMP_MIB_ITEM("Ip6InBcastOctets", IPSTATS_MIB_INBCASTOCTETS),
+	SNMP_MIB_ITEM("Ip6OutBcastOctets", IPSTATS_MIB_OUTBCASTOCTETS),
 	SNMP_MIB_SENTINEL
 };
 
diff -up linux-2.6.29.noarch/net/ipv6/raw.c.orig linux-2.6.29.noarch/net/ipv6/raw.c
--- linux-2.6.29.noarch/net/ipv6/raw.c.orig	2009-03-23 19:12:14.000000000 -0400
+++ linux-2.6.29.noarch/net/ipv6/raw.c	2009-04-27 10:15:53.000000000 -0400
@@ -638,7 +638,7 @@ static int rawv6_send_hdrinc(struct sock
 	if (err)
 		goto error_fault;
 
-	IP6_INC_STATS(sock_net(sk), rt->rt6i_idev, IPSTATS_MIB_OUTREQUESTS);
+	IP6_UPD_PO_STATS(sock_net(sk), rt->rt6i_idev, IPSTATS_MIB_OUT, skb->len);
 	err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, rt->u.dst.dev,
 		      dst_output);
 	if (err > 0)

linux-2.6-v4l-dvb-update.patch:
 smssdio.c |  354 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 354 insertions(+)

Index: linux-2.6-v4l-dvb-update.patch
===================================================================
RCS file: linux-2.6-v4l-dvb-update.patch
diff -N linux-2.6-v4l-dvb-update.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-v4l-dvb-update.patch	25 Jul 2009 04:09:29 -0000	1.16
@@ -0,0 +1,366 @@
+Mauro Carvalho Chehab (1):
+      Merge branch 'next' of ../devel into Fedora
+
+Uri Shkolnik (1):
+      V4L/DVB (11241): Siano: SDIO interface driver - remove two redundant lines
+
+diff --git a/linux/drivers/media/dvb/siano/smssdio.c b/linux/drivers/media/dvb/siano/smssdio.c
+new file mode 100644
+index 0000000..4f8fa59
+--- /dev/null
++++ b/linux/drivers/media/dvb/siano/smssdio.c
+@@ -0,0 +1,354 @@
++/*
++ *  smssdio.c - Siano 1xxx SDIO interface driver
++ *
++ *  Copyright 2008 Pierre Ossman
++ *
++ * Based on code by Siano Mobile Silicon, Inc.,
++ * Copyright (C) 2006-2008, Uri Shkolnik
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or (at
++ * your option) any later version.
++ *
++ *
++ * This hardware is a bit odd in that all transfers should be done
++ * to/from the SMSSDIO_DATA register, yet the "increase address" bit
++ * always needs to be set.
++ *
++ * Also, buffers from the card are always aligned to 128 byte
++ * boundaries.
++ */
++
++/*
++ * General cleanup notes:
++ *
++ * - only typedefs should be name *_t
++ *
++ * - use ERR_PTR and friends for smscore_register_device()
++ *
++ * - smscore_getbuffer should zero fields
++ *
++ * Fix stop command
++ */
++
++#include <linux/moduleparam.h>
++#include <linux/firmware.h>
++#include <linux/delay.h>
++#include <linux/mmc/card.h>
++#include <linux/mmc/sdio_func.h>
++#include <linux/mmc/sdio_ids.h>
++
++#include "smscoreapi.h"
++#include "sms-cards.h"
++
++/* Registers */
++
++#define SMSSDIO_DATA		0x00
++#define SMSSDIO_INT		0x04
++
++static const struct sdio_device_id smssdio_ids[] = {
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_STELLAR),
++	 .driver_data = SMS1XXX_BOARD_SIANO_STELLAR},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_NOVA_A0),
++	 .driver_data = SMS1XXX_BOARD_SIANO_NOVA_A},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_NOVA_B0),
++	 .driver_data = SMS1XXX_BOARD_SIANO_NOVA_B},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_VEGA_A0),
++	 .driver_data = SMS1XXX_BOARD_SIANO_VEGA},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_VENICE),
++	 .driver_data = SMS1XXX_BOARD_SIANO_VEGA},
++	{ /* end: all zeroes */ },
++};
++
++MODULE_DEVICE_TABLE(sdio, smssdio_ids);
++
++struct smssdio_device {
++	struct sdio_func *func;
++
++	struct smscore_device_t *coredev;
++
++	struct smscore_buffer_t *split_cb;
++};
++
++/*******************************************************************/
++/* Siano core callbacks                                            */
++/*******************************************************************/
++
++static int smssdio_sendrequest(void *context, void *buffer, size_t size)
++{
++	int ret;
++	struct smssdio_device *smsdev;
++
++	smsdev = context;
++
++	sdio_claim_host(smsdev->func);
++
++	while (size >= smsdev->func->cur_blksize) {
++		ret = sdio_write_blocks(smsdev->func, SMSSDIO_DATA, buffer, 1);
++		if (ret)
++			goto out;
++
++		buffer += smsdev->func->cur_blksize;
++		size -= smsdev->func->cur_blksize;
++	}
++
++	if (size) {
++		ret = sdio_write_bytes(smsdev->func, SMSSDIO_DATA,
++				       buffer, size);
++	}
++
++out:
++	sdio_release_host(smsdev->func);
++
++	return ret;
++}
++
++/*******************************************************************/
++/* SDIO callbacks                                                  */
++/*******************************************************************/
++
++static void smssdio_interrupt(struct sdio_func *func)
++{
++	int ret, isr;
++
++	struct smssdio_device *smsdev;
++	struct smscore_buffer_t *cb;
++	struct SmsMsgHdr_ST *hdr;
++	size_t size;
++
++	smsdev = sdio_get_drvdata(func);
++
++	/*
++	 * The interrupt register has no defined meaning. It is just
++	 * a way of turning of the level triggered interrupt.
++	 */
++	isr = sdio_readb(func, SMSSDIO_INT, &ret);
++	if (ret) {
++		dev_err(&smsdev->func->dev,
++			"Unable to read interrupt register!\n");
++		return;
++	}
++
++	if (smsdev->split_cb == NULL) {
++		cb = smscore_getbuffer(smsdev->coredev);
++		if (!cb) {
++			dev_err(&smsdev->func->dev,
++				"Unable to allocate data buffer!\n");
++			return;
++		}
++
++		ret = sdio_read_blocks(smsdev->func, cb->p, SMSSDIO_DATA, 1);
++		if (ret) {
++			dev_err(&smsdev->func->dev,
++				"Error %d reading initial block!\n", ret);
++			return;
++		}
++
++		hdr = cb->p;
++
++		if (hdr->msgFlags & MSG_HDR_FLAG_SPLIT_MSG) {
++			smsdev->split_cb = cb;
++			return;
++		}
++
++		size = hdr->msgLength - smsdev->func->cur_blksize;
++	} else {
++		cb = smsdev->split_cb;
++		hdr = cb->p;
++
++		size = hdr->msgLength - sizeof(struct SmsMsgHdr_ST);
++
++		smsdev->split_cb = NULL;
++	}
++
++	if (hdr->msgLength > smsdev->func->cur_blksize) {
++		void *buffer;
++
++		size = ALIGN(size, 128);
++		buffer = cb->p + hdr->msgLength;
++
++		BUG_ON(smsdev->func->cur_blksize != 128);
++
++		/*
++		 * First attempt to transfer all of it in one go...
++		 */
++		ret = sdio_read_blocks(smsdev->func, buffer,
++				       SMSSDIO_DATA, size / 128);
++		if (ret && ret != -EINVAL) {
++			smscore_putbuffer(smsdev->coredev, cb);
++			dev_err(&smsdev->func->dev,
++				"Error %d reading data from card!\n", ret);
++			return;
++		}
++
++		/*
++		 * ..then fall back to one block at a time if that is
++		 * not possible...
++		 *
++		 * (we have to do this manually because of the
++		 * problem with the "increase address" bit)
++		 */
++		if (ret == -EINVAL) {
++			while (size) {
++				ret = sdio_read_blocks(smsdev->func,
++						       buffer, SMSSDIO_DATA, 1);
++				if (ret) {
++					smscore_putbuffer(smsdev->coredev, cb);
++					dev_err(&smsdev->func->dev,
++						"Error %d reading "
++						"data from card!\n", ret);
++					return;
++				}
++
++				buffer += smsdev->func->cur_blksize;
++				if (size > smsdev->func->cur_blksize)
++					size -= smsdev->func->cur_blksize;
++				else
++					size = 0;
++			}
++		}
++	}
++
++	cb->size = hdr->msgLength;
++	cb->offset = 0;
++
++	smscore_onresponse(smsdev->coredev, cb);
++}
++
++static int smssdio_probe(struct sdio_func *func,
++			 const struct sdio_device_id *id)
++{
++	int ret;
++
++	int board_id;
++	struct smssdio_device *smsdev;
++	struct smsdevice_params_t params;
++
++	board_id = id->driver_data;
++
++	smsdev = kzalloc(sizeof(struct smssdio_device), GFP_KERNEL);
++	if (!smsdev)
++		return -ENOMEM;
++
++	smsdev->func = func;
++
++	memset(&params, 0, sizeof(struct smsdevice_params_t));
++
++	params.device = &func->dev;
++	params.buffer_size = 0x5000;	/* ?? */
++	params.num_buffers = 22;	/* ?? */
++	params.context = smsdev;
++
++	snprintf(params.devpath, sizeof(params.devpath),
++		 "sdio\\%s", sdio_func_id(func));
++
++	params.sendrequest_handler = smssdio_sendrequest;
++
++	params.device_type = sms_get_board(board_id)->type;
++
++	if (params.device_type != SMS_STELLAR)
++		params.flags |= SMS_DEVICE_FAMILY2;
++	else {
++		/*
++		 * FIXME: Stellar needs special handling...
++		 */
++		ret = -ENODEV;
++		goto free;
++	}
++
++	ret = smscore_register_device(&params, &smsdev->coredev);
++	if (ret < 0)
++		goto free;
++
++	smscore_set_board_id(smsdev->coredev, board_id);
++
++	sdio_claim_host(func);
++
++	ret = sdio_enable_func(func);
++	if (ret)
++		goto release;
++
++	ret = sdio_set_block_size(func, 128);
++	if (ret)
++		goto disable;
++
++	ret = sdio_claim_irq(func, smssdio_interrupt);
++	if (ret)
++		goto disable;
++
++	sdio_set_drvdata(func, smsdev);
++
++	sdio_release_host(func);
++
++	ret = smscore_start_device(smsdev->coredev);
++	if (ret < 0)
++		goto reclaim;
++
++	return 0;
++
++reclaim:
++	sdio_claim_host(func);
++	sdio_release_irq(func);
++disable:
++	sdio_disable_func(func);
++release:
++	sdio_release_host(func);
++	smscore_unregister_device(smsdev->coredev);
++free:
++	kfree(smsdev);
++
++	return ret;
++}
++
++static void smssdio_remove(struct sdio_func *func)
++{
++	struct smssdio_device *smsdev;
++
++	smsdev = sdio_get_drvdata(func);
++
++	/* FIXME: racy! */
++	if (smsdev->split_cb)
++		smscore_putbuffer(smsdev->coredev, smsdev->split_cb);
++
++	smscore_unregister_device(smsdev->coredev);
++
++	sdio_claim_host(func);
++	sdio_release_irq(func);
++	sdio_disable_func(func);
++	sdio_release_host(func);
++
++	kfree(smsdev);
++}
++
++static struct sdio_driver smssdio_driver = {
++	.name = "smssdio",
++	.id_table = smssdio_ids,
++	.probe = smssdio_probe,
++	.remove = smssdio_remove,
++};
++
++/*******************************************************************/
++/* Module functions                                                */
++/*******************************************************************/
++
++int smssdio_register(void)
++{
++	int ret = 0;
++
++	printk(KERN_INFO "smssdio: Siano SMS1xxx SDIO driver\n");
++	printk(KERN_INFO "smssdio: Copyright Pierre Ossman\n");
++
++	ret = sdio_register_driver(&smssdio_driver);
++
++	return ret;
++}
++
++void smssdio_unregister(void)
++{
++	sdio_unregister_driver(&smssdio_driver);
++}
++
++MODULE_DESCRIPTION("Siano SMS1xxx SDIO driver");
++MODULE_AUTHOR("Pierre Ossman");
++MODULE_LICENSE("GPL");

via-padlock-10-enable-64bit.patch:
 Kconfig       |    2 +-
 padlock-aes.c |   13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

--- NEW FILE via-padlock-10-enable-64bit.patch ---
From: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
Date: Tue, 21 Apr 2009 06:14:37 +0000 (+0800)
Subject: crypto: padlock - Enable on x86_64
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fherbert%2Fcryptodev-2.6.git;a=commitdiff_plain;h=d1c8b0a7692e81b46550bcc493465ed10510cd33

crypto: padlock - Enable on x86_64

Almost everything stays the same, we need just to use the extended registers
on the bit variant.

Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
---

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 01afd75..39eedd4 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -12,7 +12,7 @@ if CRYPTO_HW
 
 config CRYPTO_DEV_PADLOCK
 	tristate "Support for VIA PadLock ACE"
-	depends on X86_32 && !UML
+	depends on !UML
 	select CRYPTO_ALGAPI
 	help
 	  Some VIA processors come with an integrated crypto engine
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
index 856b3cc..87f92c3 100644
--- a/drivers/crypto/padlock-aes.c
+++ b/drivers/crypto/padlock-aes.c
@@ -154,7 +154,11 @@ static inline void padlock_reset_key(struct cword *cword)
 	int cpu = raw_smp_processor_id();
 
 	if (cword != per_cpu(last_cword, cpu))
+#ifndef CONFIG_X86_64
 		asm volatile ("pushfl; popfl");
+#else
+		asm volatile ("pushfq; popfq");
+#endif
 }
 
 static inline void padlock_store_cword(struct cword *cword)
@@ -208,10 +212,19 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key,
 
 	asm volatile ("test $1, %%cl;"
 		      "je 1f;"
+#ifndef CONFIG_X86_64
 		      "lea -1(%%ecx), %%eax;"
 		      "mov $1, %%ecx;"
+#else
+		      "lea -1(%%rcx), %%rax;"
+		      "mov $1, %%rcx;"
+#endif
 		      ".byte 0xf3,0x0f,0xa7,0xc8;"	/* rep xcryptecb */
+#ifndef CONFIG_X86_64
 		      "mov %%eax, %%ecx;"
+#else
+		      "mov %%rax, %%rcx;"
+#endif
 		      "1:"
 		      ".byte 0xf3,0x0f,0xa7,0xc8"	/* rep xcryptecb */
 		      : "+S"(input), "+D"(output)

via-padlock-20-add-x86-dependency.patch:
 Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE via-padlock-20-add-x86-dependency.patch ---
From: Herbert Xu <herbert at gondor.apana.org.au>
Date: Wed, 22 Apr 2009 05:00:15 +0000 (+0800)
Subject: crypto: padlock - Restore dependency on x86
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fherbert%2Fcryptodev-2.6.git;a=commitdiff_plain;h=2f8174187f409213e63c3589af163c627e8a182a

crypto: padlock - Restore dependency on x86

When we added 64-bit support to padlock the dependency on x86
was lost.  This causes build failures on non-x86 architectures.

Reported-by: Stephen Rothwell <sfr at canb.auug.org.au>
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
---

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 39eedd4..e748e55 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -12,7 +12,7 @@ if CRYPTO_HW
 
 config CRYPTO_DEV_PADLOCK
 	tristate "Support for VIA PadLock ACE"
-	depends on !UML
+	depends on X86 && !UML
 	select CRYPTO_ALGAPI
 	help
 	  Some VIA processors come with an integrated crypto engine

via-padlock-30-fix-might-sleep.patch:
 i387.h |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- NEW FILE via-padlock-30-fix-might-sleep.patch ---
x86: clear TS in irq_ts_save() when in atomic

The dynamic FPU context allocation changes caused the padlock driver
to generate the below warning. Fix it by masking TS when doing padlock
encryption operations in an atomic section.

BUG: sleeping function called from invalid context at mm/slub.c:1602
in_atomic(): 1, irqs_disabled(): 0, pid: 82, name: cryptomgr_test
Pid: 82, comm: cryptomgr_test Not tainted 2.6.29.4-168.test7.fc11.x86_64 #1
Call Trace:
[<ffffffff8103ff16>] __might_sleep+0x10b/0x110
[<ffffffff810cd3b2>] kmem_cache_alloc+0x37/0xf1
[<ffffffff81018505>] init_fpu+0x49/0x8a
[<ffffffff81012a83>] math_state_restore+0x3e/0xbc
[<ffffffff813ac6d0>] do_device_not_available+0x9/0xb
[<ffffffff810123ab>] device_not_available+0x1b/0x20
[<ffffffffa001c066>] ? aes_crypt+0x66/0x74 [padlock_aes]
[<ffffffff8119a51a>] ? blkcipher_walk_next+0x257/0x2e0
[<ffffffff8119a731>] ? blkcipher_walk_first+0x18e/0x19d
[<ffffffffa001c1fe>] aes_encrypt+0x9d/0xe5 [padlock_aes]
[<ffffffffa0027253>] crypt+0x6b/0x114 [xts]
[<ffffffffa001c161>] ? aes_encrypt+0x0/0xe5 [padlock_aes]
[<ffffffffa001c161>] ? aes_encrypt+0x0/0xe5 [padlock_aes]
[<ffffffffa0027390>] encrypt+0x49/0x4b [xts]
[<ffffffff81199acc>] async_encrypt+0x3c/0x3e
[<ffffffff8119dafc>] test_skcipher+0x1da/0x658
[<ffffffff811979c3>] ? crypto_spawn_tfm+0x8e/0xb1
[<ffffffff8119672d>] ? __crypto_alloc_tfm+0x11b/0x15f
[<ffffffff811979c3>] ? crypto_spawn_tfm+0x8e/0xb1
[<ffffffff81199dbe>] ? skcipher_geniv_init+0x2b/0x47
[<ffffffff8119a905>] ? async_chainiv_init+0x5c/0x61
[<ffffffff8119dfdd>] alg_test_skcipher+0x63/0x9b
[<ffffffff8119e1bc>] alg_test+0x12d/0x175
[<ffffffff8119c488>] cryptomgr_test+0x38/0x54
[<ffffffff8119c450>] ? cryptomgr_test+0x0/0x54
[<ffffffff8105c6c9>] kthread+0x4d/0x78
[<ffffffff8101264a>] child_rip+0xa/0x20
[<ffffffff81011f67>] ? restore_args+0x0/0x30
[<ffffffff8105c67c>] ? kthread+0x0/0x78
[<ffffffff81012640>] ? child_rip+0x0/0x20

Signed-off-by: Chuck Ebbert <cebbert at redhat.com>

--- work-2.6.29.4.orig/arch/x86/include/asm/i387.h
+++ work-2.6.29.4/arch/x86/include/asm/i387.h
@@ -305,18 +305,18 @@ static inline void kernel_fpu_end(void)
 /*
  * Some instructions like VIA's padlock instructions generate a spurious
  * DNA fault but don't modify SSE registers. And these instructions
- * get used from interrupt context aswell. To prevent these kernel instructions
- * in interrupt context interact wrongly with other user/kernel fpu usage, we
+ * get used from interrupt context as well. To prevent these kernel instructions
+ * in interrupt context interacting wrongly with other user/kernel fpu usage, we
  * should use them only in the context of irq_ts_save/restore()
  */
 static inline int irq_ts_save(void)
 {
 	/*
-	 * If we are in process context, we are ok to take a spurious DNA fault.
-	 * Otherwise, doing clts() in process context require pre-emption to
-	 * be disabled or some heavy lifting like kernel_fpu_begin()
+	 * If in process context and not atomic, we can take a spurious DNA fault.
+	 * Otherwise, doing clts() in process context requires disabling preemption
+	 * or some heavy lifting like kernel_fpu_begin()
 	 */
-	if (!in_interrupt())
+	if (!in_atomic() && !in_interrupt())
 		return 0;
 
 	if (read_cr0() & X86_CR0_TS) {

via-padlock-40-nano-ecb.patch:
 padlock-aes.c |   81 ++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 46 insertions(+), 35 deletions(-)

--- NEW FILE via-padlock-40-nano-ecb.patch ---
From: Chuck Ebbert <cebbert at redhat.com>
crypto: padlock-aes: work around Nano CPU errata in ECB mode

The VIA Nano processor has a bug that makes it prefetch extra data
during encryption operations, causing spurious page faults. Extend
existing workarounds for ECB mode to copy the data to an temporary
buffer to avoid the problem.

Signed-off-by: Chuck Ebbert <cebbert at redhat.com>

--- work-2.6.29.4.orig/drivers/crypto/padlock-aes.c
+++ work-2.6.29.4/drivers/crypto/padlock-aes.c
@@ -18,9 +18,17 @@
 #include <linux/percpu.h>
 #include <linux/smp.h>
 #include <asm/byteorder.h>
+#include <asm/processor.h>
 #include <asm/i387.h>
 #include "padlock.h"
 
+/* number of data blocks actually fetched for each xcrypt insn */
+static unsigned int ecb_fetch_blocks = 2;
+static unsigned int cbc_fetch_blocks = 1;
+
+#define ecb_fetch_bytes (ecb_fetch_blocks * AES_BLOCK_SIZE)
+#define cbc_fetch_bytes (cbc_fetch_blocks * AES_BLOCK_SIZE)
+
 /* Control word. */
 struct cword {
 	unsigned int __attribute__ ((__packed__))
@@ -173,63 +181,59 @@ static inline void padlock_store_cword(s
  */
 
 static inline void padlock_xcrypt(const u8 *input, u8 *output, void *key,
-				  struct cword *control_word)
+				  struct cword *control_word, int count)
 {
 	asm volatile (".byte 0xf3,0x0f,0xa7,0xc8"	/* rep xcryptecb */
 		      : "+S"(input), "+D"(output)
-		      : "d"(control_word), "b"(key), "c"(1));
+		      : "d"(control_word), "b"(key), "c"(count));
 }
 
-static void aes_crypt_copy(const u8 *in, u8 *out, u32 *key, struct cword *cword)
+static void aes_crypt_copy(const u8 *in, u8 *out, u32 *key,
+			   struct cword *cword, int count)
 {
-	u8 buf[AES_BLOCK_SIZE * 2 + PADLOCK_ALIGNMENT - 1];
+	/*
+	 * Padlock prefetches extra data so we must provide mapped input buffers.
+	 * Assume there are at least 16 bytes of stack already in use.
+	 */
+	u8 buf[AES_BLOCK_SIZE * 7 + PADLOCK_ALIGNMENT - 1];
 	u8 *tmp = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT);
 
-	memcpy(tmp, in, AES_BLOCK_SIZE);
-	padlock_xcrypt(tmp, out, key, cword);
+	memcpy(tmp, in, count * AES_BLOCK_SIZE);
+	padlock_xcrypt(tmp, out, key, cword, count);
 }
 
 static inline void aes_crypt(const u8 *in, u8 *out, u32 *key,
-			     struct cword *cword)
+			     struct cword *cword, int count)
 {
-	/* padlock_xcrypt requires at least two blocks of data. */
-	if (unlikely(!(((unsigned long)in ^ (PAGE_SIZE - AES_BLOCK_SIZE)) &
-		       (PAGE_SIZE - 1)))) {
-		aes_crypt_copy(in, out, key, cword);
+	/* Padlock in ECB mode fetches at least ecb_fetch_bytes of data.
+	 * We could avoid some copying here but it's probably not worth it.
+	 */
+	if (unlikely(((unsigned long)in & PAGE_SIZE) + ecb_fetch_bytes > PAGE_SIZE)) {
+		aes_crypt_copy(in, out, key, cword, count);
 		return;
 	}
 
-	padlock_xcrypt(in, out, key, cword);
+	padlock_xcrypt(in, out, key, cword, count);
 }
 
 static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key,
 				      void *control_word, u32 count)
 {
-	if (count == 1) {
-		aes_crypt(input, output, key, control_word);
+	u32 initial = count & (ecb_fetch_blocks - 1);
+
+	if (count < ecb_fetch_blocks) {
+		aes_crypt(input, output, key, control_word, count);
 		return;
 	}
 
-	asm volatile ("test $1, %%cl;"
-		      "je 1f;"
-#ifndef CONFIG_X86_64
-		      "lea -1(%%ecx), %%eax;"
-		      "mov $1, %%ecx;"
-#else
-		      "lea -1(%%rcx), %%rax;"
-		      "mov $1, %%rcx;"
-#endif
-		      ".byte 0xf3,0x0f,0xa7,0xc8;"	/* rep xcryptecb */
-#ifndef CONFIG_X86_64
-		      "mov %%eax, %%ecx;"
-#else
-		      "mov %%rax, %%rcx;"
-#endif
-		      "1:"
-		      ".byte 0xf3,0x0f,0xa7,0xc8"	/* rep xcryptecb */
+	if (initial)
+		asm volatile (".byte 0xf3,0x0f,0xa7,0xc8"	/* rep xcryptecb */
+			      : "+S"(input), "+D"(output)
+			      : "d"(control_word), "b"(key), "c"(initial));
+
+	asm volatile (".byte 0xf3,0x0f,0xa7,0xc8"	/* rep xcryptecb */
 		      : "+S"(input), "+D"(output)
-		      : "d"(control_word), "b"(key), "c"(count)
-		      : "ax");
+		      : "d"(control_word), "b"(key), "c"(count - initial));
 }
 
 static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
@@ -249,7 +253,7 @@ static void aes_encrypt(struct crypto_tf
 
 	padlock_reset_key(&ctx->cword.encrypt);
 	ts_state = irq_ts_save();
-	aes_crypt(in, out, ctx->E, &ctx->cword.encrypt);
+	aes_crypt(in, out, ctx->E, &ctx->cword.encrypt, 1);
 	irq_ts_restore(ts_state);
 	padlock_store_cword(&ctx->cword.encrypt);
 }
@@ -261,7 +265,7 @@ static void aes_decrypt(struct crypto_tf
 
 	padlock_reset_key(&ctx->cword.encrypt);
 	ts_state = irq_ts_save();
-	aes_crypt(in, out, ctx->D, &ctx->cword.decrypt);
+	aes_crypt(in, out, ctx->D, &ctx->cword.decrypt, 1);
 	irq_ts_restore(ts_state);
 	padlock_store_cword(&ctx->cword.encrypt);
 }
@@ -454,6 +458,7 @@ static struct crypto_alg cbc_aes_alg = {
 static int __init padlock_init(void)
 {
 	int ret;
+	struct cpuinfo_x86 *c = &cpu_data(0);
 
 	if (!cpu_has_xcrypt) {
 		printk(KERN_NOTICE PFX "VIA PadLock not detected.\n");
@@ -476,6 +481,12 @@ static int __init padlock_init(void)
 
 	printk(KERN_NOTICE PFX "Using VIA PadLock ACE for AES algorithm.\n");
 
+	if (c->x86 == 6 && c->x86_model == 15 && c->x86_mask == 2) {
+		ecb_fetch_blocks = 8;
+		cbc_fetch_blocks = 4; /* NOTE: notused */
+		printk(KERN_NOTICE PFX "VIA Nano stepping 2 detected: enabling workaround.\n");
+	}
+
 out:
 	return ret;
 

via-padlock-50-nano-cbc.patch:
 padlock-aes.c |   83 +++++++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 65 insertions(+), 18 deletions(-)

--- NEW FILE via-padlock-50-nano-cbc.patch ---
From: Chuck Ebbert <cebbert at redhat.com>
crypto: padlock-aes: work around Nano CPU errata in CBC mode

Extend previous workarounds for the prefetch bug to cover CBC mode,
clean up the code a bit.

Signed-off-by: Chuck Ebbert <cebbert at redhat.com>

--- work-2.6.29.4.orig/drivers/crypto/padlock-aes.c
+++ work-2.6.29.4/drivers/crypto/padlock-aes.c
@@ -22,11 +22,16 @@
 #include <asm/i387.h>
 #include "padlock.h"
 
-/* number of data blocks actually fetched for each xcrypt insn */
+/*
+ * Number of data blocks actually fetched for each xcrypt insn.
+ * Processors with prefetch errata will fetch extra blocks.
+ */
 static unsigned int ecb_fetch_blocks = 2;
-static unsigned int cbc_fetch_blocks = 1;
-
+#define MAX_ECB_FETCH_BLOCKS (8)
 #define ecb_fetch_bytes (ecb_fetch_blocks * AES_BLOCK_SIZE)
+
+static unsigned int cbc_fetch_blocks = 1;
+#define MAX_CBC_FETCH_BLOCKS (4)
 #define cbc_fetch_bytes (cbc_fetch_blocks * AES_BLOCK_SIZE)
 
 /* Control word. */
@@ -176,7 +181,7 @@ static inline void padlock_store_cword(s
  * should be used only inside the irq_ts_save/restore() context
  */
 
-static inline void padlock_xcrypt(const u8 *input, u8 *output, void *key,
+static inline void rep_xcrypt_ecb(const u8 *input, u8 *output, void *key,
 				  struct cword *control_word, int count)
 {
 	asm volatile (".byte 0xf3,0x0f,0xa7,0xc8"	/* rep xcryptecb */
@@ -184,32 +189,65 @@ static inline void padlock_xcrypt(const 
 		      : "d"(control_word), "b"(key), "c"(count));
 }
 
-static void aes_crypt_copy(const u8 *in, u8 *out, u32 *key,
+static inline u8 *rep_xcrypt_cbc(const u8 *input, u8 *output, void *key,
+				 u8 *iv, struct cword *control_word, int count)
+{
+	asm volatile (".byte 0xf3,0x0f,0xa7,0xd0"	/* rep xcryptcbc */
+		      : "+S" (input), "+D" (output), "+a" (iv)
+		      : "d" (control_word), "b" (key), "c" (count));
+	return iv;
+}
+
+static void ecb_crypt_copy(const u8 *in, u8 *out, u32 *key,
 			   struct cword *cword, int count)
 {
 	/*
 	 * Padlock prefetches extra data so we must provide mapped input buffers.
 	 * Assume there are at least 16 bytes of stack already in use.
 	 */
-	u8 buf[AES_BLOCK_SIZE * 7 + PADLOCK_ALIGNMENT - 1];
+	u8 buf[AES_BLOCK_SIZE * (MAX_ECB_FETCH_BLOCKS - 1) + PADLOCK_ALIGNMENT - 1];
 	u8 *tmp = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT);
 
 	memcpy(tmp, in, count * AES_BLOCK_SIZE);
-	padlock_xcrypt(tmp, out, key, cword, count);
+	rep_xcrypt_ecb(tmp, out, key, cword, count);
 }
 
-static inline void aes_crypt(const u8 *in, u8 *out, u32 *key,
+static u8 *cbc_crypt_copy(const u8 *in, u8 *out, u32 *key,
+			   u8 *iv, struct cword *cword, int count)
+{
+	/*
+	 * Padlock prefetches extra data so we must provide mapped input buffers.
+	 * Assume there are at least 16 bytes of stack already in use.
+	 */
+	u8 buf[AES_BLOCK_SIZE * (MAX_CBC_FETCH_BLOCKS - 1) + PADLOCK_ALIGNMENT - 1];
+	u8 *tmp = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT);
+
+	memcpy(tmp, in, count * AES_BLOCK_SIZE);
+	return rep_xcrypt_cbc(tmp, out, key, iv, cword, count);
+}
+
+static inline void ecb_crypt(const u8 *in, u8 *out, u32 *key,
 			     struct cword *cword, int count)
 {
 	/* Padlock in ECB mode fetches at least ecb_fetch_bytes of data.
 	 * We could avoid some copying here but it's probably not worth it.
 	 */
 	if (unlikely(((unsigned long)in & PAGE_SIZE) + ecb_fetch_bytes > PAGE_SIZE)) {
-		aes_crypt_copy(in, out, key, cword, count);
+		ecb_crypt_copy(in, out, key, cword, count);
 		return;
 	}
 
-	padlock_xcrypt(in, out, key, cword, count);
+	rep_xcrypt_ecb(in, out, key, cword, count);
+}
+
+static inline u8 *cbc_crypt(const u8 *in, u8 *out, u32 *key,
+			    u8 *iv, struct cword *cword, int count)
+{
+	/* Padlock in CBC mode fetches at least cbc_fetch_bytes of data. */
+	if (unlikely(((unsigned long)in & PAGE_SIZE) + cbc_fetch_bytes > PAGE_SIZE))
+		return cbc_crypt_copy(in, out, key, iv, cword, count);
+
+	return rep_xcrypt_cbc(in, out, key, iv, cword, count);
 }
 
 static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key,
@@ -218,7 +256,7 @@ static inline void padlock_xcrypt_ecb(co
 	u32 initial = count & (ecb_fetch_blocks - 1);
 
 	if (count < ecb_fetch_blocks) {
-		aes_crypt(input, output, key, control_word, count);
+		ecb_crypt(input, output, key, control_word, count);
 		return;
 	}
 
@@ -235,10 +273,19 @@ static inline void padlock_xcrypt_ecb(co
 static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
 				     u8 *iv, void *control_word, u32 count)
 {
-	/* rep xcryptcbc */
-	asm volatile (".byte 0xf3,0x0f,0xa7,0xd0"
+	u32 initial = count & (cbc_fetch_blocks - 1);
+
+	if (count < cbc_fetch_blocks)
+		return cbc_crypt(input, output, key, iv, control_word, count);
+
+	if (initial)
+		asm volatile (".byte 0xf3,0x0f,0xa7,0xd0"	/* rep xcryptcbc */
+			      : "+S" (input), "+D" (output), "+a" (iv)
+			      : "d" (control_word), "b" (key), "c" (count));
+
+	asm volatile (".byte 0xf3,0x0f,0xa7,0xd0"	/* rep xcryptcbc */
 		      : "+S" (input), "+D" (output), "+a" (iv)
-		      : "d" (control_word), "b" (key), "c" (count));
+		      : "d" (control_word), "b" (key), "c" (count-initial));
 	return iv;
 }
 
@@ -249,7 +296,7 @@ static void aes_encrypt(struct crypto_tf
 
 	padlock_reset_key(&ctx->cword.encrypt);
 	ts_state = irq_ts_save();
-	aes_crypt(in, out, ctx->E, &ctx->cword.encrypt, 1);
+	ecb_crypt(in, out, ctx->E, &ctx->cword.encrypt, 1);
 	irq_ts_restore(ts_state);
 	padlock_store_cword(&ctx->cword.encrypt);
 }
@@ -261,7 +308,7 @@ static void aes_decrypt(struct crypto_tf
 
 	padlock_reset_key(&ctx->cword.encrypt);
 	ts_state = irq_ts_save();
-	aes_crypt(in, out, ctx->D, &ctx->cword.decrypt, 1);
+	ecb_crypt(in, out, ctx->D, &ctx->cword.decrypt, 1);
 	irq_ts_restore(ts_state);
 	padlock_store_cword(&ctx->cword.encrypt);
 }
@@ -478,8 +525,8 @@ static int __init padlock_init(void)
 	printk(KERN_NOTICE PFX "Using VIA PadLock ACE for AES algorithm.\n");
 
 	if (c->x86 == 6 && c->x86_model == 15 && c->x86_mask == 2) {
-		ecb_fetch_blocks = 8;
-		cbc_fetch_blocks = 4; /* NOTE: notused */
+		ecb_fetch_blocks = MAX_ECB_FETCH_BLOCKS;
+		cbc_fetch_blocks = MAX_CBC_FETCH_BLOCKS;
 		printk(KERN_NOTICE PFX "VIA Nano stepping 2 detected: enabling workaround.\n");
 	}
 

via-rng-enable-64bit.patch:
 Kconfig   |    2 +-
 via-rng.c |   15 ++++++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

--- NEW FILE via-rng-enable-64bit.patch ---
Applying patch ../patches/1-linux-2.6-via.git-335095425dbd81b324a3048deab95c7616c79ae8.patch

Applying patch ../patches/2-linux-2.6-via.git-fe96668d06398ede62535739fb9483853bd29b35.patch

Applying patch ../patches/3-linux-2.6-via.git-1507086e4223df7d5e1cc38596930b17293f3daf.patch

Applying patch ../patches/4-linux-2.6-via.git-e4839e519ba71cba2c6d8c8a90db830a3c4298de.patch

--- work-2.6.29.4.orig/drivers/char/hw_random/via-rng.c
+++ work-2.6.29.4/drivers/char/hw_random/via-rng.c
@@ -132,6 +132,19 @@ static int via_rng_init(struct hwrng *rn
 	struct cpuinfo_x86 *c = &cpu_data(0);
 	u32 lo, hi, old_lo;
 
+	/* VIA Nano CPUs don't have the MSR_VIA_RNG anymore.  The RNG
+	 * is always enabled if CPUID rng_en is set.  There is no
+	 * RNG configuration like it used to be the case in this
+	 * register */
+	if ((c->x86 == 6) && (c->x86_model >= 0x0f)) {
+		if (!cpu_has_xstore_enabled) {
+			printk(KERN_ERR PFX "can't enable hardware RNG "
+				"if XSTORE is not enabled\n");
+			return -ENODEV;
+		}
+		return 0;
+	}
+
 	/* Control the RNG via MSR.  Tread lightly and pay very close
 	 * close attention to values written, as the reserved fields
 	 * are documented to be "undefined and unpredictable"; but it
@@ -205,5 +218,5 @@ static void __exit mod_exit(void)
 module_init(mod_init);
 module_exit(mod_exit);
 
-MODULE_DESCRIPTION("H/W RNG driver for VIA chipsets");
+MODULE_DESCRIPTION("H/W RNG driver for VIA CPU with PadLock");
 MODULE_LICENSE("GPL");
--- work-2.6.29.4.orig/drivers/char/hw_random/Kconfig
+++ work-2.6.29.4/drivers/char/hw_random/Kconfig
@@ -74,7 +74,7 @@ config HW_RANDOM_N2RNG
 
 config HW_RANDOM_VIA
 	tristate "VIA HW Random Number Generator support"
-	depends on HW_RANDOM && X86_32
+	depends on HW_RANDOM && X86
 	default HW_RANDOM
 	---help---
 	  This driver provides kernel-side support for the Random Number

agp-set_memory_ucwb.patch:
 b/drivers/char/agp/generic.c                        |   14 ++++++++++++--
 linux-2.6.28.noarch/drivers/gpu/drm/i915/i915_dma.c |    2 +-
 2 files changed, 13 insertions(+), 3 deletions(-)

Index: agp-set_memory_ucwb.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/agp-set_memory_ucwb.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- agp-set_memory_ucwb.patch	20 May 2009 13:51:37 -0000	1.2
+++ agp-set_memory_ucwb.patch	25 Jul 2009 04:09:15 -0000	1.3
@@ -52,3 +52,15 @@ index 97e8b41..aeeaf68 100644
  		page = virt_to_page(addr);
  
  #ifndef CONFIG_X86
+diff -up linux-2.6.28.noarch/drivers/gpu/drm/i915/i915_dma.c.dma linux-2.6.28.noarch/drivers/gpu/drm/i915/i915_dma.c
+--- linux-2.6.28.noarch/drivers/gpu/drm/i915/i915_dma.c.dma	2009-02-27 13:11:03.000000000 +1000
++++ linux-2.6.28.noarch/drivers/gpu/drm/i915/i915_dma.c	2009-02-27 13:11:11.000000000 +1000
+@@ -1104,7 +1104,7 @@ int i915_driver_load(struct drm_device *
+ 			 "performance may suffer.\n");
+ 	}
+ 
+-#ifdef CONFIG_HIGHMEM64G
++#if 0 /* Fedora has AGP workaround patch */
+ 	/* don't enable GEM on PAE - needs agp + set_memory_* interface fixes */
+ 	dev_priv->has_gem = 0;
+ #else


Index: config-arm
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/config-arm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- config-arm	25 Jul 2009 03:16:38 -0000	1.3
+++ config-arm	25 Jul 2009 04:09:16 -0000	1.4
@@ -95,3 +95,5 @@ CONFIG_RTC_DRV_PL031=m
 # CONFIG_DEBUG_LL is not set
 
 CONFIG_ARM_UNWIND=y
+
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096


Index: config-ia64-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/config-ia64-generic,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- config-ia64-generic	25 Jul 2009 03:16:38 -0000	1.25
+++ config-ia64-generic	25 Jul 2009 04:09:16 -0000	1.26
@@ -208,3 +208,5 @@ CONFIG_PARAVIRT_GUEST=y
 CONFIG_PARAVIRT=y
 
 CONFIG_DMAR_DEFAULT_ON=y
+
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096


Index: config-powerpc-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/config-powerpc-generic,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -p -r1.41 -r1.42
--- config-powerpc-generic	25 Jul 2009 03:16:38 -0000	1.41
+++ config-powerpc-generic	25 Jul 2009 04:09:16 -0000	1.42
@@ -320,3 +320,5 @@ CONFIG_DTL=y
 CONFIG_MMC_SDHCI_OF=m
 
 # CONFIG_CONSISTENT_SIZE_BOOL is not set
+
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096


Index: config-s390x
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/config-s390x,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- config-s390x	25 Jul 2009 03:16:38 -0000	1.13
+++ config-s390x	25 Jul 2009 04:09:17 -0000	1.14
@@ -218,3 +218,5 @@ CONFIG_CHSC_SCH=m
 # CONFIG_MISDN_HFCMULTI is not set
 
 CONFIG_HVC_IUCV=y
+
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096


Index: config-sparc64-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/config-sparc64-generic,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- config-sparc64-generic	25 Jul 2009 03:16:38 -0000	1.26
+++ config-sparc64-generic	25 Jul 2009 04:09:17 -0000	1.27
@@ -197,3 +197,5 @@ CONFIG_US3_MC=y
 CONFIG_SENSORS_ULTRA45=m
 CONFIG_LEDS_SUNFIRE=m
 CONFIG_TADPOLE_TS102_UCTRL=m
+
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096


Index: config-x86-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/config-x86-generic,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -p -r1.78 -r1.79
--- config-x86-generic	25 Jul 2009 03:16:38 -0000	1.78
+++ config-x86-generic	25 Jul 2009 04:09:17 -0000	1.79
@@ -461,3 +461,5 @@ CONFIG_POWER_TRACER=y
 CONFIG_HW_BRANCH_TRACER=y
 
 # CONFIG_SPARSE_IRQ is not set
+
+CONFIG_DEFAULT_MMAP_MIN_ADDR=65536


Index: config-x86_64-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/config-x86_64-generic,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -p -r1.78 -r1.79
--- config-x86_64-generic	25 Jul 2009 03:16:38 -0000	1.78
+++ config-x86_64-generic	25 Jul 2009 04:09:17 -0000	1.79
@@ -365,3 +365,5 @@ CONFIG_HW_BRANCH_TRACER=y
 CONFIG_X86_X2APIC=y
 CONFIG_SPARSE_IRQ=y
 CONFIG_NUMA_MIGRATE_IRQ_DESC=y
+
+CONFIG_DEFAULT_MMAP_MIN_ADDR=65536

drm-modesetting-radeon.patch:
 arch/x86/mm/pat.c                               |    1 
 drivers/gpu/drm/Kconfig                         |   11 
 drivers/gpu/drm/Makefile                        |    3 
 drivers/gpu/drm/ati_pcigart.c                   |  267 +
 drivers/gpu/drm/drm_agpsupport.c                |  171 
 drivers/gpu/drm/drm_bo.c                        | 2161 +++++++++
 drivers/gpu/drm/drm_bo_move.c                   |  709 +++
 drivers/gpu/drm/drm_bufs.c                      |   12 
 drivers/gpu/drm/drm_crtc.c                      |    2 
 drivers/gpu/drm/drm_crtc_helper.c               |   29 
 drivers/gpu/drm/drm_debugfs.c                   |    1 
 drivers/gpu/drm/drm_dma.c                       |    2 
 drivers/gpu/drm/drm_drv.c                       |   29 
 drivers/gpu/drm/drm_fence.c                     |  540 ++
 drivers/gpu/drm/drm_fops.c                      |    5 
 drivers/gpu/drm/drm_info.c                      |    8 
 drivers/gpu/drm/drm_memory.c                    |  107 
 drivers/gpu/drm/drm_page_alloc.c                |  171 
 drivers/gpu/drm/drm_page_alloc.h                |   33 
 drivers/gpu/drm/drm_stub.c                      |   18 
 drivers/gpu/drm/drm_ttm.c                       |  469 ++
 drivers/gpu/drm/drm_vm.c                        |  206 
 drivers/gpu/drm/i915/i915_irq.c                 |    3 
 drivers/gpu/drm/i915/intel_display.c            |   22 
 drivers/gpu/drm/radeon/Makefile                 |    6 
 drivers/gpu/drm/radeon/ObjectID.h               |  518 ++
 drivers/gpu/drm/radeon/atom-bits.h              |   48 
 drivers/gpu/drm/radeon/atom-names.h             |  100 
 drivers/gpu/drm/radeon/atom-types.h             |   42 
 drivers/gpu/drm/radeon/atom.c                   | 1141 +++++
 drivers/gpu/drm/radeon/atom.h                   |  150 
 drivers/gpu/drm/radeon/atombios.h               | 5025 ++++++++++++++++++++++
 drivers/gpu/drm/radeon/atombios_crtc.c          |  501 ++
 drivers/gpu/drm/radeon/r300_cmdbuf.c            |  164 
 drivers/gpu/drm/radeon/r300_reg.h               |  240 -
 drivers/gpu/drm/radeon/r600_cp.c                |    2 
 drivers/gpu/drm/radeon/radeon_atombios.c        | 1035 ++++
 drivers/gpu/drm/radeon/radeon_buffer.c          |  457 ++
 drivers/gpu/drm/radeon/radeon_combios.c         | 1767 +++++++
 drivers/gpu/drm/radeon/radeon_connectors.c      |  608 ++
 drivers/gpu/drm/radeon/radeon_cp.c              | 1538 ++++++
 drivers/gpu/drm/radeon/radeon_cs.c              |  687 +++
 drivers/gpu/drm/radeon/radeon_cursor.c          |  262 +
 drivers/gpu/drm/radeon/radeon_display.c         |  643 ++
 drivers/gpu/drm/radeon/radeon_drv.c             |  131 
 drivers/gpu/drm/radeon/radeon_drv.h             |  499 +-
 drivers/gpu/drm/radeon/radeon_encoders.c        | 1743 +++++++
 drivers/gpu/drm/radeon/radeon_fb.c              |  927 ++++
 drivers/gpu/drm/radeon/radeon_fence.c           |   99 
 drivers/gpu/drm/radeon/radeon_gem.c             | 1577 +++++++
 drivers/gpu/drm/radeon/radeon_gem_debugfs.c     |  179 
 drivers/gpu/drm/radeon/radeon_i2c.c             |  195 
 drivers/gpu/drm/radeon/radeon_irq.c             |   62 
 drivers/gpu/drm/radeon/radeon_legacy_crtc.c     | 1121 +++++
 drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 1283 +++++
 drivers/gpu/drm/radeon/radeon_mem.c             |    2 
 drivers/gpu/drm/radeon/radeon_mode.h            |  388 +
 drivers/gpu/drm/radeon/radeon_pm.c              |  257 +
 drivers/gpu/drm/radeon/radeon_reg.h             | 5344 ++++++++++++++++++++++++
 drivers/gpu/drm/radeon/radeon_state.c           |   88 
 include/drm/drm.h                               |    1 
 include/drm/drmP.h                              |   96 
 include/drm/drm_crtc_helper.h                   |    2 
 include/drm/drm_objects.h                       |  913 ++++
 include/drm/radeon_drm.h                        |  138 
 65 files changed, 34357 insertions(+), 602 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.82 -r 1.83 drm-modesetting-radeon.patchIndex: drm-modesetting-radeon.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/drm-modesetting-radeon.patch,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -p -r1.82 -r1.83
--- drm-modesetting-radeon.patch	6 May 2009 03:12:01 -0000	1.82
+++ drm-modesetting-radeon.patch	25 Jul 2009 04:09:19 -0000	1.83
@@ -1,5 +1,1755 @@
+commit dea27f6e83efabdc3e37bc5a91d29d6dab893853
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Wed Mar 18 17:07:07 2009 +1000
+
+    radeon: fixup encoder oops due to wrong ordering on init calls
+
+commit 4a90f1edefee2cba39d135f2866e1bacc1ac647e
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Thu Mar 19 00:16:00 2009 +1000
+
+    drm/ttm: re-org the whole cached/uncached allocator yet again.
+    
+    This removes the allocator type, and instead tracks when pages
+    were allocated from which pool and frees them back into that pool
+
+commit c8ae93fa4ac69112f4fc16477f73e0a98bba2765
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Sun Mar 15 18:26:42 2009 +1000
+
+    ttm: prefetch pages on pagefault
+
+commit f4df0e7870378ec40c268b95fb4b5d13533095fd
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Mon Mar 16 03:52:13 2009 -0400
+
+    radeon: make sure to free connector priv when done
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 96d923793eb924750b26e8ab2a4264131e17cd5b
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Mon Mar 16 03:36:16 2009 -0400
+
+    radeon: fix combios asic init
+    
+    - igp chips don't have asic_init3/4 or ram reset tables
+    - write out the detected ram size to the CONFIG_MEMSIZE register
+    - some r1xx chips require ram detection rather than reading size
+      from bios tables
+    - asic_init5 table isn't needed
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 68f14af742eda9fd28c920776ce5396e304f8a82
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Mon Mar 16 03:16:35 2009 -0400
+
+    radeon: rework bios scratch regsiter handling
+    
+    split bios scratch reg handling into 3 functions:
+    
+    - connected/active
+    - crtc to encoder mapping
+    - encoder dpms state
+    
+    Hook the functions in at the appropriate places in
+    the driver. DVI-I is a bit messy since we need to know
+    digital vs analog so we have to update the scratch regs
+    twice: once in detect() and again after we know digital/analog
+    in get_modes().
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 3ba04861b4d399a7c6e21f0a7279d5f087fc4a8c
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Sat Mar 14 16:43:14 2009 -0400
+
+    radeon: rework combios encoder/connector setup
+    
+    - along the same lines as atom
+    - re-enable atom and legacy paths for r4xx cards
+    - remove bios_connector struct
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 2ed15179f72e66a020a7f318cc4c3fa57865e4ba
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 12 16:02:01 2009 -0400
+
+    radeon: fix misleading messages
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit cb917ec2b585f5ac873ab2e6938da9a3b730c0a1
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 12 14:27:06 2009 -0400
+
+    atom: fix up encoder routines to deal with connector setup
+    
+    often times the links or lanes used are dependant on the
+    connector rather than the encoder.
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit abe11890fc272189712f2e6268a8751e25b7b7b5
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 12 13:43:03 2009 -0400
+
+    atom: re-enable quirks
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 6a45dbd73c14735711f1803e8a3dd1063b7b3021
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 12 13:21:32 2009 -0400
+
+    object table: don't add ddc for tv/cv
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 6fb018a3740510f140bcd5b6b89904e9d3167811
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 12 13:10:50 2009 -0400
+
+    radeon: major restructuring of atom output/connector setup
+    
+    - add connectors and encoders while parsing the bios tables.
+    - pull in fixed up object header parsing for r6xx+
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 034267381be779a1bbdb5f6f97c1471fb8538a04
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Wed Mar 4 13:02:26 2009 -0500
+
+    RS600 doesn't have DFP quirk in connector table
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit b7936094db13c736e4bee7494c2b99a8e5ced042
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Thu Mar 5 16:37:57 2009 -0500
+
+    R6xx/R7xx: don't mess with RADEON_HOST_PATH_CNTL
+    
+    these chips don't have this reg at this location.
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit a1fdbf2f4de3988f5e3319ee9f267f7b27e8fc6e
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Wed Mar 11 16:50:19 2009 -0400
+
+    radeon: make sure to free enc_priv when done
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit d54586a52852497d82f322c536515d223697fdf4
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Wed Mar 11 15:43:16 2009 -0400
+
+    radeon: restructure encoders
+    
+    move encoder specific data into encoder specific structs
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 0215044d42faded71b8591a79550c0bf04908458
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Wed Mar 11 11:23:16 2009 -0400
+
+    radeon: atom modesetting updates
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+
+commit 121d45a2e9562836138c658224def839bb166f68
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Thu Mar 12 11:39:05 2009 +1000
+
+    drm/radeon: Don't try to use agp symbols if we don't have AGP
+    
+    The radeon_buffer.c addition that gets pulled into the DRM driver as
+    part of Kernel Mode Setting (even if you disable KMS for the Radeon
+    driver) was assuming that it was safe to use symbols from the AGP code,
+    but that isn't safe on platforms where __OS_HAS_AGP is 0. Such as
+    sparc64. :)
+    
+    This patch gets the code building again. It probably should go into the
+    actual kms patch, but if you would prefer this go as a separate patch, I
+    can apply it. With this, we can get rawhide building for sparc64, so I'm
+    eager to see it applied in one way or another.
+    
+    Signed-off-by: Tom "spot" Callaway <tcallawa at redhat.com>
+
+commit 36bbbdea9a2e77c1d1da7504bc5f03267d0e0d6c
+Author: Dave Airlie <airlied at dhcp-1-203.bne.redhat.com>
+Date:   Thu Mar 12 10:58:05 2009 +1000
+
+    radeon: fixup the IB getting routine
+    
+    This makes the IB get routine a lot smarter and hopefully
[...6010 lines suppressed...]
-+#define DRM_IOCTL_RADEON_GEM_WAIT_IDLE	DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle) 
-+#define DRM_IOCTL_RADEON_CS		DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs)
-+#define DRM_IOCTL_RADEON_INFO		DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info)
-+
  
++#define DRM_IOCTL_RADEON_GEM_INFO   DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_INFO, struct drm_radeon_gem_info)
++#define DRM_IOCTL_RADEON_GEM_CREATE   DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_CREATE, struct drm_radeon_gem_create)
++#define DRM_IOCTL_RADEON_GEM_MMAP   DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_MMAP, struct drm_radeon_gem_mmap)
++#define DRM_IOCTL_RADEON_GEM_PIN   DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PIN, struct drm_radeon_gem_pin)
++#define DRM_IOCTL_RADEON_GEM_UNPIN   DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_UNPIN, struct drm_radeon_gem_unpin)
++#define DRM_IOCTL_RADEON_GEM_PREAD   DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PREAD, struct drm_radeon_gem_pread)
++#define DRM_IOCTL_RADEON_GEM_PWRITE   DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PWRITE, struct drm_radeon_gem_pwrite)
++#define DRM_IOCTL_RADEON_GEM_SET_DOMAIN  DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_DOMAIN, struct drm_radeon_gem_set_domain)
++#define DRM_IOCTL_RADEON_GEM_WAIT_RENDERING DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_RENDERING, struct drm_radeon_gem_wait_rendering) 
++#define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs)
++
++
  typedef struct drm_radeon_init {
  	enum {
-@@ -682,6 +703,7 @@ typedef struct drm_radeon_indirect {
+ 		RADEON_INIT_CP = 0x01,
+@@ -680,6 +713,8 @@ typedef struct drm_radeon_indirect {
  #define RADEON_PARAM_VBLANK_CRTC           13   /* VBLANK CRTC */
  #define RADEON_PARAM_FB_LOCATION           14   /* FB location */
  #define RADEON_PARAM_NUM_GB_PIPES          15   /* num GB pipes */
-+#define RADEON_PARAM_DEVICE_ID             16
++#define RADEON_PARAM_KERNEL_MM             16
++#define RADEON_PARAM_DEVICE_ID		   17
  
  typedef struct drm_radeon_getparam {
  	int param;
-@@ -751,4 +773,112 @@ typedef struct drm_radeon_surface_free {
+@@ -734,6 +769,7 @@ typedef struct drm_radeon_setparam {
+ #define RADEON_SETPARAM_NEW_MEMMAP 4		/* Use new memory map */
+ #define RADEON_SETPARAM_PCIGART_TABLE_SIZE 5    /* PCI GART Table Size */
+ #define RADEON_SETPARAM_VBLANK_CRTC 6           /* VBLANK CRTC */
++#define RADEON_SETPARAM_MM_INIT 7               /* DDX wants memory manager but has no modesetting */
+ /* 1.14: Clients can allocate/free a surface
+  */
+ typedef struct drm_radeon_surface_alloc {
+@@ -749,4 +785,106 @@ typedef struct drm_radeon_surface_free {
  #define	DRM_RADEON_VBLANK_CRTC1		1
  #define	DRM_RADEON_VBLANK_CRTC2		2
  
-+/*
-+ * Kernel modesetting world below.
-+ */
-+#define RADEON_GEM_DOMAIN_CPU		0x1
-+#define RADEON_GEM_DOMAIN_GTT		0x2
-+#define RADEON_GEM_DOMAIN_VRAM		0x4
++#define RADEON_GEM_DOMAIN_CPU 0x1   // Cached CPU domain
++#define RADEON_GEM_DOMAIN_GTT 0x2   // GTT or cache flushed
++#define RADEON_GEM_DOMAIN_VRAM 0x4  // VRAM domain
 +
++/* return to userspace start/size of gtt and vram apertures */
 +struct drm_radeon_gem_info {
-+	uint64_t	gart_size;
-+	uint64_t	vram_size;
-+	uint64_t	vram_visible;
++	uint64_t gart_start;
++	uint64_t gart_size;
++	uint64_t vram_start;
++	uint64_t vram_size;
++	uint64_t vram_visible;
 +};
 +
-+#define RADEON_GEM_NO_BACKING_STORE 1
-+
 +struct drm_radeon_gem_create {
-+	uint64_t	size;
-+	uint64_t	alignment;
-+	uint32_t	handle;
-+	uint32_t	initial_domain;
-+	uint32_t	flags;
++	uint64_t size;
++	uint64_t alignment;
++	uint32_t handle;
++	uint32_t initial_domain; // to allow VRAM to be created
++	uint32_t no_backing_store; // for VRAM objects - select whether they need backing store
++	// pretty much front/back/depth don't need it - other things do
 +};
 +
 +struct drm_radeon_gem_mmap {
-+	uint32_t	handle;
-+	uint32_t	pad;
-+	uint64_t	offset;
-+	uint64_t	size;
-+	uint64_t	addr_ptr;
++	uint32_t handle;
++	uint32_t pad;
++	uint64_t offset;
++	uint64_t size;
++	uint64_t addr_ptr;
 +};
 +
 +struct drm_radeon_gem_set_domain {
-+	uint32_t	handle;
-+	uint32_t		read_domains;
-+	uint32_t		write_domain;
++	uint32_t handle;
++	uint32_t read_domains;
++	uint32_t write_domain;
 +};
 +
-+struct drm_radeon_gem_wait_idle {
-+	uint32_t	handle;
-+	uint32_t	pad;
++struct drm_radeon_gem_wait_rendering {
++	uint32_t handle;
++};
++
++struct drm_radeon_gem_pin {
++	uint32_t handle;
++	uint32_t pin_domain;
++	uint64_t alignment;
++	uint64_t offset;
++};
++
++struct drm_radeon_gem_unpin {
++	uint32_t handle;
++	uint32_t pad;
 +};
 +
 +struct drm_radeon_gem_busy {
-+	uint32_t	handle;
-+	uint32_t	busy;
++	uint32_t handle;
++	uint32_t busy;
 +};
 +
 +struct drm_radeon_gem_pread {
@@ -37375,8 +38670,7 @@ index fe3e3a4..ed15ce2 100644
 +	/** Length of data to read */
 +	uint64_t size;
 +	/** Pointer to write the data into. */
-+	/* void *, but pointers are not 32/64 compatible */
-+	uint64_t data_ptr;
++	uint64_t data_ptr;	/* void *, but pointers are not 32/64 compatible */
 +};
 +
 +struct drm_radeon_gem_pwrite {
@@ -37388,43 +38682,28 @@ index fe3e3a4..ed15ce2 100644
 +	/** Length of data to write */
 +	uint64_t size;
 +	/** Pointer to read the data from. */
-+	/* void *, but pointers are not 32/64 compatible */
-+	uint64_t data_ptr;
++	uint64_t data_ptr;	/* void *, but pointers are not 32/64 compatible */
 +};
 +
-+#define RADEON_CHUNK_ID_RELOCS	0x01
-+#define RADEON_CHUNK_ID_IB	0x02
 +
-+struct drm_radeon_cs_chunk {
-+	uint32_t		chunk_id;
-+	uint32_t		length_dw;
-+	uint64_t		chunk_data;
-+};
++/* New interface which obsolete all previous interface.
++ */
++#define RADEON_CHUNK_ID_RELOCS 0x01
++#define RADEON_CHUNK_ID_IB     0x02
++#define RADEON_CHUNK_ID_OLD 0xff
 +
-+struct drm_radeon_cs_reloc {
-+	uint32_t		handle;
-+	uint32_t		read_domains;
-+	uint32_t		write_domain;
-+	uint32_t		flags;
++struct drm_radeon_cs_chunk {
++	uint32_t chunk_id;
++	uint32_t length_dw;
++	uint64_t chunk_data;
 +};
 +
 +struct drm_radeon_cs {
-+	uint32_t		num_chunks;
-+	uint32_t		cs_id;
-+	/* this points to uint64_t * which point to cs chunks */
-+	uint64_t		chunks;
-+	/* updates to the limits after this CS ioctl */
-+	uint64_t		gart_limit;
-+	uint64_t		vram_limit;
-+};
-+
-+#define RADEON_INFO_DEVICE_ID		0x00
-+#define RADEON_INFO_NUM_GB_PIPES	0x01
-+
-+struct drm_radeon_info {
-+	uint32_t		request;
-+	uint32_t		pad;
-+	uint64_t		value;
++	uint32_t	num_chunks;
++	uint32_t        cs_id;
++	uint64_t	chunks; /* this points to uint64_t * which point to
++				   cs chunks */
 +};
 +
++
  #endif

drm-next.patch:
 b/drivers/gpu/drm/Makefile                |    3 
 b/drivers/gpu/drm/ati_pcigart.c           |   40 
 b/drivers/gpu/drm/drm_bufs.c              |  122 
 b/drivers/gpu/drm/drm_context.c           |    4 
 b/drivers/gpu/drm/drm_debugfs.c           |  235 
 b/drivers/gpu/drm/drm_drv.c               |   85 
 b/drivers/gpu/drm/drm_gem.c               |    2 
 b/drivers/gpu/drm/drm_info.c              |  328 
 b/drivers/gpu/drm/drm_ioc32.c             |    4 
 b/drivers/gpu/drm/drm_memory.c            |    6 
 b/drivers/gpu/drm/drm_proc.c              |  720 
 b/drivers/gpu/drm/drm_stub.c              |  108 
 b/drivers/gpu/drm/drm_sysfs.c             |   37 
 b/drivers/gpu/drm/drm_vm.c                |   32 
 b/drivers/gpu/drm/i810/i810_drv.h         |    4 
 b/drivers/gpu/drm/i830/i830_drv.h         |    4 
 b/drivers/gpu/drm/i915/Makefile           |    2 
 b/drivers/gpu/drm/i915/i915_dma.c         |    2 
 b/drivers/gpu/drm/i915/i915_drv.c         |   44 
 b/drivers/gpu/drm/i915/i915_drv.h         |    6 
 b/drivers/gpu/drm/i915/i915_gem.c         |    6 
 b/drivers/gpu/drm/i915/i915_gem_debugfs.c |  257 
 b/drivers/gpu/drm/mga/mga_dma.c           |   17 
 b/drivers/gpu/drm/mga/mga_drv.h           |    8 
 b/drivers/gpu/drm/r128/r128_cce.c         |    7 
 b/drivers/gpu/drm/radeon/Makefile         |    2 
 b/drivers/gpu/drm/radeon/r300_cmdbuf.c    |    6 
 b/drivers/gpu/drm/radeon/r600_cp.c        | 2253 ++
 b/drivers/gpu/drm/radeon/r600_microcode.h |23297 ++++++++++++++++++++++++++++++
 b/drivers/gpu/drm/radeon/radeon_cp.c      |  520 
 b/drivers/gpu/drm/radeon/radeon_drv.c     |   22 
 b/drivers/gpu/drm/radeon/radeon_drv.h     |  634 
 b/drivers/gpu/drm/radeon/radeon_irq.c     |   14 
 b/drivers/gpu/drm/radeon/radeon_state.c   |   51 
 b/drivers/gpu/drm/savage/savage_bci.c     |    8 
 b/drivers/gpu/drm/via/via_drv.c           |    6 
 b/include/drm/drmP.h                      |  139 
 b/include/drm/drm_crtc.h                  |    2 
 b/include/drm/drm_os_linux.h              |   19 
 b/include/drm/drm_pciids.h                |  111 
 b/include/drm/radeon_drm.h                |    5 
 drivers/gpu/drm/i915/i915_gem_proc.c      |  334 
 42 files changed, 28158 insertions(+), 1348 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.18 -r 1.19 drm-next.patchIndex: drm-next.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/drm-next.patch,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- drm-next.patch	9 May 2009 02:08:23 -0000	1.18
+++ drm-next.patch	25 Jul 2009 04:09:20 -0000	1.19
@@ -1,3 +1,659 @@
+commit 41f13fe81dd1b08723ab9f3fc3c7f29cfa81f1a5
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Mon Mar 16 15:37:02 2009 -0400
+
+    drm/radeon: fix logic in r600_page_table_init() to match ati_gart
+    
+    This fixes page table init on rs600.
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 06f0a488c1b642d3cd7769da66600e5148c3fad8
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Fri Mar 13 09:35:32 2009 +1000
+
+    drm/radeon: r600 ptes are 64-bit, cleanup cleanup function.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 03efb8853c35aff51c7b901bf412f32765fe0fd9
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Tue Mar 10 18:36:38 2009 +1000
+
+    drm/radeon: don't call irq changes on r600 suspend/resume
+    
+    Until we sort out r600 IRQs don't do this.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit d02f7fa77d97a28a4276939f35e44ae995ad13d7
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Tue Mar 10 18:34:23 2009 +1000
+
+    drm/radeon: fix r600 writeback across suspend/resume
+    
+    This update was done in mainline radeon, but not in the r600.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 6546bf6d6cbf1f9ac350fd278a1d937d4bb9ad06
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Mon Mar 9 15:31:20 2009 +1000
+
+    drm/radeon: fix r600 writeback setup.
+    
+    This fixes 2 bugs:
+    1. the AGP calculation wasn't consistent with the PCI(E) calc for the
+    RPTR_ADDR registers. This consolidates the writes and fixes it up.
+    
+    2. The scratch address was being incorrectly calculated, this breaks
+    it out into a lot more linear steps.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 1847a549ac4db1272dea13d86331c492a2640b3b
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Mon Mar 9 12:47:18 2009 +1000
+
+    drm: fix warnings about new mappings in info code.
+    
+    This fixes up the warnings in the debugfs code that conflicted
+    with the mapping fixups.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 8f497aade8df2a619eacda927a43ebe82167a84c
+Author: Hannes Eder <hannes at hanneseder.net>
+Date:   Thu Mar 5 20:14:18 2009 +0100
+
+    drm/radeon: NULL noise: drivers/gpu/drm/radeon/radeon_*.c
+    
+    Fix this sparse warning:
+      drivers/gpu/drm/radeon/r600_cp.c:1811:52: warning: Using plain integer as NULL pointer
+      drivers/gpu/drm/radeon/radeon_cp.c:1363:52: warning: Using plain integer as NULL pointer
+      drivers/gpu/drm/radeon/radeon_state.c:1983:61: warning: Using plain integer as NULL pointer
+    
+    Signed-off-by: Hannes Eder <hannes at hanneseder.net>
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit a763d7dc0adb1159c1a52d43e566409da9fa59f0
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Mon Mar 9 12:17:08 2009 +1000
+
+    drm/radeon: fix r600 pci mapping calls.
+    
+    This realigns the r600 pci mapping calls with the ati pcigart ones,
+    fixing the direction and using the correct interface.
+    
+    Suggested by Jerome Glisse.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 08932156cc2d4f8807dc5ca5c3d6ccd85080610a
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Sat Mar 7 18:21:21 2009 -0500
+
+    drm/radeon: r6xx/r7xx: fix possible oops in r600_page_table_cleanup()
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 53c379e9462b59d4e166429ff064aaf0e7743795
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Mon Mar 9 12:12:28 2009 +1000
+
+    radeon: call the correct idle function, logic got inverted.
+    
+    This calls the correct idle function for the R600 and previous chips.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 800b69951174f7de294da575d7e7921041a7e783
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Fri Mar 6 11:47:54 2009 -0500
+
+    drm/radeon: RS600: fix interrupt handling
+    
+    the checks weren't updated when RS600 support
+    was added.
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+    Signed-off-by: Dave Airlie <airlied at linux.ie>
+
+commit a7d13ad0e2c1b0572492fd53ca1a090794e2f8e2
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Thu Feb 26 10:15:24 2009 +1000
+
+    drm/r600: fix rptr address along lines of previous fixes to radeon.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit eb1d91954ededc00ddcfb51e2626f114ff351524
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Thu Feb 26 10:14:40 2009 +1000
+
+    drm/r600: fixup r600 gart table accessor like ati_pcigart.c
+    
+    This attempts to fixup the r600 GART accessors so they work on other arches.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 6abf66018f7fe231720e50f9a47b142182388869
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Thu Feb 26 10:13:47 2009 +1000
+
+    drm/ati_pcigart: use memset_io to reset the memory
+    
+    Also don't setup pci_gart if we aren't going to need it.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 87f0da55353e23826a54bff57c457a13b97d18f1
+Author: Dave Airlie <airlied at redhat.com>
+Date:   Thu Feb 26 10:12:10 2009 +1000
+
+    drm: add DRM_READ/WRITE64 wrappers around readq/writeq.
+    
+    The readq/writeq stuff is from Dave Miller, and he
+    warns users to be careful about using these. Plans are only
+    r600 to use it so far.
+    
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 8ced9c75160947d2235fba75de9413e087e1171a
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Wed Feb 25 17:02:19 2009 -0500
+
+    radeon: add RS600 pci ids
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit c1556f71513f2e660fb2bbdc29344361b1ebff35
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Wed Feb 25 16:57:49 2009 -0500
+
+    radeon: add support for rs600 GPUs
+    
+    RS600s are an AMD IGP for Intel CPUs, that look like RS690s from
+    a lot of perspectives but look like r600s from a memory controller
+    point of view.
+    
+    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+commit 7659e9804b7a66047433182d86393d38ba4eff79
+Author: Alex Deucher <alexdeucher at gmail.com>
+Date:   Wed Feb 25 15:55:01 2009 -0500
+
+    radeon: fix r600 AGP support
+    
[...6565 lines suppressed...]
- #define DRM_IOCTL_MGA_DMA_BOOTSTRAP DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_DMA_BOOTSTRAP, drm_mga_dma_bootstrap_t)
- 
- typedef struct _drm_mga_warp_index {
-@@ -310,7 +312,7 @@ typedef struct drm_mga_dma_bootstrap {
- 	 */
- 	/*@{ */
- 	unsigned long texture_handle; /**< Handle used to map AGP textures. */
--	uint32_t texture_size;	      /**< Size of the AGP texture region. */
-+	__u32 texture_size;	      /**< Size of the AGP texture region. */
- 	/*@} */
- 
- 	/**
-@@ -319,7 +321,7 @@ typedef struct drm_mga_dma_bootstrap {
- 	 * On return from the DRM_MGA_DMA_BOOTSTRAP ioctl, this field will be
- 	 * filled in with the actual AGP mode.  If AGP was not available
- 	 */
--	uint32_t primary_size;
-+	__u32 primary_size;
- 
- 	/**
- 	 * Requested number of secondary DMA buffers.
-@@ -329,7 +331,7 @@ typedef struct drm_mga_dma_bootstrap {
- 	 * allocated.  Particularly when PCI DMA is used, this may be
- 	 * (subtantially) less than the number requested.
- 	 */
--	uint32_t secondary_bin_count;
-+	__u32 secondary_bin_count;
- 
- 	/**
- 	 * Requested size of each secondary DMA buffer.
-@@ -338,7 +340,7 @@ typedef struct drm_mga_dma_bootstrap {
- 	 * dma_mga_dma_bootstrap::secondary_bin_count, it is \b not allowed
- 	 * to reduce dma_mga_dma_bootstrap::secondary_bin_size.
- 	 */
--	uint32_t secondary_bin_size;
-+	__u32 secondary_bin_size;
- 
- 	/**
- 	 * Bit-wise mask of AGPSTAT2_* values.  Currently only \c AGPSTAT2_1X,
-@@ -350,12 +352,12 @@ typedef struct drm_mga_dma_bootstrap {
- 	 * filled in with the actual AGP mode.  If AGP was not available
- 	 * (i.e., PCI DMA was used), this value will be zero.
- 	 */
--	uint32_t agp_mode;
-+	__u32 agp_mode;
- 
- 	/**
- 	 * Desired AGP GART size, measured in megabytes.
- 	 */
--	uint8_t agp_size;
-+	__u8 agp_size;
- } drm_mga_dma_bootstrap_t;
- 
- typedef struct drm_mga_clear {
 diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
-index 73ff51f..fe3e3a4 100644
+index 73ff51f..937a275 100644
 --- a/include/drm/radeon_drm.h
 +++ b/include/drm/radeon_drm.h
-@@ -33,6 +33,8 @@
- #ifndef __RADEON_DRM_H__
- #define __RADEON_DRM_H__
- 
-+#include <linux/types.h>
-+
- /* WARNING: If you change any of these defines, make sure to change the
-  * defines in the X server file (radeon_sarea.h)
-  */
-@@ -304,6 +306,8 @@ typedef union {
+@@ -304,6 +304,8 @@ typedef union {
  
  #define RADEON_SCRATCH_REG_OFFSET	32
  
@@ -36253,7 +31890,7 @@ index 73ff51f..fe3e3a4 100644
  #define RADEON_NR_SAREA_CLIPRECTS	12
  
  /* There are 2 heaps (local/GART).  Each region within a heap is a
-@@ -526,7 +530,8 @@ typedef struct drm_radeon_init {
+@@ -526,7 +528,8 @@ typedef struct drm_radeon_init {
  		RADEON_INIT_CP = 0x01,
  		RADEON_CLEANUP_CP = 0x02,
  		RADEON_INIT_R200_CP = 0x03,
@@ -36263,117 +31900,3 @@ index 73ff51f..fe3e3a4 100644
  	} func;
  	unsigned long sarea_priv_offset;
  	int is_pci;
-@@ -722,7 +727,7 @@ typedef struct drm_radeon_irq_wait {
- 
- typedef struct drm_radeon_setparam {
- 	unsigned int param;
--	int64_t value;
-+	__s64 value;
- } drm_radeon_setparam_t;
- 
- #define RADEON_SETPARAM_FB_LOCATION    1	/* determined framebuffer location */
-diff --git a/include/drm/via_drm.h b/include/drm/via_drm.h
-index a3b5c10..170786e 100644
---- a/include/drm/via_drm.h
-+++ b/include/drm/via_drm.h
-@@ -24,6 +24,8 @@
- #ifndef _VIA_DRM_H_
- #define _VIA_DRM_H_
- 
-+#include <linux/types.h>
-+
- /* WARNING: These defines must be the same as what the Xserver uses.
-  * if you change them, you must change the defines in the Xserver.
-  */
-@@ -114,19 +116,19 @@
- #define VIA_MEM_UNKNOWN 4
- 
- typedef struct {
--	uint32_t offset;
--	uint32_t size;
-+	__u32 offset;
-+	__u32 size;
- } drm_via_agp_t;
- 
- typedef struct {
--	uint32_t offset;
--	uint32_t size;
-+	__u32 offset;
-+	__u32 size;
- } drm_via_fb_t;
- 
- typedef struct {
--	uint32_t context;
--	uint32_t type;
--	uint32_t size;
-+	__u32 context;
-+	__u32 type;
-+	__u32 size;
- 	unsigned long index;
- 	unsigned long offset;
- } drm_via_mem_t;
-@@ -148,9 +150,9 @@ typedef struct _drm_via_futex {
- 		VIA_FUTEX_WAIT = 0x00,
- 		VIA_FUTEX_WAKE = 0X01
- 	} func;
--	uint32_t ms;
--	uint32_t lock;
--	uint32_t val;
-+	__u32 ms;
-+	__u32 lock;
-+	__u32 val;
- } drm_via_futex_t;
- 
- typedef struct _drm_via_dma_init {
-@@ -211,7 +213,7 @@ typedef struct _drm_via_cmdbuf_size {
- 		VIA_CMDBUF_LAG = 0x02
- 	} func;
- 	int wait;
--	uint32_t size;
-+	__u32 size;
- } drm_via_cmdbuf_size_t;
- 
- typedef enum {
-@@ -236,8 +238,8 @@ enum drm_via_irqs {
- struct drm_via_wait_irq_request {
- 	unsigned irq;
- 	via_irq_seq_type_t type;
--	uint32_t sequence;
--	uint32_t signal;
-+	__u32 sequence;
-+	__u32 signal;
- };
- 
- typedef union drm_via_irqwait {
-@@ -246,7 +248,7 @@ typedef union drm_via_irqwait {
- } drm_via_irqwait_t;
- 
- typedef struct drm_via_blitsync {
--	uint32_t sync_handle;
-+	__u32 sync_handle;
- 	unsigned engine;
- } drm_via_blitsync_t;
- 
-@@ -257,16 +259,16 @@ typedef struct drm_via_blitsync {
-  */
- 
- typedef struct drm_via_dmablit {
--	uint32_t num_lines;
--	uint32_t line_length;
-+	__u32 num_lines;
-+	__u32 line_length;
- 
--	uint32_t fb_addr;
--	uint32_t fb_stride;
-+	__u32 fb_addr;
-+	__u32 fb_stride;
- 
- 	unsigned char *mem_addr;
--	uint32_t mem_stride;
-+	__u32 mem_stride;
- 
--	uint32_t flags;
-+	__u32 flags;
- 	int to_fb;
- 
- 	drm_via_blitsync_t sync;

drm-no-gem-on-i8xx.patch:
 i915_dma.c |    4 ++--
 i915_drv.h |    3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

Index: drm-no-gem-on-i8xx.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/drm-no-gem-on-i8xx.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- drm-no-gem-on-i8xx.patch	27 May 2009 20:12:00 -0000	1.2
+++ drm-no-gem-on-i8xx.patch	25 Jul 2009 04:09:21 -0000	1.3
@@ -22,7 +22,7 @@ index a70bf77..84664fe 100644
  #define IS_I865G(dev) ((dev)->pci_device == 0x2572)
  
 +#define IS_I8XX(dev)	(IS_I830(dev) || IS_845G(dev) || IS_I85X(dev) ||	\
-+				IS_I855(dev))
++				IS_I855(dev) || IS_I865G(dev))
 +
  #define IS_I915G(dev) ((dev)->pci_device == 0x2582 || (dev)->pci_device == 0x258a)
  #define IS_I915GM(dev) ((dev)->pci_device == 0x2592)

drm-nouveau.patch:
 drivers/gpu/drm/Kconfig                         |   15 
 drivers/gpu/drm/Makefile                        |    1 
 drivers/gpu/drm/drm_bufs.c                      |   28 
 drivers/gpu/drm/drm_fence.c                     |    2 
 drivers/gpu/drm/drm_gem.c                       |   50 
 drivers/gpu/drm/drm_stub.c                      |   15 
 drivers/gpu/drm/nouveau/Makefile                |   24 
 drivers/gpu/drm/nouveau/nouveau_backlight.c     |  156 
 drivers/gpu/drm/nouveau/nouveau_bios.c          |  854 
 drivers/gpu/drm/nouveau/nouveau_bios.h          |  151 
 drivers/gpu/drm/nouveau/nouveau_bo.c            |  415 
 drivers/gpu/drm/nouveau/nouveau_connector.h     |   52 
 drivers/gpu/drm/nouveau/nouveau_crtc.h          |   74 
 drivers/gpu/drm/nouveau/nouveau_display.c       |  114 
 drivers/gpu/drm/nouveau/nouveau_dma.c           |  213 
 drivers/gpu/drm/nouveau/nouveau_dma.h           |  106 
 drivers/gpu/drm/nouveau/nouveau_drv.c           |  172 
 drivers/gpu/drm/nouveau/nouveau_drv.h           |  751 
 drivers/gpu/drm/nouveau/nouveau_encoder.h       |   46 
 drivers/gpu/drm/nouveau/nouveau_fb.h            |   44 
 drivers/gpu/drm/nouveau/nouveau_fbcon.c         |  945 +
 drivers/gpu/drm/nouveau/nouveau_fbcon.h         |   48 
 drivers/gpu/drm/nouveau/nouveau_fence.c         |  127 
 drivers/gpu/drm/nouveau/nouveau_fifo.c          |  703 
 drivers/gpu/drm/nouveau/nouveau_gem.c           |  727 
 drivers/gpu/drm/nouveau/nouveau_ioc32.c         |   72 
 drivers/gpu/drm/nouveau/nouveau_irq.c           |  608 
 drivers/gpu/drm/nouveau/nouveau_mem.c           | 1071 +
 drivers/gpu/drm/nouveau/nouveau_notifier.c      |  176 
 drivers/gpu/drm/nouveau/nouveau_object.c        | 1240 +
 drivers/gpu/drm/nouveau/nouveau_reg.h           |  835 
 drivers/gpu/drm/nouveau/nouveau_sgdma.c         |  336 
 drivers/gpu/drm/nouveau/nouveau_state.c         | 1042 +
 drivers/gpu/drm/nouveau/nouveau_swmthd.c        |  191 
 drivers/gpu/drm/nouveau/nouveau_swmthd.h        |   33 
 drivers/gpu/drm/nouveau/nv04_fb.c               |   23 
 drivers/gpu/drm/nouveau/nv04_fifo.c             |  147 
 drivers/gpu/drm/nouveau/nv04_graph.c            |  527 
 drivers/gpu/drm/nouveau/nv04_instmem.c          |  189 
 drivers/gpu/drm/nouveau/nv04_mc.c               |   22 
 drivers/gpu/drm/nouveau/nv04_timer.c            |   53 
 drivers/gpu/drm/nouveau/nv10_fb.c               |   25 
 drivers/gpu/drm/nouveau/nv10_fifo.c             |  178 
 drivers/gpu/drm/nouveau/nv10_graph.c            |  913 +
 drivers/gpu/drm/nouveau/nv20_graph.c            |  915 +
 drivers/gpu/drm/nouveau/nv40_fb.c               |   62 
 drivers/gpu/drm/nouveau/nv40_fifo.c             |  218 
 drivers/gpu/drm/nouveau/nv40_graph.c            | 2191 ++
 drivers/gpu/drm/nouveau/nv40_mc.c               |   38 
 drivers/gpu/drm/nouveau/nv50_connector.c        |  596 
 drivers/gpu/drm/nouveau/nv50_crtc.c             |  804 
 drivers/gpu/drm/nouveau/nv50_cursor.c           |  146 
 drivers/gpu/drm/nouveau/nv50_dac.c              |  279 
 drivers/gpu/drm/nouveau/nv50_display.c          |  441 
 drivers/gpu/drm/nouveau/nv50_display.h          |   44 
 drivers/gpu/drm/nouveau/nv50_display_commands.h |  195 
 drivers/gpu/drm/nouveau/nv50_fbcon.c            |  220 
 drivers/gpu/drm/nouveau/nv50_fifo.c             |  353 
 drivers/gpu/drm/nouveau/nv50_graph.c            |  345 
 drivers/gpu/drm/nouveau/nv50_grctx.h            |20935 ++++++++++++++++++++++++
 drivers/gpu/drm/nouveau/nv50_i2c.c              |  400 
 drivers/gpu/drm/nouveau/nv50_i2c.h              |   47 
 drivers/gpu/drm/nouveau/nv50_instmem.c          |  379 
 drivers/gpu/drm/nouveau/nv50_mc.c               |   43 
 drivers/gpu/drm/nouveau/nv50_sor.c              |  277 
 include/drm/Kbuild                              |    1 
 include/drm/drmP.h                              |    2 
 include/drm/nouveau_drm.h                       |  299 
 68 files changed, 42696 insertions(+), 48 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.59 -r 1.60 drm-nouveau.patchIndex: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/drm-nouveau.patch,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -p -r1.59 -r1.60
--- drm-nouveau.patch	22 Jul 2009 05:06:09 -0000	1.59
+++ drm-nouveau.patch	25 Jul 2009 04:09:21 -0000	1.60
@@ -103,7 +103,7 @@ index f1c386c..fd62fd9 100644
  	if (mask & ~fence->type) {
  		DRM_ERROR("Wait trying to extend fence type"
 diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
-index 4984aa8..dee9b40 100644
+index c1173d8..2e4e667 100644
 --- a/drivers/gpu/drm/drm_gem.c
 +++ b/drivers/gpu/drm/drm_gem.c
 @@ -280,48 +280,58 @@ drm_gem_close_ioctl(struct drm_device *dev, void *data,
@@ -185,9 +185,58 @@ index 4984aa8..dee9b40 100644
  	mutex_lock(&dev->struct_mutex);
  	drm_gem_object_unreference(obj);
  	mutex_unlock(&dev->struct_mutex);
+diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
+index 5d45cbf..e3b0a76 100644
+--- a/drivers/gpu/drm/drm_stub.c
++++ b/drivers/gpu/drm/drm_stub.c
+@@ -406,14 +406,14 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
+ 	if (dev->driver->load) {
+ 		ret = dev->driver->load(dev, ent->driver_data);
+ 		if (ret)
+-			goto err_g3;
++			goto err_g4;
+ 	}
+ 
+         /* setup the grouping for the legacy output */
+ 	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
+ 		ret = drm_mode_group_init_legacy_group(dev, &dev->primary->mode_group);
+ 		if (ret)
+-			goto err_g3;
++			goto err_g4;
+ 	}
+ 
+ 	list_add_tail(&dev->driver_item, &driver->device_list);
+@@ -424,8 +424,11 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
+ 
+ 	return 0;
+ 
+-err_g3:
++err_g4:
+ 	drm_put_minor(&dev->primary);
++err_g3:
++	if (drm_core_check_feature(dev, DRIVER_MODESET))
++		drm_put_minor(&dev->control);
+ err_g2:
+ 	pci_disable_device(pdev);
+ err_g1:
+@@ -507,11 +510,11 @@ void drm_put_dev(struct drm_device *dev)
+ 		dev->agp = NULL;
+ 	}
+ 
+-	drm_ht_remove(&dev->map_hash);
+-	drm_ctxbitmap_cleanup(dev);
+-
+ 	list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
+ 		drm_rmmap(dev, r_list->map);
++	drm_ht_remove(&dev->map_hash);
++
++	drm_ctxbitmap_cleanup(dev);
+ 
+ 	if (drm_core_check_feature(dev, DRIVER_MODESET))
+ 		drm_put_minor(&dev->control);
 diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile
 new file mode 100644
-index 0000000..06483d0
+index 0000000..12af41b
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/Makefile
 @@ -0,0 +1,24 @@
@@ -200,8 +249,8 @@ index 0000000..06483d0
 +             nouveau_object.o nouveau_irq.o nouveau_notifier.o \
 +             nouveau_swmthd.o nouveau_sgdma.o nouveau_dma.o \
 +             nouveau_bo.o nouveau_fence.o nouveau_gem.o \
-+             nouveau_hw.o nouveau_calc.o nouveau_bios.o nouveau_i2c.o \
-+	     nouveau_display.o nouveau_fbcon.o nouveau_backlight.o \
++             nouveau_bios.o nouveau_display.o nouveau_fbcon.o \
++	     nouveau_backlight.o \
 +             nv04_timer.o \
 +             nv04_mc.o nv40_mc.o nv50_mc.o \
 +             nv04_fb.o nv10_fb.o nv40_fb.o \
@@ -210,17 +259,17 @@ index 0000000..06483d0
 +             nv40_graph.o nv50_graph.o \
 +             nv04_instmem.o nv50_instmem.o \
 +             nv50_crtc.o nv50_dac.o nv50_sor.o nv50_connector.o \
-+             nv50_cursor.o nv50_display.o nv50_fbcon.o
++             nv50_cursor.o nv50_i2c.o nv50_display.o nv50_fbcon.o
 +
 +nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o
 +
 +obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
 diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
 new file mode 100644
-index 0000000..e3d354f
+index 0000000..3fc521e
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
-@@ -0,0 +1,152 @@
+@@ -0,0 +1,156 @@
 +/*
 + * Copyright (C) 2009 Red Hat <mjg at redhat.com>
 + *
@@ -263,6 +312,7 @@ index 0000000..e3d354f
 +static int nv40_get_intensity(struct backlight_device *bd)
 +{
 +	struct drm_device *dev = bl_get_data(bd);
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
 +	int val = (nv_rd32(NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK) >> 16;
 +
 +	return val;
@@ -271,6 +321,7 @@ index 0000000..e3d354f
 +static int nv40_set_intensity(struct backlight_device *bd)
 +{
 +	struct drm_device *dev = bl_get_data(bd);
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
 +	int val = bd->props.brightness;
 +	int reg = nv_rd32(NV40_PMC_BACKLIGHT);
 +
@@ -289,6 +340,7 @@ index 0000000..e3d354f
 +static int nv50_get_intensity(struct backlight_device *bd)
 +{
 +	struct drm_device *dev = bl_get_data(bd);
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
 +
 +	return nv_rd32(NV50_PDISPLAY_BACKLIGHT);
 +}
@@ -296,6 +348,7 @@ index 0000000..e3d354f
 +static int nv50_set_intensity(struct backlight_device *bd)
 +{
 +	struct drm_device *dev = bl_get_data(bd);
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
 +	int val = bd->props.brightness;
 +
 +	nv_wr32(NV50_PDISPLAY_BACKLIGHT, val | NV50_PDISPLAY_BACKLIGHT_ENABLE);
@@ -375,66 +428,45 @@ index 0000000..e3d354f
 +}	
 diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
 new file mode 100644
-index 0000000..d63baf3
+index 0000000..bcbedb7
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
-@@ -0,0 +1,4852 @@
+@@ -0,0 +1,854 @@
 +/*
-+ * Copyright 2005-2006 Erik Waling
-+ * Copyright 2006 Stephane Marchesin
-+ * Copyright 2007-2009 Stuart Bennett
++ * Copyright (C) 2005-2006 Erik Waling
++ * Copyright (C) 2006 Stephane Marchesin
++ * Copyright (C) 2007-2008 Stuart Bennett
++ * Copyright (C) 2008 Maarten Maathuis.
++ * All Rights Reserved.
 + *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
++ * Permission is hereby granted, free of charge, to any person obtaining
++ * a copy of this software and associated documentation files (the
++ * "Software"), to deal in the Software without restriction, including
++ * without limitation the rights to use, copy, modify, merge, publish,
++ * distribute, sublicense, and/or sell copies of the Software, and to
++ * permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
 + *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
++ * The above copyright notice and this permission notice (including the
++ * next paragraph) shall be included in all copies or substantial
++ * portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
++ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 + *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
 + */
 +
-+#include "drmP.h"
++#include <asm/byteorder.h>
[...22225 lines suppressed...]
-+#	define NV_PRAMDAC_CU_START_POS_Y			31:16
-+#define NV_RAMDAC_NV10_CURSYNC				0x00680404
-+
-+#define NV_PRAMDAC_NVPLL_COEFF				0x00680500
-+#define NV_PRAMDAC_MPLL_COEFF				0x00680504
-+#define NV_PRAMDAC_VPLL_COEFF				0x00680508
-+#	define NV30_RAMDAC_ENABLE_VCO2				(8 << 4)
-+
-+#define NV_PRAMDAC_PLL_COEFF_SELECT			0x0068050c
-+#	define NV_RAMDAC_PLL_SELECT_USE_VPLL2_TRUE		(4 << 0)
-+#	define NV_PRAMDAC_PLL_COEFF_SELECT_SOURCE_PROG_MPLL	(1 << 8)
-+#	define NV_PRAMDAC_PLL_COEFF_SELECT_SOURCE_PROG_VPLL	(2 << 8)
-+#	define NV_PRAMDAC_PLL_COEFF_SELECT_SOURCE_PROG_NVPLL	(4 << 8)
-+#	define NV_RAMDAC_PLL_SELECT_PLL_SOURCE_VPLL2		(8 << 8)
-+#	define NV_PRAMDAC_PLL_COEFF_SELECT_VCLK_RATIO_DB2	(1 << 28)
-+#	define NV_RAMDAC_PLL_SELECT_VCLK2_RATIO_DB2		(2 << 28)
-+
-+#define NV_PRAMDAC_PLL_SETUP_CONTROL			0x00680510
-+#define NV_RAMDAC_VPLL2					0x00680520
-+#define NV_PRAMDAC_SEL_CLK				0x00680524
-+#define NV_RAMDAC_DITHER_NV11				0x00680528
-+#define NV_PRAMDAC_DACCLK				0x0068052c
-+#	define NV_PRAMDAC_DACCLK_SEL_DACCLK			(1 << 0)
-+
-+#define NV_RAMDAC_NVPLL_B				0x00680570
-+#define NV_RAMDAC_MPLL_B				0x00680574
-+#define NV_RAMDAC_VPLL_B				0x00680578
-+#define NV_RAMDAC_VPLL2_B				0x0068057c
-+#	define NV31_RAMDAC_ENABLE_VCO2				(8 << 28)
-+#define NV_PRAMDAC_580					0x00680580
-+#	define NV_RAMDAC_580_VPLL1_ACTIVE			(1 << 8)
-+#	define NV_RAMDAC_580_VPLL2_ACTIVE			(1 << 28)
-+
-+#define NV_PRAMDAC_GENERAL_CONTROL			0x00680600
-+#define NV_PRAMDAC_TEST_CONTROL				0x00680608
-+#	define NV_PRAMDAC_TEST_CONTROL_TP_INS_EN_ASSERTED	(1 << 12)
-+#	define NV_PRAMDAC_TEST_CONTROL_PWRDWN_DAC_OFF		(1 << 16)
-+#	define NV_PRAMDAC_TEST_CONTROL_SENSEB_ALLHI		(1 << 28)
-+#define NV_PRAMDAC_TESTPOINT_DATA			0x00680610
-+#	define NV_PRAMDAC_TESTPOINT_DATA_NOTBLANK		(8 << 28)
-+#define NV_PRAMDAC_630					0x00680630
-+#define NV_PRAMDAC_634					0x00680634
-+
-+#define NV_PRAMDAC_FP_VDISPLAY_END			0x00680800
-+#define NV_PRAMDAC_FP_VTOTAL				0x00680804
-+#define NV_PRAMDAC_FP_VCRTC				0x00680808
-+#define NV_PRAMDAC_FP_VSYNC_START			0x0068080c
-+#define NV_PRAMDAC_FP_VSYNC_END				0x00680810
-+#define NV_PRAMDAC_FP_VVALID_START			0x00680814
-+#define NV_PRAMDAC_FP_VVALID_END			0x00680818
-+#define NV_PRAMDAC_FP_HDISPLAY_END			0x00680820
-+#define NV_PRAMDAC_FP_HTOTAL				0x00680824
-+#define NV_PRAMDAC_FP_HCRTC				0x00680828
-+#define NV_PRAMDAC_FP_HSYNC_START			0x0068082c
-+#define NV_PRAMDAC_FP_HSYNC_END				0x00680830
-+#define NV_PRAMDAC_FP_HVALID_START			0x00680834
-+#define NV_PRAMDAC_FP_HVALID_END			0x00680838
-+
-+#define NV_RAMDAC_FP_DITHER				0x0068083c
-+#define NV_PRAMDAC_FP_TG_CONTROL			0x00680848
-+#	define NV_PRAMDAC_FP_TG_CONTROL_VSYNC_POS		(1 << 0)
-+#	define NV_PRAMDAC_FP_TG_CONTROL_VSYNC_DISABLE		(2 << 0)
-+#	define NV_PRAMDAC_FP_TG_CONTROL_HSYNC_POS		(1 << 4)
-+#	define NV_PRAMDAC_FP_TG_CONTROL_HSYNC_DISABLE		(2 << 4)
-+#	define NV_PRAMDAC_FP_TG_CONTROL_MODE_SCALE		(0 << 8)
-+#	define NV_PRAMDAC_FP_TG_CONTROL_MODE_CENTER		(1 << 8)
-+#	define NV_PRAMDAC_FP_TG_CONTROL_MODE_NATIVE		(2 << 8)
-+#	define NV_PRAMDAC_FP_TG_CONTROL_READ_PROG		(1 << 20)
-+#	define NV_PRAMDAC_FP_TG_CONTROL_WIDTH_12		(1 << 24)
-+#	define NV_PRAMDAC_FP_TG_CONTROL_DISPEN_POS		(1 << 28)
-+#	define NV_PRAMDAC_FP_TG_CONTROL_DISPEN_DISABLE		(2 << 28)
-+#define NV_PRAMDAC_850					0x00680850
-+#define NV_PRAMDAC_85C					0x0068085c
-+#define NV_PRAMDAC_FP_DEBUG_0				0x00680880
-+#	define NV_PRAMDAC_FP_DEBUG_0_XSCALE_ENABLE		(1 << 0)
-+#	define NV_PRAMDAC_FP_DEBUG_0_YSCALE_ENABLE		(1 << 4)
-+/* This doesn't seem to be essential for tmds, but still often set */
-+#	define NV_RAMDAC_FP_DEBUG_0_TMDS_ENABLED		(8 << 4)
-+#	define NV_PRAMDAC_FP_DEBUG_0_XINTERP_BILINEAR		(1 << 8)
-+#	define NV_PRAMDAC_FP_DEBUG_0_YINTERP_BILINEAR		(1 << 12)
-+#	define NV_PRAMDAC_FP_DEBUG_0_XWEIGHT_ROUND		(1 << 20)
-+#	define NV_PRAMDAC_FP_DEBUG_0_YWEIGHT_ROUND		(1 << 24)
-+#       define NV_PRAMDAC_FP_DEBUG_0_PWRDOWN_FPCLK              (1 << 28)
-+#define NV_PRAMDAC_FP_DEBUG_1				0x00680884
-+#	define NV_PRAMDAC_FP_DEBUG_1_XSCALE_VALUE		11:0
-+#	define NV_PRAMDAC_FP_DEBUG_1_XSCALE_TESTMODE_ENABLE	(1 << 12)
-+#	define NV_PRAMDAC_FP_DEBUG_1_YSCALE_VALUE		27:16
-+#	define NV_PRAMDAC_FP_DEBUG_1_YSCALE_TESTMODE_ENABLE	(1 << 28)
-+#define NV_PRAMDAC_FP_DEBUG_2				0x00680888
-+#define NV_PRAMDAC_FP_DEBUG_3				0x0068088C
-+
-+/* see NV_PRAMDAC_INDIR_TMDS in rules.xml */
-+#define NV_PRAMDAC_FP_TMDS_CONTROL			0x006808b0
-+#	define NV_PRAMDAC_FP_TMDS_CONTROL_WRITE_DISABLE		(1 << 16)
-+#define NV_PRAMDAC_FP_TMDS_DATA				0x006808b4
-+
-+/* Some kind of switch */
-+#define NV_PRAMDAC_900					0x00680900
-+#define NV_PRAMDAC_A20					0x00680A20
-+#define NV_PRAMDAC_A24					0x00680A24
-+#define NV_PRAMDAC_A34					0x00680A34
-+
-+/* names fabricated from NV_USER_DAC info */
-+#define NV_PRMDIO_PIXEL_MASK		0x006813c6
-+#	define NV_PRMDIO_PIXEL_MASK_MASK	0xff
-+#define NV_PRMDIO_READ_MODE_ADDRESS	0x006813c7
-+#define NV_PRMDIO_WRITE_MODE_ADDRESS	0x006813c8
-+#define NV_PRMDIO_PALETTE_DATA		0x006813c9
-+
-+#define NV_PGRAPH_DEBUG_0		0x00400080
-+#define NV_PGRAPH_DEBUG_1		0x00400084
-+#define NV_PGRAPH_DEBUG_2_NV04		0x00400088
-+#define NV_PGRAPH_DEBUG_2		0x00400620
-+#define NV_PGRAPH_DEBUG_3		0x0040008c
-+#define NV_PGRAPH_DEBUG_4		0x00400090
-+#define NV_PGRAPH_INTR			0x00400100
-+#define NV_PGRAPH_INTR_EN		0x00400140
-+#define NV_PGRAPH_CTX_CONTROL		0x00400144
-+#define NV_PGRAPH_CTX_CONTROL_NV04	0x00400170
-+#define NV_PGRAPH_ABS_UCLIP_XMIN	0x0040053C
-+#define NV_PGRAPH_ABS_UCLIP_YMIN	0x00400540
-+#define NV_PGRAPH_ABS_UCLIP_XMAX	0x00400544
-+#define NV_PGRAPH_ABS_UCLIP_YMAX	0x00400548
-+#define NV_PGRAPH_BETA_AND		0x00400608
-+#define NV_PGRAPH_LIMIT_VIOL_PIX	0x00400610
-+#define NV_PGRAPH_BOFFSET0		0x00400640
-+#define NV_PGRAPH_BOFFSET1		0x00400644
-+#define NV_PGRAPH_BOFFSET2		0x00400648
-+#define NV_PGRAPH_BLIMIT0		0x00400684
-+#define NV_PGRAPH_BLIMIT1		0x00400688
-+#define NV_PGRAPH_BLIMIT2		0x0040068c
-+#define NV_PGRAPH_STATUS		0x00400700
-+#define NV_PGRAPH_SURFACE		0x00400710
-+#define NV_PGRAPH_STATE			0x00400714
-+#define NV_PGRAPH_FIFO			0x00400720
-+#define NV_PGRAPH_PATTERN_SHAPE		0x00400810
-+#define NV_PGRAPH_TILE			0x00400b00
-+
-+#define NV_PVIDEO_INTR_EN		0x00008140
-+#define NV_PVIDEO_BUFFER		0x00008700
-+#define NV_PVIDEO_STOP			0x00008704
-+#define NV_PVIDEO_UVPLANE_BASE(buff)	(0x00008800+(buff)*4)
-+#define NV_PVIDEO_UVPLANE_LIMIT(buff)	(0x00008808+(buff)*4)
-+#define NV_PVIDEO_UVPLANE_OFFSET_BUFF(buff)	(0x00008820+(buff)*4)
-+#define NV_PVIDEO_BASE(buff)		(0x00008900+(buff)*4)
-+#define NV_PVIDEO_LIMIT(buff)		(0x00008908+(buff)*4)
-+#define NV_PVIDEO_LUMINANCE(buff)	(0x00008910+(buff)*4)
-+#define NV_PVIDEO_CHROMINANCE(buff)	(0x00008918+(buff)*4)
-+#define NV_PVIDEO_OFFSET_BUFF(buff)	(0x00008920+(buff)*4)
-+#define NV_PVIDEO_SIZE_IN(buff)		(0x00008928+(buff)*4)
-+#define NV_PVIDEO_POINT_IN(buff)	(0x00008930+(buff)*4)
-+#define NV_PVIDEO_DS_DX(buff)		(0x00008938+(buff)*4)
-+#define NV_PVIDEO_DT_DY(buff)		(0x00008940+(buff)*4)
-+#define NV_PVIDEO_POINT_OUT(buff)	(0x00008948+(buff)*4)
-+#define NV_PVIDEO_SIZE_OUT(buff)	(0x00008950+(buff)*4)
-+#define NV_PVIDEO_FORMAT(buff)		(0x00008958+(buff)*4)
-+#	define NV_PVIDEO_FORMAT_PLANAR			(1 << 0)
-+#	define NV_PVIDEO_FORMAT_COLOR_LE_CR8YB8CB8YA8	(1 << 16)
-+#	define NV_PVIDEO_FORMAT_DISPLAY_COLOR_KEY	(1 << 20)
-+#	define NV_PVIDEO_FORMAT_MATRIX_ITURBT709	(1 << 24)
-+#define NV_PVIDEO_COLOR_KEY		0x00008B00
-+
-+/* NV04 overlay defines from VIDIX & Haiku */
-+#define NV_PVIDEO_INTR_EN_0		0x00680140
-+#define NV_PVIDEO_STEP_SIZE		0x00680200
-+#define NV_PVIDEO_CONTROL_Y		0x00680204
-+#define NV_PVIDEO_CONTROL_X		0x00680208
-+#define NV_PVIDEO_BUFF0_START_ADDRESS	0x0068020c
-+#define NV_PVIDEO_BUFF0_PITCH_LENGTH	0x00680214
-+#define NV_PVIDEO_BUFF0_OFFSET		0x0068021c
-+#define NV_PVIDEO_BUFF1_START_ADDRESS	0x00680210
-+#define NV_PVIDEO_BUFF1_PITCH_LENGTH	0x00680218
-+#define NV_PVIDEO_BUFF1_OFFSET		0x00680220
-+#define NV_PVIDEO_OE_STATE		0x00680224
-+#define NV_PVIDEO_SU_STATE		0x00680228
-+#define NV_PVIDEO_RM_STATE		0x0068022c
-+#define NV_PVIDEO_WINDOW_START		0x00680230
-+#define NV_PVIDEO_WINDOW_SIZE		0x00680234
-+#define NV_PVIDEO_FIFO_THRES_SIZE	0x00680238
-+#define NV_PVIDEO_FIFO_BURST_LENGTH	0x0068023c
-+#define NV_PVIDEO_KEY			0x00680240
-+#define NV_PVIDEO_OVERLAY		0x00680244
-+#define NV_PVIDEO_RED_CSC_OFFSET	0x00680280
-+#define NV_PVIDEO_GREEN_CSC_OFFSET	0x00680284
-+#define NV_PVIDEO_BLUE_CSC_OFFSET	0x00680288
-+#define NV_PVIDEO_CSC_ADJUST		0x0068028c
-+
-+#endif
 diff --git a/include/drm/Kbuild b/include/drm/Kbuild
 index b940fdf..cfa6af4 100644
 --- a/include/drm/Kbuild
@@ -49627,7 +42929,7 @@ index b940fdf..cfa6af4 100644
  unifdef-y += via_drm.h
 +unifdef-y += nouveau_drm.h
 diff --git a/include/drm/drmP.h b/include/drm/drmP.h
-index 04fbd1e..f2a6bff 100644
+index b61b0c6..5b7ce2d 100644
 --- a/include/drm/drmP.h
 +++ b/include/drm/drmP.h
 @@ -1267,6 +1267,8 @@ extern void drm_idlelock_release(struct drm_lock_data *lock_data);

git-bluetooth.patch:
 drivers/bluetooth/bfusb.c         |    3 
 drivers/bluetooth/bt3c_cs.c       |    4 
 drivers/bluetooth/btusb.c         |   40 +-
 drivers/bluetooth/hci_h4.c        |    3 
 drivers/bluetooth/hci_ll.c        |    3 
 include/net/bluetooth/bluetooth.h |   12 
 include/net/bluetooth/hci.h       |    8 
 include/net/bluetooth/hci_core.h  |   84 +++--
 include/net/bluetooth/l2cap.h     |   13 
 include/net/bluetooth/rfcomm.h    |   20 -
 net/bluetooth/af_bluetooth.c      |   17 -
 net/bluetooth/cmtp/core.c         |    3 
 net/bluetooth/hci_conn.c          |   64 ++--
 net/bluetooth/hci_core.c          |    3 
 net/bluetooth/hci_event.c         |   26 +
 net/bluetooth/l2cap.c             |  602 +++++++++++++++++++++++++++-----------
 net/bluetooth/rfcomm/core.c       |  179 ++++++-----
 net/bluetooth/rfcomm/sock.c       |  189 +++++++++++
 net/bluetooth/sco.c               |   57 +++
 19 files changed, 968 insertions(+), 362 deletions(-)

Index: git-bluetooth.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/git-bluetooth.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- git-bluetooth.patch	12 May 2009 13:54:05 -0000	1.3
+++ git-bluetooth.patch	25 Jul 2009 04:09:22 -0000	1.4
@@ -1,256 +1,4 @@
-commit 1e3ea965efd7fafb6b882956fe23613574dfe80e
-Author: Marcel Holtmann <marcel at holtmann.org>
-Date:   Sat May 9 12:09:21 2009 -0700
-
-    Bluetooth: Don't trigger disconnect timeout for security mode 3 pairing
-    
-    A remote device in security mode 3 that tries to connect will require
-    the pairing during the connection setup phase. The disconnect timeout
-    is now triggered within 10 milliseconds and causes the pairing to fail.
-    
-    If a connection is not fully established and a PIN code request is
-    received, don't trigger the disconnect timeout. The either successful
-    or failing connection complete event will make sure that the timeout
-    is triggered at the right time.
-    
-    The biggest problem with security mode 3 is that many Bluetooth 2.0
-    device and before use a temporary security mode 3 for dedicated
-    bonding.
-    
-    Based on a report by Johan Hedberg <johan.hedberg at nokia.com>
-    
-    Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
-    Tested-by: Johan Hedberg <johan.hedberg at nokia.com>
-
-commit c5bf7426a6360fbdfc45fe25d6731733dca1e53e
-Author: Marcel Holtmann <marcel at holtmann.org>
-Date:   Sat May 9 12:04:08 2009 -0700
-
-    Bluetooth: Don't use hci_acl_connect_cancel() for incoming connections
-    
-    The connection setup phase takes around 2 seconds or longer and in
-    that time it is possible that the need for an ACL connection is no
-    longer present. If that happens then, the connection attempt will
-    be canceled.
-    
-    This only applies to outgoing connections, but currently it can also
-    be triggered by incoming connection. Don't call hci_acl_connect_cancel()
-    on incoming connection since these have to be either accepted or rejected
-    in this state. Once they are successfully connected they need to be
-    fully disconnected anyway.
-    
-    Also remove the wrong hci_acl_disconn() call for SCO and eSCO links
-    since at this stage they can't be disconnected either, because the
-    connection handle is still unknown.
-    
-    Based on a report by Johan Hedberg <johan.hedberg at nokia.com>
-    
-    Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
-    Tested-by: Johan Hedberg <johan.hedberg at nokia.com>
-
-commit 17c2c44c6c6d4a060b6d77eb81a0437f50879d1a
-Author: Marcel Holtmann <marcel at holtmann.org>
-Date:   Fri May 8 18:20:43 2009 -0700
-
-    Bluetooth: Fix wrong module refcount when connection setup fails
-    
-    The module refcount is increased by hci_dev_hold() call in hci_conn_add()
-    and decreased by hci_dev_put() call in del_conn(). In case the connection
-    setup fails, hci_dev_put() is never called.
-    
-    Procedure to reproduce the issue:
-    
-      # hciconfig hci0 up
-      # lsmod | grep btusb                   -> "used by" refcount = 1
-    
-      # hcitool cc <non-exisiting bdaddr>    -> will get timeout
-    
-      # lsmod | grep btusb                   -> "used by" refcount = 2
-      # hciconfig hci0 down
-      # lsmod | grep btusb                   -> "used by" refcount = 1
-      # rmmod btusb                          -> ERROR: Module btusb is in use
-    
-    The hci_dev_put() call got moved into del_conn() with the 2.6.25 kernel
-    to fix an issue with hci_dev going away before hci_conn. However that
-    change was wrong and introduced this problem.
-    
-    When calling hci_conn_del() it has to call hci_dev_put() after freeing
-    the connection details. This handling should be fully symmetric. The
-    execution of del_conn() is done in a work queue and needs it own calls
-    to hci_dev_hold() and hci_dev_put() to ensure that the hci_dev stays
-    until the connection cleanup has been finished.
-    
-    Based on a report by Bing Zhao <bzhao at marvell.com>
-    
-    Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
-    Tested-by: Bing Zhao <bzhao at marvell.com>
-
-commit 5e9f9314a7da0b3a52d23a574770dc06f7ab7318
-Author: Marcel Holtmann <marcel at holtmann.org>
-Date:   Tue Apr 28 09:04:55 2009 -0700
-
-    Bluetooth: Fix connection establishment with low security requirement
-    
-    The Bluetooth 2.1 specification introduced four different security modes
-    that can be mapped using Legacy Pairing and Simple Pairing. With the
-    usage of Simple Pairing it is required that all connections (except
-    the ones for SDP) are encrypted. So even the low security requirement
-    mandates an encrypted connection when using Simple Pairing. When using
-    Legacy Pairing (for Bluetooth 2.0 devices and older) this is not required
-    since it causes interoperability issues.
-    
-    To support this properly the low security requirement translates into
-    different host controller transactions depending if Simple Pairing is
-    supported or not. However in case of Simple Pairing the command to
-    switch on encryption after a successful authentication is not triggered
-    for the low security mode. This patch fixes this and actually makes
-    the logic to differentiate between Simple Pairing and Legacy Pairing
-    a lot simpler.
-    
-    Based on a report by Ville Tervo <ville.tervo at nokia.com>
-    
-    Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
-
-commit f9a02cb37e0321844fc6532a8531dcfedc2b7dff
-Author: Marcel Holtmann <marcel at holtmann.org>
-Date:   Sun Apr 26 20:01:22 2009 +0200
-
-    Bluetooth: Add different pairing timeout for Legacy Pairing
-    
-    The Bluetooth stack uses a reference counting for all established ACL
-    links and if no user (L2CAP connection) is present, the link will be
-    terminated to save power. The problem part is the dedicated pairing
-    when using Legacy Pairing (Bluetooth 2.0 and before). At that point
-    no user is present and pairing attempts will be disconnected within
-    10 seconds or less. In previous kernel version this was not a problem
-    since the disconnect timeout wasn't triggered on incoming connections
-    for the first time. However this caused issues with broken host stacks
-    that kept the connections around after dedicated pairing. When the
-    support for Simple Pairing got added, the link establishment procedure
-    needed to be changed and now causes issues when using Legacy Pairing
-    
-    When using Simple Pairing it is possible to do a proper reference
-    counting of ACL link users. With Legacy Pairing this is not possible
-    since the specification is unclear in some areas and too many broken
-    Bluetooth devices have already been deployed. So instead of trying to
-    deal with all the broken devices, a special pairing timeout will be
-    introduced that increases the timeout to 60 seconds when pairing is
-    triggered.
-    
-    If a broken devices now puts the stack into an unforeseen state, the
-    worst that happens is the disconnect timeout triggers after 120 seconds
-    instead of 4 seconds. This allows successful pairings with legacy and
-    broken devices now.
-    
-    Based on a report by Johan Hedberg <johan.hedberg at nokia.com>
-    
-    Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
-
-commit b91cd64b1639c33bc53279dd3ea78c26a8c59928
-Author: Roger Quadros <ext-roger.quadros at nokia.com>
-Date:   Thu Apr 23 14:50:54 2009 +0300
-
-    Bluetooth: Ensure that HCI sysfs add/del is preempt safe
-    
-    Use a different work_struct variables for add_conn() and del_conn() and
-    use single work queue instead of two for adding and deleting connections.
-    
-    It eliminates the following error on a preemptible kernel:
-    
-    [  204.358032] Unable to handle kernel NULL pointer dereference at virtual address 0000000c
-    [  204.370697] pgd = c0004000
-    [  204.373443] [0000000c] *pgd=00000000
-    [  204.378601] Internal error: Oops: 17 [#1] PREEMPT
-    [  204.383361] Modules linked in: vfat fat rfcomm sco l2cap sd_mod scsi_mod iphb pvr2d drm omaplfb ps
-    [  204.438537] CPU: 0    Not tainted  (2.6.28-maemo2 #1)
-    [  204.443664] PC is at klist_put+0x2c/0xb4
-    [  204.447601] LR is at klist_put+0x18/0xb4
-    [  204.451568] pc : [<c0270f08>]    lr : [<c0270ef4>]    psr: a0000113
-    [  204.451568] sp : cf1b3f10  ip : cf1b3f10  fp : cf1b3f2c
-    [  204.463104] r10: 00000000  r9 : 00000000  r8 : bf08029c
-    [  204.468353] r7 : c7869200  r6 : cfbe2690  r5 : c78692c8  r4 : 00000001
-    [  204.474945] r3 : 00000001  r2 : cf1b2000  r1 : 00000001  r0 : 00000000
-    [  204.481506] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM Segment kernel
-    [  204.488861] Control: 10c5387d  Table: 887fc018  DAC: 00000017
-    [  204.494628] Process btdelconn (pid: 515, stack limit = 0xcf1b22e0)
-    
-    Signed-off-by: Roger Quadros <ext-roger.quadros at nokia.com>
-    Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
-
-commit d7c26bff6fb2869ff5ee6a5f5911844d559bf77f
-Author: Marcel Holtmann <marcel at holtmann.org>
-Date:   Sun Apr 19 19:30:03 2009 +0200
-
-    Bluetooth: Add workaround for wrong HCI event in eSCO setup
-    
-    The Broadcom chips with 2.1 firmware handle the fallback case to a SCO
-    link wrongly when setting up eSCO connections.
-    
-      < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
-          handle 11 voice setting 0x0060
-      > HCI Event: Command Status (0x0f) plen 4
-          Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
-      > HCI Event: Connect Complete (0x03) plen 11
-          status 0x00 handle 1 bdaddr 00:1E:3A:xx:xx:xx type SCO encrypt 0x01
-    
-    The Link Manager negotiates the fallback to SCO, but then sends out
-    a Connect Complete event. This is wrong and the Link Manager should
-    actually send a Synchronous Connection Complete event if the Setup
-    Synchronous Connection has been used. Only the remote side is allowed
-    to use Connect Complete to indicate the missing support for eSCO in
-    the host stack.
-    
-    This patch adds a workaround for this which clearly should not be
-    needed, but reality is that broken Broadcom devices are deployed.
-    
-    Based on a report by Ville Tervo <ville.tervo at nokia.com>
-    
-    Signed-off-by: Marcel Holtman <marcel at holtmann.org>
-
-commit dd5214b3789cdeb63e4d866feba29b93c0d609b5
-Author: Marcel Holtmann <marcel at holtmann.org>
-Date:   Sun Apr 19 19:14:14 2009 +0200
-
-    Bluetooth: Fallback from eSCO to SCO on unspecified error
-    
-    Some Bluetooth chips (like the ones from Texas Instruments) don't do
-    proper eSCO negotiations inside the Link Manager. They just return an
-    error code and in case of the Kyocera ED-8800 headset it is just a
-    random error.
-    
-      < HCI Command: Setup Synchronous Connection 0x01|0x0028) plen 17
-        handle 1 voice setting 0x0060
-      > HCI Event: Command Status (0x0f) plen 4
-        Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
-      > HCI Event: Synchronous Connect Complete (0x2c) plen 17
-        status 0x1f handle 257 bdaddr 00:14:0A:xx:xx:xx type eSCO
-        Error: Unspecified Error
-    
-    In these cases it is up to the host stack to fallback to a SCO setup
-    and so retry with SCO parameters.
-    
-    Based on a report by Nick Pelly <npelly at google.com>
-    
-    Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
-
-commit 7441ee220db28dbba9987421de4ae7df878bbfb0
-Author: Johan Hedberg <johan.hedberg at nokia.com>
-Date:   Thu Mar 26 16:41:56 2009 +0200
-
-    Bluetooth: Fix removing of RFCOMM DLC timer with DEFER_SETUP
-    
-    There is a missing call to rfcomm_dlc_clear_timer in the case that
-    DEFER_SETUP is used and so the connection gets disconnected after the
-    timeout even if it was successfully accepted previously.
-    
-    This patch adds a call to rfcomm_dlc_clear_timer to rfcomm_dlc_accept
-    which will get called when the user accepts the connection by calling
-    read() on the socket.
-    
-    Signed-off-by: Johan Hedberg <johan.hedberg at nokia.com>
-    Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
-
-commit 55294d00155240ba9008e495dcceaf255fbb9ee6
+commit b1fb06830dc870d862f7f80e276130c0ab84d59f
 Author: Wei Yongjun <yjwei at cn.fujitsu.com>
 Date:   Wed Feb 25 18:09:33 2009 +0800
 
@@ -261,7 +9,7 @@ Date:   Wed Feb 25 18:09:33 2009 +0800
     Signed-off-by: Wei Yongjun <yjwei at cn.fujitsu.com>
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit c46694e3a88224e52e5a2188b84d57ae2aa02a44
+commit 7585b97a48180f754ebdade1be94092e36bef365
 Author: Wei Yongjun <yjwei at cn.fujitsu.com>
 Date:   Wed Feb 25 18:29:52 2009 +0800
 
@@ -272,7 +20,7 @@ Date:   Wed Feb 25 18:29:52 2009 +0800
     Signed-off-by: Wei Yongjun <yjwei at cn.fujitsu.com>
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit b138d79a7612a3d5dbc62115119c0db9f90b6e19
+commit 2ae9a6be5f476f3512839a4d11a8f432bfd2914c
 Author: Dave Young <hidave.darkstar at gmail.com>
 Date:   Sat Feb 21 16:13:34 2009 +0800
 
@@ -479,7 +227,7 @@ Date:   Sat Feb 21 16:13:34 2009 +0800
     Signed-off-by: Dave Young <hidave.darkstar at gmail.com>
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit fcf3f9cb7556f152f151aecee653f4d7c8bd8f18
+commit 2526d3d8b2f671a7d36cc486af984052cd5a690f
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Fri Feb 20 20:54:06 2009 +0100
 
@@ -492,7 +240,7 @@ Date:   Fri Feb 20 20:54:06 2009 +0100
     Signed-off-by: Johan Hedberg <johan.hedberg at nokia.com>
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 29c699aaa1e038177344d1eb38a347ae174ef5ec
+commit 37e62f5516cfb210e64fe53457932df4341b0ad1
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Tue Feb 17 21:49:33 2009 +0100
 
@@ -505,7 +253,7 @@ Date:   Tue Feb 17 21:49:33 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 1e58058c15f659ca97c38a80883c68d64ce6af79
+commit 2a517ca687232adc8f14893730644da712010ffc
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Mon Feb 16 03:20:31 2009 +0100
 
@@ -519,7 +267,7 @@ Date:   Mon Feb 16 03:20:31 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 74dffad5d84eb0db0e86e99795979c6e233110f6
+commit 8bf4794174659b06d43cc5e290cd384757374613
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Mon Feb 16 02:59:49 2009 +0100
 
@@ -532,7 +280,7 @@ Date:   Mon Feb 16 02:59:49 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit e269154213d9ed12488b925f44be1eb496125c43
+commit d5f2d2be68876f65dd051b978a7b66265fde9ffd
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Mon Feb 16 02:57:30 2009 +0100
 
@@ -545,7 +293,7 @@ Date:   Mon Feb 16 02:57:30 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 0d105ec8ed68d2fc2dcecf7600daeec99d2d669c
+commit 96a3183322cba1a2846771b067c99b9d6f481263
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Feb 12 16:23:03 2009 +0100
 
@@ -559,7 +307,7 @@ Date:   Thu Feb 12 16:23:03 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 33641a119177c0765420e49afcee834c83626bd2
+commit 00ae4af91d8c5b6814e2bb3bfaaf743845f989eb
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Feb 12 16:19:45 2009 +0100
 
@@ -574,7 +322,7 @@ Date:   Thu Feb 12 16:19:45 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit e714c7d7337fead3ed9d0e9de4f2b9e2d6e6a3f3
+commit 2950f21acb0f6b8fcd964485c2ebf1e06545ac20
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Feb 12 14:02:50 2009 +0100
 
@@ -607,7 +355,7 @@ Date:   Thu Feb 12 14:02:50 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 6e6512b6f5abbda65ed3d27f11f681990e0f19f9
+commit f29972de8e7476706ab3c01304a505e7c95d9040
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Feb 12 05:07:45 2009 +0100
 
@@ -625,7 +373,7 @@ Date:   Thu Feb 12 05:07:45 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 59825c3cdfabca877a994573120a479c6e06646a
+commit e1027a7c69700301d14db03d2e049ee60c4f92df
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Mon Feb 9 09:18:02 2009 +0100
 
@@ -639,7 +387,7 @@ Date:   Mon Feb 9 09:18:02 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 49fea994547a19087d962dd4e93efb0e5b40cee5
+commit 435fef20acfc48f46476abad55b0cd3aa47b8365
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Mon Feb 9 03:55:28 2009 +0100
 
@@ -660,7 +408,7 @@ Date:   Mon Feb 9 03:55:28 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit f4befabc4c291a5f437b9845233937099e1dee05
+commit 6a8d3010b313d99adbb28f1826fac0234395bb26
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Fri Feb 6 23:56:36 2009 +0100
 
@@ -675,7 +423,7 @@ Date:   Fri Feb 6 23:56:36 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit fe2e4d9c758ebf18c1db55eb8f7e655845b255c4
+commit 984947dc64f82bc6cafa4d84ba1a139718f634a8
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Fri Feb 6 23:35:19 2009 +0100
 
@@ -689,7 +437,7 @@ Date:   Fri Feb 6 23:35:19 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 395c54b3da235b1827475973b95a12c153cc4600
+commit 657e17b03c80bec817975984d221bef716f83558
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Fri Feb 6 19:45:36 2009 +0100
 
@@ -705,7 +453,7 @@ Date:   Fri Feb 6 19:45:36 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 5a10f179e4af482474dbf9adc58ce9fae9ea6b15
+commit 0684e5f9fb9e3f7e168ab831dfca693bcb44805b
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Mon Feb 9 02:48:38 2009 +0100
 
@@ -717,7 +465,7 @@ Date:   Mon Feb 9 02:48:38 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 1b7c3ce31a94cce8e818a6c043f65cddae9ef047
+commit efc7688b557dd1be10eead7399b315efcb1dbc74
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Fri Feb 6 09:13:37 2009 +0100
 
@@ -738,7 +486,7 @@ Date:   Fri Feb 6 09:13:37 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 05a0fa77ec659a5aa7608e470d3e1b359ffba314
+commit 255c76014af74165428e7aa16414b857e2bdccf2
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Wed Feb 4 21:07:19 2009 +0100
 
@@ -754,7 +502,7 @@ Date:   Wed Feb 4 21:07:19 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 07e2928373ec26bf42a71c4a6b1e86e8db3deb7b
+commit 43c2e57f94c15744495fee564610aa24602b3824
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Wed Feb 4 17:41:38 2009 +0100
 
@@ -772,7 +520,7 @@ Date:   Wed Feb 4 17:41:38 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 056367e0f7af33b39fa32beb4d81f47b1b505aa1
+commit 6e1031a40029492c10509e8c3dcac9b611438ccb
 Author: Jaikumar Ganesh <jaikumar at google.com>
 Date:   Mon Feb 2 18:03:57 2009 -0800
 
@@ -787,7 +535,7 @@ Date:   Mon Feb 2 18:03:57 2009 -0800
     Signed-off-by: Jaikumar Ganesh <jaikumar at google.com>
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit d242cdb6130ad02529fe5e688e8d7ae0b48301f8
+commit 34a55eda483e8177c9044f93fd2c9107f02bf1c7
 Author: Andre Haupt <andre at bitwigglers.org>
 Date:   Mon Feb 2 14:45:11 2009 -0800
 
@@ -798,7 +546,7 @@ Date:   Mon Feb 2 14:45:11 2009 -0800
     Signed-off-by: Andre Haupt <andre at bitwigglers.org>
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 0fd01f772fe7ab90928084ca123f4f0df7709bbd
+commit dd2efd03b49d56ae795c71335bc7358022514c32
 Author: Dave Young <hidave.darkstar at gmail.com>
 Date:   Sat Jan 31 13:51:15 2009 +0800
 
@@ -818,7 +566,7 @@ Date:   Sat Jan 31 13:51:15 2009 +0800
     Signed-off-by: Dave Young <hidave.darkstar at gmail.com>
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 3f4b0e5002a401ec520f39fe470a23ebe6b8e634
+commit 5f9018af004fa8635bbbe3ab2dc61e8a686edfaa
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Fri Jan 16 10:09:50 2009 +0100
 
@@ -833,7 +581,7 @@ Date:   Fri Jan 16 10:09:50 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 23094d5ee9b1ce8968c1e93ef3b59c42a57fd0cf
+commit 0588d94fd7e414367a7ae517569d2222441c255f
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Fri Jan 16 10:06:13 2009 +0100
 
@@ -848,7 +596,7 @@ Date:   Fri Jan 16 10:06:13 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 570f37485f475607cc946672302b62970e1cfdd7
+commit f62e4323ab43c59e7cd7f72c1eb392d7c767ce5a
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Jan 15 21:58:44 2009 +0100
 
@@ -865,7 +613,7 @@ Date:   Thu Jan 15 21:58:44 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit d9cbe1221781e3eac1c7a0594def985575d56fb3
+commit 8c84b83076b5062f59b6167cdda90d9e5124aa71
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Fri Jan 16 08:17:51 2009 +0100
 
@@ -886,7 +634,7 @@ Date:   Fri Jan 16 08:17:51 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 494b54d3b734430334b38fdc68423bc5a4112422
+commit 9f2c8a03fbb3048cf38b158f87aa0c3c09bca084
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Jan 15 21:58:40 2009 +0100
 
@@ -897,7 +645,7 @@ Date:   Thu Jan 15 21:58:40 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 4a63263dc5c07f75318aded47b18a5b95cbfaab9
+commit 2af6b9d518ddfbc4d6990d5f9c9b1a05341c1cef
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Jan 15 21:58:38 2009 +0100
 
@@ -908,7 +656,7 @@ Date:   Thu Jan 15 21:58:38 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit b9849003b7f3b9a52e9d313cc5410f15c022e403
+commit 8c1b235594fbab9a13240a1dac12ea9fd99b6440
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Jan 15 21:58:04 2009 +0100
 
@@ -944,7 +692,7 @@ Date:   Thu Jan 15 21:58:04 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 148e04ad8caf7e613b4713aed9a3a3ae63b01ed9
+commit c89b6e6bda4c8021195778f47567d0cc9dbfe7ec
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Jan 15 21:57:03 2009 +0100
 
@@ -960,7 +708,7 @@ Date:   Thu Jan 15 21:57:03 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 1d2d14c8ce227b1c2fb6584f27cfabee5a4eb3fd
+commit 71aeeaa1fd88fe7446391e0553336f0e0c2cfe6a
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Jan 15 21:57:02 2009 +0100
 
@@ -972,7 +720,7 @@ Date:   Thu Jan 15 21:57:02 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit e8f4ffcd82776573bd738329be852f71a63ff1d3
+commit f66dc81f44d918ee1aa1a9d821bb2f25c7592bc0
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Jan 15 21:57:00 2009 +0100
 
@@ -985,7 +733,7 @@ Date:   Thu Jan 15 21:57:00 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit 229f1d3e93e15e6d06f43a408869eb9b372d8db7
+commit bb23c0ab824653be4aa7dfca15b07b3059717004
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Jan 15 21:56:48 2009 +0100
 
@@ -1001,7 +749,7 @@ Date:   Thu Jan 15 21:56:48 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit e00363cd524ae1005dbf475e88d998a483137a77
+commit c4f912e155504e94dd4f3d63c378dab0ff03dbda
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Jan 15 21:52:16 2009 +0100
 
@@ -1018,7 +766,7 @@ Date:   Thu Jan 15 21:52:16 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit d71f85471f699c246c6ab65042c7ddabf4b199f8
+commit d58daf42d29a3a4a4d4be46cf47ceee096789680
 Author: Marcel Holtmann <marcel at holtmann.org>
 Date:   Thu Jan 15 21:52:14 2009 +0100
 
@@ -1032,7 +780,7 @@ Date:   Thu Jan 15 21:52:14 2009 +0100
     
     Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
-commit f1562094f31ad51a74c20ee4e7f0eba37a051d9c
+commit 91aa35a5aa3540223066bf6b51c935418c63a35d
 Author: Victor Shcherbatyuk <victor.shcherbatyuk at tomtom.com>
 Date:   Thu Jan 15 21:52:12 2009 +0100
 
@@ -1217,18 +965,10 @@ index a04f846..3ad5390 100644
  
  struct bt_sock_list {
 diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
-index 3645139..ed3aea1 100644
+index 3645139..f69f015 100644
 --- a/include/net/bluetooth/hci.h
 +++ b/include/net/bluetooth/hci.h
-@@ -101,6 +101,7 @@ enum {
- /* HCI timeouts */
- #define HCI_CONNECT_TIMEOUT	(40000)	/* 40 seconds */
- #define HCI_DISCONN_TIMEOUT	(2000)	/* 2 seconds */
-+#define HCI_PAIRING_TIMEOUT	(60000)	/* 60 seconds */
- #define HCI_IDLE_TIMEOUT	(6000)	/* 6 seconds */
- #define HCI_INIT_TIMEOUT	(10000)	/* 10 seconds */
- 
-@@ -133,8 +134,13 @@ enum {
+@@ -133,8 +133,13 @@ enum {
  #define ESCO_EV3	0x0008
  #define ESCO_EV4	0x0010
  #define ESCO_EV5	0x0020
@@ -1242,7 +982,7 @@ index 3645139..ed3aea1 100644
  
  /* ACL flags */
  #define ACL_CONT		0x01
-@@ -176,6 +182,9 @@ enum {
+@@ -176,6 +181,9 @@ enum {
  #define LMP_EV5		0x02
  
  #define LMP_SNIFF_SUBR	0x02
@@ -1253,30 +993,18 @@ index 3645139..ed3aea1 100644
  #define LMP_SIMPLE_PAIR	0x08
  
 diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
-index 46a43b7..be5bd71 100644
+index 46a43b7..01f9316 100644
 --- a/include/net/bluetooth/hci_core.h
 +++ b/include/net/bluetooth/hci_core.h
-@@ -169,7 +169,9 @@ struct hci_conn {
+@@ -169,6 +169,7 @@ struct hci_conn {
  	__u16            link_policy;
  	__u32		 link_mode;
  	__u8             auth_type;
 +	__u8             sec_level;
  	__u8             power_save;
-+	__u16            disc_timeout;
  	unsigned long	 pend;
  
- 	unsigned int	 sent;
-@@ -179,7 +181,8 @@ struct hci_conn {
- 	struct timer_list disc_timer;
- 	struct timer_list idle_timer;
- 
--	struct work_struct work;
-+	struct work_struct work_add;
-+	struct work_struct work_del;
- 
- 	struct device	dev;
- 
-@@ -325,12 +328,11 @@ int hci_conn_del(struct hci_conn *conn);
+@@ -325,12 +326,11 @@ int hci_conn_del(struct hci_conn *conn);
  void hci_conn_hash_flush(struct hci_dev *hdev);
  void hci_conn_check_pending(struct hci_dev *hdev);
  
@@ -1292,19 +1020,7 @@ index 46a43b7..be5bd71 100644
  
  void hci_conn_enter_active_mode(struct hci_conn *conn);
  void hci_conn_enter_sniff_mode(struct hci_conn *conn);
-@@ -348,9 +350,9 @@ static inline void hci_conn_put(struct hci_conn *conn)
- 		if (conn->type == ACL_LINK) {
- 			del_timer(&conn->idle_timer);
- 			if (conn->state == BT_CONNECTED) {
--				timeo = msecs_to_jiffies(HCI_DISCONN_TIMEOUT);
-+				timeo = msecs_to_jiffies(conn->disc_timeout);
- 				if (!conn->out)
--					timeo *= 5;
-+					timeo *= 2;
- 			} else
- 				timeo = msecs_to_jiffies(10);
- 		} else
-@@ -470,26 +472,26 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
+@@ -470,26 +470,26 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
  
  /* ----- HCI protocols ----- */
  struct hci_proto {
@@ -1337,7 +1053,7 @@ index 46a43b7..be5bd71 100644
  	hp = hci_proto[HCI_PROTO_L2CAP];
  	if (hp && hp->connect_ind)
  		mask |= hp->connect_ind(hdev, bdaddr, type);
-@@ -514,30 +516,52 @@ static inline void hci_proto_connect_cfm(struct hci_conn *conn, __u8 status)
+@@ -514,30 +514,52 @@ static inline void hci_proto_connect_cfm(struct hci_conn *conn, __u8 status)
  		hp->connect_cfm(conn, status);
  }
  
@@ -1397,7 +1113,7 @@ index 46a43b7..be5bd71 100644
  }
  
  static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt)
-@@ -545,12 +569,12 @@ static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status, __u
+@@ -545,12 +567,12 @@ static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status, __u
  	register struct hci_proto *hp;
  
  	hp = hci_proto[HCI_PROTO_L2CAP];
@@ -1414,7 +1130,7 @@ index 46a43b7..be5bd71 100644
  }
  
  int hci_register_proto(struct hci_proto *hproto);
-@@ -562,8 +586,7 @@ struct hci_cb {
+@@ -562,8 +584,7 @@ struct hci_cb {
  
  	char *name;
  
@@ -1424,7 +1140,7 @@ index 46a43b7..be5bd71 100644
  	void (*key_change_cfm)	(struct hci_conn *conn, __u8 status);
  	void (*role_switch_cfm)	(struct hci_conn *conn, __u8 status, __u8 role);
  };
-@@ -571,14 +594,20 @@ struct hci_cb {
+@@ -571,14 +592,20 @@ struct hci_cb {
  static inline void hci_auth_cfm(struct hci_conn *conn, __u8 status)
  {
  	struct list_head *p;
@@ -1447,7 +1163,7 @@ index 46a43b7..be5bd71 100644
  	}
  	read_unlock_bh(&hci_cb_list_lock);
  }
-@@ -587,13 +616,16 @@ static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encr
+@@ -587,13 +614,16 @@ static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encr
  {
  	struct list_head *p;
  
@@ -1658,7 +1374,7 @@ index c9cac77..0073ec8 100644
  
  static inline int cmtp_recv_frame(struct cmtp_session *session, struct sk_buff *skb)
 diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
-index a4a789f..8c66c9a 100644
+index a4a789f..1181db0 100644
 --- a/net/bluetooth/hci_conn.c
 +++ b/net/bluetooth/hci_conn.c
 @@ -123,6 +123,8 @@ void hci_add_sco(struct hci_conn *conn, __u16 handle)
@@ -1687,15 +1403,7 @@ index a4a789f..8c66c9a 100644
  
  	BT_DBG("conn %p state %d", conn, conn->state);
  
-@@ -166,14 +171,13 @@ static void hci_conn_timeout(unsigned long arg)
- 	switch (conn->state) {
- 	case BT_CONNECT:
- 	case BT_CONNECT2:
--		if (conn->type == ACL_LINK)
-+		if (conn->type == ACL_LINK && conn->out)
- 			hci_acl_connect_cancel(conn);
--		else
--			hci_acl_disconn(conn, 0x13);
+@@ -173,7 +178,8 @@ static void hci_conn_timeout(unsigned long arg)
  		break;
  	case BT_CONFIG:
  	case BT_CONNECTED:
@@ -1705,15 +1413,7 @@ index a4a789f..8c66c9a 100644
  		break;
  	default:
  		conn->state = BT_CLOSED;
-@@ -209,6 +213,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
- 	conn->state = BT_OPEN;
- 
- 	conn->power_save = 1;
-+	conn->disc_timeout = HCI_DISCONN_TIMEOUT;
- 
- 	switch (type) {
- 	case ACL_LINK:
-@@ -216,12 +221,13 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
+@@ -216,12 +222,13 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
  		break;
  	case SCO_LINK:
  		if (lmp_esco_capable(hdev))
@@ -1729,18 +1429,16 @@ index a4a789f..8c66c9a 100644
  		break;
  	}
  
-@@ -280,6 +286,10 @@ int hci_conn_del(struct hci_conn *conn)
+@@ -280,6 +287,8 @@ int hci_conn_del(struct hci_conn *conn)
  
  	skb_queue_purge(&conn->data_q);
  
 +	hci_conn_del_sysfs(conn);
 +
-+	hci_dev_put(hdev);
-+
  	return 0;
  }
  
-@@ -325,7 +335,7 @@ EXPORT_SYMBOL(hci_get_route);
+@@ -325,7 +334,7 @@ EXPORT_SYMBOL(hci_get_route);
  
  /* Create SCO or ACL connection.
   * Device _must_ be locked */
@@ -1749,7 +1447,7 @@ index a4a789f..8c66c9a 100644
  {
  	struct hci_conn *acl;
  	struct hci_conn *sco;
-@@ -340,6 +350,7 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
+@@ -340,6 +349,7 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
  	hci_conn_hold(acl);
  
  	if (acl->state == BT_OPEN || acl->state == BT_CLOSED) {
@@ -1757,7 +1455,7 @@ index a4a789f..8c66c9a 100644
  		acl->auth_type = auth_type;
  		hci_acl_connect(acl);
  	}
-@@ -385,51 +396,56 @@ int hci_conn_check_link_mode(struct hci_conn *conn)
+@@ -385,51 +395,59 @@ int hci_conn_check_link_mode(struct hci_conn *conn)
  EXPORT_SYMBOL(hci_conn_check_link_mode);
  
  /* Authenticate remote device */
@@ -1802,9 +1500,12 @@ index a4a789f..8c66c9a 100644
 +	if (sec_level == BT_SECURITY_SDP)
 +		return 1;
 +
-+	if (sec_level == BT_SECURITY_LOW &&
-+				(!conn->ssp_mode || !conn->hdev->ssp_mode))
-+		return 1;
++	if (sec_level == BT_SECURITY_LOW) {
++		if (conn->ssp_mode > 0 && conn->hdev->ssp_mode > 0)
++			return hci_conn_auth(conn, sec_level, auth_type);
++		else
++			return 1;
++	}
 +
  	if (conn->link_mode & HCI_LM_ENCRYPT)
 -		return hci_conn_auth(conn);
@@ -1829,7 +1530,7 @@ index a4a789f..8c66c9a 100644
  
  /* Change link key */
  int hci_conn_change_link_key(struct hci_conn *conn)
-@@ -442,12 +458,13 @@ int hci_conn_change_link_key(struct hci_conn *conn)
+@@ -442,12 +460,13 @@ int hci_conn_change_link_key(struct hci_conn *conn)
  		hci_send_cmd(conn->hdev, HCI_OP_CHANGE_CONN_LINK_KEY,
  							sizeof(cp), &cp);
  	}
@@ -1844,7 +1545,7 @@ index a4a789f..8c66c9a 100644
  {
  	BT_DBG("conn %p", conn);
  
-@@ -460,6 +477,7 @@ int hci_conn_switch_role(struct hci_conn *conn, uint8_t role)
+@@ -460,6 +479,7 @@ int hci_conn_switch_role(struct hci_conn *conn, uint8_t role)
  		cp.role = role;
  		hci_send_cmd(conn->hdev, HCI_OP_SWITCH_ROLE, sizeof(cp), &cp);
  	}
@@ -1852,7 +1553,7 @@ index a4a789f..8c66c9a 100644
  	return 0;
  }
  EXPORT_SYMBOL(hci_conn_switch_role);
-@@ -542,9 +560,7 @@ void hci_conn_hash_flush(struct hci_dev *hdev)
+@@ -542,9 +562,7 @@ void hci_conn_hash_flush(struct hci_dev *hdev)
  
  		c->state = BT_CLOSED;
  
@@ -1878,7 +1579,7 @@ index ba78cc1..cd06151 100644
  		if ((hdev->sent_cmd = skb_clone(skb, GFP_ATOMIC))) {
  			atomic_dec(&hdev->cmd_cnt);
 diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
-index f91ba69..184ba0a 100644
+index f91ba69..5553424 100644
 --- a/net/bluetooth/hci_event.c
 +++ b/net/bluetooth/hci_event.c
 @@ -484,6 +484,15 @@ static void hci_cc_read_local_features(struct hci_dev *hdev, struct sk_buff *skb
@@ -1897,34 +1598,7 @@ index f91ba69..184ba0a 100644
  	BT_DBG("%s features 0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x", hdev->name,
  					hdev->features[0], hdev->features[1],
  					hdev->features[2], hdev->features[3],
-@@ -857,8 +866,16 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s
- 	hci_dev_lock(hdev);
- 
- 	conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
--	if (!conn)
--		goto unlock;
-+	if (!conn) {
-+		if (ev->link_type != SCO_LINK)
-+			goto unlock;
-+
-+		conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr);
-+		if (!conn)
-+			goto unlock;
-+
-+		conn->type = SCO_LINK;
-+	}
- 
- 	if (!ev->status) {
- 		conn->handle = __le16_to_cpu(ev->handle);
-@@ -866,6 +883,7 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s
- 		if (conn->type == ACL_LINK) {
- 			conn->state = BT_CONFIG;
- 			hci_conn_hold(conn);
-+			conn->disc_timeout = HCI_DISCONN_TIMEOUT;
- 		} else
- 			conn->state = BT_CONNECTED;
- 
-@@ -914,7 +932,8 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s
+@@ -914,7 +923,8 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s
  	if (ev->status) {
  		hci_proto_connect_cfm(conn, ev->status);
  		hci_conn_del(conn);
@@ -1934,7 +1608,7 @@ index f91ba69..184ba0a 100644
  
  unlock:
  	hci_dev_unlock(hdev);
-@@ -1009,9 +1028,7 @@ static inline void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff
+@@ -1009,9 +1019,7 @@ static inline void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff
  	if (conn) {
  		conn->state = BT_CLOSED;
  
@@ -1945,67 +1619,7 @@ index f91ba69..184ba0a 100644
  		hci_conn_del(conn);
  	}
  
-@@ -1047,9 +1064,14 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *s
- 				hci_proto_connect_cfm(conn, ev->status);
- 				hci_conn_put(conn);
- 			}
--		} else
-+		} else {
- 			hci_auth_cfm(conn, ev->status);
- 
-+			hci_conn_hold(conn);
-+			conn->disc_timeout = HCI_DISCONN_TIMEOUT;
-+			hci_conn_put(conn);
-+		}
-+
- 		if (test_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend)) {
- 			if (!ev->status) {
- 				struct hci_cp_set_conn_encrypt cp;
-@@ -1463,7 +1485,21 @@ static inline void hci_mode_change_evt(struct hci_dev *hdev, struct sk_buff *skb
- 
- static inline void hci_pin_code_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
- {
-+	struct hci_ev_pin_code_req *ev = (void *) skb->data;
-+	struct hci_conn *conn;
-+
- 	BT_DBG("%s", hdev->name);
-+
-+	hci_dev_lock(hdev);
-+
-+	conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr);
-+	if (conn && conn->state == BT_CONNECTED) {
-+		hci_conn_hold(conn);
-+		conn->disc_timeout = HCI_PAIRING_TIMEOUT;
-+		hci_conn_put(conn);
-+	}
-+
-+	hci_dev_unlock(hdev);
- }
- 
- static inline void hci_link_key_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
-@@ -1473,7 +1509,21 @@ static inline void hci_link_key_request_evt(struct hci_dev *hdev, struct sk_buff
- 
- static inline void hci_link_key_notify_evt(struct hci_dev *hdev, struct sk_buff *skb)
- {
-+	struct hci_ev_link_key_notify *ev = (void *) skb->data;
-+	struct hci_conn *conn;
-+
- 	BT_DBG("%s", hdev->name);
-+
-+	hci_dev_lock(hdev);
-+
-+	conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr);
-+	if (conn) {
-+		hci_conn_hold(conn);
-+		conn->disc_timeout = HCI_DISCONN_TIMEOUT;
-+		hci_conn_put(conn);
-+	}
-+
-+	hci_dev_unlock(hdev);
- }
- 
- static inline void hci_clock_offset_evt(struct hci_dev *hdev, struct sk_buff *skb)
-@@ -1600,7 +1650,8 @@ static inline void hci_remote_ext_features_evt(struct hci_dev *hdev, struct sk_b
+@@ -1600,7 +1608,8 @@ static inline void hci_remote_ext_features_evt(struct hci_dev *hdev, struct sk_b
  
  		if (conn->state == BT_CONFIG) {
  			if (!ev->status && hdev->ssp_mode > 0 &&
@@ -2015,151 +1629,20 @@ index f91ba69..184ba0a 100644
  				struct hci_cp_auth_requested cp;
  				cp.handle = ev->handle;
  				hci_send_cmd(hdev, HCI_OP_AUTH_REQUESTED,
-@@ -1637,13 +1688,28 @@ static inline void hci_sync_conn_complete_evt(struct hci_dev *hdev, struct sk_bu
+@@ -1637,6 +1646,13 @@ static inline void hci_sync_conn_complete_evt(struct hci_dev *hdev, struct sk_bu
  		conn->type = SCO_LINK;
  	}
  
--	if (!ev->status) {
-+	switch (ev->status) {
-+	case 0x00:
- 		conn->handle = __le16_to_cpu(ev->handle);
- 		conn->state  = BT_CONNECTED;
- 
- 		hci_conn_add_sysfs(conn);
--	} else
-+		break;
-+
-+	case 0x1c:	/* SCO interval rejected */
-+	case 0x1f:	/* Unspecified error */
-+		if (conn->out && conn->attempt < 2) {
-+			conn->pkt_type = (hdev->esco_type & SCO_ESCO_MASK) |
++	if (conn->out && ev->status == 0x1c && conn->attempt < 2) {
++		conn->pkt_type = (hdev->esco_type & SCO_ESCO_MASK) |
 +					(hdev->esco_type & EDR_ESCO_MASK);
-+			hci_setup_sync(conn, conn->link->handle);
-+			goto unlock;
-+		}
-+		/* fall through */
-+
-+	default:
- 		conn->state = BT_CLOSED;
-+		break;
++		hci_setup_sync(conn, conn->link->handle);
++		goto unlock;
 +	}
- 
- 	hci_proto_connect_cfm(conn, ev->status);
- 	if (ev->status)
-diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
-index 1a1f916..41fbfa5 100644
---- a/net/bluetooth/hci_sysfs.c
-+++ b/net/bluetooth/hci_sysfs.c
-@@ -9,8 +9,7 @@
- struct class *bt_class = NULL;
- EXPORT_SYMBOL_GPL(bt_class);
- 
--static struct workqueue_struct *btaddconn;
--static struct workqueue_struct *btdelconn;
-+static struct workqueue_struct *bluetooth;
- 
- static inline char *link_typetostr(int type)
- {
-@@ -88,14 +87,17 @@ static struct device_type bt_link = {
- 
- static void add_conn(struct work_struct *work)
- {
--	struct hci_conn *conn = container_of(work, struct hci_conn, work);
-+	struct hci_conn *conn = container_of(work, struct hci_conn, work_add);
- 
--	flush_workqueue(btdelconn);
-+	/* ensure previous add/del is complete */
-+	flush_workqueue(bluetooth);
- 
- 	if (device_add(&conn->dev) < 0) {
- 		BT_ERR("Failed to register connection device");
- 		return;
- 	}
 +
-+	hci_dev_hold(hdev);
- }
- 
- void hci_conn_add_sysfs(struct hci_conn *conn)
-@@ -114,9 +116,9 @@ void hci_conn_add_sysfs(struct hci_conn *conn)
- 
- 	device_initialize(&conn->dev);
- 
--	INIT_WORK(&conn->work, add_conn);
-+	INIT_WORK(&conn->work_add, add_conn);
- 
--	queue_work(btaddconn, &conn->work);
-+	queue_work(bluetooth, &conn->work_add);
- }
- 
- /*
-@@ -131,9 +133,12 @@ static int __match_tty(struct device *dev, void *data)
- 
- static void del_conn(struct work_struct *work)
- {
--	struct hci_conn *conn = container_of(work, struct hci_conn, work);
-+	struct hci_conn *conn = container_of(work, struct hci_conn, work_del);
- 	struct hci_dev *hdev = conn->hdev;
- 
-+	/* ensure previous add/del is complete */
-+	flush_workqueue(bluetooth);
-+
- 	while (1) {
- 		struct device *dev;
- 
-@@ -146,6 +151,7 @@ static void del_conn(struct work_struct *work)
- 
- 	device_del(&conn->dev);
- 	put_device(&conn->dev);
-+
- 	hci_dev_put(hdev);
- }
- 
-@@ -156,9 +162,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn)
- 	if (!device_is_registered(&conn->dev))
- 		return;
- 
--	INIT_WORK(&conn->work, del_conn);
-+	INIT_WORK(&conn->work_del, del_conn);
- 
--	queue_work(btdelconn, &conn->work);
-+	queue_work(bluetooth, &conn->work_del);
- }
- 
- static inline char *host_typetostr(int type)
-@@ -435,20 +441,13 @@ void hci_unregister_sysfs(struct hci_dev *hdev)
- 
- int __init bt_sysfs_init(void)
- {
--	btaddconn = create_singlethread_workqueue("btaddconn");
--	if (!btaddconn)
-+	bluetooth = create_singlethread_workqueue("bluetooth");
-+	if (!bluetooth)
- 		return -ENOMEM;
- 
--	btdelconn = create_singlethread_workqueue("btdelconn");
--	if (!btdelconn) {
--		destroy_workqueue(btaddconn);
--		return -ENOMEM;
--	}
--
- 	bt_class = class_create(THIS_MODULE, "bluetooth");
- 	if (IS_ERR(bt_class)) {
--		destroy_workqueue(btdelconn);
--		destroy_workqueue(btaddconn);
-+		destroy_workqueue(bluetooth);
- 		return PTR_ERR(bt_class);
- 	}
- 
-@@ -457,8 +456,7 @@ int __init bt_sysfs_init(void)
- 
- void bt_sysfs_cleanup(void)
- {
--	destroy_workqueue(btaddconn);
--	destroy_workqueue(btdelconn);
-+	destroy_workqueue(bluetooth);
- 
- 	class_destroy(bt_class);
- }
+ 	if (!ev->status) {
+ 		conn->handle = __le16_to_cpu(ev->handle);
+ 		conn->state  = BT_CONNECTED;
 diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
 index b93748e..ca4d3b4 100644
 --- a/net/bluetooth/l2cap.c
@@ -3140,7 +2623,7 @@ index b93748e..ca4d3b4 100644
  };
  
 diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
-index acd84fd..374536e 100644
+index acd84fd..1d0fb0f 100644
 --- a/net/bluetooth/rfcomm/core.c
 +++ b/net/bluetooth/rfcomm/core.c
 @@ -46,7 +46,7 @@
@@ -3260,14 +2743,7 @@ index acd84fd..374536e 100644
  {
  	struct sock *sk = d->session->sock->sk;
  
-@@ -1170,17 +1194,38 @@ static void rfcomm_dlc_accept(struct rfcomm_dlc *d)
- 
- 	rfcomm_send_ua(d->session, d->dlci);
- 
-+	rfcomm_dlc_clear_timer(d);
-+
- 	rfcomm_dlc_lock(d);
- 	d->state = BT_CONNECTED;
+@@ -1175,12 +1199,31 @@ static void rfcomm_dlc_accept(struct rfcomm_dlc *d)
  	d->state_change(d, 0);
  	rfcomm_dlc_unlock(d);
  
@@ -3300,7 +2776,7 @@ index acd84fd..374536e 100644
  static int rfcomm_recv_sabm(struct rfcomm_session *s, u8 dlci)
  {
  	struct rfcomm_dlc *d;
-@@ -1203,11 +1248,7 @@ static int rfcomm_recv_sabm(struct rfcomm_session *s, u8 dlci)
+@@ -1203,11 +1246,7 @@ static int rfcomm_recv_sabm(struct rfcomm_session *s, u8 dlci)
  	if (d) {
  		if (d->state == BT_OPEN) {
  			/* DLC was previously opened by PN request */
@@ -3313,7 +2789,7 @@ index acd84fd..374536e 100644
  		}
  		return 0;
  	}
-@@ -1219,11 +1260,7 @@ static int rfcomm_recv_sabm(struct rfcomm_session *s, u8 dlci)
+@@ -1219,11 +1258,7 @@ static int rfcomm_recv_sabm(struct rfcomm_session *s, u8 dlci)
  		d->addr = __addr(s->initiator, dlci);
  		rfcomm_dlc_link(s, d);
  
@@ -3326,7 +2802,7 @@ index acd84fd..374536e 100644
  	} else {
  		rfcomm_send_dm(s, dlci);
  	}
-@@ -1637,11 +1674,12 @@ static void rfcomm_process_connect(struct rfcomm_session *s)
+@@ -1637,11 +1672,12 @@ static void rfcomm_process_connect(struct rfcomm_session *s)
  		d = list_entry(p, struct rfcomm_dlc, list);
  		if (d->state == BT_CONFIG) {
  			d->mtu = s->mtu;
@@ -3342,7 +2818,7 @@ index acd84fd..374536e 100644
  		}
  	}
  }
-@@ -1717,11 +1755,17 @@ static inline void rfcomm_process_dlcs(struct rfcomm_session *s)
+@@ -1717,11 +1753,17 @@ static inline void rfcomm_process_dlcs(struct rfcomm_session *s)
  			if (d->out) {
  				rfcomm_send_pn(s, 1, d);
  				rfcomm_dlc_set_timer(d, RFCOMM_CONN_TIMEOUT);
@@ -3365,7 +2841,7 @@ index acd84fd..374536e 100644
  			}
  			continue;
  		} else if (test_and_clear_bit(RFCOMM_AUTH_REJECT, &d->flags)) {
-@@ -1734,6 +1778,9 @@ static inline void rfcomm_process_dlcs(struct rfcomm_session *s)
+@@ -1734,6 +1776,9 @@ static inline void rfcomm_process_dlcs(struct rfcomm_session *s)
  			continue;
  		}
  
@@ -3375,7 +2851,7 @@ index acd84fd..374536e 100644
  		if (test_bit(RFCOMM_TX_THROTTLED, &s->flags))
  			continue;
  
-@@ -1876,6 +1923,7 @@ static int rfcomm_add_listener(bdaddr_t *ba)
+@@ -1876,6 +1921,7 @@ static int rfcomm_add_listener(bdaddr_t *ba)
  	bacpy(&addr.l2_bdaddr, ba);
  	addr.l2_family = AF_BLUETOOTH;
  	addr.l2_psm    = htobs(RFCOMM_PSM);
@@ -3383,7 +2859,7 @@ index acd84fd..374536e 100644
  	err = kernel_bind(sock, (struct sockaddr *) &addr, sizeof(addr));
  	if (err < 0) {
  		BT_ERR("Bind failed %d", err);
-@@ -1947,42 +1995,7 @@ static int rfcomm_run(void *unused)
+@@ -1947,42 +1993,7 @@ static int rfcomm_run(void *unused)
  	return 0;
  }
  
@@ -3427,7 +2903,7 @@ index acd84fd..374536e 100644
  {
  	struct rfcomm_session *s;
  	struct rfcomm_dlc *d;
-@@ -1999,18 +2012,29 @@ static void rfcomm_encrypt_cfm(struct hci_conn *conn, u8 status, u8 encrypt)
+@@ -1999,18 +2010,29 @@ static void rfcomm_encrypt_cfm(struct hci_conn *conn, u8 status, u8 encrypt)
  	list_for_each_safe(p, n, &s->dlcs) {
  		d = list_entry(p, struct rfcomm_dlc, list);
  
@@ -3464,7 +2940,7 @@ index acd84fd..374536e 100644
  			set_bit(RFCOMM_AUTH_ACCEPT, &d->flags);
  		else
  			set_bit(RFCOMM_AUTH_REJECT, &d->flags);
-@@ -2023,8 +2047,7 @@ static void rfcomm_encrypt_cfm(struct hci_conn *conn, u8 status, u8 encrypt)
+@@ -2023,8 +2045,7 @@ static void rfcomm_encrypt_cfm(struct hci_conn *conn, u8 status, u8 encrypt)
  
  static struct hci_cb rfcomm_cb = {
  	.name		= "RFCOMM",


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1681
retrieving revision 1.1682
diff -u -p -r1.1681 -r1.1682
--- kernel.spec	25 Jul 2009 03:16:38 -0000	1.1681
+++ kernel.spec	25 Jul 2009 04:09:23 -0000	1.1682
@@ -1831,6 +1831,12 @@ fi
 
 %changelog
 * Fri Jul 24 2009 Kyle McMartin <kyle at redhat.com>
+- CONFIG_DEFAULT_MMAP_MIN_ADDR=65536 [i386 x86_64], 4096 elsewhere, as
+  per defconfigs.
+- Blat patches from other tag, now to rebase fixes, splat in the changelog,
+  and tag it for building.
+
+* Fri Jul 24 2009 Kyle McMartin <kyle at redhat.com>
 - Copy over release configs from devel-2.6.30 tag.
 - Fix up some spec deviations.
 

linux-2.6-defaults-pci_no_msi.patch:
 b/drivers/pci/Kconfig                                   |   12 ++++++++++++
 b/drivers/pci/msi.c                                     |    9 +++++++++
 b/drivers/pci/pci.c                                     |    2 ++
 b/drivers/pci/pci.h                                     |    2 ++
 linux-2.6.29.noarch/Documentation/kernel-parameters.txt |    3 +++
 5 files changed, 28 insertions(+)

Index: linux-2.6-defaults-pci_no_msi.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/linux-2.6-defaults-pci_no_msi.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- linux-2.6-defaults-pci_no_msi.patch	4 Feb 2009 17:50:39 -0000	1.4
+++ linux-2.6-defaults-pci_no_msi.patch	25 Jul 2009 04:09:24 -0000	1.5
@@ -1,10 +1,8 @@
-diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
-index d8362cf..30d6053 100644
---- a/Documentation/kernel-parameters.txt
-+++ b/Documentation/kernel-parameters.txt
-@@ -1674,6 +1674,9 @@ and is between 256 and 4096 characters. It is defined in the file
+--- linux-2.6.29.noarch/Documentation/kernel-parameters.txt~	2009-04-20 13:36:09.000000000 -0400
++++ linux-2.6.29.noarch/Documentation/kernel-parameters.txt	2009-04-20 13:36:33.000000000 -0400
+@@ -1723,6 +1723,9 @@ and is between 256 and 4096 characters. 
  				root domains (aka PCI segments, in ACPI-speak).
- 		nommconf	[X86-32,X86_64] Disable use of MMCONFIG for PCI
+ 		nommconf	[X86] Disable use of MMCONFIG for PCI
  				Configuration
 +		msi		[MSI] If the PCI_MSI kernel config parameter is
 +				enabled, this kernel boot option can be used to

linux-2.6-execshield.patch:
 arch/x86/include/asm/desc.h      |   25 +++++++
 arch/x86/include/asm/mmu.h       |    7 ++
 arch/x86/include/asm/paravirt.h  |    9 ++
 arch/x86/include/asm/processor.h |    3 
 arch/x86/kernel/cpu/common.c     |   14 ++++
 arch/x86/kernel/paravirt.c       |    3 
 arch/x86/kernel/process_32.c     |   49 ++++++++++++++
 arch/x86/kernel/traps.c          |  129 ++++++++++++++++++++++++++++++++++++---
 arch/x86/mm/init.c               |    4 +
 arch/x86/mm/init_32.c            |   16 ++--
 arch/x86/mm/mmap.c               |    5 +
 arch/x86/mm/tlb.c                |    7 ++
 arch/x86/vdso/vdso32-setup.c     |    2 
 arch/x86/xen/enlighten.c         |   21 ++++++
 fs/binfmt_elf.c                  |   21 +++++-
 include/linux/mm.h               |    8 ++
 include/linux/mm_types.h         |    3 
 include/linux/resource.h         |    5 +
 include/linux/sched.h            |    7 ++
 kernel/sysctl.c                  |   28 ++++++++
 mm/mmap.c                        |  121 ++++++++++++++++++++++++++++++++++--
 mm/mprotect.c                    |   10 ++-
 mm/mremap.c                      |    4 -
 23 files changed, 464 insertions(+), 37 deletions(-)

Index: linux-2.6-execshield.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/linux-2.6-execshield.patch,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -p -r1.105 -r1.106
--- linux-2.6-execshield.patch	9 May 2009 02:08:24 -0000	1.105
+++ linux-2.6-execshield.patch	25 Jul 2009 04:09:24 -0000	1.106
@@ -1,5 +1,5 @@
 diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h
-index dc27705..34ed3a2 100644
+index 5623c50..353a24e 100644
 --- a/arch/x86/include/asm/desc.h
 +++ b/arch/x86/include/asm/desc.h
 @@ -6,6 +6,7 @@
@@ -10,7 +10,7 @@ index dc27705..34ed3a2 100644
  
  static inline void fill_ldt(struct desc_struct *desc,
  			    const struct user_desc *info)
-@@ -95,6 +96,9 @@ static inline int desc_empty(const void *ptr)
+@@ -94,6 +95,9 @@ static inline int desc_empty(const void *ptr)
  
  #define load_TLS(t, cpu) native_load_tls(t, cpu)
  #define set_ldt native_set_ldt
@@ -20,7 +20,7 @@ index dc27705..34ed3a2 100644
  
  #define write_ldt_entry(dt, entry, desc)	\
  	native_write_ldt_entry(dt, entry, desc)
-@@ -379,6 +383,27 @@ static inline void set_system_intr_gate_ist(int n, void *addr, unsigned ist)
+@@ -380,6 +384,27 @@ static inline void set_system_intr_gate_ist(int n, void *addr, unsigned ist)
  	_set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, __KERNEL_CS);
  }
  
@@ -73,10 +73,10 @@ index 80a1dee..8314c66 100644
  
  #ifdef CONFIG_SMP
 diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
-index e299287..aaa8a35 100644
+index 7727aa8..5d6083c 100644
 --- a/arch/x86/include/asm/paravirt.h
 +++ b/arch/x86/include/asm/paravirt.h
-@@ -113,6 +113,9 @@ struct pv_cpu_ops {
+@@ -138,6 +138,9 @@ struct pv_cpu_ops {
  	void (*store_gdt)(struct desc_ptr *);
  	void (*store_idt)(struct desc_ptr *);
  	void (*set_ldt)(const void *desc, unsigned entries);
@@ -86,7 +86,7 @@ index e299287..aaa8a35 100644
  	unsigned long (*store_tr)(void);
  	void (*load_tls)(struct thread_struct *t, unsigned int cpu);
  #ifdef CONFIG_X86_64
-@@ -860,6 +863,12 @@ static inline void set_ldt(const void *addr, unsigned entries)
+@@ -953,6 +956,12 @@ static inline void set_ldt(const void *addr, unsigned entries)
  {
  	PVOP_VCALL2(pv_cpu_ops.set_ldt, addr, entries);
  }
@@ -100,10 +100,10 @@ index e299287..aaa8a35 100644
  {
  	PVOP_VCALL1(pv_cpu_ops.store_gdt, dtr);
 diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
-index 3bfd523..99c8119 100644
+index 34c5237..4fc080f 100644
 --- a/arch/x86/include/asm/processor.h
 +++ b/arch/x86/include/asm/processor.h
-@@ -158,6 +158,9 @@ static inline int hlt_works(int cpu)
+@@ -159,6 +159,9 @@ static inline int hlt_works(int cpu)
  
  #define cache_line_size()	(boot_cpu_data.x86_cache_alignment)
  
@@ -114,12 +114,12 @@ index 3bfd523..99c8119 100644
  
  extern struct pt_regs *idle_regs(struct pt_regs *);
 diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
-index 83492b1..a84c787 100644
+index c4f6678..0a680c0 100644
 --- a/arch/x86/kernel/cpu/common.c
 +++ b/arch/x86/kernel/cpu/common.c
-@@ -708,6 +708,21 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
- 	 * we do "generic changes."
- 	 */
+@@ -789,6 +789,20 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
+ 	/* Filter out anything that depends on CPUID levels we don't have */
+ 	filter_cpuid_features(c, true);
  
 +	/*
 +	 *  emulation of NX with segment limits unfortunately means
@@ -135,15 +135,14 @@ index 83492b1..a84c787 100644
 +			clear_cpu_cap(c, X86_FEATURE_SEP);
 +	}
 +
-+
  	/* If the model name is still unset, do table lookup. */
  	if (!c->x86_model_id[0]) {
- 		char *p;
+ 		const char *p;
 diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
-index c6520a4..2066aa1 100644
+index 8e45f44..13c0535 100644
 --- a/arch/x86/kernel/paravirt.c
 +++ b/arch/x86/kernel/paravirt.c
-@@ -352,6 +352,9 @@ struct pv_cpu_ops pv_cpu_ops = {
+@@ -369,6 +369,9 @@ struct pv_cpu_ops pv_cpu_ops = {
  	.read_tscp = native_read_tscp,
  	.load_tr_desc = native_load_tr_desc,
  	.set_ldt = native_set_ldt,
@@ -154,19 +153,21 @@ index c6520a4..2066aa1 100644
  	.load_idt = native_load_idt,
  	.store_gdt = native_store_gdt,
 diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
-index bd4da2a..60823d4 100644
+index 76f8f84..4118f17 100644
 --- a/arch/x86/kernel/process_32.c
 +++ b/arch/x86/kernel/process_32.c
-@@ -343,6 +343,8 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
+@@ -301,7 +301,10 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
  void
  start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
  {
 +	int cpu;
 +
- 	__asm__("movl %0, %%gs" : : "r"(0));
+ 	set_user_gs(regs, 0);
++
  	regs->fs		= 0;
  	set_fs(USER_DS);
-@@ -352,6 +354,11 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
+ 	regs->ds		= __USER_DS;
+@@ -310,6 +313,11 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
  	regs->cs		= __USER_CS;
  	regs->ip		= new_ip;
  	regs->sp		= new_sp;
@@ -178,7 +179,7 @@ index bd4da2a..60823d4 100644
  	/*
  	 * Free the old FP and other extended state
  	 */
-@@ -519,7 +526,8 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
+@@ -356,7 +364,8 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
  	/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
  
  	__unlazy_fpu(prev_p);
@@ -188,7 +189,7 @@ index bd4da2a..60823d4 100644
  
  	/* we're going to use this soon, after a few expensive things */
  	if (next_p->fpu_counter > 5)
-@@ -692,3 +700,41 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
+@@ -509,3 +518,41 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
  	unsigned long range_end = mm->brk + 0x02000000;
  	return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
  }
@@ -230,34 +231,13 @@ index bd4da2a..60823d4 100644
 +	mm->context.exec_limit = 0;
 +	set_user_cs(&mm->context.user_cs, 0);
 +}
-diff --git a/arch/x86/kernel/tlb_32.c b/arch/x86/kernel/tlb_32.c
-index ce50546..bd6593a 100644
---- a/arch/x86/kernel/tlb_32.c
-+++ b/arch/x86/kernel/tlb_32.c
-@@ -2,6 +2,7 @@
- #include <linux/cpu.h>
- #include <linux/interrupt.h>
- 
-+#include <asm/desc.h>
- #include <asm/tlbflush.h>
- 
- DEFINE_PER_CPU(struct tlb_state, cpu_tlbstate)
-@@ -91,6 +92,8 @@ void smp_invalidate_interrupt(struct pt_regs *regs)
- 	unsigned long cpu;
- 
- 	cpu = get_cpu();
-+	if (current->active_mm)
-+		load_user_cs_desc(cpu, current->active_mm);
- 
- 	if (!cpu_isset(cpu, flush_cpumask))
- 		goto out;
 diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
-index a9e7548..af0f8f0 100644
+index a1d2883..453b616 100644
 --- a/arch/x86/kernel/traps.c
 +++ b/arch/x86/kernel/traps.c
-@@ -160,6 +160,76 @@ static int lazy_iobitmap_copy(void)
- 
- 	return 0;
+@@ -118,6 +118,76 @@ die_if_kernel(const char *str, struct pt_regs *regs, long err)
+ 	if (!user_mode_vm(regs))
+ 		die(str, regs, err);
  }
 +
 +static inline int
@@ -332,7 +312,7 @@ index a9e7548..af0f8f0 100644
  #endif
  
  static void __kprobes
-@@ -323,6 +393,29 @@ do_general_protection(struct pt_regs *regs, long error_code)
+@@ -276,6 +346,29 @@ do_general_protection(struct pt_regs *regs, long error_code)
  	if (!user_mode(regs))
  		goto gp_in_kernel;
  
@@ -362,7 +342,7 @@ index a9e7548..af0f8f0 100644
  	tsk->thread.error_code = error_code;
  	tsk->thread.trap_no = 13;
  
-@@ -934,19 +1027,37 @@ dotraplinkage void __kprobes do_device_not_available(struct pt_regs regs)
+@@ -888,19 +981,37 @@ do_device_not_available(struct pt_regs *regs, long error_code)
  }
  
  #ifdef CONFIG_X86_32
@@ -388,7 +368,7 @@ index a9e7548..af0f8f0 100644
 -	info.si_signo = SIGILL;
 -	info.si_errno = 0;
 -	info.si_code = ILL_BADSTK;
--	info.si_addr = 0;
+-	info.si_addr = NULL;
 -	if (notify_die(DIE_TRAP, "iret exception",
 -			regs, error_code, 32, SIGILL) == NOTIFY_STOP)
 -		return;
@@ -409,11 +389,27 @@ index a9e7548..af0f8f0 100644
  }
  #endif
  
+diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
+index fd3da1d..ac54294 100644
+--- a/arch/x86/mm/init.c
++++ b/arch/x86/mm/init.c
+@@ -163,7 +163,11 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
+ 	set_nx();
+ 	if (nx_enabled)
+ 		printk(KERN_INFO "NX (Execute Disable) protection: active\n");
++	else
+ #endif
++	if (exec_shield)
++		printk(KERN_INFO "Using x86 segment limits to approximate "
++			"NX protection\n");
+ 
+ 	/* Enable PSE if available */
+ 	if (cpu_has_pse)
 diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
-index 2cef050..a18ae07 100644
+index 749559e..ad9943c 100644
 --- a/arch/x86/mm/init_32.c
 +++ b/arch/x86/mm/init_32.c
-@@ -617,7 +617,7 @@ static int disable_nx __initdata;
+@@ -602,7 +602,7 @@ static int disable_nx __initdata;
   * Control non executable mappings.
   *
   * on      Enable
@@ -422,7 +418,7 @@ index 2cef050..a18ae07 100644
   */
  static int __init noexec_setup(char *str)
  {
-@@ -626,14 +626,12 @@ static int __init noexec_setup(char *str)
+@@ -611,14 +611,12 @@ static int __init noexec_setup(char *str)
  			__supported_pte_mask |= _PAGE_NX;
  			disable_nx = 0;
  		}
@@ -443,20 +439,8 @@ index 2cef050..a18ae07 100644
  
  	return 0;
  }
-@@ -892,7 +890,11 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
- 	set_nx();
- 	if (nx_enabled)
- 		printk(KERN_INFO "NX (Execute Disable) protection: active\n");
-+	else
- #endif
-+	if (exec_shield)
-+		printk(KERN_INFO "Using x86 segment limits to approximate "
-+			"NX protection\n");
- 
- 	/* Enable PSE if available */
- 	if (cpu_has_pse)
 diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
-index 56fe712..30d2be7 100644
+index 1658296..72056cf 100644
 --- a/arch/x86/mm/mmap.c
 +++ b/arch/x86/mm/mmap.c
 @@ -111,13 +111,16 @@ static unsigned long mmap_legacy_base(void)
@@ -477,6 +461,31 @@ index 56fe712..30d2be7 100644
  		mm->unmap_area = arch_unmap_area_topdown;
  	}
  }
+diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
+index 821e970..ea5a4c3 100644
+--- 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 <asm/desc.h>
+ #include <asm/tlbflush.h>
+ #include <asm/mmu_context.h>
+ #include <asm/apic.h>
+@@ -129,6 +130,12 @@ void smp_invalidate_interrupt(struct pt_regs *regs)
+ 	union smp_flush_state *f;
+ 
+ 	cpu = smp_processor_id();
++
++#ifdef CONFIG_X86_32
++	if (current->active_mm)
++		load_user_cs_desc(cpu, current->active_mm);
++#endif
++
+ 	/*
+ 	 * orig_rax contains the negated interrupt vector.
+ 	 * Use that to determine where the sender put the data.
 diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
 index 1241f11..3f2c44c 100644
 --- a/arch/x86/vdso/vdso32-setup.c
@@ -491,10 +500,10 @@ index 1241f11..3f2c44c 100644
  			ret = addr;
  			goto up_fail;
 diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
-index b58e963..cdc83ce 100644
+index 82cd39a..702e3a0 100644
 --- a/arch/x86/xen/enlighten.c
 +++ b/arch/x86/xen/enlighten.c
-@@ -316,6 +316,24 @@ static void xen_set_ldt(const void *addr, unsigned entries)
+@@ -282,6 +282,24 @@ static void xen_set_ldt(const void *addr, unsigned entries)
  	xen_mc_issue(PARAVIRT_LAZY_CPU);
  }
  
@@ -519,7 +528,7 @@ index b58e963..cdc83ce 100644
  static void xen_load_gdt(const struct desc_ptr *dtr)
  {
  	unsigned long *frames;
-@@ -1232,6 +1250,9 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
+@@ -792,6 +810,9 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
  
  	.load_tr_desc = paravirt_nop,
  	.set_ldt = xen_set_ldt,
@@ -530,10 +539,10 @@ index b58e963..cdc83ce 100644
  	.load_idt = xen_load_idt,
  	.load_tls = xen_load_tls,
 diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
-index 33b7235..ce1f044 100644
+index 40381df..f856fab 100644
 --- a/fs/binfmt_elf.c
 +++ b/fs/binfmt_elf.c
-@@ -80,7 +80,7 @@ static struct linux_binfmt elf_format = {
+@@ -73,7 +73,7 @@ static struct linux_binfmt elf_format = {
  		.hasvdso	= 1
  };
  
@@ -542,7 +551,7 @@ index 33b7235..ce1f044 100644
  
  static int set_brk(unsigned long start, unsigned long end)
  {
-@@ -735,6 +735,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
+@@ -721,6 +721,11 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
  			break;
  		}
  
@@ -554,7 +563,7 @@ index 33b7235..ce1f044 100644
  	/* Some simple consistency checks for the interpreter */
  	if (elf_interpreter) {
  		retval = -ELIBBAD;
-@@ -754,6 +759,15 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
+@@ -740,6 +745,15 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
  	if (retval)
  		goto out_free_dentry;
  
@@ -570,7 +579,7 @@ index 33b7235..ce1f044 100644
  	/* OK, This is the point of no return */
  	current->flags &= ~PF_FORKNOEXEC;
  	current->mm->def_flags = def_flags;
-@@ -761,7 +775,8 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
+@@ -747,7 +761,8 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
  	/* Do this immediately, since STACK_TOP as used in setup_arg_pages
  	   may depend on the personality.  */
  	SET_PERSONALITY(loc->elf_ex);
@@ -580,7 +589,7 @@ index 33b7235..ce1f044 100644
  		current->personality |= READ_IMPLIES_EXEC;
  
  	if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
-@@ -926,7 +941,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
+@@ -912,7 +927,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
  					    interpreter,
  					    &interp_map_addr,
  					    load_bias);
@@ -590,10 +599,10 @@ index 33b7235..ce1f044 100644
  			 * load_elf_interp() returns relocation
  			 * adjustment
 diff --git a/include/linux/mm.h b/include/linux/mm.h
-index 065cdf8..aa94aa9 100644
+index bff1f0d..88c5efa 100644
 --- a/include/linux/mm.h
 +++ b/include/linux/mm.h
-@@ -1135,7 +1135,13 @@ extern int install_special_mapping(struct mm_struct *mm,
+@@ -1138,7 +1138,13 @@ extern int install_special_mapping(struct mm_struct *mm,
  				   unsigned long addr, unsigned long len,
  				   unsigned long flags, struct page **pages);
  
@@ -609,10 +618,10 @@ index 065cdf8..aa94aa9 100644
  extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
  	unsigned long len, unsigned long prot,
 diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
-index 92915e8..4bfd050 100644
+index 0e80e26..af904ea 100644
 --- a/include/linux/mm_types.h
 +++ b/include/linux/mm_types.h
-@@ -194,6 +194,9 @@ struct mm_struct {
+@@ -198,6 +198,9 @@ struct mm_struct {
  	unsigned long (*get_unmapped_area) (struct file *filp,
  				unsigned long addr, unsigned long len,
  				unsigned long pgoff, unsigned long flags);
@@ -640,12 +649,12 @@ index 40fc7e6..68c2549 100644
  /*
   * GPG2 wants 64kB of mlocked memory, to make sure pass phrases
 diff --git a/include/linux/sched.h b/include/linux/sched.h
-index 8c216e0..79eca33 100644
+index b94f354..aed6221 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -98,6 +98,9 @@ struct robust_list_head;
- struct bio;
+@@ -99,6 +99,9 @@ struct bio;
  struct bts_tracer;
+ struct fs_struct;
  
 +extern int exec_shield;
 +extern int print_fatal_signals;
@@ -653,7 +662,7 @@ index 8c216e0..79eca33 100644
  /*
   * List of flags we want to share for kernel threads,
   * if only because they are not used by them anyway.
-@@ -346,6 +349,10 @@ extern int sysctl_max_map_count;
+@@ -351,6 +354,10 @@ extern int sysctl_max_map_count;
  extern unsigned long
  arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
  		       unsigned long, unsigned long);
@@ -665,10 +674,10 @@ index 8c216e0..79eca33 100644
  arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
  			  unsigned long len, unsigned long pgoff,
 diff --git a/kernel/sysctl.c b/kernel/sysctl.c
-index c5ef44f..f7abce4 100644
+index 82350f8..d89dd29 100644
 --- a/kernel/sysctl.c
 +++ b/kernel/sysctl.c
-@@ -85,6 +85,26 @@ extern int sysctl_nr_open_min, sysctl_nr_open_max;
+@@ -86,6 +86,26 @@ extern int sysctl_nr_open_min, sysctl_nr_open_max;
  #ifndef CONFIG_MMU
  extern int sysctl_nr_trim_pages;
  #endif
@@ -695,7 +704,7 @@ index c5ef44f..f7abce4 100644
  #ifdef CONFIG_RCU_TORTURE_TEST
  extern int rcutorture_runnable;
  #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
-@@ -379,6 +399,14 @@ static struct ctl_table kern_table[] = {
+@@ -377,6 +397,14 @@ static struct ctl_table kern_table[] = {
  		.proc_handler	= &proc_dointvec,
  	},
  	{
@@ -711,10 +720,10 @@ index c5ef44f..f7abce4 100644
  		.procname	= "core_uses_pid",
  		.data		= &core_uses_pid,
 diff --git a/mm/mmap.c b/mm/mmap.c
-index 00ced3e..931bc3b 100644
+index 4a38411..12ca810 100644
 --- a/mm/mmap.c
 +++ b/mm/mmap.c
-@@ -27,6 +27,7 @@
+@@ -28,6 +28,7 @@
  #include <linux/mempolicy.h>
  #include <linux/rmap.h>
  #include <linux/mmu_notifier.h>
@@ -722,7 +731,7 @@ index 00ced3e..931bc3b 100644
  
  #include <asm/uaccess.h>
  #include <asm/cacheflush.h>
-@@ -43,6 +44,18 @@
+@@ -44,6 +45,18 @@
  #define arch_rebalance_pgtables(addr, len)		(addr)
  #endif
  
@@ -741,7 +750,7 @@ index 00ced3e..931bc3b 100644
  static void unmap_region(struct mm_struct *mm,
  		struct vm_area_struct *vma, struct vm_area_struct *prev,
  		unsigned long start, unsigned long end);
-@@ -391,6 +404,8 @@ static inline void
+@@ -392,6 +405,8 @@ static inline void
  __vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma,
  		struct vm_area_struct *prev, struct rb_node *rb_parent)
  {
@@ -750,7 +759,7 @@ index 00ced3e..931bc3b 100644
  	if (prev) {
  		vma->vm_next = prev->vm_next;
  		prev->vm_next = vma;
-@@ -493,6 +508,8 @@ __vma_unlink(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -494,6 +509,8 @@ __vma_unlink(struct mm_struct *mm, struct vm_area_struct *vma,
  	rb_erase(&vma->vm_rb, &mm->mm_rb);
  	if (mm->mmap_cache == vma)
  		mm->mmap_cache = prev;
@@ -759,7 +768,7 @@ index 00ced3e..931bc3b 100644
  }
  
  /*
-@@ -802,6 +819,8 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -803,6 +820,8 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
  		} else					/* cases 2, 5, 7 */
  			vma_adjust(prev, prev->vm_start,
  				end, prev->vm_pgoff, NULL);
@@ -768,7 +777,7 @@ index 00ced3e..931bc3b 100644
  		return prev;
  	}
  
-@@ -956,7 +975,8 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+@@ -957,7 +976,8 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
  	/* Obtain the address to map to. we verify (or select) it and ensure
  	 * that it represents a valid section of the address space.
  	 */
@@ -778,7 +787,7 @@ index 00ced3e..931bc3b 100644
  	if (addr & ~PAGE_MASK)
  		return addr;
  
-@@ -1436,13 +1456,17 @@ void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr)
+@@ -1440,13 +1460,17 @@ void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr)
  }
  
  unsigned long
@@ -799,7 +808,7 @@ index 00ced3e..931bc3b 100644
  	if (file && file->f_op && file->f_op->get_unmapped_area)
  		get_area = file->f_op->get_unmapped_area;
  	addr = get_area(file, addr, len, pgoff, flags);
-@@ -1456,8 +1480,76 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
+@@ -1460,8 +1484,76 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
  
  	return arch_rebalance_pgtables(addr, len);
  }
@@ -877,7 +886,7 @@ index 00ced3e..931bc3b 100644
  
  /* Look up the first VMA which satisfies  addr < vm_end,  NULL if none. */
  struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
-@@ -1532,6 +1624,14 @@ out:
+@@ -1536,6 +1628,14 @@ out:
  	return prev ? prev->vm_next : vma;
  }
  
@@ -892,7 +901,7 @@ index 00ced3e..931bc3b 100644
  /*
   * Verify that the stack growth is acceptable and
   * update accounting. This is shared with both the
-@@ -1548,7 +1648,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
+@@ -1552,7 +1652,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
  		return -ENOMEM;
  
  	/* Stack limit test */
@@ -901,7 +910,7 @@ index 00ced3e..931bc3b 100644
  		return -ENOMEM;
  
  	/* mlock limit tests */
-@@ -1858,10 +1958,14 @@ int split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
+@@ -1862,10 +1962,14 @@ int split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
  	if (new->vm_ops && new->vm_ops->open)
  		new->vm_ops->open(new);
  
@@ -918,7 +927,7 @@ index 00ced3e..931bc3b 100644
  		vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
  
  	return 0;
-@@ -2110,6 +2214,7 @@ void exit_mmap(struct mm_struct *mm)
+@@ -2114,6 +2218,7 @@ void exit_mmap(struct mm_struct *mm)
  	vm_unacct_memory(nr_accounted);
  	free_pgtables(tlb, vma, FIRST_USER_ADDRESS, 0);
  	tlb_finish_mmu(tlb, 0, end);

linux-2.6-tracehook.patch:
 include/linux/tracehook.h |   25 ++++++++++------
 kernel/signal.c           |   69 +++++++++++++++++++++++-----------------------
 2 files changed, 51 insertions(+), 43 deletions(-)

Index: linux-2.6-tracehook.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/linux-2.6-tracehook.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- linux-2.6-tracehook.patch	2 Jun 2009 20:44:55 -0000	1.9
+++ linux-2.6-tracehook.patch	25 Jul 2009 04:09:27 -0000	1.10
@@ -19,7 +19,7 @@ Signed-off-by: Roland McGrath <roland at re
  2 files changed, 51 insertions(+), 43 deletions(-)
 
 diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
-index 6186a78..b622498 100644  
+index c7aa154..4ec4821 100644  
 --- a/include/linux/tracehook.h
 +++ b/include/linux/tracehook.h
 @@ -1,7 +1,7 @@
@@ -31,7 +31,7 @@ index 6186a78..b622498 100644  
   *
   * This copyrighted material is made available to anyone wishing to use,
   * modify, copy, or redistribute it subject to the terms and conditions
-@@ -469,22 +469,29 @@ static inline int tracehook_get_signal(s
+@@ -464,22 +464,29 @@ static inline int tracehook_get_signal(s
  
  /**
   * tracehook_notify_jctl - report about job control stop/continue
@@ -70,10 +70,10 @@ index 6186a78..b622498 100644  
  
  #define DEATH_REAP			-1
 diff --git a/kernel/signal.c b/kernel/signal.c
-index 1c88144..1adbb90 100644  
+index d803473..424eff2 100644  
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
-@@ -691,7 +691,7 @@ static int prepare_signal(int sig, struc
+@@ -702,7 +702,7 @@ static int prepare_signal(int sig, struc
  
  		if (why) {
  			/*
@@ -82,7 +82,7 @@ index 1c88144..1adbb90 100644  
  			 * will take ->siglock, notice SIGNAL_CLD_MASK, and
  			 * notify its parent. See get_signal_to_deliver().
  			 */
-@@ -1637,29 +1637,6 @@ void ptrace_notify(int exit_code)
+@@ -1665,29 +1665,6 @@ void ptrace_notify(int exit_code)
  	spin_unlock_irq(&current->sighand->siglock);
  }
  
@@ -112,7 +112,7 @@ index 1c88144..1adbb90 100644  
  /*
   * This performs the stopping for SIGSTOP and other stop signals.
   * We have to stop all threads in the thread group.
-@@ -1670,6 +1647,7 @@ static int do_signal_stop(int signr)
+@@ -1698,6 +1675,7 @@ static int do_signal_stop(int signr)
  {
  	struct signal_struct *sig = current->signal;
  	int stop_count;
@@ -120,7 +120,7 @@ index 1c88144..1adbb90 100644  
  
  	if (sig->group_stop_count > 0) {
  		/*
-@@ -1709,8 +1687,30 @@ static int do_signal_stop(int signr)
+@@ -1737,8 +1715,30 @@ static int do_signal_stop(int signr)
  	current->exit_code = sig->group_exit_code;
  	__set_current_state(TASK_STOPPED);
  
@@ -152,7 +152,7 @@ index 1c88144..1adbb90 100644  
  	return 1;
  }
  
-@@ -1779,14 +1779,15 @@ relock:
+@@ -1807,14 +1807,15 @@ relock:
  		int why = (signal->flags & SIGNAL_STOP_CONTINUED)
  				? CLD_CONTINUED : CLD_STOPPED;
  		signal->flags &= ~SIGNAL_CLD_MASK;
@@ -174,7 +174,7 @@ index 1c88144..1adbb90 100644  
  		goto relock;
  	}
  
-@@ -1944,14 +1945,14 @@ void exit_signals(struct task_struct *ts
+@@ -1979,14 +1980,14 @@ void exit_signals(struct task_struct *ts
  	if (unlikely(tsk->signal->group_stop_count) &&
  			!--tsk->signal->group_stop_count) {
  		tsk->signal->flags = SIGNAL_STOP_STOPPED;

linux-2.6-upstream-reverts.patch:
 0 files changed

Index: linux-2.6-upstream-reverts.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/linux-2.6-upstream-reverts.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- linux-2.6-upstream-reverts.patch	13 Jun 2009 02:07:58 -0000	1.7
+++ linux-2.6-upstream-reverts.patch	25 Jul 2009 04:09:27 -0000	1.8
@@ -1,36 +1 @@
-From 42beefc0093725ec0f8cea340cc54c36ccaceea0 Mon Sep 17 00:00:00 2001
-From: Dave Airlie <airlied at redhat.com>
-Date: Wed, 6 May 2009 09:04:52 +1000
-Subject: drm/r128: fix r128 ioremaps to use ioremap_wc.
-
-From: Dave Airlie <airlied at redhat.com>
-
-commit 42beefc0093725ec0f8cea340cc54c36ccaceea0 upstream.
-
-This should allow r128 to start working again since PAT changes.
-
-taken from F-11 kernel.
-
-Signed-off-by: Dave Airlie <airlied at redhat.com>
-Cc: Venkatesh Pallipadi <venkatesh.pallipadi at intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
-
----
- drivers/gpu/drm/r128/r128_cce.c |    6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/drivers/gpu/drm/r128/r128_cce.c
-+++ b/drivers/gpu/drm/r128/r128_cce.c
-@@ -511,9 +511,9 @@ static int r128_do_init_cce(struct drm_d
- 
- #if __OS_HAS_AGP
- 	if (!dev_priv->is_pci) {
--		drm_core_ioremap(dev_priv->cce_ring, dev);
--		drm_core_ioremap(dev_priv->ring_rptr, dev);
--		drm_core_ioremap(dev->agp_buffer_map, dev);
-+		drm_core_ioremap_wc(dev_priv->cce_ring, dev);
-+		drm_core_ioremap_wc(dev_priv->ring_rptr, dev);
-+		drm_core_ioremap_wc(dev->agp_buffer_map, dev);
- 		if (!dev_priv->cce_ring->handle ||
- 		    !dev_priv->ring_rptr->handle ||
- 		    !dev->agp_buffer_map->handle) {
+nil

linux-2.6-utrace.patch:
 Documentation/DocBook/Makefile    |    2 
 Documentation/DocBook/utrace.tmpl |  590 +++++++++
 fs/proc/array.c                   |    3 
 include/linux/init_task.h         |    1 
 include/linux/sched.h             |    6 
 include/linux/tracehook.h         |   61 
 include/linux/utrace.h            |  692 +++++++++++
 include/linux/utrace_struct.h     |   58 
 init/Kconfig                      |    9 
 kernel/Makefile                   |    1 
 kernel/ptrace.c                   |   18 
 kernel/utrace.c                   | 2357 ++++++++++++++++++++++++++++++++++++++
 12 files changed, 3795 insertions(+), 3 deletions(-)

Index: linux-2.6-utrace.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/linux-2.6-utrace.patch,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -p -r1.111 -r1.112
--- linux-2.6-utrace.patch	2 Jun 2009 20:44:55 -0000	1.111
+++ linux-2.6-utrace.patch	25 Jul 2009 04:09:27 -0000	1.112
@@ -40,7 +40,7 @@ Signed-off-by: Roland McGrath <roland at re
  12 files changed, 3795 insertions(+), 3 deletions(-)
 
 diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
-index 1462ed8..f5da1b4 100644  
+index b1eb661..02851f6 100644  
 --- a/Documentation/DocBook/Makefile
 +++ b/Documentation/DocBook/Makefile
 @@ -9,7 +9,7 @@
@@ -51,7 +51,7 @@ index 1462ed8..f5da1b4 100644  
 +	    kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml utrace.xml \
  	    gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
  	    genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
- 	    mac80211.xml debugobjects.xml sh.xml regulator.xml
+ 	    mac80211.xml debugobjects.xml sh.xml regulator.xml \
 diff --git a/Documentation/DocBook/utrace.tmpl b/Documentation/DocBook/utrace.tmpl
 new file mode 100644
 index ...6cc58a1 100644  
@@ -670,10 +670,10 @@ index 725a650..e299a63 100644  
  	if (p->files)
  		fdt = files_fdtable(p->files);
 diff --git a/include/linux/init_task.h b/include/linux/init_task.h
-index e752d97..39eebc8 100644  
+index d87247d..0d0b55d 100644  
 --- a/include/linux/init_task.h
 +++ b/include/linux/init_task.h
-@@ -181,6 +181,7 @@ extern struct cred init_cred;
+@@ -170,6 +170,7 @@ extern struct cred init_cred;
  		[PIDTYPE_SID]  = INIT_PID_LINK(PIDTYPE_SID),		\
  	},								\
  	.dirties = INIT_PROP_LOCAL_SINGLE(dirties),			\
@@ -682,7 +682,7 @@ index e752d97..39eebc8 100644  
  	INIT_TRACE_IRQFLAGS						\
  	INIT_LOCKDEP							\
 diff --git a/include/linux/sched.h b/include/linux/sched.h
-index f8af167..454de2a 100644  
+index b4c38bc..30db106 100644  
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
 @@ -59,6 +59,7 @@ struct sched_param {
@@ -693,7 +693,7 @@ index f8af167..454de2a 100644  
  
  #include <asm/system.h>
  #include <asm/page.h>
-@@ -1288,6 +1289,11 @@ struct task_struct {
+@@ -1291,6 +1292,11 @@ struct task_struct {
  #endif
  	seccomp_t seccomp;
  
@@ -706,7 +706,7 @@ index f8af167..454de2a 100644  
     	u32 parent_exec_id;
     	u32 self_exec_id;
 diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
-index b622498..8def62a 100644  
+index 4ec4821..a7de30f 100644  
 --- a/include/linux/tracehook.h
 +++ b/include/linux/tracehook.h
 @@ -49,6 +49,7 @@
@@ -777,9 +777,9 @@ index b622498..8def62a 100644  
  {
 +	if (unlikely(task_utrace_flags(current) & UTRACE_EVENT(CLONE)))
 +		utrace_report_clone(clone_flags, child);
- 	if (unlikely(trace) || unlikely(clone_flags & CLONE_PTRACE)) {
+ 	if (unlikely(task_ptrace(child))) {
  		/*
- 		 * The child starts up with an immediate SIGSTOP.
+ 		 * It doesn't matter who attached/attaching to this
 @@ -311,6 +326,9 @@ static inline void tracehook_report_clon
  						   pid_t pid,
  						   struct task_struct *child)
@@ -815,18 +815,18 @@ index b622498..8def62a 100644  
  	if (stepping)
  		ptrace_notify(SIGTRAP);
  }
-@@ -400,6 +422,8 @@ static inline int tracehook_consider_ign
- 						    int sig,
- 						    void __user *handler)
+@@ -397,6 +419,8 @@ static inline void tracehook_signal_hand
+ static inline int tracehook_consider_ignored_signal(struct task_struct *task,
+ 						    int sig)
  {
 +	if (unlikely(task_utrace_flags(task) & UTRACE_EVENT(SIGNAL_IGN)))
 +		return 1;
  	return (task_ptrace(task) & PT_PTRACED) != 0;
  }
  
-@@ -421,6 +445,9 @@ static inline int tracehook_consider_fat
- 						  int sig,
- 						  void __user *handler)
+@@ -416,6 +440,9 @@ static inline int tracehook_consider_ign
+ static inline int tracehook_consider_fatal_signal(struct task_struct *task,
+ 						  int sig)
  {
 +	if (unlikely(task_utrace_flags(task) & (UTRACE_EVENT(SIGNAL_TERM) |
 +						UTRACE_EVENT(SIGNAL_CORE))))
@@ -834,7 +834,7 @@ index b622498..8def62a 100644  
  	return (task_ptrace(task) & PT_PTRACED) != 0;
  }
  
-@@ -435,6 +462,8 @@ static inline int tracehook_consider_fat
+@@ -430,6 +457,8 @@ static inline int tracehook_consider_fat
   */
  static inline int tracehook_force_sigpending(void)
  {
@@ -843,7 +843,7 @@ index b622498..8def62a 100644  
  	return 0;
  }
  
-@@ -464,6 +493,8 @@ static inline int tracehook_get_signal(s
+@@ -459,6 +488,8 @@ static inline int tracehook_get_signal(s
  				       siginfo_t *info,
  				       struct k_sigaction *return_ka)
  {
@@ -852,7 +852,7 @@ index b622498..8def62a 100644  
  	return 0;
  }
  
-@@ -491,6 +522,8 @@ static inline int tracehook_get_signal(s
+@@ -486,6 +517,8 @@ static inline int tracehook_get_signal(s
   */
  static inline int tracehook_notify_jctl(int notify, int why)
  {
@@ -861,16 +861,16 @@ index b622498..8def62a 100644  
  	return notify ?: (current->ptrace & PT_PTRACED) ? why : 0;
  }
  
-@@ -514,6 +547,8 @@ static inline int tracehook_notify_jctl(
+@@ -509,6 +542,8 @@ static inline int tracehook_notify_jctl(
  static inline int tracehook_notify_death(struct task_struct *task,
  					 void **death_cookie, int group_dead)
  {
 +	*death_cookie = task_utrace_struct(task);
 +
- 	if (task->exit_signal == -1)
+ 	if (task_detached(task))
  		return task->ptrace ? SIGCHLD : DEATH_REAP;
  
-@@ -550,6 +585,20 @@ static inline void tracehook_report_deat
+@@ -545,6 +580,20 @@ static inline void tracehook_report_deat
  					  int signal, void *death_cookie,
  					  int group_dead)
  {
@@ -891,7 +891,7 @@ index b622498..8def62a 100644  
  }
  
  #ifdef TIF_NOTIFY_RESUME
-@@ -579,10 +628,20 @@ static inline void set_notify_resume(str
+@@ -574,10 +623,20 @@ static inline void set_notify_resume(str
   * asynchronously, this will be called again before we return to
   * user mode.
   *
@@ -1676,10 +1676,10 @@ index ...aba7e09 100644  
 +
 +#endif	/* linux/utrace_struct.h */
 diff --git a/init/Kconfig b/init/Kconfig
-index 6a5c5fe..4b5ab3e 100644  
+index 7be4d38..a6987df 100644  
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -1060,6 +1060,15 @@ config STOP_MACHINE
+@@ -1149,6 +1149,15 @@ config STOP_MACHINE
  	help
  	  Need stop_machine() primitive.
  
@@ -1696,7 +1696,7 @@ index 6a5c5fe..4b5ab3e 100644  
  
  config PREEMPT_NOTIFIERS
 diff --git a/kernel/Makefile b/kernel/Makefile
-index e4791b3..7bff724 100644  
+index 4242366..a79634e 100644  
 --- a/kernel/Makefile
 +++ b/kernel/Makefile
 @@ -68,6 +68,7 @@ obj-$(CONFIG_IKCONFIG) += configs.o
@@ -1708,7 +1708,7 @@ index e4791b3..7bff724 100644  
  obj-$(CONFIG_AUDITSYSCALL) += auditsc.o
  obj-$(CONFIG_AUDIT_TREE) += audit_tree.o
 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index dc3b98e..f897ef6 100644  
+index 0692ab5..1d33e9c 100644  
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
 @@ -16,6 +16,7 @@
@@ -1719,8 +1719,8 @@ index dc3b98e..f897ef6 100644  
  #include <linux/security.h>
  #include <linux/signal.h>
  #include <linux/audit.h>
-@@ -172,6 +173,14 @@ bool ptrace_may_access(struct task_struc
- 	return (!err ? true : false);
+@@ -174,6 +175,14 @@ bool ptrace_may_access(struct task_struc
+ 	return !err;
  }
  
 +/*
@@ -1734,7 +1734,7 @@ index dc3b98e..f897ef6 100644  
  int ptrace_attach(struct task_struct *task)
  {
  	int retval;
-@@ -210,6 +219,11 @@ repeat:
+@@ -212,6 +221,11 @@ repeat:
  		goto repeat;
  	}
  
@@ -1746,7 +1746,7 @@ index dc3b98e..f897ef6 100644  
  	if (!task->mm)
  		goto bad;
  	/* the same process cannot be attached many times */
-@@ -515,7 +529,9 @@ int ptrace_traceme(void)
+@@ -588,7 +602,9 @@ int ptrace_traceme(void)
  	 */
  repeat:
  	task_lock(current);

linux-2.6-v4l-dvb-fixes.patch:
 b/Documentation/dvb/get_dvb_firmware                 |   85 
 b/Documentation/feature-removal-schedule.txt         |    8 
 b/Documentation/ioctl/ioctl-number.txt               |    2 
 b/Documentation/video4linux/CARDLIST.bttv            |    6 
 b/Documentation/video4linux/CARDLIST.cx23885         |    4 
 b/Documentation/video4linux/CARDLIST.cx88            |    1 
 b/Documentation/video4linux/CARDLIST.em28xx          |    9 
 b/Documentation/video4linux/CARDLIST.saa7134         |    2 
 b/Documentation/video4linux/Zoran                    |    3 
 b/Documentation/video4linux/bttv/Insmod-options      |   10 
 b/Documentation/video4linux/bttv/README              |    4 
 b/Documentation/video4linux/cx2341x/README.hm12      |    4 
 b/Documentation/video4linux/gspca.txt                |    4 
 b/Documentation/video4linux/si470x.txt               |   11 
 b/Documentation/video4linux/v4l2-framework.txt       |  187 
 b/Documentation/video4linux/v4lgrab.c                |    4 
 b/Documentation/video4linux/zr364xx.txt              |    1 
 b/MAINTAINERS                                        |    2 
 b/arch/arm/mach-pxa/pcm990-baseboard.c               |   53 
 b/arch/arm/plat-mxc/include/mach/mx3_camera.h        |   52 
 b/arch/sh/boards/board-ap325rxa.c                    |    3 
 b/arch/sh/boards/mach-migor/setup.c                  |    5 
 b/drivers/media/Kconfig                              |    2 
 b/drivers/media/common/ir-keymaps.c                  |  146 
 b/drivers/media/common/saa7146_core.c                |   15 
 b/drivers/media/common/saa7146_fops.c                |   48 
 b/drivers/media/common/saa7146_i2c.c                 |   29 
 b/drivers/media/common/saa7146_video.c               | 1268 ++---
 b/drivers/media/common/tuners/Kconfig                |   64 
 b/drivers/media/common/tuners/Makefile               |    1 
 b/drivers/media/common/tuners/mc44s803.c             |  371 +
 b/drivers/media/common/tuners/mc44s803.h             |   46 
 b/drivers/media/common/tuners/mc44s803_priv.h        |  208 
 b/drivers/media/common/tuners/mt2060.c               |    2 
 b/drivers/media/common/tuners/mt20xx.c               |    2 
 b/drivers/media/common/tuners/mxl5005s.c             |    7 
 b/drivers/media/common/tuners/mxl5007t.c             |  428 -
 b/drivers/media/common/tuners/tda18271-common.c      |    6 
 b/drivers/media/common/tuners/tda18271-fe.c          |   37 
 b/drivers/media/common/tuners/tda18271-priv.h        |    6 
 b/drivers/media/common/tuners/tda18271.h             |   10 
 b/drivers/media/common/tuners/tda827x.c              |  237 -
 b/drivers/media/common/tuners/tda8290.c              |    9 
 b/drivers/media/common/tuners/tea5761.c              |    2 
 b/drivers/media/common/tuners/tea5767.c              |    2 
 b/drivers/media/common/tuners/xc5000.c               |   14 
 b/drivers/media/dvb/b2c2/Kconfig                     |    2 
 b/drivers/media/dvb/b2c2/Makefile                    |    1 
 b/drivers/media/dvb/b2c2/flexcop-common.h            |   64 
 b/drivers/media/dvb/b2c2/flexcop-dma.c               |   27 
 b/drivers/media/dvb/b2c2/flexcop-eeprom.c            |   47 
 b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c          |    6 
 b/drivers/media/dvb/b2c2/flexcop-hw-filter.c         |  171 
 b/drivers/media/dvb/b2c2/flexcop-i2c.c               |   61 
 b/drivers/media/dvb/b2c2/flexcop-misc.c              |   68 
 b/drivers/media/dvb/b2c2/flexcop-pci.c               |  165 
 b/drivers/media/dvb/b2c2/flexcop-reg.h               |   21 
 b/drivers/media/dvb/b2c2/flexcop-sram.c              |  112 
 b/drivers/media/dvb/b2c2/flexcop-usb.c               |  368 -
 b/drivers/media/dvb/b2c2/flexcop-usb.h               |   62 
 b/drivers/media/dvb/b2c2/flexcop.c                   |   86 
 b/drivers/media/dvb/b2c2/flexcop.h                   |   20 
 b/drivers/media/dvb/b2c2/flexcop_ibi_value_be.h      |    7 
 b/drivers/media/dvb/b2c2/flexcop_ibi_value_le.h      |    7 
 b/drivers/media/dvb/bt8xx/Kconfig                    |    2 
 b/drivers/media/dvb/bt8xx/dst_ca.c                   |   14 
 b/drivers/media/dvb/bt8xx/dvb-bt8xx.c                |    2 
 b/drivers/media/dvb/dm1105/Kconfig                   |    1 
 b/drivers/media/dvb/dm1105/dm1105.c                  |  204 
 b/drivers/media/dvb/dvb-core/dmxdev.c                |    2 
 b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c        |    2 
 b/drivers/media/dvb/dvb-core/dvb_frontend.c          |    2 
 b/drivers/media/dvb/dvb-core/dvb_net.c               |    2 
 b/drivers/media/dvb/dvb-core/dvbdev.c                |    4 
 b/drivers/media/dvb/dvb-core/dvbdev.h                |    2 
 b/drivers/media/dvb/dvb-usb/Kconfig                  |   67 
 b/drivers/media/dvb/dvb-usb/Makefile                 |    2 
 b/drivers/media/dvb/dvb-usb/af9015.c                 |   60 
 b/drivers/media/dvb/dvb-usb/af9015.h                 |   31 
 b/drivers/media/dvb/dvb-usb/ce6230.c                 |  328 +
 b/drivers/media/dvb/dvb-usb/ce6230.h                 |   69 
 b/drivers/media/dvb/dvb-usb/dib0700_core.c           |   10 
 b/drivers/media/dvb/dvb-usb/dib0700_devices.c        |  164 
 b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h            |   11 
 b/drivers/media/dvb/dvb-usb/dvb-usb.h                |    2 
 b/drivers/media/dvb/firewire/firedtv-avc.c           |    2 
 b/drivers/media/dvb/frontends/Kconfig                |   69 
 b/drivers/media/dvb/frontends/Makefile               |    6 
 b/drivers/media/dvb/frontends/au8522.h               |   16 
 b/drivers/media/dvb/frontends/au8522_decoder.c       |  835 +++
 b/drivers/media/dvb/frontends/au8522_dig.c           |  902 +++
 b/drivers/media/dvb/frontends/au8522_priv.h          |  412 +
 b/drivers/media/dvb/frontends/cx24113.c              |    2 
 b/drivers/media/dvb/frontends/cx24116.c              |   63 
 b/drivers/media/dvb/frontends/cx24123.c              |    4 
 b/drivers/media/dvb/frontends/dib0070.h              |    2 
 b/drivers/media/dvb/frontends/dib3000mc.h            |   36 
 b/drivers/media/dvb/frontends/dib7000m.h             |   28 
 b/drivers/media/dvb/frontends/dib7000p.h             |   35 
 b/drivers/media/dvb/frontends/dvb_dummy_fe.h         |   19 
 b/drivers/media/dvb/frontends/itd1000_priv.h         |    2 
 b/drivers/media/dvb/frontends/lgdt3304.c             |    1 
 b/drivers/media/dvb/frontends/lgdt3305.c             | 1087 ++++
 b/drivers/media/dvb/frontends/lgdt3305.h             |   85 
 b/drivers/media/dvb/frontends/lnbh24.h               |   55 
 b/drivers/media/dvb/frontends/lnbp21.c               |   41 
 b/drivers/media/dvb/frontends/lnbp21.h               |   34 
 b/drivers/media/dvb/frontends/s921_module.c          |    1 
 b/drivers/media/dvb/frontends/stb6100_cfg.h          |    4 
 b/drivers/media/dvb/frontends/stv0900.h              |   62 
 b/drivers/media/dvb/frontends/stv0900_core.c         | 1949 ++++++++
 b/drivers/media/dvb/frontends/stv0900_init.h         |  441 +
 b/drivers/media/dvb/frontends/stv0900_priv.h         |  430 +
 b/drivers/media/dvb/frontends/stv0900_reg.h          | 3787 ++++++++++++++++
 b/drivers/media/dvb/frontends/stv0900_sw.c           | 2847 ++++++++++++
 b/drivers/media/dvb/frontends/stv6110.c              |  456 +
 b/drivers/media/dvb/frontends/stv6110.h              |   62 
 b/drivers/media/dvb/frontends/tda1004x.c             |   30 
 b/drivers/media/dvb/frontends/zl10036.c              |  519 ++
 b/drivers/media/dvb/frontends/zl10036.h              |   53 
 b/drivers/media/dvb/frontends/zl10353.c              |    8 
 b/drivers/media/dvb/frontends/zl10353.h              |    4 
 b/drivers/media/dvb/frontends/zl10353_priv.h         |    8 
 b/drivers/media/dvb/pluto2/pluto2.c                  |    7 
 b/drivers/media/dvb/siano/Makefile                   |    4 
 b/drivers/media/dvb/siano/sms-cards.c                |   92 
 b/drivers/media/dvb/siano/sms-cards.h                |    5 
 b/drivers/media/dvb/siano/smscoreapi.c               |   45 
 b/drivers/media/dvb/siano/smscoreapi.h               |   41 
 b/drivers/media/dvb/siano/smsdvb.c                   |   60 
 b/drivers/media/dvb/siano/smsusb.c                   |   73 
 b/drivers/media/dvb/ttpci/Kconfig                    |    2 
 b/drivers/media/dvb/ttpci/av7110.c                   |    2 
 b/drivers/media/dvb/ttpci/av7110_av.c                |    4 
 b/drivers/media/dvb/ttpci/av7110_ca.c                |    2 
 b/drivers/media/dvb/ttpci/av7110_v4l.c               |  480 +-
 b/drivers/media/dvb/ttpci/budget-av.c                |   88 
 b/drivers/media/dvb/ttpci/budget-ci.c                |    6 
 b/drivers/media/radio/dsbr100.c                      |   10 
 b/drivers/media/radio/radio-aimslab.c                |  347 -
 b/drivers/media/radio/radio-aztech.c                 |  378 -
 b/drivers/media/radio/radio-cadet.c                  |  595 +-
 b/drivers/media/radio/radio-gemtek-pci.c             |  329 -
 b/drivers/media/radio/radio-gemtek.c                 |  396 -
 b/drivers/media/radio/radio-maestro.c                |  337 -
 b/drivers/media/radio/radio-maxiradio.c              |  374 -
 b/drivers/media/radio/radio-mr800.c                  |  221 
 b/drivers/media/radio/radio-rtrack2.c                |  276 -
 b/drivers/media/radio/radio-sf16fmi.c                |  283 -
 b/drivers/media/radio/radio-sf16fmr2.c               |  371 -
 b/drivers/media/radio/radio-si470x.c                 |  200 
 b/drivers/media/radio/radio-tea5764.c                |    3 
 b/drivers/media/radio/radio-terratec.c               |  310 -
 b/drivers/media/radio/radio-trust.c                  |  343 -
 b/drivers/media/radio/radio-typhoon.c                |  349 -
 b/drivers/media/radio/radio-zoltrix.c                |  378 -
 b/drivers/media/video/Kconfig                        |   94 
 b/drivers/media/video/Makefile                       |   10 
 b/drivers/media/video/adv7170.c                      |  354 -
 b/drivers/media/video/adv7175.c                      |  329 -
 b/drivers/media/video/au0828/Kconfig                 |   10 
 b/drivers/media/video/au0828/Makefile                |    2 
 b/drivers/media/video/au0828/au0828-cards.c          |  127 
 b/drivers/media/video/au0828/au0828-core.c           |   34 
 b/drivers/media/video/au0828/au0828-dvb.c            |    2 
 b/drivers/media/video/au0828/au0828-i2c.c            |   72 
 b/drivers/media/video/au0828/au0828-reg.h            |    6 
 b/drivers/media/video/au0828/au0828-video.c          | 1712 +++++++
 b/drivers/media/video/au0828/au0828.h                |  181 
 b/drivers/media/video/bt819.c                        |  493 +-
 b/drivers/media/video/bt856.c                        |  291 -
 b/drivers/media/video/bt866.c                        |  282 -
 b/drivers/media/video/bt8xx/Kconfig                  |    2 
 b/drivers/media/video/bt8xx/bttv-cards.c             | 1672 +++----
 b/drivers/media/video/bt8xx/bttv-driver.c            |  197 
 b/drivers/media/video/bt8xx/bttv-i2c.c               |   61 
 b/drivers/media/video/bt8xx/bttv-if.c                |   18 
 b/drivers/media/video/bt8xx/bttv-risc.c              |    4 
 b/drivers/media/video/bt8xx/bttv-vbi.c               |    2 
 b/drivers/media/video/bt8xx/bttv.h                   |   96 
 b/drivers/media/video/bt8xx/bttvp.h                  |   30 
 b/drivers/media/video/cafe_ccic.c                    |  432 -
 b/drivers/media/video/cpia2/cpia2_v4l.c              |    1 
 b/drivers/media/video/cs5345.c                       |    7 
 b/drivers/media/video/cs53l32a.c                     |   12 
 b/drivers/media/video/cx18/Kconfig                   |    2 
 b/drivers/media/video/cx18/cx18-audio.c              |   52 
 b/drivers/media/video/cx18/cx18-audio.h              |    2 
 b/drivers/media/video/cx18/cx18-av-audio.c           |  120 
 b/drivers/media/video/cx18/cx18-av-core.c            |  796 ++-
 b/drivers/media/video/cx18/cx18-av-core.h            |   49 
 b/drivers/media/video/cx18/cx18-av-firmware.c        |   16 
 b/drivers/media/video/cx18/cx18-av-vbi.c             |  367 -
 b/drivers/media/video/cx18/cx18-cards.c              |   50 
 b/drivers/media/video/cx18/cx18-cards.h              |   18 
 b/drivers/media/video/cx18/cx18-controls.c           |   70 
 b/drivers/media/video/cx18/cx18-driver.c             |  416 -
 b/drivers/media/video/cx18/cx18-driver.h             |  258 -
 b/drivers/media/video/cx18/cx18-dvb.c                |    2 
 b/drivers/media/video/cx18/cx18-fileops.c            |  107 
 b/drivers/media/video/cx18/cx18-firmware.c           |   22 
 b/drivers/media/video/cx18/cx18-gpio.c               |  319 -
 b/drivers/media/video/cx18/cx18-gpio.h               |   10 
 b/drivers/media/video/cx18/cx18-i2c.c                |  296 -
 b/drivers/media/video/cx18/cx18-i2c.h                |    5 
 b/drivers/media/video/cx18/cx18-ioctl.c              |  273 -
 b/drivers/media/video/cx18/cx18-mailbox.c            |   44 
 b/drivers/media/video/cx18/cx18-queue.c              |    4 
 b/drivers/media/video/cx18/cx18-queue.h              |    4 
 b/drivers/media/video/cx18/cx18-streams.c            |  210 
 b/drivers/media/video/cx18/cx18-vbi.c                |  155 
 b/drivers/media/video/cx18/cx18-vbi.h                |    2 
 b/drivers/media/video/cx18/cx18-version.h            |    4 
 b/drivers/media/video/cx18/cx18-video.c              |    3 
 b/drivers/media/video/cx18/cx23418.h                 |   16 
 b/drivers/media/video/cx2341x.c                      |  196 
 b/drivers/media/video/cx23885/Kconfig                |   15 
 b/drivers/media/video/cx23885/Makefile               |    4 
 b/drivers/media/video/cx23885/cimax2.c               |  472 ++
 b/drivers/media/video/cx23885/cimax2.h               |   47 
 b/drivers/media/video/cx23885/cx23885-417.c          |   49 
 b/drivers/media/video/cx23885/cx23885-cards.c        |   94 
 b/drivers/media/video/cx23885/cx23885-core.c         |   43 
 b/drivers/media/video/cx23885/cx23885-dvb.c          |  166 
 b/drivers/media/video/cx23885/cx23885-i2c.c          |   68 
 b/drivers/media/video/cx23885/cx23885-reg.h          |    2 
 b/drivers/media/video/cx23885/cx23885-video.c        |   51 
 b/drivers/media/video/cx23885/cx23885.h              |   20 
 b/drivers/media/video/cx23885/netup-eeprom.c         |  107 
 b/drivers/media/video/cx23885/netup-eeprom.h         |   42 
 b/drivers/media/video/cx23885/netup-init.c           |  125 
 b/drivers/media/video/cx23885/netup-init.h           |   25 
 b/drivers/media/video/cx25840/cx25840-audio.c        |  121 
 b/drivers/media/video/cx25840/cx25840-core.c         |   65 
 b/drivers/media/video/cx25840/cx25840-core.h         |    8 
 b/drivers/media/video/cx25840/cx25840-vbi.c          |  314 -
 b/drivers/media/video/cx88/Kconfig                   |    2 
 b/drivers/media/video/cx88/cx88-blackbird.c          |    8 
 b/drivers/media/video/cx88/cx88-cards.c              |   99 
 b/drivers/media/video/cx88/cx88-core.c               |   11 
 b/drivers/media/video/cx88/cx88-dvb.c                |   18 
 b/drivers/media/video/cx88/cx88-i2c.c                |   41 
 b/drivers/media/video/cx88/cx88-input.c              |   29 
 b/drivers/media/video/cx88/cx88-video.c              |   52 
 b/drivers/media/video/cx88/cx88.h                    |   24 
 b/drivers/media/video/dabusb.c                       |   83 
 b/drivers/media/video/em28xx/em28xx-audio.c          |   77 
 b/drivers/media/video/em28xx/em28xx-cards.c          |  195 
 b/drivers/media/video/em28xx/em28xx-core.c           |   41 
 b/drivers/media/video/em28xx/em28xx-dvb.c            |    3 
 b/drivers/media/video/em28xx/em28xx-i2c.c            |   12 
 b/drivers/media/video/em28xx/em28xx-input.c          |   22 
 b/drivers/media/video/em28xx/em28xx-video.c          |   61 
 b/drivers/media/video/em28xx/em28xx.h                |   24 
 b/drivers/media/video/gspca/Kconfig                  |   27 
 b/drivers/media/video/gspca/Makefile                 |  102 
 b/drivers/media/video/gspca/conex.c                  |   63 
 b/drivers/media/video/gspca/etoms.c                  |   36 
 b/drivers/media/video/gspca/finepix.c                |  433 -
 b/drivers/media/video/gspca/gspca.c                  |  166 
 b/drivers/media/video/gspca/gspca.h                  |   14 
 b/drivers/media/video/gspca/jpeg.h                   |  263 -
 b/drivers/media/video/gspca/m5602/m5602_core.c       |    7 
 b/drivers/media/video/gspca/mars.c                   |  506 +-
 b/drivers/media/video/gspca/mr97310a.c               |  362 +
 b/drivers/media/video/gspca/ov519.c                  |    7 
 b/drivers/media/video/gspca/ov534.c                  |  820 ++-
 b/drivers/media/video/gspca/pac207.c                 |    8 
 b/drivers/media/video/gspca/pac7311.c                |    7 
 b/drivers/media/video/gspca/sonixb.c                 |    7 
 b/drivers/media/video/gspca/sonixj.c                 |  951 +++-
 b/drivers/media/video/gspca/spca500.c                |   99 
 b/drivers/media/video/gspca/spca501.c                |   22 
 b/drivers/media/video/gspca/spca505.c                |  525 +-
 b/drivers/media/video/gspca/spca506.c                |   57 
 b/drivers/media/video/gspca/spca508.c                |  128 
 b/drivers/media/video/gspca/spca561.c                |  192 
 b/drivers/media/video/gspca/sq905.c                  |  456 +
 b/drivers/media/video/gspca/sq905c.c                 |  328 +
 b/drivers/media/video/gspca/stk014.c                 |   72 
 b/drivers/media/video/gspca/stv06xx/stv06xx.c        |    7 
 b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c   |   76 
 b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h   |   65 
 b/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c |  147 
 b/drivers/media/video/gspca/stv06xx/stv06xx_pb0100.h |  130 
 b/drivers/media/video/gspca/stv06xx/stv06xx_sensor.h |    8 
 b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c |  123 
 b/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h |   58 
 b/drivers/media/video/gspca/sunplus.c                |  124 
 b/drivers/media/video/gspca/t613.c                   |  564 +-
 b/drivers/media/video/gspca/tv8532.c                 |  483 --
 b/drivers/media/video/gspca/vc032x.c                 | 1591 +++++-
 b/drivers/media/video/gspca/zc3xx.c                  |  884 ++-
 b/drivers/media/video/hdpvr/Kconfig                  |   10 
 b/drivers/media/video/hdpvr/Makefile                 |    9 
 b/drivers/media/video/hdpvr/hdpvr-control.c          |  201 
 b/drivers/media/video/hdpvr/hdpvr-core.c             |  466 ++
 b/drivers/media/video/hdpvr/hdpvr-i2c.c              |  145 
 b/drivers/media/video/hdpvr/hdpvr-video.c            | 1248 +++++
 b/drivers/media/video/hdpvr/hdpvr.h                  |  303 +
 b/drivers/media/video/hexium_gemini.c                |  292 -
 b/drivers/media/video/hexium_orion.c                 |  103 
 b/drivers/media/video/indycam.c                      |  314 -
 b/drivers/media/video/indycam.h                      |   19 
 b/drivers/media/video/ir-kbd-i2c.c                   |   84 
 b/drivers/media/video/ivtv/ivtv-controls.c           |    1 
 b/drivers/media/video/ivtv/ivtv-driver.c             |   93 
 b/drivers/media/video/ivtv/ivtv-driver.h             |   26 
 b/drivers/media/video/ivtv/ivtv-fileops.c            |   10 
 b/drivers/media/video/ivtv/ivtv-firmware.c           |    2 
 b/drivers/media/video/ivtv/ivtv-gpio.c               |    4 
 b/drivers/media/video/ivtv/ivtv-i2c.c                |   14 
 b/drivers/media/video/ivtv/ivtv-ioctl.c              |   20 
 b/drivers/media/video/ivtv/ivtv-irq.c                |    4 
 b/drivers/media/video/ivtv/ivtv-queue.c              |    8 
 b/drivers/media/video/ivtv/ivtv-queue.h              |    8 
 b/drivers/media/video/ivtv/ivtv-streams.c            |   68 
 b/drivers/media/video/ivtv/ivtv-udma.c               |   10 
 b/drivers/media/video/ivtv/ivtv-udma.h               |    4 
 b/drivers/media/video/ivtv/ivtv-vbi.c                |    2 
 b/drivers/media/video/ivtv/ivtv-version.h            |    2 
 b/drivers/media/video/ivtv/ivtv-yuv.c                |    6 
 b/drivers/media/video/ivtv/ivtvfb.c                  |    6 
 b/drivers/media/video/ks0127.c                       |  677 +-
 b/drivers/media/video/ks0127.h                       |    2 
 b/drivers/media/video/m52790.c                       |    7 
 b/drivers/media/video/meye.c                         |   45 
 b/drivers/media/video/msp3400-driver.c               |  142 
 b/drivers/media/video/mt9m001.c                      |  164 
 b/drivers/media/video/mt9m111.c                      |   64 
 b/drivers/media/video/mt9t031.c                      |  179 
 b/drivers/media/video/mt9v022.c                      |  205 
 b/drivers/media/video/mx3_camera.c                   | 1220 +++++
 b/drivers/media/video/mxb.c                          |  828 +--
 b/drivers/media/video/omap24xxcam.c                  |    7 
 b/drivers/media/video/ov7670.c                       |  552 +-
 b/drivers/media/video/ov772x.c                       |  320 -
 b/drivers/media/video/ovcamchip/ovcamchip_core.c     |  197 
 b/drivers/media/video/ovcamchip/ovcamchip_priv.h     |    7 
 b/drivers/media/video/pvrusb2/Kconfig                |    8 
 b/drivers/media/video/pvrusb2/Makefile               |    7 
 b/drivers/media/video/pvrusb2/pvrusb2-audio.c        |  142 
 b/drivers/media/video/pvrusb2/pvrusb2-audio.h        |    6 
 b/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c     |   95 
 b/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.h     |   48 
 b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c  |  245 -
 b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h  |    4 
 b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c     |    5 
 b/drivers/media/video/pvrusb2/pvrusb2-debugifc.h     |   12 
 b/drivers/media/video/pvrusb2/pvrusb2-devattr.c      |  102 
 b/drivers/media/video/pvrusb2/pvrusb2-devattr.h      |   34 
 b/drivers/media/video/pvrusb2/pvrusb2-dvb.c          |    2 
 b/drivers/media/video/pvrusb2/pvrusb2-encoder.c      |    2 
 b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h |   50 
 b/drivers/media/video/pvrusb2/pvrusb2-hdw.c          |  648 ++
 b/drivers/media/video/pvrusb2/pvrusb2-hdw.h          |    6 
 b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c     |  417 -
 b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h     |   57 
 b/drivers/media/video/pvrusb2/pvrusb2-main.c         |    4 
 b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c        |   12 
 b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c         |   18 
 b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c    |  214 
 b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h    |    7 
 b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c       |  134 
 b/drivers/media/video/pvrusb2/pvrusb2-wm8775.h       |    4 
 b/drivers/media/video/pwc/Kconfig                    |   10 
 b/drivers/media/video/pwc/pwc-if.c                   |   79 
 b/drivers/media/video/pwc/pwc.h                      |    6 
 b/drivers/media/video/pxa_camera.c                   |   68 
 b/drivers/media/video/s2255drv.c                     |   41 
 b/drivers/media/video/saa5246a.c                     |   70 
 b/drivers/media/video/saa5249.c                      |   71 
 b/drivers/media/video/saa6588.c                      |  207 
 b/drivers/media/video/saa7110.c                      |  472 +-
 b/drivers/media/video/saa7115.c                      |   64 
 b/drivers/media/video/saa7127.c                      |    1 
 b/drivers/media/video/saa7134/Kconfig                |   13 
 b/drivers/media/video/saa7134/saa6752hs.c            |  581 +-
 b/drivers/media/video/saa7134/saa7134-cards.c        |  333 +
 b/drivers/media/video/saa7134/saa7134-core.c         |  108 
 b/drivers/media/video/saa7134/saa7134-dvb.c          |   75 
 b/drivers/media/video/saa7134/saa7134-empress.c      |   27 
 b/drivers/media/video/saa7134/saa7134-i2c.c          |   23 
 b/drivers/media/video/saa7134/saa7134-ts.c           |   15 
 b/drivers/media/video/saa7134/saa7134-video.c        |   75 
 b/drivers/media/video/saa7134/saa7134.h              |   40 
 b/drivers/media/video/saa7146.h                      |    2 
 b/drivers/media/video/saa717x.c                      |   10 
 b/drivers/media/video/saa7185.c                      |  239 -
 b/drivers/media/video/saa7191.c                      |  500 --
 b/drivers/media/video/saa7191.h                      |   26 
 b/drivers/media/video/sh_mobile_ceu_camera.c         |   82 
 b/drivers/media/video/sn9c102/sn9c102_devtable.h     |    4 
 b/drivers/media/video/soc_camera.c                   |  135 
 b/drivers/media/video/soc_camera_platform.c          |    9 
 b/drivers/media/video/stk-webcam.c                   |   24 
 b/drivers/media/video/tcm825x.c                      |   22 
 b/drivers/media/video/tcm825x.h                      |    2 
 b/drivers/media/video/tda7432.c                      |   22 
 b/drivers/media/video/tda9840.c                      |   82 
 b/drivers/media/video/tda9875.c                      |   19 
 b/drivers/media/video/tea6415c.c                     |   53 
 b/drivers/media/video/tea6415c.h                     |   12 
 b/drivers/media/video/tea6420.c                      |   69 
 b/drivers/media/video/tea6420.h                      |   27 
 b/drivers/media/video/tlv320aic23b.c                 |   12 
 b/drivers/media/video/tuner-core.c                   |  152 
 b/drivers/media/video/tvaudio.c                      |  173 
 b/drivers/media/video/tveeprom.c                     |    7 
 b/drivers/media/video/tvp514x.c                      |  113 
 b/drivers/media/video/tvp5150.c                      |   10 
 b/drivers/media/video/tw9910.c                       |   36 
 b/drivers/media/video/upd64031a.c                    |    7 
 b/drivers/media/video/upd64083.c                     |    7 
 b/drivers/media/video/usbvideo/vicam.c               |    2 
 b/drivers/media/video/usbvision/usbvision-core.c     |   49 
 b/drivers/media/video/usbvision/usbvision-i2c.c      |  153 
 b/drivers/media/video/usbvision/usbvision-video.c    |  125 
 b/drivers/media/video/usbvision/usbvision.h          |   10 
 b/drivers/media/video/uvc/uvc_ctrl.c                 |    2 
 b/drivers/media/video/uvc/uvc_driver.c               |   45 
 b/drivers/media/video/uvc/uvc_status.c               |   16 
 b/drivers/media/video/uvc/uvc_v4l2.c                 |   20 
 b/drivers/media/video/uvc/uvc_video.c                |  133 
 b/drivers/media/video/uvc/uvcvideo.h                 |    8 
 b/drivers/media/video/v4l2-common.c                  |  265 -
 b/drivers/media/video/v4l2-compat-ioctl32.c          |    1 
 b/drivers/media/video/v4l2-dev.c                     |   54 
 b/drivers/media/video/v4l2-device.c                  |   60 
 b/drivers/media/video/v4l2-ioctl.c                   |  192 
 b/drivers/media/video/v4l2-subdev.c                  |   18 
 b/drivers/media/video/videobuf-dma-contig.c          |    2 
 b/drivers/media/video/videobuf-vmalloc.c             |    2 
 b/drivers/media/video/vino.c                         | 1655 ++-----
 b/drivers/media/video/vivi.c                         |  495 +-
 b/drivers/media/video/vp27smpx.c                     |    7 
 b/drivers/media/video/vpx3220.c                      |  491 +-
 b/drivers/media/video/w9966.c                        |    2 
 b/drivers/media/video/w9968cf.c                      |  133 
 b/drivers/media/video/w9968cf.h                      |   24 
 b/drivers/media/video/wm8739.c                       |    7 
 b/drivers/media/video/wm8775.c                       |   12 
 b/drivers/media/video/zc0301/zc0301_sensor.h         |    8 
 b/drivers/media/video/zoran/Kconfig                  |    8 
 b/drivers/media/video/zoran/videocodec.h             |    9 
 b/drivers/media/video/zoran/zoran.h                  |   97 
 b/drivers/media/video/zoran/zoran_card.c             |  555 --
 b/drivers/media/video/zoran/zoran_card.h             |    3 
 b/drivers/media/video/zoran/zoran_device.c           |  529 --
 b/drivers/media/video/zoran/zoran_device.h           |   14 
 b/drivers/media/video/zoran/zoran_driver.c           | 4385 ++++++-------------
 b/drivers/media/video/zoran/zoran_procfs.c           |    2 
 b/drivers/media/video/zoran/zr36016.c                |    5 
 b/drivers/media/video/zoran/zr36050.c                |    4 
 b/drivers/media/video/zoran/zr36060.c                |    4 
 b/drivers/media/video/zr364xx.c                      |   17 
 b/include/linux/Kbuild                               |    2 
 b/include/linux/i2c-id.h                             |    2 
 b/include/linux/ivtv.h                               |   10 
 b/include/linux/videodev.h                           |   18 
 b/include/linux/videodev2.h                          |   69 
 b/include/media/bt819.h                              |   33 
 b/include/media/cx2341x.h                            |    6 
 b/include/media/cx25840.h                            |   12 
 b/include/media/ir-common.h                          |    3 
 b/include/media/ir-kbd-i2c.h                         |    3 
 b/include/media/ov772x.h                             |    5 
 b/include/media/saa7146.h                            |    8 
 b/include/media/saa7146_vv.h                         |   17 
 b/include/media/sh_mobile_ceu.h                      |    5 
 b/include/media/soc_camera.h                         |   24 
 b/include/media/v4l2-chip-ident.h                    |   94 
 b/include/media/v4l2-common.h                        |   24 
 b/include/media/v4l2-dev.h                           |    2 
 b/include/media/v4l2-device.h                        |   40 
 b/include/media/v4l2-ioctl.h                         |    2 
 b/include/media/v4l2-subdev.h                        |   22 
 b/include/media/videobuf-core.h                      |    1 
 b/include/sound/tea575x-tuner.h                      |    8 
 b/sound/i2c/other/tea575x-tuner.c                    |  302 -
 b/sound/pci/Kconfig                                  |    2 
 drivers/media/dvb/frontends/au8522.c                 |  874 ---
 drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c |  113 
 drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c   |  322 -
 drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h   |   50 
 drivers/media/video/pvrusb2/pvrusb2-tuner.c          |  120 
 drivers/media/video/pvrusb2/pvrusb2-tuner.h          |   37 
 drivers/media/video/saa7111.c                        |  492 --
 drivers/media/video/saa7114.c                        | 1068 ----
 drivers/media/video/tda9840.h                        |   14 
 include/linux/video_decoder.h                        |   48 
 include/linux/video_encoder.h                        |   23 
 492 files changed, 49377 insertions(+), 28220 deletions(-)

Index: linux-2.6-v4l-dvb-fixes.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/linux-2.6-v4l-dvb-fixes.patch,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- linux-2.6-v4l-dvb-fixes.patch	1 May 2009 20:40:05 -0000	1.15
+++ linux-2.6-v4l-dvb-fixes.patch	25 Jul 2009 04:09:28 -0000	1.16
@@ -315,6 +315,7 @@ Hans Verkuil (171):
       V4L/DVB (11051): v4l-dvb: replace remaining references to the old mailinglist.
       V4L/DVB (11052): bt819: remove an unused header
       V4L/DVB (11053): saa7134: set v4l2_dev field of video_device
+      V4L/DVB (11098): v4l2-common: remove incorrect MODULE test
       V4L/DVB (11100): au8522: fix compilation warning.
       V4L/DVB (11112): v4l2-subdev: add support for TRY_FMT, ENUM_FMT and G/S_PARM.
       V4L/DVB (11113): ov7670: convert to v4l2_subdev
@@ -56798,6 +56799,83 @@ index c0ff230..996b4ed 100644
  /*
   * Local variables:
   * c-basic-offset: 8
+diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
+index 8683d10..ec05312 100644
+--- a/drivers/media/video/cx88/cx88-input.c
++++ b/drivers/media/video/cx88/cx88-input.c
+@@ -48,8 +48,7 @@ struct cx88_IR {
+ 
+ 	/* poll external decoder */
+ 	int polling;
+-	struct work_struct work;
+-	struct timer_list timer;
++	struct delayed_work work;
+ 	u32 gpio_addr;
+ 	u32 last_gpio;
+ 	u32 mask_keycode;
+@@ -143,27 +142,19 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
+ 	}
+ }
+ 
+-static void ir_timer(unsigned long data)
+-{
+-	struct cx88_IR *ir = (struct cx88_IR *)data;
+-
+-	schedule_work(&ir->work);
+-}
+-
+ static void cx88_ir_work(struct work_struct *work)
+ {
+-	struct cx88_IR *ir = container_of(work, struct cx88_IR, work);
++	struct cx88_IR *ir = container_of(work, struct cx88_IR, work.work);
+ 
+ 	cx88_ir_handle_key(ir);
+-	mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling));
++	schedule_delayed_work(&ir->work, msecs_to_jiffies(ir->polling));
+ }
+ 
+ void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir)
+ {
+ 	if (ir->polling) {
+-		setup_timer(&ir->timer, ir_timer, (unsigned long)ir);
+-		INIT_WORK(&ir->work, cx88_ir_work);
+-		schedule_work(&ir->work);
++		INIT_DELAYED_WORK(&ir->work, cx88_ir_work);
++		schedule_delayed_work(&ir->work, 0);
+ 	}
+ 	if (ir->sampling) {
+ 		core->pci_irqmask |= PCI_INT_IR_SMPINT;
+@@ -179,10 +170,8 @@ void cx88_ir_stop(struct cx88_core *core, struct cx88_IR *ir)
+ 		core->pci_irqmask &= ~PCI_INT_IR_SMPINT;
+ 	}
+ 
+-	if (ir->polling) {
+-		del_timer_sync(&ir->timer);
+-		flush_scheduled_work();
+-	}
++	if (ir->polling)
++		cancel_delayed_work_sync(&ir->work);
+ }
+ 
+ /* ---------------------------------------------------------------------- */
+@@ -226,6 +215,8 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
+ 	case CX88_BOARD_HAUPPAUGE_HVR3000:
+ 	case CX88_BOARD_HAUPPAUGE_HVR4000:
+ 	case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
++	case CX88_BOARD_PCHDTV_HD3000:
++	case CX88_BOARD_PCHDTV_HD5500:
+ 		ir_codes = ir_codes_hauppauge_new;
+ 		ir_type = IR_TYPE_RC5;
+ 		ir->sampling = 1;
+@@ -466,6 +457,8 @@ void cx88_ir_irq(struct cx88_core *core)
+ 	case CX88_BOARD_HAUPPAUGE_HVR3000:
+ 	case CX88_BOARD_HAUPPAUGE_HVR4000:
+ 	case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
++	case CX88_BOARD_PCHDTV_HD3000:
++	case CX88_BOARD_PCHDTV_HD5500:
+ 		ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7);
+ 		ir_dprintk("biphase decoded: %x\n", ircode);
+ 		/*
 diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
 index 791e69d..434237a 100644
 --- a/drivers/media/video/cx88/cx88-video.c
@@ -98317,6 +98395,19 @@ index b8f2be8..1da8cb8 100644
     to high class IDs.
  
     This function returns the first ID that follows after the given ID.
+@@ -910,10 +797,10 @@ struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter,
+ 	struct i2c_board_info info;
+ 
+ 	BUG_ON(!dev);
+-#ifdef MODULE
++
+ 	if (module_name)
+ 		request_module(module_name);
+-#endif
++
+ 	/* Setup the i2c board info with the device type and
+ 	   the device address. */
+ 	memset(&info, 0, sizeof(info));
 @@ -927,11 +814,11 @@ struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter,
  	   We need better support from the kernel so that we
  	   can easily wait for the load to finish. */
@@ -98346,6 +98437,19 @@ index b8f2be8..1da8cb8 100644
  }
  EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev);
  
+@@ -958,10 +850,10 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter,
+ 	struct i2c_board_info info;
+ 
+ 	BUG_ON(!dev);
+-#ifdef MODULE
++
+ 	if (module_name)
+ 		request_module(module_name);
+-#endif
++
+ 	/* Setup the i2c board info with the device type and
+ 	   the device address. */
+ 	memset(&info, 0, sizeof(info));
 @@ -974,11 +866,11 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter,
  	   We need better support from the kernel so that we
  	   can easily wait for the load to finish. */

linux-2.6.29-lirc.patch:
 MAINTAINERS                           |    9 
 drivers/input/Kconfig                 |    2 
 drivers/input/Makefile                |    2 
 drivers/input/lirc/Kconfig            |  118 +
 drivers/input/lirc/Makefile           |   21 
 drivers/input/lirc/lirc.h             |  100 +
 drivers/input/lirc/lirc_bt829.c       |  383 ++++++
 drivers/input/lirc/lirc_dev.c         |  849 ++++++++++++++
 drivers/input/lirc/lirc_dev.h         |  184 +++
 drivers/input/lirc/lirc_i2c.c         |  649 ++++++++++
 drivers/input/lirc/lirc_igorplugusb.c |  556 +++++++++
 drivers/input/lirc/lirc_imon.c        | 2043 ++++++++++++++++++++++++++++++++++
 drivers/input/lirc/lirc_it87.c        |  986 ++++++++++++++++
 drivers/input/lirc/lirc_it87.h        |  116 +
 drivers/input/lirc/lirc_ite8709.c     |  539 ++++++++
 drivers/input/lirc/lirc_mceusb.c      |  749 ++++++++++++
 drivers/input/lirc/lirc_mceusb2.c     | 1103 ++++++++++++++++++
 drivers/input/lirc/lirc_parallel.c    |  709 +++++++++++
 drivers/input/lirc/lirc_parallel.h    |   26 
 drivers/input/lirc/lirc_sasem.c       |  931 +++++++++++++++
 drivers/input/lirc/lirc_serial.c      | 1316 +++++++++++++++++++++
 drivers/input/lirc/lirc_sir.c         | 1294 +++++++++++++++++++++
 drivers/input/lirc/lirc_streamzap.c   |  777 ++++++++++++
 drivers/input/lirc/lirc_ttusbir.c     |  397 ++++++
 drivers/input/lirc/lirc_zilog.c       | 1384 +++++++++++++++++++++++
 25 files changed, 15243 insertions(+)

Index: linux-2.6.29-lirc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/linux-2.6.29-lirc.patch,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- linux-2.6.29-lirc.patch	30 Jun 2009 04:59:08 -0000	1.10
+++ linux-2.6.29-lirc.patch	25 Jul 2009 04:09:30 -0000	1.11
@@ -2,8 +2,6 @@ Linux Infrared Remote Control drivers --
 
 From http://git.wilsonet.com/linux-2.6-lirc.git/
 
-Refreshed 20090630
-
 Signed-off-by: Jarod Wilson <jarod at redhat.com>
 
 ---
@@ -14,16 +12,16 @@ Signed-off-by: Jarod Wilson <jarod at redha
  drivers/input/lirc/Makefile           |   21 +
  drivers/input/lirc/lirc.h             |  100 ++
  drivers/input/lirc/lirc_bt829.c       |  383 ++++++
- drivers/input/lirc/lirc_dev.c         |  851 ++++++++++++++
+ drivers/input/lirc/lirc_dev.c         |  849 ++++++++++++++
  drivers/input/lirc/lirc_dev.h         |  184 +++
  drivers/input/lirc/lirc_i2c.c         |  649 +++++++++++
  drivers/input/lirc/lirc_igorplugusb.c |  556 +++++++++
- drivers/input/lirc/lirc_imon.c        | 2057 +++++++++++++++++++++++++++++++++
+ drivers/input/lirc/lirc_imon.c        | 2043 +++++++++++++++++++++++++++++++++
  drivers/input/lirc/lirc_it87.c        |  986 ++++++++++++++++
  drivers/input/lirc/lirc_it87.h        |  116 ++
  drivers/input/lirc/lirc_ite8709.c     |  539 +++++++++
  drivers/input/lirc/lirc_mceusb.c      |  749 ++++++++++++
- drivers/input/lirc/lirc_mceusb2.c     | 1105 ++++++++++++++++++
+ drivers/input/lirc/lirc_mceusb2.c     | 1103 ++++++++++++++++++
  drivers/input/lirc/lirc_parallel.c    |  709 ++++++++++++
  drivers/input/lirc/lirc_parallel.h    |   26 +
  drivers/input/lirc/lirc_sasem.c       |  931 +++++++++++++++
@@ -32,7 +30,7 @@ Signed-off-by: Jarod Wilson <jarod at redha
  drivers/input/lirc/lirc_streamzap.c   |  777 +++++++++++++
  drivers/input/lirc/lirc_ttusbir.c     |  397 +++++++
  drivers/input/lirc/lirc_zilog.c       | 1384 ++++++++++++++++++++++
- 25 files changed, 15261 insertions(+), 0 deletions(-)
+ 25 files changed, 15243 insertions(+), 0 deletions(-)
 
 diff --git a/MAINTAINERS b/MAINTAINERS
 index 59fd2d1..ad1b16c 100644
@@ -725,10 +723,10 @@ index 0000000..0485884
 +MODULE_PARM_DESC(debug, "Debug enabled or not");
 diff --git a/drivers/input/lirc/lirc_dev.c b/drivers/input/lirc/lirc_dev.c
 new file mode 100644
-index 0000000..a5d5c89
+index 0000000..8848d8e
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_dev.c
-@@ -0,0 +1,851 @@
+@@ -0,0 +1,849 @@
 +/*
 + * LIRC base driver
 + *
@@ -814,7 +812,6 @@ index 0000000..a5d5c89
 + */
 +static void init_irctl(struct irctl *ir)
 +{
-+	dprintk(LOGHEAD "initializing irctl\n", ir->d.name, ir->d.minor);
 +	mutex_init(&ir->buffer_lock);
 +	ir->d.minor = NOPLUG;
 +}
@@ -917,7 +914,7 @@ index 0000000..a5d5c89
 +		cdev_init(&ir->cdev, &fops);
 +		ir->cdev.owner = THIS_MODULE;
 +	}
-+	kobject_set_name(&ir->cdev.kobj, "lirc%d", d->minor);
++	kobject_set_name(&ir->cdev.kobj, "lircv%d", d->minor);
 +
 +	retval = cdev_add(&ir->cdev, MKDEV(MAJOR(lirc_base_dev), d->minor), 1);
 +	if (retval)
@@ -1038,8 +1035,7 @@ index 0000000..a5d5c89
 +	/* some safety check 8-) */
 +	d->name[sizeof(d->name)-1] = '\0';
 +
-+	bytes_in_key = BITS_TO_LONGS(d->code_length) +
-+			(d->code_length % 8 ? 1 : 0);
++	bytes_in_key = BITS_TO_LONGS(d->code_length);
 +	buffer_size = d->buffer_size ? d->buffer_size : BUFLEN / bytes_in_key;
 +	chunk_size  = d->chunk_size  ? d->chunk_size  : bytes_in_key;
 +
@@ -2989,10 +2985,10 @@ index 0000000..ff49bdd
 +
 diff --git a/drivers/input/lirc/lirc_imon.c b/drivers/input/lirc/lirc_imon.c
 new file mode 100644
-index 0000000..5375d6f
+index 0000000..bcd8d42
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_imon.c
-@@ -0,0 +1,2057 @@
+@@ -0,0 +1,2043 @@
 +/*
 + *   lirc_imon.c:  LIRC/VFD/LCD driver for SoundGraph iMON IR/VFD/LCD
 + *		   including the iMON PAD model
@@ -3357,12 +3353,6 @@ index 0000000..5375d6f
 +/* IR protocol: native iMON or Windows MCE (RC-6) */
 +static int ir_protocol;
 +
-+/*
-+ * In certain use cases, mouse mode isn't really helpful, and could actually
-+ * cause confusion, so allow disabling it when the IR device is open.
-+ */
-+static int nomouse;
-+
 +
 +/***  M O D U L E   C O D E ***/
 +
@@ -3379,9 +3369,6 @@ index 0000000..5375d6f
 +module_param(ir_protocol, int, S_IRUGO | S_IWUSR);
 +MODULE_PARM_DESC(ir_protocol, "Which IR protocol to use. 0=native iMON, "
 +		 "1=Windows Media Center Ed. (RC-6) (default: native iMON)");
-+module_param(nomouse, int, S_IRUGO | S_IWUSR);
-+MODULE_PARM_DESC(nomouse, "Disable mouse input device mode when IR device is "
-+		 "open. 0=don't disable, 1=disable. (default: don't disable)");
 +
 +static void free_imon_context(struct imon_context *context)
 +{
@@ -4111,14 +4098,9 @@ index 0000000..5375d6f
 +	/* keyboard/mouse mode toggle button */
 +	if (memcmp(buf, toggle_button1, 4) == 0 ||
 +	    memcmp(buf, toggle_button2, 4) == 0) {
-+		if (!nomouse) {
-+			context->pad_mouse = ~(context->pad_mouse) & 0x1;
-+			dprintk("toggling to %s mode\n",
-+				context->pad_mouse ? "mouse" : "keyboard");
-+		} else {
-+			context->pad_mouse = 0;
-+			dprintk("mouse mode was disabled by modparam\n");
-+		}
++		context->pad_mouse = ~(context->pad_mouse) & 0x1;
++		dprintk("toggling to %s mode\n",
++			context->pad_mouse ? "mouse" : "keyboard");
 +		return;
 +	}
 +
@@ -7466,10 +7448,10 @@ index 0000000..12d9723
 +MODULE_PARM_DESC(debug, "Debug enabled or not");
 diff --git a/drivers/input/lirc/lirc_mceusb2.c b/drivers/input/lirc/lirc_mceusb2.c
 new file mode 100644
-index 0000000..7c3d0b1
+index 0000000..36ef032
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_mceusb2.c
-@@ -0,0 +1,1105 @@
+@@ -0,0 +1,1103 @@
 +/*
 + * LIRC driver for Philips eHome USB Infrared Transceiver
 + * and the Microsoft Media Center Edition Remote Control
@@ -7652,10 +7634,8 @@ index 0000000..7c3d0b1
 +	{ USB_DEVICE(VENDOR_WISTRON, 0x0002) },
 +	/* Compro K100 */
 +	{ USB_DEVICE(VENDOR_COMPRO, 0x3020) },
-+	/* Compro K100 v2 */
-+	{ USB_DEVICE(VENDOR_COMPRO, 0x3082) },
 +	/* Northstar Systems, Inc. eHome Infrared Transceiver */
-+	{ USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) },
++	{ USB_DEVICE(VENDOR_NORTHSTAR, 0xe0004) },
 +	/* Terminating entry */
 +	{ }
 +};
@@ -10261,7 +10241,7 @@ index 0000000..270f8ff
 +module_exit(sasem_exit);
 diff --git a/drivers/input/lirc/lirc_serial.c b/drivers/input/lirc/lirc_serial.c
 new file mode 100644
-index 0000000..d602e90
+index 0000000..1b79ced
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_serial.c
 @@ -0,0 +1,1316 @@
@@ -11171,6 +11151,11 @@ index 0000000..d602e90
 +	int result;
 +	unsigned long flags;
 +
++	/* Init read buffer. */
++	result = lirc_buffer_init(&rbuf, sizeof(int), RBUF_LEN);
++	if (result < 0)
++		return -ENOMEM;
++
 +	/* initialize timestamp */
 +	do_gettimeofday(&lasttv);
 +
@@ -11181,10 +11166,12 @@ index 0000000..d602e90
 +	switch (result) {
 +	case -EBUSY:
 +		printk(KERN_ERR LIRC_DRIVER_NAME ": IRQ %d busy\n", irq);
++		lirc_buffer_free(&rbuf);
 +		return -EBUSY;
 +	case -EINVAL:
 +		printk(KERN_ERR LIRC_DRIVER_NAME
 +		       ": Bad irq number or handler\n");
++		lirc_buffer_free(&rbuf);
 +		return -EINVAL;
 +	default:
 +		dprintk("Interrupt %d, port %04x obtained\n", irq, io);
@@ -11219,6 +11206,7 @@ index 0000000..d602e90
 +	free_irq(irq, (void *)&hardware);
 +
 +	dprintk("freed IRQ %d\n", irq);
++	lirc_buffer_free(&rbuf);
 +}
 +
 +static ssize_t lirc_write(struct file *file, const char *buf,
@@ -11417,15 +11405,10 @@ index 0000000..d602e90
 +{
 +	int result;
 +
-+	/* Init read buffer. */
-+	result = lirc_buffer_init(&rbuf, sizeof(int), RBUF_LEN);
-+	if (result < 0)
-+		return -ENOMEM;
-+
 +	result = platform_driver_register(&lirc_serial_driver);
 +	if (result) {
 +		printk("lirc register returned %d\n", result);
-+		goto exit_buffer_free;
++		return result;
 +	}
 +
 +	lirc_serial_dev = platform_device_alloc("lirc_serial", 0);
@@ -11444,8 +11427,6 @@ index 0000000..d602e90
 +	platform_device_put(lirc_serial_dev);
 +exit_driver_unregister:
 +	platform_driver_unregister(&lirc_serial_driver);
-+exit_buffer_free:
-+	lirc_buffer_free(&rbuf);
 +	return result;
 +}
 +
@@ -11453,7 +11434,6 @@ index 0000000..d602e90
 +{
 +	platform_device_unregister(lirc_serial_dev);
 +	platform_driver_unregister(&lirc_serial_driver);
-+	lirc_buffer_free(&rbuf);
 +}
 +
 +static int __init lirc_serial_init_module(void)


--- alsa-dont-reset-stream-at-each-prepare-callb.patch DELETED ---


--- alsa-hda-add-debugging.patch DELETED ---


--- alsa-hda-dont-reset-BDL-unnecessarily.patch DELETED ---


--- alsa-hda_intel-fix-unexpected-ring-buffer-positio.patch DELETED ---


--- alsa-pcm-always-reset-invalid-position.patch DELETED ---


--- alsa-pcm-fix-delta-calc-at-overlap.patch DELETED ---


--- alsa-pcm-safer-boundary-checks.patch DELETED ---


--- alsa-rewrite-hw_ptr-updaters.patch DELETED ---


--- cpufreq-add-atom-to-p4-clockmod.patch DELETED ---


--- drm-connector-dpms-fix.patch DELETED ---


--- drm-copyback-ioctl-data-to-userspace-regardless-of-retcode.patch DELETED ---


--- drm-dont-frob-i2c.patch DELETED ---


--- drm-edid-ignore-tiny-modes.patch DELETED ---


--- drm-i915-apply-a-big-hammer-to-865-gem-object.patch DELETED ---


--- drm-i915-enable-mchbar.patch DELETED ---


--- drm-i915-fix-tiling-pitch.patch DELETED ---


--- drm-intel-a17-fix.patch DELETED ---


--- drm-intel-debugfs-ringbuffer.patch DELETED ---


--- drm-intel-disable-kms-i8xx.patch DELETED ---


--- drm-intel-gem-use-dma32-on-pae.patch DELETED ---


--- drm-intel-gen3-fb-hack.patch DELETED ---


--- drm-intel-hdmi-edid-fix.patch DELETED ---


--- drm-intel-i8xx-cursors.patch DELETED ---


--- drm-intel-include-965gme-pci-id.patch DELETED ---


--- drm-intel-lying-systems-without-lvds.patch DELETED ---


--- drm-intel-next.patch DELETED ---


--- drm-intel-set-domain-on-fault.patch DELETED ---


--- drm-intel-tiling-transition.patch DELETED ---


--- drm-intel-tv-fix.patch DELETED ---


--- drm-intel-vmalloc.patch DELETED ---


--- drm-modesetting-radeon-fixes.patch DELETED ---


--- drm-pnp-add-resource-range-checker.patch DELETED ---


--- drm-radeon-cs-oops-fix.patch DELETED ---


--- drm-radeon-fix-ring-commit.patch DELETED ---


--- drm-radeon-new-pciids.patch DELETED ---


--- git-bluetooth-fixes.patch DELETED ---


--- increase-MAX_LOCKDEP_ENTRIES.patch DELETED ---


--- iwl3945-add-debugging-for-wrong-command-queue.patch DELETED ---


--- iwl3945-fix-rfkill-sw-and-hw-mishmash.patch DELETED ---


--- iwl3945-release-resources-before-shutting-down.patch DELETED ---


--- linux-2.6-acpi-strict-resources.patch DELETED ---


--- linux-2.6-acpi-video-didl-intel-outputs.patch DELETED ---


--- linux-2.6-add-qcserial.patch DELETED ---


--- linux-2.6-btrfs-unstable-update.patch DELETED ---


--- linux-2.6-cdrom-door-status.patch DELETED ---


--- linux-2.6-defaults-saner-vm-settings.patch DELETED ---


--- linux-2.6-dev-zero-avoid-oom-lockup.patch DELETED ---


--- linux-2.6-dma-debug-fixes.patch DELETED ---


--- linux-2.6-drivers-char-low-latency-removal.patch DELETED ---


--- linux-2.6-dropwatch-protocol.patch DELETED ---


--- linux-2.6-e820-acpi3-bios-workaround.patch DELETED ---


--- linux-2.6-e820-guard-against-pre-acpi3.patch DELETED ---


--- linux-2.6-e820-save-restore-edi-ebp.patch DELETED ---


--- linux-2.6-fiemap-header-install.patch DELETED ---


--- linux-2.6-fs-cifs-fix-port-numbers.patch DELETED ---


--- linux-2.6-hid-apple-mini-keyboard.patch DELETED ---


--- linux-2.6-hwmon-atk0110.patch DELETED ---


--- linux-2.6-input-bcm5974-add-macbook-unibody.patch DELETED ---


--- linux-2.6-input-bcm5974-add-quad-finger.patch DELETED ---


--- linux-2.6-input-bcm5974-new-header-type.patch DELETED ---


--- linux-2.6-input-hid-extra-gamepad.patch DELETED ---


--- linux-2.6-input-wacom-bluetooth.patch DELETED ---


--- linux-2.6-iommu-fixes.patch DELETED ---


--- linux-2.6-ipw2x00-age-scan-results-on-resume.patch DELETED ---


--- linux-2.6-iwl3945-report-killswitch-changes-even-if-the-interface-is-down.patch DELETED ---


--- linux-2.6-iwl3945-use-cancel_delayed_work_sync-to-cancel-rfkill_poll.patch DELETED ---


--- linux-2.6-iwlagn-fix-hw-rfkill-while-the-interface-is-down.patch DELETED ---


--- linux-2.6-kvm-skip-pit-check.patch DELETED ---


--- linux-2.6-mac80211-fix-beacon-loss-detection-after-scan.patch DELETED ---


--- linux-2.6-mm-lru-dont-evict-mapped-executable-pages.patch DELETED ---


--- linux-2.6-mm-lru-evict-streaming-io-pages-first.patch DELETED ---


--- linux-2.6-mm-lru-report-vm-flags-in-page-referenced.patch DELETED ---


--- linux-2.6-netdev-ehea-fix-circular-locking.patch DELETED ---


--- linux-2.6-netdev-ehea-fix-page-alignment.patch DELETED ---


--- linux-2.6-netdev-ehea-remove-from-list.patch DELETED ---


--- linux-2.6-netdev-r8169-use-different-family-defaults.patch DELETED ---


--- linux-2.6-nfsd-cred-refcount-fix.patch DELETED ---


--- linux-2.6-nfsd-report-short-writes-fix.patch DELETED ---


--- linux-2.6-nfsd-report-short-writes.patch DELETED ---


--- linux-2.6-parport-quickfix-the-proc-registration-bug.patch DELETED ---


--- linux-2.6-pci-sysfs-remove-id.patch DELETED ---


--- linux-2.6-relatime-by-default.patch DELETED ---


--- linux-2.6-scsi-cpqarray-set-master.patch DELETED ---


--- linux-2.6-serial-add-txen-test-param.patch DELETED ---


--- linux-2.6-shut-up-efifb.patch DELETED ---


--- linux-2.6-sony-laptop-rfkill.patch DELETED ---


--- linux-2.6-usb-remove-low-latency-hack.patch DELETED ---


--- linux-2.6-utrace-ftrace.patch DELETED ---


--- linux-2.6-v4l-dvb-fix-uint16_t-audio-h.patch DELETED ---


--- linux-2.6-v4l-pvrusb2-fixes.patch DELETED ---


--- linux-2.6-virtio_blk-dont-bounce-highmem-requests.patch DELETED ---


--- linux-2.6-x86-delay-tsc-barrier.patch DELETED ---


--- linux-2.6-xen-check-for-nx-support.patch DELETED ---


--- linux-2.6-xen-fix_warning_when_deleting_gendisk.patch DELETED ---


--- linux-2.6.29-alsa-update-quirks.patch DELETED ---


--- linux-2.6.29-xen-disable-gbpages.patch DELETED ---


--- linux-2.6.29.3-boot-vga.patch DELETED ---


--- mac80211-don-t-drop-nullfunc-frames-during-software.patch DELETED ---


--- net-revert-forcedeth-power-down-phy-when-interface-is.patch DELETED ---


--- revert-fix-modules_install-via-nfs.patch DELETED ---


--- squashfs-broken-when-pagesize-greater-than-blocksize.patch DELETED ---


--- via-centaur-merge-32-64-bit-init.patch DELETED ---


--- via-padlock-cryptodev-1-64bit-enable.patch DELETED ---


--- via-padlock-cryptodev-2-64bit-enable.patch DELETED ---


--- via-padlock-fix-might-sleep.patch DELETED ---


--- via-padlock-nano-workarounds-cbc.patch DELETED ---


--- via-padlock-nano-workarounds-ecb.patch DELETED ---


--- via-rng-64-bit-enable.patch DELETED ---




More information about the fedora-extras-commits mailing list